|
@@ -236,17 +236,17 @@ public class LogisticsConsignmentService {
|
|
|
|
|
|
|
|
checkUnit.setUnitType(1);
|
|
checkUnit.setUnitType(1);
|
|
|
checkUnit.setFirmName(bo.getCheckCompany());
|
|
checkUnit.setFirmName(bo.getCheckCompany());
|
|
|
- checkUnit.setEntId(Long.parseLong(bo.getCheckCompanyId()));
|
|
|
|
|
- checkUnit.setTopEntId(checkentMap == null ? null : checkentMap.getId());
|
|
|
|
|
- checkUnit.setContactsId(Long.parseLong(bo.getCheckContactsId()));
|
|
|
|
|
|
|
+ checkUnit.setEntId(Long.parseLong(bo.getConsignCompanyId()));
|
|
|
|
|
+ checkUnit.setTopEntId(consignentMap == null ? null : consignentMap.getId());
|
|
|
|
|
+ checkUnit.setContactsId(Long.parseLong(bo.getConsignContactsId()));
|
|
|
|
|
|
|
|
//承运单位
|
|
//承运单位
|
|
|
KwtLogisticsOrderUnit carriageUnit = new KwtLogisticsOrderUnit();
|
|
KwtLogisticsOrderUnit carriageUnit = new KwtLogisticsOrderUnit();
|
|
|
carriageUnit.setUnitType(2);
|
|
carriageUnit.setUnitType(2);
|
|
|
carriageUnit.setFirmName(bo.getConsignCompany());
|
|
carriageUnit.setFirmName(bo.getConsignCompany());
|
|
|
- carriageUnit.setEntId(Long.parseLong(bo.getConsignCompanyId()));
|
|
|
|
|
- carriageUnit.setTopEntId(consignentMap == null ? null : consignentMap.getId());
|
|
|
|
|
- carriageUnit.setContactsId(Long.parseLong(bo.getConsignContactsId()));
|
|
|
|
|
|
|
+ carriageUnit.setEntId(Long.parseLong(bo.getCheckCompanyId()));
|
|
|
|
|
+ carriageUnit.setTopEntId(checkentMap == null ? null : checkentMap.getId());
|
|
|
|
|
+ carriageUnit.setContactsId(Long.parseLong(bo.getCheckContactsId()));
|
|
|
|
|
|
|
|
// commonService.initIatingLogisticsConsignment(checkUnit, carriageUnit, lOrderNo, LoginUserHolder.getUserId(), LoginUserHolder.getEntId());
|
|
// commonService.initIatingLogisticsConsignment(checkUnit, carriageUnit, lOrderNo, LoginUserHolder.getUserId(), LoginUserHolder.getEntId());
|
|
|
commonService.newSendLogisticsOrderToMessage(checkUnit, carriageUnit, lOrderNo, LoginUserHolder.getUserId(), LoginUserHolder.getEntId(),
|
|
commonService.newSendLogisticsOrderToMessage(checkUnit, carriageUnit, lOrderNo, LoginUserHolder.getUserId(), LoginUserHolder.getEntId(),
|
|
@@ -2111,5 +2111,26 @@ public class LogisticsConsignmentService {
|
|
|
return HttpResult.ok();
|
|
return HttpResult.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 采购/销售订单-完成车次统计
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param tradeOrderId 贸易订单id
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public Long statisticsWaybillCount(String tradeOrderId) {
|
|
|
|
|
+ Long count = 0L;
|
|
|
|
|
+ List<KwtLogisticsOrder> orderList = kwtLogisticsOrderMapper.selectList(new LambdaQueryWrapper<KwtLogisticsOrder>()
|
|
|
|
|
+ .eq(KwtLogisticsOrder::getTOrderId, tradeOrderId).eq(KwtLogisticsOrder::getDelFlag, NumberConstant.ZERO));
|
|
|
|
|
+ if (org.springframework.util.CollectionUtils.isEmpty(orderList)) {
|
|
|
|
|
+ return count;
|
|
|
|
|
+ }
|
|
|
|
|
+ List<Long> longList = orderList.stream().map(KwtLogisticsOrder::getId).collect(Collectors.toList());
|
|
|
|
|
+ if (org.springframework.util.CollectionUtils.isEmpty(longList)) {
|
|
|
|
|
+ return count;
|
|
|
|
|
+ }
|
|
|
|
|
+ count = waybillOrderMapper.selectCount(new LambdaQueryWrapper<KwtWaybillOrder>()
|
|
|
|
|
+ .eq(KwtWaybillOrder::getStatus, CarWaybillEnum.APPROVAL_PASS.getCode())
|
|
|
|
|
+ .in(KwtWaybillOrder::getLOrderId, longList));
|
|
|
|
|
+ return count;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|