Commit 16c5a5310556bc37e9cdaa35e95984b97576d16c

Authored by 房远帅
1 parent f12853e0

采购-计划:吨超协汇总审核问题处理

... ... @@ -317,9 +317,10 @@ public class CoordinationSummaryApprovalServiceImpl
317 317
318 318 this.update(Wrappers.lambdaUpdate(CoordinationSummaryApproval.class)
319 319 .set(CoordinationSummaryApproval::getProcessNode, "GYGLKZG")
  320 + .set(CoordinationSummaryApproval::getApprovalStatus, "AUDIT")
320 321 .eq(CoordinationSummaryApproval::getId, id));
321 322
322   - flowInstanceWrapperService.startInstance(BPM_FLAG, id, BPM_FLAG, null);
  323 + flowInstanceWrapperService.startInstance(BPM_FLAG, id, BPM_FLAG, entity);
323 324
324 325 OpLogUtil.setVariable("id", id);
325 326 OpLogUtil.setExtra(entity);
... ... @@ -372,8 +373,7 @@ public class CoordinationSummaryApprovalServiceImpl
372 373 Object examStatusObj = map.get("examStatus");
373 374 String examStatus = examStatusObj == null ? null : String.valueOf(examStatusObj);
374 375
375   - Object bizIdObj = map.get("bizId");
376   - String bizId = bizIdObj == null ? null : String.valueOf(bizIdObj);
  376 + String bizId = resolveBizId(map);
377 377
378 378 if ("PASS".equals(examStatus)) {
379 379 String processNode = null;
... ... @@ -398,6 +398,27 @@ public class CoordinationSummaryApprovalServiceImpl
398 398 }
399 399 }
400 400
  401 + private String resolveBizId(Map<String, Object> map) {
  402 + Object id = map.get("id");
  403 + String bizId = id == null ? null : String.valueOf(id);
  404 + if (StringUtil.isBlank(bizId) || "null".equals(bizId)) {
  405 + Object bizIdObj = map.get("bizId");
  406 + bizId = bizIdObj == null ? null : String.valueOf(bizIdObj);
  407 + }
  408 + if (StringUtil.isBlank(bizId) || "null".equals(bizId)) {
  409 + Object variables = map.get("variables");
  410 + if (variables instanceof Map) {
  411 + Map<?, ?> variablesMap = (Map<?, ?>) variables;
  412 + Object vId = variablesMap.get("id");
  413 + if (vId == null) {
  414 + vId = variablesMap.get("bizId");
  415 + }
  416 + bizId = vId == null ? null : String.valueOf(vId);
  417 + }
  418 + }
  419 + return bizId;
  420 + }
  421 +
401 422 @Override
402 423 public List<DomesticPlanSummary> queryDomesticPlanSummaryList(QueryDomesticPlanSummaryVo vo) {
403 424 return domesticPlanSummaryService.query(vo);
... ...