|
|
|
@ -2880,7 +2880,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
distributionStockArticleClient.submitHandleNumByOrderId(difficult, articleId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
audio = (realLoadingNumber+enterNum)+"件"; |
|
|
|
|
audio = (enterNum)+"件"; |
|
|
|
|
|
|
|
|
|
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode, goodsName, difficult, |
|
|
|
|
2, isData, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark); |
|
|
|
@ -3412,6 +3412,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
String orderCode = zeroSuppleVO.getOrderCode(); |
|
|
|
|
Integer enterNum = zeroSuppleVO.getEnterNum(); |
|
|
|
|
Long finalNodeId = zeroSuppleVO.getFinalNodeId(); |
|
|
|
|
Long signOrderId = zeroSuppleVO.getSignOrderId(); |
|
|
|
|
|
|
|
|
|
WarehouseWaybillEntity warehouseWaybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNo); |
|
|
|
|
if (Objects.isNull(warehouseWaybillEntity)) { |
|
|
|
@ -3452,11 +3453,24 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsLoadScanEntity.setUnloadCheck(0); |
|
|
|
|
carsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName()); |
|
|
|
|
carsLoadScanEntity.setIsSupple(1); |
|
|
|
|
carsLoadScanEntity.setSignOrderId(signOrderId); |
|
|
|
|
trunklineCarsLoadScanService.save(carsLoadScanEntity); |
|
|
|
|
|
|
|
|
|
zeroStockArticleEntity.setHandQuantity(zeroStockArticleEntity.getHandQuantity() - enterNum); |
|
|
|
|
|
|
|
|
|
distributionStockArticleClient.saveOrUpdate(zeroStockArticleEntity); |
|
|
|
|
|
|
|
|
|
if(!Objects.isNull(signOrderId)){ |
|
|
|
|
updateSignOrderNumBySignOrderId(signOrderId); |
|
|
|
|
// TrunklineLoadSignOrderEntity signOrderEntity = trunklineLoadSignOrderService.getById(signOrderId);
|
|
|
|
|
// signOrderEntity.setPlanNum(signOrderEntity.getPlanNum() + enterNum);
|
|
|
|
|
// signOrderEntity.setLoadingNum(signOrderEntity.getLoadingNum() + enterNum);
|
|
|
|
|
// Integer signNum = signOrderEntity.getSignNum();
|
|
|
|
|
// if(signNum > 0 ){
|
|
|
|
|
// signOrderEntity.setSignStatus("10");
|
|
|
|
|
// }
|
|
|
|
|
// trunklineLoadSignOrderService.updateById(signOrderEntity);
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//更新数量
|
|
|
|
|
updateNumByLoadId(loadId); |
|
|
|
@ -5228,10 +5242,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.fail(405, "零担已卸车"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ("3".equals(scanStatus)) { |
|
|
|
|
log.warn("##############signZeroOrder: 零担已签收 carsLoadScanId={} scanStatus={}", carsLoadScanId, scanStatus); |
|
|
|
|
return R.fail(405, "零担已签收"); |
|
|
|
|
} |
|
|
|
|
// if ("3".equals(scanStatus)) {
|
|
|
|
|
// log.warn("##############signZeroOrder: 零担已签收 carsLoadScanId={} scanStatus={}", carsLoadScanId, scanStatus);
|
|
|
|
|
// return R.fail(405, "零担已签收");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Long wid = carsLoadScanEntity.getWarehouseId(); |
|
|
|
@ -5240,6 +5254,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.fail(405, "包件不在签收计划中"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Integer num = carsLoadScanEntity.getNum(); |
|
|
|
|
if(enterNum > num){ |
|
|
|
|
log.warn("##############signScanPackageCode: 签收数量不能大于当前数据的装车数量 num={} enterNum={}", num, enterNum); |
|
|
|
|
return R.fail(405, "签收数量不能大于当前数据的装车数量"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
carsLoadScanEntity.setScanStatus("3"); |
|
|
|
|
carsLoadScanEntity.setUnloadNum(enterNum); |
|
|
|
|
carsLoadScanEntity.setUnloadAbnormal(0); |
|
|
|
@ -6002,11 +6022,27 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
//直发商家签收单
|
|
|
|
|
signOrderEntity.setSignStatus("30"); |
|
|
|
|
//处理零担的数据
|
|
|
|
|
QueryWrapper<TrunklineCarsLoadScanEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("sign_order_id",signOrderId) |
|
|
|
|
.eq("type",2) |
|
|
|
|
.eq("scan_status","3"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<TrunklineCarsLoadScanEntity> carsLoadScanEntityList = trunklineCarsLoadScanService.list(queryWrapper); |
|
|
|
|
carsLoadScanEntityList.forEach(carsLoadScanEntity -> { |
|
|
|
|
Integer num = carsLoadScanEntity.getNum(); |
|
|
|
|
Integer unloadNum = carsLoadScanEntity.getUnloadNum(); |
|
|
|
|
String orderCode = carsLoadScanEntity.getOrderCode(); |
|
|
|
|
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId(); |
|
|
|
|
if(unloadNum != num){ |
|
|
|
|
int diff = num - unloadNum; |
|
|
|
|
DistributionStockArticleEntity stockArticle = distributionStockArticleClient.findZeroByOrderCodeAndWarehouseId(orderCode, fromWarehouseId); |
|
|
|
|
distributionStockArticleClient.addHandQuantity(stockArticle.getId(), diff); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
trunklineLoadSignOrderService.updateById(signOrderEntity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return R.success("添加成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|