Commit 844cefda23b894fedcf36c7babdc80b7608b445e

Authored by 房远帅
1 parent d9b6f3cb

合同:审核过程中更新流程变量数据

... ... @@ -102,6 +102,7 @@ public class FlowTaskServiceImpl implements FlowTaskService {
102 102 // 创建订货单
103 103 contractDistributorStandardService.createPurchaseOrderInfo(data, "PRODUCTION");
104 104 }
  105 + refreshContractVariable(map, vo.getId());
105 106 }
106 107 } catch (JsonProcessingException e) {
107 108 e.printStackTrace();
... ... @@ -127,12 +128,28 @@ public class FlowTaskServiceImpl implements FlowTaskService {
127 128 // 创建订货单
128 129 contractDistributorStandardService.createPurchaseOrderInfo(data, "PRODUCTION");
129 130 }
  131 + refreshContractVariable(map, vo.getId());
130 132 }
131 133 } catch (JsonProcessingException e) {
132 134 e.printStackTrace();
133 135 }
134 136 }
135 137
  138 + private void refreshContractVariable(Map<String, Object> variableMap, String contractId) {
  139 + if (variableMap == null || contractId == null) {
  140 + return;
  141 + }
  142 + ContractDistributorStandard contract = contractDistributorStandardService.findById(contractId);
  143 + if (contract == null) {
  144 + return;
  145 + }
  146 + Map<String, Object> contractMap = JsonUtil.parseMap(JsonUtil.toJsonString(contract), String.class, Object.class);
  147 + if (contractMap == null || contractMap.isEmpty()) {
  148 + return;
  149 + }
  150 + variableMap.putAll(contractMap);
  151 + }
  152 +
136 153 @OpLog(type = OtherOpLogType.class, name = "修改订货单,ID:{}", params = {"#id"})
137 154 @Transactional(rollbackFor = Exception.class)
138 155 @Override
... ...