|
@@ -211,7 +211,7 @@ public class LogisticsConsignmentService {
|
|
|
HttpResult httpResult = tradeOrderInfoService.createOrCancelLogisticsOrder(param);
|
|
HttpResult httpResult = tradeOrderInfoService.createOrCancelLogisticsOrder(param);
|
|
|
if (httpResult.getCode() != HttpStatus.SUCCESS_CODE) {
|
|
if (httpResult.getCode() != HttpStatus.SUCCESS_CODE) {
|
|
|
log.info("{}生成物流托运失败!,返回信息:{}", tradeOrder.getTOrderNo(), JSONObject.toJSONString(httpResult));
|
|
log.info("{}生成物流托运失败!,返回信息:{}", tradeOrder.getTOrderNo(), JSONObject.toJSONString(httpResult));
|
|
|
- throw new BusinessException("{" + tradeOrder.getTOrderNo() + "}生成物流托运失败!"+httpResult.getMsg());
|
|
|
|
|
|
|
+ throw new BusinessException("{" + tradeOrder.getTOrderNo() + "}生成物流托运失败!" + httpResult.getMsg());
|
|
|
}
|
|
}
|
|
|
/**消息列表*/
|
|
/**消息列表*/
|
|
|
EntCacheResDto consignentMap = remoteSystemService.queryEntTreeById(Long.parseLong(bo.getConsignCompanyId()));
|
|
EntCacheResDto consignentMap = remoteSystemService.queryEntTreeById(Long.parseLong(bo.getConsignCompanyId()));
|
|
@@ -375,7 +375,7 @@ public class LogisticsConsignmentService {
|
|
|
// .setContactsId(consignentMap.get(Long.parseLong(bo.getConsignCompanyId())).getContactsId())
|
|
// .setContactsId(consignentMap.get(Long.parseLong(bo.getConsignCompanyId())).getContactsId())
|
|
|
EntCacheResDto checkentMap = remoteSystemService.queryEntTreeById(Long.parseLong(bo.getCheckCompanyId()));
|
|
EntCacheResDto checkentMap = remoteSystemService.queryEntTreeById(Long.parseLong(bo.getCheckCompanyId()));
|
|
|
// .setContactsId(checkentMap.get(Long.parseLong(bo.getCheckCompanyId())).getContactsId())
|
|
// .setContactsId(checkentMap.get(Long.parseLong(bo.getCheckCompanyId())).getContactsId())
|
|
|
- if (consignentMap == null || checkentMap== null) {
|
|
|
|
|
|
|
+ if (consignentMap == null || checkentMap == null) {
|
|
|
throw new BusinessException("企业对应一级企业不存在");
|
|
throw new BusinessException("企业对应一级企业不存在");
|
|
|
}
|
|
}
|
|
|
KwtLogisticsOrderUnit checkUnit = new KwtLogisticsOrderUnit()
|
|
KwtLogisticsOrderUnit checkUnit = new KwtLogisticsOrderUnit()
|
|
@@ -666,7 +666,7 @@ public class LogisticsConsignmentService {
|
|
|
stringList = stringList.stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList());
|
|
stringList = stringList.stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList());
|
|
|
for (String id : stringList) {
|
|
for (String id : stringList) {
|
|
|
OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.parseLong(id));
|
|
OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.parseLong(id));
|
|
|
- if (orderDetailRes==null){
|
|
|
|
|
|
|
+ if (orderDetailRes == null) {
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
@@ -726,7 +726,7 @@ public class LogisticsConsignmentService {
|
|
|
*/
|
|
*/
|
|
|
public HttpResult logisticsOrderCount(String id, String type) {
|
|
public HttpResult logisticsOrderCount(String id, String type) {
|
|
|
OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.parseLong(id));
|
|
OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.parseLong(id));
|
|
|
- if (orderDetailRes==null){
|
|
|
|
|
|
|
+ if (orderDetailRes == null) {
|
|
|
return HttpResult.ok();
|
|
return HttpResult.ok();
|
|
|
}
|
|
}
|
|
|
/**根据下单方式(代客下单/自主下单)决定托运数据是否展示*/
|
|
/**根据下单方式(代客下单/自主下单)决定托运数据是否展示*/
|
|
@@ -780,7 +780,7 @@ public class LogisticsConsignmentService {
|
|
|
List<LogisticsOrderDTO> returnList = new ArrayList<>();
|
|
List<LogisticsOrderDTO> returnList = new ArrayList<>();
|
|
|
for (String id : stringList) {
|
|
for (String id : stringList) {
|
|
|
OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.parseLong(id));
|
|
OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.parseLong(id));
|
|
|
- if (orderDetailRes==null){
|
|
|
|
|
|
|
+ if (orderDetailRes == null) {
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
log.info("贸易订单数据:{}", JSONObject.toJSONString(orderDetailRes));
|
|
log.info("贸易订单数据:{}", JSONObject.toJSONString(orderDetailRes));
|
|
@@ -1083,15 +1083,15 @@ public class LogisticsConsignmentService {
|
|
|
//托运
|
|
//托运
|
|
|
KwtLogisticsOrderUnit consignUnit = kwtLogisticsOrderUnitMapper.selectOne(
|
|
KwtLogisticsOrderUnit consignUnit = kwtLogisticsOrderUnitMapper.selectOne(
|
|
|
new LambdaQueryWrapper<KwtLogisticsOrderUnit>()
|
|
new LambdaQueryWrapper<KwtLogisticsOrderUnit>()
|
|
|
- .eq(KwtLogisticsOrderUnit::getLOrderId,kwtLogisticsOrder.getId())
|
|
|
|
|
|
|
+ .eq(KwtLogisticsOrderUnit::getLOrderId, kwtLogisticsOrder.getId())
|
|
|
.eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.ONE));
|
|
.eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.ONE));
|
|
|
//承运
|
|
//承运
|
|
|
KwtLogisticsOrderUnit carriageUnit = kwtLogisticsOrderUnitMapper.selectOne(
|
|
KwtLogisticsOrderUnit carriageUnit = kwtLogisticsOrderUnitMapper.selectOne(
|
|
|
new LambdaQueryWrapper<KwtLogisticsOrderUnit>()
|
|
new LambdaQueryWrapper<KwtLogisticsOrderUnit>()
|
|
|
- .eq(KwtLogisticsOrderUnit::getLOrderId,kwtLogisticsOrder.getId())
|
|
|
|
|
|
|
+ .eq(KwtLogisticsOrderUnit::getLOrderId, kwtLogisticsOrder.getId())
|
|
|
.eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.TWO));
|
|
.eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.TWO));
|
|
|
- commonService.cancelLogisticsConsignment(consignUnit,carriageUnit,kwtLogisticsOrder.getLOrderNo(),kwtLogisticsOrder.getCreateBy(),
|
|
|
|
|
- kwtLogisticsOrder.getEntId(), MessageEnum.CANCELLATION_LOGISTICS,MessageEnum.CARRIAGE_CANCELLATION_LOGISTICS);
|
|
|
|
|
|
|
+ commonService.cancelLogisticsConsignment(consignUnit, carriageUnit, kwtLogisticsOrder.getLOrderNo(), kwtLogisticsOrder.getCreateBy(),
|
|
|
|
|
+ kwtLogisticsOrder.getEntId(), MessageEnum.CANCELLATION_LOGISTICS, MessageEnum.CARRIAGE_CANCELLATION_LOGISTICS);
|
|
|
} else {
|
|
} else {
|
|
|
result.setMsg("操作失败:" + httpResult.getMsg());
|
|
result.setMsg("操作失败:" + httpResult.getMsg());
|
|
|
result.setCode(HttpStatus.GLOBAL_EXCEPTION_CODE);
|
|
result.setCode(HttpStatus.GLOBAL_EXCEPTION_CODE);
|
|
@@ -1177,15 +1177,15 @@ public class LogisticsConsignmentService {
|
|
|
//托运
|
|
//托运
|
|
|
KwtLogisticsOrderUnit consignUnit = kwtLogisticsOrderUnitMapper.selectOne(
|
|
KwtLogisticsOrderUnit consignUnit = kwtLogisticsOrderUnitMapper.selectOne(
|
|
|
new LambdaQueryWrapper<KwtLogisticsOrderUnit>()
|
|
new LambdaQueryWrapper<KwtLogisticsOrderUnit>()
|
|
|
- .eq(KwtLogisticsOrderUnit::getLOrderId,id)
|
|
|
|
|
|
|
+ .eq(KwtLogisticsOrderUnit::getLOrderId, id)
|
|
|
.eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.ONE));
|
|
.eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.ONE));
|
|
|
//承运
|
|
//承运
|
|
|
KwtLogisticsOrderUnit carriageUnit = kwtLogisticsOrderUnitMapper.selectOne(
|
|
KwtLogisticsOrderUnit carriageUnit = kwtLogisticsOrderUnitMapper.selectOne(
|
|
|
new LambdaQueryWrapper<KwtLogisticsOrderUnit>()
|
|
new LambdaQueryWrapper<KwtLogisticsOrderUnit>()
|
|
|
- .eq(KwtLogisticsOrderUnit::getLOrderId,id)
|
|
|
|
|
|
|
+ .eq(KwtLogisticsOrderUnit::getLOrderId, id)
|
|
|
.eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.TWO));
|
|
.eq(KwtLogisticsOrderUnit::getUnitType, NumberConstant.TWO));
|
|
|
- commonService.cancelLogisticsConsignment(consignUnit,carriageUnit,kwtLogisticsOrder.getLOrderNo(),kwtLogisticsOrder.getCreateBy(),
|
|
|
|
|
- kwtLogisticsOrder.getEntId(), MessageEnum.CANCELLATION_LOGISTICS,MessageEnum.CARRIAGE_CANCELLATION_LOGISTICS);
|
|
|
|
|
|
|
+ commonService.cancelLogisticsConsignment(consignUnit, carriageUnit, kwtLogisticsOrder.getLOrderNo(), kwtLogisticsOrder.getCreateBy(),
|
|
|
|
|
+ kwtLogisticsOrder.getEntId(), MessageEnum.CANCELLATION_LOGISTICS, MessageEnum.CARRIAGE_CANCELLATION_LOGISTICS);
|
|
|
} else {
|
|
} else {
|
|
|
result.setCode(HttpStatus.GLOBAL_EXCEPTION_CODE);
|
|
result.setCode(HttpStatus.GLOBAL_EXCEPTION_CODE);
|
|
|
result.setMsg("操作失败:" + httpResult.getMsg());
|
|
result.setMsg("操作失败:" + httpResult.getMsg());
|
|
@@ -1906,7 +1906,7 @@ public class LogisticsConsignmentService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 导出销售/采购订单对应的运单列表
|
|
|
|
|
|
|
+ * 导出采购订单-对应的运单列表
|
|
|
*
|
|
*
|
|
|
* @param ids 销售/采购订单IDs
|
|
* @param ids 销售/采购订单IDs
|
|
|
* @return
|
|
* @return
|