Browse Source

1.干线bug,运单bug修复

dist.1.3.0
zhenghaoyu 2 months ago
parent
commit
8e008c890e
  1. 2
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java
  2. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  3. 44
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  4. 14
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java

2
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java

@ -7,7 +7,7 @@ import java.io.Serializable;
@Data
public class UnloadPackageVO implements Serializable {
private Long loadScanId;
private Long carsLoadScanId;
private String orderPackageCode;
private Integer num;
private Integer unloadNum;

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -221,7 +221,7 @@
</select>
<select id="findUnloadPackageList" resultType="com.logpm.trunkline.vo.UnloadPackageVO">
select id loadScanId,
select id carsLoadScanId,
scan_code orderPackageCode,
num num,
unload_num unloadNum,

44
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -3105,27 +3105,29 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
// String operationRemark = "运单装车"+enterNum+"件 干线批次号:"+carsLoadEntity.getCarsNo()+",车牌号:"+carsLoadEntity.getCarNumber()+",司机姓名:"+carsLoadEntity.getDriverName()+",司机手机:"+carsLoadEntity.getDriverMobile();
// openOrderAsyncService.saveLog(waybillId, waybillNo, "30", "干线装车", operationRemark, AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName);
QueryWrapper<TrunklineWaybillOrderEntity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.eq("waybill_id",waybillId)
.eq("order_code",waybillNo);
TrunklineWaybillOrderEntity one = trunklineWaybillOrderService.getOne(queryWrapper1);
if(!Objects.isNull(one)){
Integer totalCount = waybillEntity.getTotalCount();
Integer waybillStatusInt = Integer.parseInt(waybillEntity.getWaybillStatus());
if(waybillStatusInt <= 30){
Integer handleNumber = one.getHandleNumber();
int total = handleNumber + enterNum;
if(total < totalCount){
waybillEntity.setWaybillStatus("30");
one.setHandleNumber(total);
}else{
waybillEntity.setWaybillStatus("40");
one.setHandleNumber(totalCount);
}
warehouseWaybillClient.updateEntity(waybillEntity);
trunklineWaybillOrderService.updateById(one);
}
}
// QueryWrapper<TrunklineWaybillOrderEntity> queryWrapper1 = new QueryWrapper<>();
// queryWrapper1.eq("waybill_id",waybillId)
// .eq("order_code",waybillNo);
// TrunklineWaybillOrderEntity one = trunklineWaybillOrderService.getOne(queryWrapper1);
// if(!Objects.isNull(one)){
// Integer totalCount = waybillEntity.getTotalCount();
// Integer waybillStatusInt = Integer.parseInt(waybillEntity.getWaybillStatus());
// if(waybillStatusInt <= 30){
// Integer handleNumber = one.getHandleNumber();
// int total = handleNumber + enterNum;
// if(total < totalCount){
// waybillEntity.setWaybillStatus("30");
// one.setHandleNumber(total);
// }else{
// waybillEntity.setWaybillStatus("40");
// one.setHandleNumber(totalCount);
// }
// warehouseWaybillClient.updateEntity(waybillEntity);
// trunklineWaybillOrderService.updateById(one);
// }
// }
waybillPackageService.updateWaybillStatus(waybillEntity);
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode, goodsName, difficult,
2, isData, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark);

14
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java

@ -137,26 +137,28 @@ public class TrunklineWaybillPackageServiceImpl extends BaseServiceImpl<Trunklin
}
warehouseWaybillClient.updateEntity(updateEntity);
}else if(waybillType == 2){
WarehouseWaybillEntity updateEntity = new WarehouseWaybillEntity();
updateEntity.setId(waybillEntity.getId());
Integer incomingNum = distributionStockArticleClient.findIncomingNumByWaybillNo(waybillNo, destinationWarehouseId);
Integer stockNum = distributionStockArticleClient.findStockNumByWaybillNo(waybillNo,departureWarehouseId);
if(incomingNum == 0){
if(stockNum == 0){
waybillEntity.setWaybillStatus("40");
updateEntity.setWaybillStatus("40");
}else{
if(stockNum == totalCount){
waybillEntity.setWaybillStatus("20");
updateEntity.setWaybillStatus("20");
}else{
waybillEntity.setWaybillStatus("30");
updateEntity.setWaybillStatus("30");
}
}
}else{
if(incomingNum == totalCount){
waybillEntity.setWaybillStatus("60");
updateEntity.setWaybillStatus("60");
}else{
waybillEntity.setWaybillStatus("50");
updateEntity.setWaybillStatus("50");
}
}
warehouseWaybillClient.updateEntity(updateEntity);
}

Loading…
Cancel
Save