Browse Source

1.干线bug修复

master
zhenghaoyu 9 months ago
parent
commit
a199f7ef8d
  1. 5
      blade-biz-common/src/main/java/org/springblade/common/constant/IncomingTypeEnum.java
  2. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineCarsLoadScanClient.java
  3. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java
  4. 7
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java
  5. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineCarsLoadScanClient.java
  6. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  7. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java
  8. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
  9. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml
  10. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java
  11. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java
  12. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  13. 222
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  14. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java

5
blade-biz-common/src/main/java/org/springblade/common/constant/IncomingTypeEnum.java

@ -16,13 +16,12 @@ public enum IncomingTypeEnum {
UNLOAD_TRAY_ONE(9, "卸分一体"),
OPEN_TO_IN(10, "开单及入库"),
FACTORY_TO_INCOMING(11, "工厂推送数据入库"),
SUPPLE_INCOMING(12, "数据补录入库");
SUPPLE_INCOMING(12, "数据补录入库"),
ABNORMAL_INCOMING(13, "异常列表入库");
private Integer code;
private String value;
IncomingTypeEnum(Integer code, String value) {
this.code = code;
this.value = value;

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineCarsLoadScanClient.java

@ -19,6 +19,9 @@ public interface ITrunklineCarsLoadScanClient {
@GetMapping(API_PREFIX+"/incomingPackage")
R incomingPackage(@RequestParam Long carsLoadScanId);
@GetMapping(API_PREFIX+"/adnormalHasStock")
R adnormalHasStock(@RequestParam Long carsLoadScanId, @RequestParam Long warehouseId);
// @PostMapping(API_PREFIX+"/addAdvanceReturnId")
// Long addAdvanceReturnId(@RequestBody TrunklineAdvanceEntity trunklineAdvanceEntity);

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java

@ -50,5 +50,6 @@ public class TrunklineCarsLoadVO extends TrunklineCarsLoadEntity {
private Integer lastStartCarStatus;
private Integer planUnloadNum;
private Integer totalLoadingNum;
private String loadCarsNo;
}

7
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAbnormalRecordServiceImpl.java

@ -106,6 +106,13 @@ public class AftersalesAbnormalRecordServiceImpl extends BaseServiceImpl<Aftersa
abnormalRecordEntity.setRemark("本车次少货("+upWarehouseName+" "+AuthUtil.getNickName()+")");
}else if(dealType.equals(4)){
Long warehouseId = abnormalRecordDTO.getWarehouseId();
R r = trunklineCarsLoadScanClient.adnormalHasStock(carsLoadScanId,warehouseId);
int code = r.getCode();
if(code != 200){
return r;
}
//已入库
abnormalRecordEntity.setRemark("已入库("+upWarehouseName+" "+AuthUtil.getNickName()+")");
}

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineCarsLoadScanClient.java

@ -25,4 +25,9 @@ public class TrunklineCarsLoadScanClient implements ITrunklineCarsLoadScanClient
public R incomingPackage(Long carsLoadScanId) {
return trunklineCarsLoadService.syncIncomingPackage(carsLoadScanId);
}
@Override
public R adnormalHasStock(Long carsLoadScanId, Long warehouseId) {
return trunklineCarsLoadService.adnormalHasStock(carsLoadScanId,warehouseId);
}
}

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -114,6 +114,9 @@
<if test="param.warehouseId != null" >
and ltcl.end_warehouse_ids like concat('%',#{param.warehouseId},'%')
</if>
<if test="param.loadCarsNo != null and param.loadCarsNo != ''">
and Locate(#{param.loadCarsNo},ltcl.cars_no) > 0
</if>
group by ltcl.id,ltcl.cars_no,
ltcl.plan_loading_number,
ltcl.real_loading_number,
@ -395,7 +398,7 @@
and ltcl.create_time &lt;= #{param.endTime}
</if>
<if test="param.loadCarsNo != null and param.loadCarsNo != ''">
and ltcl.cars_no &lt;= #{param.loadCarsNo}
and Locate(#{param.loadCarsNo},ltcl.cars_no) > 0
</if>
group by ltcl.id
order by ltcl.create_time desc

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

@ -58,4 +58,6 @@ public interface TrunklineCarsOrderMapper extends BaseMapper<TrunklineCarsOrderE
TrunklineCarsOrderEntity findEntityByLoadIdAndWarehouseIdAndOrderCodeAndWaybillNo(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId, @Param("orderCode") String orderCode, @Param("waybillNo") String waybillNo);
List<TrunklineCarsOrderEntity> findLoadingList(@Param("loadId") Long loadId, @Param("nodeId") Long nodeId);
Integer findLoadingNumBySignOrderId(@Param("signOrderId") Long signOrderId);
}

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml

@ -316,4 +316,11 @@
and real_num > 0
</select>
<select id="findLoadingNumBySignOrderId" resultType="int">
select IFNULL(sum(real_num),0)
from logpm_trunkline_cars_order
where sign_order_id = #{signOrderId}
</select>
</mapper>

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml

@ -23,6 +23,12 @@
ltlso.plan_num planNum,
ltlso.load_sign_code loadSignCode,
ltlso.sign_num signNum,
ltlso.mall_name mallName,
ltlso.mall_person mallPerson,
ltlso.mall_mobile mallMobile,
ltlso.mall_address mallAddress,
ltlso.belong_to_warehouse_name belongToWarehouseName,
ltlso.sign_status signStatus,
ltcl.driver_name driverName,
ltcl.driver_mobile driverMobile,
ltcl.car_number carNumber,

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java

@ -217,4 +217,6 @@ public interface ITrunklineCarsLoadService extends BaseService<TrunklineCarsLoad
R findSignOrderPageList(LoadCarsDTO loadCarsDTO);
R findSignPhotoList(LoadCarsDTO loadCarsDTO);
R adnormalHasStock(Long carsLoadScanId, Long warehouseId);
}

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java

@ -55,4 +55,6 @@ public interface ITrunklineCarsOrderService extends BaseService<TrunklineCarsOrd
TrunklineCarsOrderEntity findEntityByLoadIdAndWarehouseIdAndOrderCodeAndWaybillNo(Long loadId, Long warehouseId, String orderCode, String waybillNo);
List<TrunklineCarsOrderEntity> findLoadingList(Long loadId, Long nodeId);
Integer findLoadingNumBySignOrderId(Long signOrderId);
}

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

@ -2185,13 +2185,13 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
});
parcelListEntityList.forEach(parcelListEntity -> {
Long nowWarehouseId = parcelListEntity.getWarehouseId();
parcelListEntity.setSendWarehouseId(departureWarehouseId);
parcelListEntity.setSendWarehouseName(departureWarehouseName);
parcelListEntity.setAcceptWarehouseId(destinationWarehouseId);
parcelListEntity.setAcceptWarehouseName(destinationWarehouseName);
if(departureWarehouseId.equals(destinationWarehouseId)){
if(nowWarehouseId.equals(destinationWarehouseId)){
parcelListEntity.setIsTransfer(0);
}else{
parcelListEntity.setIsTransfer(1);

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

@ -4563,11 +4563,22 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setUnloadTime(date);
carsLoadScanEntity.setRemark("未入库签收");
trunklineCarsLoadScanService.save(carsLoadScanEntity);
Long loadScanId = carsLoadScanEntity.getId();
trunklineCarsLoadingLogService.savaLoadingLog(null, null, loadId, carsNo, null, null, null, orderPackageCode, 1, 1, 1, 1, null, null, null, null, carsLoadScanEntity.getId(), "未入库补装车记录");
trunklineCarsSignLogService.saveSignLog(null, null, loadId, carsNo, null, null, null, orderPackageCode, 1, 1, 1, 1, null, null, null, null, carsLoadScanEntity.getId(), "未入库异常签收");
//无装车记录异常日志记录
try {
carsLoadAsyncService.abnormalListUnloadByLoadIdAndWarehouseId(loadId, warehouseId, warehouseEntity.getName(), loadScanId, AuthUtil.getTenantId(), AuthUtil.getUserId(), AuthUtil.getNickName(), Func.firstLong(AuthUtil.getDeptId()));
} catch (Exception e) {
log.warn("###############unloadPackage: 存入异常列表记录失败");
}
}else{
log.warn("##############signScanPackageCode: 包件未入库 orderPackageCode={}", orderPackageCode);
return R.fail(405, "包件未入库");
@ -4621,6 +4632,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setUnloadTime(date);
carsLoadScanEntity.setRemark("有数据异常签收");
trunklineCarsLoadScanService.save(carsLoadScanEntity);
Long loadScanId = carsLoadScanEntity.getId();
//存入补装车记录
trunklineCarsLoadingLogService.savaLoadingLog(null, null, loadId, carsNo, null, waybillNumber, orderCode, orderPackageCode, 1, 1, 1, 1, null, null, null, wid, carsLoadScanEntity.getId(), "有数据异常补装车记录");
@ -4629,6 +4641,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//更新包件状态
distributionParcelListClient.updateOrderPackageCodeById(parcelListEntity.getId(), "70");
//无装车记录异常日志记录
try {
carsLoadAsyncService.abnormalListUnloadByLoadIdAndWarehouseId(loadId, warehouseId, warehouseEntity.getName(), loadScanId, AuthUtil.getTenantId(), AuthUtil.getUserId(), AuthUtil.getNickName(), Func.firstLong(AuthUtil.getDeptId()));
} catch (Exception e) {
log.warn("###############unloadPackage: 存入异常列表记录失败");
}
}
} else {
@ -4742,7 +4761,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
log.warn("##############signScanPackageCode: 签收单信息不存在 signOrderId={}", signOrderId);
throw new CustomerException(405, "签收单信息不存在");
}
Integer loadingNum = signOrderEntity.getLoadingNum();
Integer loadingNum = trunklineCarsOrderService.findLoadingNumBySignOrderId(signOrderId);
Integer signNum = trunklineCarsOrderService.findSignNumBySignOrderId(signOrderId);
Integer realSignNum = trunklineCarsLoadScanService.findRealSignNumBySignOrderId(signOrderId);
@ -4752,6 +4771,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
signOrderEntity.setSignTime(new Date());
} else {
signOrderEntity.setSignStatus("10");
signOrderEntity.setSignTime(new Date());
}
trunklineLoadSignOrderService.updateById(signOrderEntity);
@ -4894,7 +4914,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
entity.setUnloadNum(t.getNum());
entity.setSignTime(date);
entity.setSignUserName(AuthUtil.getNickName());
entity.setUnloadUserName(AuthUtil.getNickName());
entity.setUnloadTime(date);
entity.setUnloadNodeId(warehouseId);
entity.setUnloadNodeName(warehouseName);
if (entity.getType().equals(1)) {
String scanCode = entity.getScanCode();
List<DistributionParcelListEntity> parcelList = parcelListMap.get(scanCode);
@ -5791,6 +5814,55 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.data(ls);
}
@Override
public R adnormalHasStock(Long carsLoadScanId, Long warehouseId) {
TrunklineCarsLoadScanEntity trunklineCarsLoadScan = trunklineCarsLoadScanService.getById(carsLoadScanId);
if(Objects.isNull(trunklineCarsLoadScan)){
log.warn("###############adnormalHasStock: 装车明细不存在");
return R.fail(405, "装车明细不存在");
}
Long loadId = trunklineCarsLoadScan.getLoadId();
Integer type = trunklineCarsLoadScan.getType();
String scanCode = trunklineCarsLoadScan.getScanCode();
Integer num = trunklineCarsLoadScan.getNum();
String trayCode = trunklineCarsLoadScan.getTrayCode();
String waybillNo = trunklineCarsLoadScan.getWaybillNo();
String orderCode = trunklineCarsLoadScan.getOrderCode();
if(type==1){
//包件
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(scanCode, warehouseId);
if(Objects.isNull(parcelListEntity)){
log.info("#########adnormalHasStock: 包件信息不存在");
Integer unbingTray = 0;
if(StringUtil.isNotBlank(trayCode)){
unbingTray = 1;
}
unloadPackage(loadId,scanCode,warehouseId,unbingTray,IncomingTypeEnum.ABNORMAL_INCOMING.getValue(),IncomingTypeEnum.ABNORMAL_INCOMING.getCode());
}else{
String orderPackageStatus = parcelListEntity.getOrderPackageStatus();
if("20".equals(orderPackageStatus)){
log.warn("#########adnormalHasStock: 包件已入库 scanCode={} warehouseId={}",scanCode,warehouseId);
return R.fail(405,"包件已入库");
}else{
Integer unbingTray = 0;
if(StringUtil.isNotBlank(trayCode)){
unbingTray = 1;
}
unloadPackage(loadId,scanCode,warehouseId,unbingTray,IncomingTypeEnum.ABNORMAL_INCOMING.getValue(),IncomingTypeEnum.ABNORMAL_INCOMING.getCode());
}
}
}else{
Integer unbingTray = 0;
if(StringUtil.isNotBlank(trayCode)){
unbingTray = 1;
}
//零担
unloadZero(loadId,waybillNo,num,warehouseId,unbingTray,trayCode,orderCode,"异常列表入库");
}
return R.success("入库成功");
}
@Override
public R loadingTrayInfo(LoadCarsDTO loadCarsDTO) {
log.info("##############loadingTrayInfo: 查询托盘的货物信息");
@ -6300,11 +6372,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//判断是否有装车扫描记录
if (Objects.isNull(carsLoadScanEntity)) {
//没有装车扫码记录
//先判断是否在其他车次中
// QueryWrapper<TrunklineCarsLoadScanEntity> loadScanQueryWrapper = new QueryWrapper<>();
// loadScanQueryWrapper.eq("load_id", loadId)
// .eq("scan_code", orderPackageCode);
// carsLoadScanEntity = trunklineCarsLoadScanService.getOne(loadScanQueryWrapper);
//不在计划中,则查询在哪个仓库中
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByOrderPackageCodeAndStatus(orderPackageCode);
@ -6353,6 +6420,148 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, null, null, null, orderPackageCode, 1,
1, 1, 1, trayId, trayCode, trayName, null, loadScanId, "有数据,异常卸车");
}else{
//已入库
Long nowWarehouseId = advanceDetailEntity.getNowWarehouseId();
String nowWarehouseName = advanceDetailEntity.getNowWarehouseName();
//需要补装车扫记录
TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity = new TrunklineCarsLoadScanEntity();
trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
trunklineCarsLoadScanEntity.setOrderCode(advanceDetailEntity.getOrderCode());
trunklineCarsLoadScanEntity.setWaybillId(advanceDetailEntity.getWaybillId());
trunklineCarsLoadScanEntity.setWaybillNo(advanceDetailEntity.getWaybillNo());
trunklineCarsLoadScanEntity.setLoadId(loadId);
trunklineCarsLoadScanEntity.setLoadCode(loadCode);
trunklineCarsLoadScanEntity.setScanCode(orderPackageCode);
trunklineCarsLoadScanEntity.setScanStatus("2");
trunklineCarsLoadScanEntity.setNum(1);
trunklineCarsLoadScanEntity.setType(1);
trunklineCarsLoadScanEntity.setIsData(1);
trunklineCarsLoadScanEntity.setLoadingAbnormal(1);
trunklineCarsLoadScanEntity.setUnloadAbnormal(1);
trunklineCarsLoadScanEntity.setUnloadNodeName(warehouseName);
trunklineCarsLoadScanEntity.setUnloadNodeId(warehouseId);
trunklineCarsLoadScanEntity.setUnloadNum(1);
trunklineCarsLoadScanEntity.setIsSupple(0);
trunklineCarsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName());
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
trunklineCarsLoadScanEntity.setUnloadTime(new Date());
trunklineCarsLoadScanEntity.setFromWarehouseId(nowWarehouseId);
trunklineCarsLoadScanEntity.setRemark("无装车记录卸车");
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity);
loadScanId = trunklineCarsLoadScanEntity.getId();
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, null, null, null, orderPackageCode, 1,
1, 1, 1, trayId, trayCode, trayName, null, loadScanId, "有数据,无计划,无装车,补装车计划,异常装车");
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, null, null, null, orderPackageCode, 1,
1, 1, 1, trayId, trayCode, trayName, null, loadScanId, "有数据,无计划,无装车,异常卸车");
//无装车记录异常日志记录
try {
carsLoadAsyncService.abnormalListUnloadByLoadIdAndWarehouseId(loadId, warehouseId, warehouseName, loadScanId, AuthUtil.getTenantId(), AuthUtil.getUserId(), AuthUtil.getNickName(), Func.firstLong(AuthUtil.getDeptId()));
} catch (Exception e) {
log.warn("###############unloadPackage: 存入异常列表记录失败");
}
DistributionParcelListEntity nowParcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(orderPackageCode, nowWarehouseId);
if(Objects.isNull(nowParcelListEntity)){
log.warn("###############unloadPackage: 包件信息不存在 orderPackageCode={},nowWarehouseId={}",orderPackageCode,nowWarehouseId);
return R.fail(405,"包件信息不存在");
}
orderCode = nowParcelListEntity.getOrderCode();
Long packageId = nowParcelListEntity.getId();
String orderPackageStatus = nowParcelListEntity.getOrderPackageStatus();
String waybillNumber = nowParcelListEntity.getWaybillNumber();
DistributionStockArticleEntity nowDistributionStockArticle = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, nowWarehouseId);
if(Objects.isNull(nowDistributionStockArticle)){
log.warn("###############unloadPackage: 订单信息不存在 orderCode={},nowWarehouseId={}",orderCode,nowWarehouseId);
return R.fail(405,"订单信息不存在");
}
Long articleId = nowDistributionStockArticle.getId();
if(!"70".equals(orderPackageStatus)){
distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
distributionParcelListClient.updateOrderPackageCodeById(packageId, "60");
}
Long currentOrderId = null;
//查询当前仓库订单信息有没有
DistributionStockArticleEntity currentStockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId);
if (Objects.isNull(currentStockArticleEntity)) {
//查询包件前面仓的订单信息
currentStockArticleEntity = new DistributionStockArticleEntity();
BeanUtil.copy(nowDistributionStockArticle, currentStockArticleEntity);
currentStockArticleEntity.setId(null);
currentStockArticleEntity.setWarehouseId(warehouseId);
currentStockArticleEntity.setWarehouse(warehouseName);
currentStockArticleEntity.setHandQuantity(0);
currentStockArticleEntity.setCompleteSet(1);
currentStockArticleEntity.setStockupStatus("10");
currentStockArticleEntity.setReservationStatus("10");
currentStockArticleEntity.setOrderStatus("10");
currentStockArticleEntity.setGroundingStatus("10");
currentStockArticleEntity.setOrderReceiveStatus("10");
currentStockArticleEntity.setFreezeStatus("10");
currentStockArticleEntity.setSortingQuantity(0);
currentStockArticleEntity.setDeliveryQuantity(0);
currentStockArticleEntity.setTransferQuantity(0);
currentStockArticleEntity.setSigninQuantity(0);
currentStockArticleEntity.setIncomingNum(0);
currentOrderId = distributionStockArticleClient.addData(currentStockArticleEntity);
currentStockArticleEntity.setId(currentOrderId);
} else {
currentOrderId = currentStockArticleEntity.getId();
}
//判断包件当前仓是否是目的仓
WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNumber);
if (Objects.isNull(distributionParcelListEntity)) {
distributionParcelListEntity = new DistributionParcelListEntity();
BeanUtil.copy(nowParcelListEntity, distributionParcelListEntity);
distributionParcelListEntity.setId(null);
distributionParcelListEntity.setIsTransfer(1);
if (!Objects.isNull(warehouseWaybillEntity)) {
Long destinationWarehouseId = warehouseWaybillEntity.getDestinationWarehouseId();//目的仓
if (destinationWarehouseId.equals(warehouseId)) {
distributionParcelListEntity.setIsTransfer(0);
}
}
distributionParcelListEntity.setAdvanceId(nowParcelListEntity.getAdvanceId());
distributionParcelListEntity.setOrderPackageStatus("20");
distributionParcelListEntity.setWarehouseId(warehouseId);
distributionParcelListEntity.setWarehouse(warehouseName);
distributionParcelListEntity.setTrainNumber(loadCode);
distributionParcelListEntity.setStockArticleId(currentOrderId);
distributionParcelListEntity.setOrderPackageFreezeStatus("10");
distributionParcelListEntity.setOrderPackageGroundingStatus("10");
distributionParcelListEntity.setOrderPackageStockupStatus("10");
distributionParcelListEntity.setOrderPackageReservationStatus("10");
distributionParcelListEntity.setOrderPackageLoadingStatus("10");
distributionParcelListEntity.setWarehouseEntryTimeEnd(new Date());
boolean add = distributionParcelListClient.add(distributionParcelListEntity);
if (add) {
distributionStockArticleClient.addIncomingNum(currentOrderId, 1);
}
} else {
distributionParcelListEntity.setOrderPackageStatus("20");
if (!Objects.isNull(warehouseWaybillEntity)) {
Long destinationWarehouseId = warehouseWaybillEntity.getDestinationWarehouseId();//目的仓
if (destinationWarehouseId.equals(warehouseId)) {
distributionParcelListEntity.setIsTransfer(0);
} else {
distributionParcelListEntity.setIsTransfer(1);
}
}
distributionParcelListClient.update(distributionParcelListEntity);
}
updownTypeClient.downPackageOrDelTray(orderPackageCode, nowWarehouseId, "干线卸车下架解托");
}
}else{
//需要补装车扫记录
@ -6385,6 +6594,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, null, null, null, orderPackageCode, 1,
1, 0, 1, trayId, trayCode, trayName, null, loadScanId, "无数据,异常卸车");
}
} else {
String waybillNumber = parcelListEntity.getWaybillNumber();

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java

@ -133,4 +133,9 @@ public class TrunklineCarsOrderEntityServiceImpl extends BaseServiceImpl<Trunkli
return baseMapper.findLoadingList(loadId,nodeId);
}
@Override
public Integer findLoadingNumBySignOrderId(Long signOrderId) {
return baseMapper.findLoadingNumBySignOrderId(signOrderId);
}
}

Loading…
Cancel
Save