Browse Source

1.尝试修复入库的报错,

2.尝试修复装车人信息缺失问题
master
pref_mail@163.com 4 months ago
parent
commit
a284ec87fb
  1. 10
      blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java
  2. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/MyExcelUtil.java
  4. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  5. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  6. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  7. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  8. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/waybil/StatusLogListener.java
  9. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java
  10. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java
  11. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillTrackServiceImpl.java

10
blade-biz-common/src/main/java/org/springblade/common/model/PackageData.java

@ -150,6 +150,16 @@ public class PackageData implements Serializable {
private String signUser;//签收人
/**
* 装车人
*/
private String loadingUserName;
private Long finalNodeId;
private String finalNodeName;

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java

@ -323,6 +323,6 @@ public interface IDistributionParcelListClient {
List<String> findSignOrderPackageCodes(@RequestBody List<String> orderPackageCodes);
@PostMapping(API_PREFIX + "/findListZhaoBuDaoYuanYin")
List<DistributionParcelListEntity> findListZhaoBuDaoYuanYin(FindParamterDTO findParamterD);
List<DistributionParcelListEntity> findListZhaoBuDaoYuanYin(@RequestBody FindParamterDTO findParamterD);
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/bean/MyExcelUtil.java

@ -43,7 +43,7 @@ public class MyExcelUtil extends ExcelUtil {
//进行是否零担的区分
Map<String, List<DistributionStockupPackageListDetailExcel>> isZeroMap = v.stream().collect(Collectors.groupingBy(DistributionStockupPackageListDetailExcel::getIsZero));
isZeroMap.forEach((m,n)->{
if (m.equals("0")){
if ("0".equals(m)){
//订制品
WriteSheet writeSheet = EasyExcel.writerSheet(1,"订制品备货清单").head(DistributionStockupPackageListDetailExcel.class).build();
excelWriter.write(n, writeSheet);

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java

@ -682,9 +682,9 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
@Override
public List<DistributionParcelListEntity> findListZhaoBuDaoYuanYin(FindParamterDTO findParamterD) {
log.info("###################findListZhaoBuDaoYuanYin: 当前处理的订单数据 {}",findParamterD);
QueryWrapper<DistributionParcelListEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.in("order_code", findParamterD.getOrderCodeSet())
.eq("warehouse_id", findParamterD.getWarehouseId());
LambdaQueryWrapper<DistributionParcelListEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(DistributionParcelListEntity::getOrderCode, findParamterD.getOrderCodeSet())
.eq(DistributionParcelListEntity::getWarehouseId, findParamterD.getWarehouseId());
return distributionParcelListService.list(queryWrapper);
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -906,7 +906,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
BasicTenantCodeEntity basicTenantCodeByCodeAndShowType = basicTenantCodeClient.findBasicTenantCodeByCodeAndShowType(BasicCodeTypeConstant.STOCK_CODE.getValue(), BasicCodeShowConstant.QR_CODE.getValue());
String tenantCode = "BH";
if (ObjectUtils.isNull(basicTenantCodeByCodeAndShowType)) {
log.error("获取货区码失败");
log.warn(" bianMa 获取货区码失败");
} else {
tenantCode = basicTenantCodeByCodeAndShowType.getCode();
}
@ -937,7 +937,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
BasicTenantCodeEntity basicTenantCodeByCodeAndShowType = basicTenantCodeClient.findBasicTenantCodeByCodeAndShowType(BasicCodeTypeConstant.APPOINTMENT_CODE.getValue(), BasicCodeShowConstant.QR_CODE.getValue());
String tenantCode = "YY";
if (ObjectUtils.isNull(basicTenantCodeByCodeAndShowType)) {
log.error("获取货区码失败");
log.warn(" reservationMa 获取货区码失败");
} else {
tenantCode = basicTenantCodeByCodeAndShowType.getCode();
}
@ -968,7 +968,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
BasicTenantCodeEntity basicTenantCodeByCodeAndShowType = basicTenantCodeClient.findBasicTenantCodeByCodeAndShowType(BasicCodeTypeConstant.APPOINTMENT_CODE.getValue(), BasicCodeShowConstant.QR_CODE.getValue());
String tenantCode = "HK";
if (ObjectUtils.isNull(basicTenantCodeByCodeAndShowType)) {
log.error("获取货区码失败");
log.warn("retentionMa 获取货区码失败");
} else {
tenantCode = basicTenantCodeByCodeAndShowType.getCode();
}
@ -1023,7 +1023,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
String tenantCode = "PSCC";
BasicTenantCodeEntity basicTenantCodeByCodeAndShowType = basicTenantCodeClient.findBasicTenantCodeByCodeAndShowType(BasicCodeTypeConstant.DELIVERY_PLAN_CODE.getValue(), BasicCodeShowConstant.QR_CODE.getValue());
if (ObjectUtils.isNull(basicTenantCodeByCodeAndShowType)) {
log.error("获取货区码失败");
log.warn(" trainNumberMa 获取货区码失败");
} else {
tenantCode = basicTenantCodeByCodeAndShowType.getCode();
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -814,6 +814,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
PackageData packageData = new PackageData();
packageData.setSignTime(org.springblade.core.tool.utils.DateUtil.parse(distributionLoadscanEntity.getSigningTime(),"yyyy-MM-dd hh:mm:ss"));
packageData.setSignUser(distributionLoadscanEntity.getSigningUser());
// 增加装车扫描人
packageData.setLoadingUserName(distributionLoadscanEntity.getScanUser());
// 不是零担
if (distributionLoadscanEntity.getIsZero() == null || distributionLoadscanEntity.getIsZero() == 0) {
packageData.setPackageCode(distributionLoadscanEntity.getOrderPackageCode());
@ -9015,11 +9017,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
DistributionDeliverySelfEntity deliverySelfEntity = this.getDriver(deliveryListEntity, user,driver);
log.info("driverName>>>>>>>>>>>>>:{}", deliverySelfEntity.getDriverName());
if (Objects.isNull(deliverySelfEntity)) {
return Resp.scanFail("当前人无操作权限", "当前人无操作权限");
}
//针对之前该司机上传的图片进行全部删除
//针对之前该司机上传的图片进行全部删除
//查询该司机已有的图片信息
List<DistributionSignPrintEntity> list = iDistributionSignPrintService.list(Wrappers.<DistributionSignPrintEntity>query().lambda()
.eq(DistributionSignPrintEntity::getReservationId, signforEntity.getReservationId())

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -4176,6 +4176,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
PackageData packageData = new PackageData();
packageData.setSignUser(t.getScanUser());
packageData.setSignTime(t.getCreateTime());
packageData.setLoadingUserName(t.getScanUser());
if ("1".equals(t.getMaterialType())) {
// 库存
Long stockListId = t.getStockListId();
@ -5023,7 +5024,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
String tenantCode = "ZT";
BasicTenantCodeEntity basicTenantCodeByCodeAndShowType = basicTenantCodeClient.findBasicTenantCodeByCodeAndShowType(BasicCodeTypeConstant.DELIVERY_PLAN_CODE.getValue(), BasicCodeShowConstant.QR_CODE.getValue());
if (ObjectUtils.isNull(basicTenantCodeByCodeAndShowType)) {
log.error("获取货区码失败");
log.warn(" billMa 获取货区码失败");
} else {
tenantCode = basicTenantCodeByCodeAndShowType.getCode();
}

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/waybil/StatusLogListener.java

@ -73,10 +73,12 @@ public class StatusLogListener {
WaybillLogDTO t = new WaybillLogDTO();
List<PackageData> packageDataList = map.get(waybillNumber);
if (packageDataList != null && !packageDataList.isEmpty()) {
packageDataList.sort(Comparator.comparing(PackageData::getSignTime));
// 按照时间做新的在最前面
packageDataList.sort(Comparator.comparing(PackageData::getSignTime).reversed());
// 获取排序第一个
t.setSignUser(packageDataList.get(0).getSignUser());
t.setSignTime(packageDataList.get(0).getSignTime());
t.setLoadingUser(packageDataList.get(0).getLoadingUserName());
}
t.setWaybillNo(waybillNumber);
t.setWarehouseName(bean.getWarehouse());
@ -89,6 +91,7 @@ public class StatusLogListener {
t.setNum(waybillCountMap.get(waybillNumber));
t.setSignOrderCode(vo.getPickupBatch());
t.setType(3);
trunklineWaybillTrackClient.addSignWaybillLog(t);

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java

@ -224,7 +224,7 @@ public class InComingServiceImpl implements IInComingService {
.build();
factoryDataMessageSender.sendNodeDataByBrand(nodePushMsg);
} catch (Exception e) {
log.error("入库推送失败:{}", e);
log.error("入库推送失败:", e);
}
}
}
@ -822,7 +822,7 @@ public class InComingServiceImpl implements IInComingService {
String tenantId = inComingDTO.getTenantId();
String nickName = inComingDTO.getNickName();
List<TrunklineAdvanceDetailEntity> sendAdvanceDetailEntityList = new ArrayList();
List<TrunklineAdvanceDetailEntity> sendAdvanceDetailEntityList = new ArrayList<>();
Set<Long> waybillIdSet = new HashSet<>();
Integer total = 0;

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java

@ -744,6 +744,7 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
}
TrunklineAdvanceDetailEntity advanceDetailEntity = advanceDetailEntities.get(0);
log.info("############saveOrderAndPackages: advanceDetailEntity={}", advanceDetailEntity);
String tenantId = advanceDetailEntity.getTenantId();
Long userId = AuthUtil.getUserId();
Long deptId = Func.firstLong(AuthUtil.getDeptId());
@ -781,6 +782,7 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
FindParamterDTO findParamterDTO = new FindParamterDTO();
findParamterDTO.setOrderCodeSet(orderCodeSet);
findParamterDTO.setWarehouseId(warehouseId);
log.info("############saveOrderAndPackages: findParamterDTO={}", findParamterDTO);
List<DistributionStockArticleEntity> stockArticleEntities = stockArticleClient.findListByOrderCodesAndWarehouseId(findParamterDTO);
Map<String, DistributionStockArticleEntity> stockArticleMap = new HashMap<>();
if (!stockArticleEntities.isEmpty()) {
@ -790,6 +792,8 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
FindParamterDTO findParamterD = new FindParamterDTO();
findParamterD.setOrderCodeSet(orderCodeSet);
findParamterD.setWarehouseId(warehouseId);
log.info("############saveOrderAndPackages: findParamterD={}", findParamterD);
List<DistributionParcelListEntity> parcelListEntities = parcelListClient.findListZhaoBuDaoYuanYin(findParamterD);
Map<String, DistributionParcelListEntity> parcelListMap = new HashMap<>();
if (!parcelListEntities.isEmpty()) {

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillTrackServiceImpl.java

@ -194,12 +194,12 @@ public class TrunklineWaybillTrackServiceImpl extends BaseServiceImpl<TrunklineW
}
if(type == 3){
//如果是配送签收需要补录配送装车记录
String operationRemark = warehouseName+" 配送装车"+num+"件,车次号:"+trainNumber+",司机:"+driverName+",车牌号:"+carNumber+",装车人"+ loadingUser+",配送时间"+ CommonUtil.dateToStringGeneral(deliveryTime);
String operationRemark = warehouseName+" 配送装车"+num+"件,车次号:"+trainNumber+",司机:"+driverName+",车牌号:"+carNumber+",装车人"+ loadingUser+",配送时间"+ CommonUtil.dateToStringGeneral(deliveryTime);
openOrderAsyncService.saveLog(waybillId,waybillNo,"90",warehouseName+" 配送装车",operationRemark,nickName,userId,warehouseId,warehouseName);
}
//存入签收日志
String operationRemark = warehouseName+" "+typeStr+num+"件,车次号:"+trainNumber+",司机:"+driverName+",车牌号:"+carNumber+",签收人"+ signUser+",签收单:"+signOrderCode+",签收时间"+ CommonUtil.dateToStringGeneral(signTime);
String operationRemark = warehouseName+" "+typeStr+num+"件,车次号:"+trainNumber+",司机:"+driverName+",车牌号:"+carNumber+",签收人"+ signUser+",签收单:"+signOrderCode+",签收时间"+ CommonUtil.dateToStringGeneral(signTime);
openOrderAsyncService.saveLog(waybillId,waybillNo,"100",warehouseName+" "+typeStr,operationRemark,nickName,userId,warehouseId,warehouseName);
trunklineWaybillPackageService.updateWaybillStatus(waybillEntity);

Loading…
Cancel
Save