|
|
@@ -1220,18 +1220,25 @@ public class LogisticsConsignmentService {
|
|
|
result.setCode(HttpStatus.SUCCESS_CODE);
|
|
|
|
|
|
/**消息列表发送*/
|
|
|
- //托运
|
|
|
- KwtLogisticsOrderUnit consignUnit = kwtLogisticsOrderUnitMapper.selectOne(
|
|
|
- new LambdaQueryWrapper<KwtLogisticsOrderUnit>()
|
|
|
- .eq(KwtLogisticsOrderUnit::getLOrderId, kwtLogisticsOrder.getId())
|
|
|
- .eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.ONE));
|
|
|
- //承运
|
|
|
- KwtLogisticsOrderUnit carriageUnit = kwtLogisticsOrderUnitMapper.selectOne(
|
|
|
- new LambdaQueryWrapper<KwtLogisticsOrderUnit>()
|
|
|
- .eq(KwtLogisticsOrderUnit::getLOrderId, kwtLogisticsOrder.getId())
|
|
|
- .eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.TWO));
|
|
|
-// commonService.cancelLogisticsConsignment(consignUnit, carriageUnit, kwtLogisticsOrder.getLOrderNo(), kwtLogisticsOrder.getCreateBy(),
|
|
|
-// kwtLogisticsOrder.getEntId(), MessageEnum.CANCELLATION_LOGISTICS, MessageEnum.CARRIAGE_CANCELLATION_LOGISTICS);
|
|
|
+ Long id = kwtLogisticsOrder.getId();
|
|
|
+ KwtLogisticsOrderUnit consignOrderUnit = kwtLogisticsOrderUnitMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrderUnit>().eq(KwtLogisticsOrderUnit::getLOrderId, id).eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.ONE));
|
|
|
+ KwtLogisticsOrderUnit carriageOrderUnit = kwtLogisticsOrderUnitMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrderUnit>().eq(KwtLogisticsOrderUnit::getLOrderId, id).eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.TWO));
|
|
|
+
|
|
|
+ //接收方
|
|
|
+ KwtLogisticsOrderUnit consignUnit = new KwtLogisticsOrderUnit();
|
|
|
+ consignUnit.setUnitType(1);
|
|
|
+ consignUnit.setFirmName(carriageOrderUnit.getFirmName());
|
|
|
+ consignUnit.setEntId(carriageOrderUnit.getEntId());
|
|
|
+ consignUnit.setTopEntId(consignOrderUnit.getTopEntId());
|
|
|
+ consignUnit.setContactsId(carriageOrderUnit.getContactsId());
|
|
|
+
|
|
|
+ //发起方
|
|
|
+ KwtLogisticsOrderUnit carriageUnit = new KwtLogisticsOrderUnit();
|
|
|
+ carriageUnit.setUnitType(2);
|
|
|
+ carriageUnit.setFirmName(consignOrderUnit.getFirmName());
|
|
|
+ carriageUnit.setEntId(consignOrderUnit.getEntId());
|
|
|
+ carriageUnit.setContactsId(consignOrderUnit.getContactsId());
|
|
|
+ carriageUnit.setTopEntId(carriageOrderUnit.getTopEntId());
|
|
|
commonService.newSendLogisticsOrderToMessage(consignUnit, carriageUnit, kwtLogisticsOrder.getLOrderNo(), kwtLogisticsOrder.getCreateBy(),
|
|
|
kwtLogisticsOrder.getEntId(),
|
|
|
messageUrlConfig.getPc().getConsignLogisticsAddOrderUrl(), messageUrlConfig.getApp().getConsignLogisticsAddOrderUrl(),
|
|
|
@@ -1320,16 +1327,25 @@ public class LogisticsConsignmentService {
|
|
|
result.setCode(HttpStatus.SUCCESS_CODE);
|
|
|
|
|
|
/**消息列表发送*/
|
|
|
- //托运
|
|
|
- KwtLogisticsOrderUnit consignUnit = kwtLogisticsOrderUnitMapper.selectOne(
|
|
|
- new LambdaQueryWrapper<KwtLogisticsOrderUnit>()
|
|
|
- .eq(KwtLogisticsOrderUnit::getLOrderId, id)
|
|
|
- .eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.ONE));
|
|
|
- //承运
|
|
|
- KwtLogisticsOrderUnit carriageUnit = kwtLogisticsOrderUnitMapper.selectOne(
|
|
|
- new LambdaQueryWrapper<KwtLogisticsOrderUnit>()
|
|
|
- .eq(KwtLogisticsOrderUnit::getLOrderId, id)
|
|
|
- .eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.TWO));
|
|
|
+ Long orderId = kwtLogisticsOrder.getId();
|
|
|
+ KwtLogisticsOrderUnit consignOrderUnit = kwtLogisticsOrderUnitMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrderUnit>().eq(KwtLogisticsOrderUnit::getLOrderId, orderId).eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.ONE));
|
|
|
+ KwtLogisticsOrderUnit carriageOrderUnit = kwtLogisticsOrderUnitMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrderUnit>().eq(KwtLogisticsOrderUnit::getLOrderId, orderId).eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.TWO));
|
|
|
+
|
|
|
+ //接收方
|
|
|
+ KwtLogisticsOrderUnit consignUnit = new KwtLogisticsOrderUnit();
|
|
|
+ consignUnit.setUnitType(1);
|
|
|
+ consignUnit.setFirmName(carriageOrderUnit.getFirmName());
|
|
|
+ consignUnit.setEntId(carriageOrderUnit.getEntId());
|
|
|
+ consignUnit.setTopEntId(consignOrderUnit.getTopEntId());
|
|
|
+ consignUnit.setContactsId(carriageOrderUnit.getContactsId());
|
|
|
+
|
|
|
+ //发起方
|
|
|
+ KwtLogisticsOrderUnit carriageUnit = new KwtLogisticsOrderUnit();
|
|
|
+ carriageUnit.setUnitType(2);
|
|
|
+ carriageUnit.setFirmName(consignOrderUnit.getFirmName());
|
|
|
+ carriageUnit.setEntId(consignOrderUnit.getEntId());
|
|
|
+ carriageUnit.setContactsId(consignOrderUnit.getContactsId());
|
|
|
+ carriageUnit.setTopEntId(carriageOrderUnit.getTopEntId());
|
|
|
// commonService.cancelLogisticsConsignment(consignUnit, carriageUnit, kwtLogisticsOrder.getLOrderNo(), kwtLogisticsOrder.getCreateBy(),
|
|
|
// kwtLogisticsOrder.getEntId(), MessageEnum.CANCELLATION_LOGISTICS, MessageEnum.CARRIAGE_CANCELLATION_LOGISTICS);
|
|
|
commonService.newSendLogisticsOrderToMessage(consignUnit, carriageUnit, kwtLogisticsOrder.getLOrderNo(), kwtLogisticsOrder.getCreateBy(),
|