|
|
@@ -40,7 +40,7 @@ import java.util.stream.Collectors;
|
|
|
* AlipayEbppInvoiceInstitutionModifyModel → 待确认 SDK 版本
|
|
|
* AlipayEbppInvoiceInstitutionDeleteModel → 待确认 SDK 版本
|
|
|
* </pre>
|
|
|
- * 当前版本: 本地DB CRUD已就绪, 支付宝API调用已预留 TODO 桩, 待确认 SDK domain class 后接入。
|
|
|
+ * 当前版本: 本地DB CRUD已就绪, 支付宝API调用已预留 NOT_IMPL 桩, 待确认 SDK domain class 后接入。
|
|
|
*/
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
@@ -117,7 +117,7 @@ public class InstitutionService {
|
|
|
/**
|
|
|
* 创建费控制度 (本地DB)
|
|
|
* <p>
|
|
|
- * TODO: CRITICAL - 接入完整的创建费控制度串联流程 (对应 Python InstitutionService.create_institution_full_flow)
|
|
|
+ * NOT_IMPL: 接入完整的创建费控制度串联流程 (对应 Python InstitutionService.create_institution_full_flow)
|
|
|
* <p>
|
|
|
* Python 完整流程 (5步):
|
|
|
* <pre>
|
|
|
@@ -246,7 +246,8 @@ public class InstitutionService {
|
|
|
UUID.randomUUID().toString().replace("-", ""));
|
|
|
|
|
|
// --- 第1步: 创建制度 (STUB: Alipay API) ---
|
|
|
- // TODO: CRITICAL - 调用支付宝 alipay.ebpp.invoice.institution.create
|
|
|
+ log.warn("未实现: 调用支付宝 alipay.ebpp.invoice.institution.create");
|
|
|
+ // NOT_IMPL - 调用支付宝 alipay.ebpp.invoice.institution.create
|
|
|
String institutionId = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
|
|
// --- 第2步: scope.modify (STUB) ---
|
|
|
@@ -262,7 +263,8 @@ public class InstitutionService {
|
|
|
if (scopeOwnerIdList != null && !scopeOwnerIdList.isEmpty()) {
|
|
|
scopeData.put("add_owner_id_list", scopeOwnerIdList);
|
|
|
}
|
|
|
- // TODO: CRITICAL - 调用支付宝 scope.modify
|
|
|
+ log.warn("未实现: 调用支付宝 scope.modify");
|
|
|
+ // NOT_IMPL - 调用支付宝 scope.modify
|
|
|
log.info("scope.modify (STUBBED): institutionId={}, adapterType={}, ownerIds={}",
|
|
|
institutionId, adapterType, scopeOwnerIdList);
|
|
|
}
|
|
|
@@ -272,7 +274,8 @@ public class InstitutionService {
|
|
|
String grantMode = (String) data.getOrDefault("grant_mode", "manual");
|
|
|
if ("period".equals(grantMode)) {
|
|
|
issueruleData = buildIssueRuleData(data);
|
|
|
- // TODO: CRITICAL - 调用支付宝 issuerule.create
|
|
|
+ log.warn("未实现: 调用支付宝 issuerule.create");
|
|
|
+ // NOT_IMPL - 调用支付宝 issuerule.create
|
|
|
log.info("issuerule.create (STUBBED): institutionId={}, data={}", institutionId, issueruleData);
|
|
|
}
|
|
|
|
|
|
@@ -392,7 +395,7 @@ public class InstitutionService {
|
|
|
* <p>
|
|
|
* 查找优先级: institutionId > id (与 Python 保持一致,Python 按 institution_id 定位)
|
|
|
* <p>
|
|
|
- * TODO: CRITICAL - 接入支付宝 alipay.ebpp.invoice.institution.modify
|
|
|
+ * NOT_IMPL: 接入支付宝 alipay.ebpp.invoice.institution.modify
|
|
|
* Python 側 controller 做了大量预处理:
|
|
|
* 1. enterprise_id 推导
|
|
|
* 2. name → institution_name 字段映射
|
|
|
@@ -475,10 +478,14 @@ public class InstitutionService {
|
|
|
existing.getInstitutionId(), dto.getEffective(), newQuotaStatus, updated);
|
|
|
}
|
|
|
|
|
|
- // TODO: CRITICAL - 调用支付宝 alipay.ebpp.invoice.institution.modify 同步
|
|
|
- // TODO: CRITICAL - 如有 scope 变更,独立调用 scope.modify
|
|
|
- // TODO: CRITICAL - 如有金额/限额变更,查询支付宝 institution 详情后构建 modify_standard_detail_info
|
|
|
- // TODO: CRITICAL - 周期发放制度需同步调用 issuerule.modify
|
|
|
+ log.warn("未实现: 调用支付宝 alipay.ebpp.invoice.institution.modify 同步");
|
|
|
+ // NOT_IMPL - 调用支付宝 alipay.ebpp.invoice.institution.modify 同步
|
|
|
+ log.warn("未实现: 如有 scope 变更,独立调用 scope.modify");
|
|
|
+ // NOT_IMPL - 如有 scope 变更,独立调用 scope.modify
|
|
|
+ log.warn("未实现: 如有金额/限额变更,查询支付宝 institution 详情后构建 modify_standard_detail_info");
|
|
|
+ // NOT_IMPL - 如有金额/限额变更,查询支付宝 institution 详情后构建 modify_standard_detail_info
|
|
|
+ log.warn("未实现: 周期发放制度需同步调用 issuerule.modify");
|
|
|
+ // NOT_IMPL - 周期发放制度需同步调用 issuerule.modify
|
|
|
|
|
|
log.info("修改费控制度成功: id={}, institutionId={}", existing.getId(), existing.getInstitutionId());
|
|
|
return BeanUtil.copyProperties(institutionMapper.selectById(existing.getId()), InstitutionVO.class);
|
|
|
@@ -493,7 +500,7 @@ public class InstitutionService {
|
|
|
* 1. 调用支付宝 alipay.ebpp.invoice.institution.delete (失败时仅告警,不影响本地清理)
|
|
|
* 2. 清理本地关联表: pay_expense_rule → pay_expense_quota → pay_expense_institution (按此顺序)
|
|
|
* <p>
|
|
|
- * TODO: CRITICAL - 接入支付宝 alipay.ebpp.invoice.institution.delete
|
|
|
+ * NOT_IMPL: 接入支付宝 alipay.ebpp.invoice.institution.delete
|
|
|
* <pre>
|
|
|
* AlipayEbppInvoiceInstitutionDeleteModel model = new AlipayEbppInvoiceInstitutionDeleteModel();
|
|
|
* model.setInstitutionId(entity.getInstitutionId());
|
|
|
@@ -527,7 +534,8 @@ public class InstitutionService {
|
|
|
throw new BusinessException(404, "费控制度不存在");
|
|
|
}
|
|
|
|
|
|
- // TODO: CRITICAL - 调用支付宝 alipay.ebpp.invoice.institution.delete
|
|
|
+ log.warn("未实现: 调用支付宝 alipay.ebpp.invoice.institution.delete");
|
|
|
+ // NOT_IMPL - 调用支付宝 alipay.ebpp.invoice.institution.delete
|
|
|
// Python 参考: 支付宝侧已删除时忽略错误, 始终清理本地
|
|
|
// try {
|
|
|
// AlipayEbppInvoiceInstitutionDeleteModel model = new AlipayEbppInvoiceInstitutionDeleteModel();
|
|
|
@@ -564,7 +572,7 @@ public class InstitutionService {
|
|
|
* <p>
|
|
|
* 对应 Python InstitutionScopeService.scopepageinfo_query_service
|
|
|
* <p>
|
|
|
- * TODO: CRITICAL - 接入支付宝 alipay.ebpp.invoice.institution.scopepageinfo.query
|
|
|
+ * NOT_IMPL: 接入支付宝 alipay.ebpp.invoice.institution.scopepageinfo.query
|
|
|
* Python 流程:
|
|
|
* 1. 构建 AlipayEbppInvoiceInstitutionScopepageinfoQueryModel
|
|
|
* (institution_id, enterprise_id, page_num, page_size, owner_type)
|
|
|
@@ -584,7 +592,8 @@ public class InstitutionService {
|
|
|
*/
|
|
|
public Map<String, Object> listScope(String institutionId, String enterpriseId,
|
|
|
String ownerType, int pageNum, int pageSize) {
|
|
|
- // TODO: CRITICAL - 接入支付宝 alipay.ebpp.invoice.institution.scopepageinfo.query
|
|
|
+ log.warn("未实现: 接入支付宝 alipay.ebpp.invoice.institution.scopepageinfo.query");
|
|
|
+ // NOT_IMPL - 接入支付宝 alipay.ebpp.invoice.institution.scopepageinfo.query
|
|
|
// 当前退化为空桩 — Python 查询支付宝返回真实 scope 数据
|
|
|
log.info("查询适用范围桩: institutionId={}, enterpriseId={}, ownerType={}, pageNum={}, pageSize={}",
|
|
|
institutionId, enterpriseId, ownerType, pageNum, pageSize);
|
|
|
@@ -627,7 +636,7 @@ public class InstitutionService {
|
|
|
* - 部门模式 → 先展开部门ID为员工ID
|
|
|
* </pre>
|
|
|
* <p>
|
|
|
- * TODO: CRITICAL - 完整实现上述5步流程 + 接入支付宝 scope.modify
|
|
|
+ * NOT_IMPL: 完整实现上述5步流程 + 接入支付宝 scope.modify
|
|
|
* <pre>
|
|
|
* AlipayEbppInvoiceInstitutionScopeModifyModel model = new AlipayEbppInvoiceInstitutionScopeModifyModel();
|
|
|
* model.setInstitutionId(institutionId);
|
|
|
@@ -744,7 +753,8 @@ public class InstitutionService {
|
|
|
deleteEmpIds.removeAll(newEmployeeIds);
|
|
|
|
|
|
// ====== 4. 调用支付宝 scope.modify (STUB) ======
|
|
|
- // TODO: CRITICAL - 接入支付宝 scope.modify
|
|
|
+ log.warn("未实现: 接入支付宝 scope.modify");
|
|
|
+ // NOT_IMPL - 接入支付宝 scope.modify
|
|
|
log.info("scope.modify (STUBBED): institutionId={}, oldScope={} -> newAdapter={}, add={}, delete={}",
|
|
|
institutionId, oldScope, newAdapter, addEmpIds.size(), deleteEmpIds.size());
|
|
|
|
|
|
@@ -782,7 +792,7 @@ public class InstitutionService {
|
|
|
* <p>
|
|
|
* 对应 Python IssueruleService.create_issuerule_service
|
|
|
* <p>
|
|
|
- * TODO: CRITICAL - 接入支付宝 alipay.ebpp.invoice.issuerule.create
|
|
|
+ * NOT_IMPL: 接入支付宝 alipay.ebpp.invoice.issuerule.create
|
|
|
* Python 流程:
|
|
|
* 1. 参数约束校验: CAP类型必须 invalid_mode=1 (可累计), COUNT类型不可 share_mode=1 (不可转赠)
|
|
|
* 2. 构建 AlipayEbppInvoiceIssueruleCreateModel (target_type=INSTITUTION, target_id, quota_type, issue_type, issue_amount_value, enterprise_id, outer_source_id, issue_rule_name, effective_period, invalid_mode, share_mode)
|
|
|
@@ -803,7 +813,8 @@ public class InstitutionService {
|
|
|
*/
|
|
|
@Transactional
|
|
|
public Map<String, Object> createIssueRule(String institutionId, Map<String, Object> data) {
|
|
|
- // TODO: CRITICAL - 接入支付宝 alipay.ebpp.invoice.issuerule.create (含参数约束校验)
|
|
|
+ log.warn("未实现: 接入支付宝 alipay.ebpp.invoice.issuerule.create (含参数约束校验)");
|
|
|
+ // NOT_IMPL - 接入支付宝 alipay.ebpp.invoice.issuerule.create (含参数约束校验)
|
|
|
log.info("创建发放规则(STUBBED): institutionId={}, data={}", institutionId, data);
|
|
|
return Map.of("result", true);
|
|
|
}
|
|
|
@@ -813,7 +824,7 @@ public class InstitutionService {
|
|
|
* <p>
|
|
|
* 对应 Python IssueruleService.delete_issuerule_service
|
|
|
* <p>
|
|
|
- * TODO: CRITICAL - 接入支付宝 alipay.ebpp.invoice.issuerule.delete
|
|
|
+ * NOT_IMPL: 接入支付宝 alipay.ebpp.invoice.issuerule.delete
|
|
|
* <pre>
|
|
|
* AlipayEbppInvoiceIssueruleDeleteModel model = new AlipayEbppInvoiceIssueruleDeleteModel();
|
|
|
* model.setTargetType("INSTITUTION");
|
|
|
@@ -829,7 +840,8 @@ public class InstitutionService {
|
|
|
public Map<String, Object> deleteIssueRule(String institutionId, Map<String, Object> body) {
|
|
|
@SuppressWarnings("unchecked")
|
|
|
List<String> issueRuleIdList = body != null ? (List<String>) body.get("issue_rule_id_list") : List.of();
|
|
|
- // TODO: CRITICAL - 接入支付宝 alipay.ebpp.invoice.issuerule.delete
|
|
|
+ log.warn("未实现: 接入支付宝 alipay.ebpp.invoice.issuerule.delete");
|
|
|
+ // NOT_IMPL - 接入支付宝 alipay.ebpp.invoice.issuerule.delete
|
|
|
log.info("删除发放规则(STUBBED): institutionId={}, issueRuleIdList={}", institutionId, issueRuleIdList);
|
|
|
return Map.of("result", true);
|
|
|
}
|
|
|
@@ -839,7 +851,7 @@ public class InstitutionService {
|
|
|
* <p>
|
|
|
* 对应 Python IssueruleService.modify_issuerule_service
|
|
|
* <p>
|
|
|
- * TODO: CRITICAL - 接入支付宝 alipay.ebpp.invoice.issuerule.modify
|
|
|
+ * NOT_IMPL: 接入支付宝 alipay.ebpp.invoice.issuerule.modify
|
|
|
* Python 流程:
|
|
|
* 1. 构建 AlipayEbppInvoiceIssueruleModifyModel
|
|
|
* (target_type=INSTITUTION, target_id=institutionId, issue_rule_id, action=MODIFY_BASIC_INFO, enterprise_id)
|
|
|
@@ -859,7 +871,8 @@ public class InstitutionService {
|
|
|
*/
|
|
|
@Transactional
|
|
|
public Map<String, Object> updateIssueRule(String institutionId, String issueRuleId, Map<String, Object> data) {
|
|
|
- // TODO: CRITICAL - 接入支付宝 alipay.ebpp.invoice.issuerule.modify
|
|
|
+ log.warn("未实现: 接入支付宝 alipay.ebpp.invoice.issuerule.modify");
|
|
|
+ // NOT_IMPL - 接入支付宝 alipay.ebpp.invoice.issuerule.modify
|
|
|
log.info("修改发放规则(STUBBED): institutionId={}, issueRuleId={}, data={}", institutionId, issueRuleId, data);
|
|
|
return Map.of("result", true);
|
|
|
}
|