Showing
1 changed file
with
17 additions
and
0 deletions
| ... | ... | @@ -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 | ... | ... |