Browse Source

Merge branch 'dev' into pre-production

master
zhaoqiaobo 8 months ago
parent
commit
a9b73c4826
  1. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java
  2. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java

@ -3351,6 +3351,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
Map<String, BasicdataBrandEntity> brandEntityMap, Map<String, BasicdataPriceEntity> priceEntityMap,
Map<String, BasicdataStoreBrandEntity> clientBrandMap, Map<String, List<BasicdataPriceEntity>> checkPriceEntityMap) {
if (CollUtil.isNotEmpty(priceExcels)) {
Map<String,String> checkRepeatMap = new HashMap<>();
for (int i = 0; i < priceExcels.size(); i++) {
StringBuilder rowMessage = new StringBuilder();
int rowNum = i + 2;
@ -3377,6 +3378,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
brandFlag = Boolean.TRUE;
}
}
checkRepeatMap.put(priceExcel.getClient() + priceExcel.getBrand(),priceExcel.getClient() + priceExcel.getBrand());
Boolean templateFlag = Boolean.FALSE;
if (StrUtil.isEmpty(priceExcel.getTemplateName())) {
rowMessage.append("模板名称不能为空;");
@ -3465,7 +3467,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
buildErrorMessageExcel(message, rowMessage, firstMessage);
}
if (StrUtil.isEmpty(message.toString())) {
if (CollUtil.isNotEmpty(priceEntityMap) && !ObjectUtil.equal(priceExcels.size(), clientBrandMap.size())) {
if (CollUtil.isNotEmpty(checkRepeatMap) && !ObjectUtil.equal(priceExcels.size(), checkRepeatMap.size())) {
message.append(sheet1).append("中存在 客户名称+品牌 重复的数据,请检查;");
}
}

34
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -3217,6 +3217,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//新增订单
List<DistributionParcelListDTO> packageListInfo = s.getPackageListInfo();
if (Func.isNotEmpty(packageListInfo)) {
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())) {
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId());
throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "文员完成复核,无法追加订单");
}
if (Func.isNotEmpty(reservationEntity) && reservationEntity.getSigningStatus().equals(ReservationSigningStatusConstant.yiqianshou.getValue())) {
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId());
throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "司机完成签收,无法追加订单");
@ -3239,6 +3243,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
logs.add(js);
});
} else {
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())) {
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId());
throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "文员完成复核,无法追加订单");
}
if (Func.isNotEmpty(reservationEntity) && reservationEntity.getSigningStatus().equals(ReservationSigningStatusConstant.yiqianshou.getValue())) {
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId());
throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "司机完成签收,无法追加订单");
@ -3361,8 +3369,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(packageListInfo)) {
packageListInfo.forEach(p -> {
if (Func.isEmpty(oldPackageList.get(p.getId()))) {
if (Func.isNotEmpty(reservationEntity) && reservationEntity.getSigningStatus().equals(ReservationSigningStatusConstant.yiqianshou.getValue())) {
if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())) {
log.error("#############商配文员对已复核预约进行订单追加reservationId:{}", reservationEntity.getId());
throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "文员完成复核,无法追加订单");
}
if (Func.isNotEmpty(reservationEntity) && reservationEntity.getSigningStatus().equals(ReservationSigningStatusConstant.yiqianshou.getValue())) {
log.error("#############商配文员对司机完成签收订单追加reservationId:{}", reservationEntity.getId());
throw new RuntimeException("收货单位:" + reservationEntity.getMallName() + "客户:" + reservationEntity.getConsignee() + "司机完成签收,无法追加订单");
}
//为该订单新增了包件
@ -6089,11 +6101,21 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
log.error("###########查询配送任务异常,deliveyId:{}", deliveryId);
return false;
}
DistributionReservationEntity reservationEntity = distributionReservationService.getById(reservationId);
if (Func.isEmpty(reservationEntity)) {
log.error("###########查询预约任务异常,reservationId:{}", reservationId);
return false;
}
if (conditions != 1) {
log.error("###########包件类型错误,conditions:{}", conditions);
return false;
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
log.error("###########retentionDeliveryReservationPackage未授权,warehouse:{}", myCurrentWarehouse);
return false;
}
List<JSONObject> aaa =new ArrayList<>();
//订制品
//需要对该配送任务下的该包件进行取消状态标识
int row = distributionReservationMapper.cancelReservationPackage(reservationId, orderPackageId);
@ -6116,6 +6138,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
int a = distributionSignforMapper.deductionLoadingPacjageNum(loadscanEntity.getReservationId(), loadscanEntity.getDeliveryId(), loadscanEntity.getLoadedNub());
//维护订单状态
distributionStockArticleService.maintenanceOrderInfo(parcelListEntity.getOrderCode(), parcelListEntity.getWarehouseId());
//增加滞留信息
String content = "包件在"+myCurrentWarehouse.getName()+"由"+loadscanEntity.getScanUser()+"取消配车,取消方式:滞留扫描,取消计划,配送车次号:"+loadscanEntity.getTrainNumber()+"预约任务号:"+reservationEntity.getReservationCode();
JSONObject js = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), parcelListEntity.getOrderPackageCode(),content , WorkNodeEnums.CANCEL_DISTRIBUTION.getCode());
aaa.add(js);
}
if (!aaa.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
//进行了一条包件任务的取消,此时就应该对预约、配送任务进行数量的维护
distributionAsyncService.checkRetentionReservationAndDeliveryInfo(reservationId, deliveryId);

Loading…
Cancel
Save