|
|
@@ -359,7 +359,7 @@ public class CommonService {
|
|
|
//给业务联系人发消息[托运方]
|
|
|
List<UserInfo> list = new ArrayList<>();
|
|
|
UserInfo userInfo = new UserInfo();
|
|
|
- UserCacheResDto userCacheResDto = remoteSystemService.queryUserCacheById(consignUnit.getContactsId());
|
|
|
+// UserCacheResDto userCacheResDto = remoteSystemService.queryUserCacheById(consignUnit.getContactsId());
|
|
|
userInfo.setUserId(consignUnit.getContactsId()).setEntId(consignUnit.getTopEntId());
|
|
|
list.add(userInfo);
|
|
|
map.put("companyName", consignUnit.getFirmName());
|
|
|
@@ -474,27 +474,25 @@ public class CommonService {
|
|
|
}
|
|
|
|
|
|
public void newLogisticsOrder(AddOrderDTO addOrderDTO, String lOrderNo, Long createBy, Long entId) {
|
|
|
-
|
|
|
- EntCacheResDto consignentMap = remoteSystemService.queryEntTreeById(Long.parseLong(addOrderDTO.getConsignCompanyId()));
|
|
|
- EntCacheResDto acceptMap = remoteSystemService.queryEntTreeById(Long.parseLong(addOrderDTO.getAcceptCompanyId()));
|
|
|
-
|
|
|
- //托运单位
|
|
|
- KwtLogisticsOrderUnit checkUnit = new KwtLogisticsOrderUnit();
|
|
|
- checkUnit.setUnitType(1);
|
|
|
- checkUnit.setFirmName(addOrderDTO.getConsignCompany());
|
|
|
- checkUnit.setEntId(Long.parseLong(addOrderDTO.getConsignCompanyId()));
|
|
|
- checkUnit.setTopEntId(consignentMap == null ? null : consignentMap.getId());
|
|
|
- checkUnit.setContactsId(Long.parseLong(addOrderDTO.getConsignContactsId()));
|
|
|
-
|
|
|
- //承运单位
|
|
|
+ //发起方
|
|
|
+ EntCacheResDto entCacheResDto = remoteSystemService.queryEntCacheById(Long.parseLong(addOrderDTO.getConsignCompanyId()));
|
|
|
+ KwtLogisticsOrderUnit consignUnit = new KwtLogisticsOrderUnit();
|
|
|
+ consignUnit.setUnitType(NumberConstant.ONE);
|
|
|
+ consignUnit.setEntId(Long.parseLong(addOrderDTO.getConsignCompanyId()));
|
|
|
+ consignUnit.setTopEntId(entCacheResDto == null ? null : entCacheResDto.getId());
|
|
|
+ consignUnit.setFirmName(addOrderDTO.getAcceptCompany());
|
|
|
+ consignUnit.setContactsId(Long.parseLong(addOrderDTO.getConsignContactsId()));
|
|
|
+
|
|
|
+ //接收方
|
|
|
+ EntCacheResDto entCacheResDto1 = remoteSystemService.queryEntCacheById(Long.parseLong(addOrderDTO.getAcceptCompanyId()));
|
|
|
KwtLogisticsOrderUnit carriageUnit = new KwtLogisticsOrderUnit();
|
|
|
- carriageUnit.setUnitType(2);
|
|
|
- carriageUnit.setFirmName(addOrderDTO.getAcceptCompany());
|
|
|
+ carriageUnit.setUnitType(NumberConstant.TWO);
|
|
|
carriageUnit.setEntId(Long.parseLong(addOrderDTO.getAcceptCompanyId()));
|
|
|
- carriageUnit.setContactsId(Long.parseLong(addOrderDTO.getAcceptContactsId()));
|
|
|
+ carriageUnit.setTopEntId(entCacheResDto1 == null ? null : entCacheResDto1.getId());
|
|
|
carriageUnit.setFirmName(addOrderDTO.getConsignCompany());
|
|
|
- carriageUnit.setTopEntId(acceptMap == null ? null : acceptMap.getId());
|
|
|
- newSendLogisticsOrderToMessage(checkUnit, carriageUnit, lOrderNo, createBy, entId
|
|
|
+ carriageUnit.setContactsId(Long.parseLong(addOrderDTO.getAcceptContactsId()));
|
|
|
+
|
|
|
+ newSendLogisticsOrderToMessage(consignUnit, carriageUnit, lOrderNo, createBy, entId
|
|
|
, messageUrlConfig.getPc().getConsignLogisticsAddOrderUrl(), messageUrlConfig.getApp().getConsignLogisticsAddOrderUrl(),
|
|
|
messageUrlConfig.getPc().getCarriageLogisticsAddOrderUrl(), messageUrlConfig.getApp().getCarriageLogisticsAddOrderUrl(),
|
|
|
MessageEnum.NEW_LOGISTICS_ORDER, MessageEnum.NEW_CARRIAGE_ORDER, "1"
|