|
|
@@ -426,10 +426,9 @@ public class KwcContractLogisticsService {
|
|
|
ESignCallBackReqVo eSignCallBackReqVo = new ESignCallBackReqVo();
|
|
|
eSignCallBackReqVo.setContractId(id);
|
|
|
eSignCallBackReqVo.setStatus(ContractStatusEnum.SIGNED.getCode());
|
|
|
- commonBusinessService.approval(eSignCallBackReqVo);
|
|
|
//发送消息
|
|
|
sendLogisticsMessage(kwcContractLogistics);
|
|
|
- commonBusinessService.sendLogisticsPassMessage(kwcContractLogistics);
|
|
|
+ commonBusinessService.approval(eSignCallBackReqVo);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -437,41 +436,45 @@ public class KwcContractLogisticsService {
|
|
|
|
|
|
|
|
|
private void sendLogisticsMessage(KwcContractLogistics kwcContractLogistics) {
|
|
|
- List<KwcContractLogisticsUnit> kwcContractLogisticsUnits = kwcContractLogisticsUnitService.queryByContractId(kwcContractLogistics.getId());
|
|
|
- Map<Integer, KwcContractLogisticsUnit> collect = kwcContractLogisticsUnits.stream().collect(Collectors.toMap(KwcContractLogisticsUnit::getUnitType, Function.identity()));
|
|
|
- KwcContractLogisticsUnit kwcContractLogisticsUnit = collect.get(CooperateTypeEnum.CARRIAGE.getCode());
|
|
|
- EntCacheResDto entCacheResDto = remoteSystemService.queryEntCacheById(kwcContractLogisticsUnit.getEntId());
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("entName", entCacheResDto.getFirmName());
|
|
|
- map.put("contract_no", kwcContractLogistics.getContractNo());
|
|
|
- map.put("name", kwcContractLogistics.getName());
|
|
|
- MessageEnum messageEnum;
|
|
|
- if (Objects.nonNull(kwcContractLogistics.getContractPid())) {
|
|
|
- messageEnum = MessageEnum.SAELCONTRACT_SUBMIT_DATA;
|
|
|
- } else {
|
|
|
- messageEnum = MessageEnum.SAELCONTRACT_SEND_CONTRACT;
|
|
|
- }
|
|
|
- commonBusinessService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(kwcContractLogistics.getCreateBy()).setEntId(kwcContractLogistics.getEntId())),
|
|
|
- messageEnum,
|
|
|
- map,
|
|
|
- consignmentSendContract,
|
|
|
- appConsignmentSendContract);
|
|
|
-
|
|
|
-
|
|
|
- if (Objects.nonNull(kwcContractLogistics.getContractPid())) {
|
|
|
- messageEnum = MessageEnum.BUYCONTRACT_SUPPLYPROCESS_SEND;
|
|
|
- } else {
|
|
|
- messageEnum = MessageEnum.BUYCONTRACT_PROCESS_SEND;
|
|
|
- }
|
|
|
-
|
|
|
- EntCacheResDto entCacheResDto2 = remoteSystemService.queryEntTreeById(kwcContractLogisticsUnit.getEntId());
|
|
|
- EntCacheResDto entCacheResDto1 = remoteSystemService.queryEntCacheById(kwcContractLogistics.getEntId());
|
|
|
- map.put("entName", entCacheResDto1.getFirmName());
|
|
|
- commonBusinessService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(entCacheResDto2.getContactsId()).setEntId(entCacheResDto2.getId())),
|
|
|
- messageEnum,
|
|
|
- map,
|
|
|
- acceptanceSendContract,
|
|
|
- appAcceptanceSendContract);
|
|
|
+ try {
|
|
|
+ List<KwcContractLogisticsUnit> kwcContractLogisticsUnits = kwcContractLogisticsUnitService.queryByContractId(kwcContractLogistics.getId());
|
|
|
+ Map<Integer, KwcContractLogisticsUnit> collect = kwcContractLogisticsUnits.stream().collect(Collectors.toMap(KwcContractLogisticsUnit::getUnitType, Function.identity()));
|
|
|
+ KwcContractLogisticsUnit kwcContractLogisticsUnit = collect.get(CooperateTypeEnum.CARRIAGE.getCode());
|
|
|
+ EntCacheResDto entCacheResDto = remoteSystemService.queryEntCacheById(kwcContractLogisticsUnit.getEntId());
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("entName", entCacheResDto.getFirmName());
|
|
|
+ map.put("contract_no", kwcContractLogistics.getContractNo());
|
|
|
+ map.put("name", kwcContractLogistics.getName());
|
|
|
+ MessageEnum messageEnum;
|
|
|
+ if (Objects.nonNull(kwcContractLogistics.getContractPid())) {
|
|
|
+ messageEnum = MessageEnum.SAELCONTRACT_SUBMIT_DATA;
|
|
|
+ } else {
|
|
|
+ messageEnum = MessageEnum.SAELCONTRACT_SEND_CONTRACT;
|
|
|
+ }
|
|
|
+ commonBusinessService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(kwcContractLogistics.getCreateBy()).setEntId(kwcContractLogistics.getEntId())),
|
|
|
+ messageEnum,
|
|
|
+ map,
|
|
|
+ consignmentSendContract,
|
|
|
+ appConsignmentSendContract);
|
|
|
+
|
|
|
+
|
|
|
+ if (Objects.nonNull(kwcContractLogistics.getContractPid())) {
|
|
|
+ messageEnum = MessageEnum.BUYCONTRACT_SUPPLYPROCESS_SEND;
|
|
|
+ } else {
|
|
|
+ messageEnum = MessageEnum.BUYCONTRACT_PROCESS_SEND;
|
|
|
+ }
|
|
|
+
|
|
|
+ EntCacheResDto entCacheResDto2 = remoteSystemService.queryEntTreeById(kwcContractLogisticsUnit.getEntId());
|
|
|
+ EntCacheResDto entCacheResDto1 = remoteSystemService.queryEntCacheById(kwcContractLogistics.getEntId());
|
|
|
+ map.put("entName", entCacheResDto1.getFirmName());
|
|
|
+ commonBusinessService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(entCacheResDto2.getContactsId()).setEntId(entCacheResDto2.getId())),
|
|
|
+ messageEnum,
|
|
|
+ map,
|
|
|
+ acceptanceSendContract,
|
|
|
+ appAcceptanceSendContract);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("合同签约流程已发起消息出错:", e);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -595,33 +598,37 @@ public class KwcContractLogisticsService {
|
|
|
|
|
|
|
|
|
//发送消息
|
|
|
- List<KwcContractLogisticsUnit> kwcContractLogisticsUnits = kwcContractLogisticsUnitService.queryByContractId(kwcContractLogistic.getId());
|
|
|
- Map<Integer, KwcContractLogisticsUnit> collect = kwcContractLogisticsUnits.stream().collect(Collectors.toMap(KwcContractLogisticsUnit::getUnitType, Function.identity()));
|
|
|
- KwcContractLogisticsUnit kwcContractLogisticsUnit = collect.get(CooperateTypeEnum.CARRIAGE.getCode());
|
|
|
- Long entId = kwcContractLogisticsUnit.getEntId();
|
|
|
- EntCacheResDto entCacheResDto = remoteSystemService.queryEntCacheById(entId);
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("entName", entCacheResDto.getFirmName());
|
|
|
- map.put("contract_no", kwcContractLogistic.getContractNo());
|
|
|
- map.put("name", kwcContractLogistic.getName());
|
|
|
-
|
|
|
- commonBusinessService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(kwcContractLogistic.getCreateBy()).setEntId(kwcContractLogistic.getEntId())),
|
|
|
- MessageEnum.SAELCONTRACT_COMPLETE_CONTRACT,
|
|
|
- map,
|
|
|
- consignmentSendContract,
|
|
|
- appConsignmentSendContract);
|
|
|
-
|
|
|
-
|
|
|
- KwcContractLogisticsUnit kwcContractLogisticsUnit2 = collect.get(CooperateTypeEnum.CONSIGN.getCode());
|
|
|
- Long entId1 = kwcContractLogisticsUnit2.getEntId();
|
|
|
- EntCacheResDto entCacheResDto1 = remoteSystemService.queryEntCacheById(entId1);
|
|
|
- EntCacheResDto entCacheResDto2 = remoteSystemService.queryEntTreeById(entId);
|
|
|
- map.put("entName", entCacheResDto1.getFirmName());
|
|
|
- commonBusinessService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(entCacheResDto2.getContactsId()).setEntId(entCacheResDto2.getId())),
|
|
|
- MessageEnum.BUYCONTRACT_COMPLETE_CONTRACT,
|
|
|
- map,
|
|
|
- acceptanceSendContract,
|
|
|
- appAcceptanceSendContract);
|
|
|
+ try {
|
|
|
+ List<KwcContractLogisticsUnit> kwcContractLogisticsUnits = kwcContractLogisticsUnitService.queryByContractId(kwcContractLogistic.getId());
|
|
|
+ Map<Integer, KwcContractLogisticsUnit> collect = kwcContractLogisticsUnits.stream().collect(Collectors.toMap(KwcContractLogisticsUnit::getUnitType, Function.identity()));
|
|
|
+ KwcContractLogisticsUnit kwcContractLogisticsUnit = collect.get(CooperateTypeEnum.CARRIAGE.getCode());
|
|
|
+ Long entId = kwcContractLogisticsUnit.getEntId();
|
|
|
+ EntCacheResDto entCacheResDto = remoteSystemService.queryEntCacheById(entId);
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("entName", entCacheResDto.getFirmName());
|
|
|
+ map.put("contract_no", kwcContractLogistic.getContractNo());
|
|
|
+ map.put("name", kwcContractLogistic.getName());
|
|
|
+
|
|
|
+ commonBusinessService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(kwcContractLogistic.getCreateBy()).setEntId(kwcContractLogistic.getEntId())),
|
|
|
+ MessageEnum.SAELCONTRACT_COMPLETE_CONTRACT,
|
|
|
+ map,
|
|
|
+ consignmentSendContract,
|
|
|
+ appConsignmentSendContract);
|
|
|
+
|
|
|
+
|
|
|
+ KwcContractLogisticsUnit kwcContractLogisticsUnit2 = collect.get(CooperateTypeEnum.CONSIGN.getCode());
|
|
|
+ Long entId1 = kwcContractLogisticsUnit2.getEntId();
|
|
|
+ EntCacheResDto entCacheResDto1 = remoteSystemService.queryEntCacheById(entId1);
|
|
|
+ EntCacheResDto entCacheResDto2 = remoteSystemService.queryEntTreeById(entId);
|
|
|
+ map.put("entName", entCacheResDto1.getFirmName());
|
|
|
+ commonBusinessService.sendSystemMessage(Collections.singletonList(new UserInfo().setUserId(entCacheResDto2.getContactsId()).setEntId(entCacheResDto2.getId())),
|
|
|
+ MessageEnum.BUYCONTRACT_COMPLETE_CONTRACT,
|
|
|
+ map,
|
|
|
+ acceptanceSendContract,
|
|
|
+ appAcceptanceSendContract);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("完结合同消息出错:", e);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|