|
|
|
@ -2562,7 +2562,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(); |
|
|
|
|
orderPackageCodes.add(orderPackageCode); |
|
|
|
|
String content = "包件在 " + warehouseName + " " + (StringUtil.isBlank(trayName) ? "扫码" : "托盘(" + trayName + ")") + " 装车,配载计划目的仓 " + carsLoadScanEntity.getFinalNodeName() + ",数据来源仓库 " + fromWarehouseName; |
|
|
|
|
String content = "包件在 " + warehouseName + " " + (StringUtil.isBlank(trayName) ? "扫码" : "托盘(" + trayName + ")") + " 装车, 车次号:"+loadCode+" ,配载计划目的仓 " + carsLoadScanEntity.getFinalNodeName() + ",数据来源仓库 " + fromWarehouseName; |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseName, WorkNodeEnums.INITIAL_WAREHOUSE_LOADING.getCode(), content); |
|
|
|
|
|
|
|
|
|
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode, orderPackageCode, 1, |
|
|
|
@ -2756,7 +2756,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
Integer num = carsLoadScanEntity.getNum(); |
|
|
|
|
|
|
|
|
|
if (useNum - num + enterNum > handQuantity) { |
|
|
|
|
int i = enterNum - num; |
|
|
|
|
int i1 = handQuantity - i; |
|
|
|
|
|
|
|
|
|
if (i1 < 0) { |
|
|
|
|
log.warn("##################loadingZero: 不能大于在库件数 handQuantity={} real={}", handQuantity, useNum - num + enterNum); |
|
|
|
|
return R.fail(405, "不能大于在库件数"); |
|
|
|
|
} |
|
|
|
@ -3464,9 +3467,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Long warehouseId = loadCarsDTO.getWarehouseId(); |
|
|
|
|
Integer incomingType = loadCarsDTO.getIncomingType(); |
|
|
|
|
|
|
|
|
|
BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode); |
|
|
|
|
if(Objects.isNull(basicdataTrayEntity)){ |
|
|
|
|
log.warn("#############unloadTrayAllOne: 托盘信息不存在 trayCode={}",trayCode); |
|
|
|
|
return R.fail(405,"托盘信息不存在"); |
|
|
|
|
} |
|
|
|
|
String palletName = basicdataTrayEntity.getPalletName(); |
|
|
|
|
|
|
|
|
|
String orders = null; |
|
|
|
|
if (0 == isZero) { |
|
|
|
|
unloadPackage(loadId, orderPackageCode, warehouseId, 1, "卸分一体 卸车", incomingType); |
|
|
|
|
unloadPackage(loadId, orderPackageCode, warehouseId, 1, "卸分一体 卸车", incomingType,palletName,trayCode); |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("trayType", trayType); |
|
|
|
|
map.put("trayCode", trayCode); |
|
|
|
@ -3483,7 +3493,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
unloadZero(loadId, waybillNo, enterNum, warehouseId, 1, null, orderCode, "卸分一体 卸车"); |
|
|
|
|
unloadZero(loadId, waybillNo, enterNum, warehouseId, 1, null, orderCode, "卸分一体 卸车",palletName,trayCode); |
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("trayType", trayType); |
|
|
|
@ -3975,7 +3985,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
Integer enterNum = unloadZeroDTO.getEnterNum(); |
|
|
|
|
String trayCode = unloadZeroDTO.getTrayCode(); |
|
|
|
|
String orderCode = unloadZeroDTO.getOrderCode(); |
|
|
|
|
unloadZero(loadId, waybillNo, enterNum, warehouseId, 1, trayCode, orderCode, "批量卸车零担正常卸车"); |
|
|
|
|
unloadZero(loadId, waybillNo, enterNum, warehouseId, 1, trayCode, orderCode, "批量卸车零担正常卸车",null,null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<Long> carsLoadScanIds = new ArrayList<>(); |
|
|
|
@ -6142,7 +6152,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
if(StringUtil.isNotBlank(trayCode)){ |
|
|
|
|
unbingTray = 1; |
|
|
|
|
} |
|
|
|
|
unloadPackageNoXz(loadId,scanCode,warehouseId,unbingTray,IncomingTypeEnum.ABNORMAL_INCOMING.getValue(),IncomingTypeEnum.ABNORMAL_INCOMING.getCode()); |
|
|
|
|
unloadPackageNoXz(loadId,scanCode,warehouseId,unbingTray,IncomingTypeEnum.ABNORMAL_INCOMING.getValue(),IncomingTypeEnum.ABNORMAL_INCOMING.getCode(),null,null); |
|
|
|
|
}else{ |
|
|
|
|
String orderPackageStatus = parcelListEntity.getOrderPackageStatus(); |
|
|
|
|
if("20".equals(orderPackageStatus)){ |
|
|
|
@ -6153,7 +6163,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
if(StringUtil.isNotBlank(trayCode)){ |
|
|
|
|
unbingTray = 1; |
|
|
|
|
} |
|
|
|
|
unloadPackageNoXz(loadId,scanCode,warehouseId,unbingTray,IncomingTypeEnum.ABNORMAL_INCOMING.getValue(),IncomingTypeEnum.ABNORMAL_INCOMING.getCode()); |
|
|
|
|
unloadPackageNoXz(loadId,scanCode,warehouseId,unbingTray,IncomingTypeEnum.ABNORMAL_INCOMING.getValue(),IncomingTypeEnum.ABNORMAL_INCOMING.getCode(),null,null); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
@ -6619,7 +6629,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R unloadPackage(Long loadId, String orderPackageCode, Long warehouseId, Integer unbindTray, String remark, Integer incomingType) { |
|
|
|
|
public R unloadPackage(Long loadId, String orderPackageCode, Long warehouseId, Integer unbindTray, String remark, Integer incomingType,String unloadTrayName,String unloadTrayCode) { |
|
|
|
|
log.info("#############unloadPackage: 卸车包件"); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
@ -6711,6 +6721,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
trunklineCarsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName()); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTime(new Date()); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTrayCode(unloadTrayCode); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTrayName(unloadTrayName); |
|
|
|
|
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity); |
|
|
|
|
loadScanId = trunklineCarsLoadScanEntity.getId(); |
|
|
|
|
|
|
|
|
@ -6750,6 +6762,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTime(new Date()); |
|
|
|
|
trunklineCarsLoadScanEntity.setFromWarehouseId(nowWarehouseId); |
|
|
|
|
trunklineCarsLoadScanEntity.setRemark("无装车记录卸车"); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTrayCode(unloadTrayCode); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTrayName(unloadTrayName); |
|
|
|
|
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity); |
|
|
|
|
loadScanId = trunklineCarsLoadScanEntity.getId(); |
|
|
|
|
|
|
|
|
@ -6886,6 +6900,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
trunklineCarsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName()); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTime(new Date()); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTrayCode(unloadTrayCode); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTrayName(unloadTrayName); |
|
|
|
|
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity); |
|
|
|
|
loadScanId = trunklineCarsLoadScanEntity.getId(); |
|
|
|
|
|
|
|
|
@ -6938,6 +6954,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
trunklineCarsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName()); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTime(new Date()); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTrayCode(unloadTrayCode); |
|
|
|
|
trunklineCarsLoadScanEntity.setUnloadTrayName(unloadTrayName); |
|
|
|
|
trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity); |
|
|
|
|
|
|
|
|
|
isData = 1; |
|
|
|
@ -7065,6 +7083,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsLoadScanEntity.setScanStatus("2"); |
|
|
|
|
carsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); |
|
|
|
|
carsLoadScanEntity.setUnloadTime(new Date()); |
|
|
|
|
carsLoadScanEntity.setUnloadTrayCode(unloadTrayCode); |
|
|
|
|
carsLoadScanEntity.setUnloadTrayName(unloadTrayName); |
|
|
|
|
trayCode = carsLoadScanEntity.getTrayCode(); |
|
|
|
|
if (!StringUtil.isBlank(trayCode)) { |
|
|
|
|
BasicdataTrayEntity trayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode); |
|
|
|
@ -7214,6 +7234,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); |
|
|
|
|
carsLoadScanEntity.setUnloadTime(new Date()); |
|
|
|
|
carsLoadScanEntity.setIsData(1); |
|
|
|
|
carsLoadScanEntity.setUnloadTrayCode(unloadTrayCode); |
|
|
|
|
carsLoadScanEntity.setUnloadTrayName(unloadTrayName); |
|
|
|
|
isData = 1; |
|
|
|
|
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); |
|
|
|
|
|
|
|
|
@ -7229,7 +7251,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
orderPackageCodes.add(orderPackageCode); |
|
|
|
|
String content = "包件在 " + warehouseName + "卸车,卸车方式:" + IncomingTypeEnum.getValue(incomingType); |
|
|
|
|
String content = "包件在 " + warehouseName + "卸车,车次号:"+carsLoadEntity.getCarsNo()+" 卸车方式:" + IncomingTypeEnum.getValue(incomingType)+ (StringUtil.isNotBlank(unloadTrayName)?"托盘:"+unloadTrayName:""); |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseName, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE.getCode(), content); |
|
|
|
|
try { |
|
|
|
|
if (StrUtil.isNotEmpty(orderCode)) { |
|
|
|
@ -7283,7 +7305,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public R unloadPackageNoXz(Long loadId, String orderPackageCode, Long warehouseId, Integer unbindTray, String remark, Integer incomingType) { |
|
|
|
|
public R unloadPackageNoXz(Long loadId, String orderPackageCode, Long warehouseId, Integer unbindTray, String remark, Integer incomingType,String unloadTrayName,String unloadTrayCode) { |
|
|
|
|
log.info("#############unloadPackage: 卸车包件"); |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
@ -7893,7 +7915,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
List<String> orderPackageCodes = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
orderPackageCodes.add(orderPackageCode); |
|
|
|
|
String content = "包件在 " + warehouseName + "卸车,卸车方式:" + IncomingTypeEnum.getValue(incomingType); |
|
|
|
|
String content = "包件在 " + warehouseName + "卸车,车次号:"+carsLoadEntity.getCarsNo()+" ,卸车方式:" + IncomingTypeEnum.getValue(incomingType)+ (StringUtil.isNotBlank(unloadTrayName)?"托盘:"+unloadTrayName:""); |
|
|
|
|
packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseName, WorkNodeEnums.UNLOAD_INCOMING_WAREHOUSE.getCode(), content); |
|
|
|
|
try { |
|
|
|
|
if (StrUtil.isNotEmpty(orderCode)) { |
|
|
|
@ -7947,7 +7969,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R unloadZero(Long loadId, String waybillNo, Integer enterNun, Long warehouseId, Integer unbindTray, String trayCode, String orderCode, String remark) { |
|
|
|
|
public R unloadZero(Long loadId, String waybillNo, Integer enterNun, Long warehouseId, Integer unbindTray, String trayCode, String orderCode, String remark,String unloadTrayName,String unloadTrayCode) { |
|
|
|
|
log.info("#############unloadZero: 卸车零担"); |
|
|
|
|
|
|
|
|
|
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId); |
|
|
|
@ -8022,6 +8044,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
carsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName()); |
|
|
|
|
carsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName()); |
|
|
|
|
carsLoadScanEntity.setUnloadTime(new Date()); |
|
|
|
|
carsLoadScanEntity.setUnloadTrayName(unloadTrayName); |
|
|
|
|
carsLoadScanEntity.setUnloadTrayCode(unloadTrayCode); |
|
|
|
|
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); |
|
|
|
|
|
|
|
|
|
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode, |
|
|
|
@ -8363,6 +8387,14 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
log.warn("###############unloadTray: 配载计划不存在 loadId={}", loadId); |
|
|
|
|
return R.fail(405, "配载计划不存在"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode); |
|
|
|
|
if(Objects.isNull(basicdataTrayEntity)){ |
|
|
|
|
log.warn("###############unloadTray: 托盘信息不存在 trayCode={}", trayCode); |
|
|
|
|
return R.fail(405, "托盘信息不存在"); |
|
|
|
|
} |
|
|
|
|
String palletName = basicdataTrayEntity.getPalletName(); |
|
|
|
|
|
|
|
|
|
//查询该节点有没有该托盘的信息
|
|
|
|
|
List<TrunklineCarsLoadScanEntity> list = trunklineCarsLoadScanService.findUnloadTrayGoodsList(loadId, warehouseId, trayCode); |
|
|
|
|
Set<String> set = new TreeSet<>(); |
|
|
|
@ -8371,12 +8403,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
String scanCode = carsLoadScanEntity.getScanCode(); |
|
|
|
|
if (type == 1) { |
|
|
|
|
//包件
|
|
|
|
|
unloadPackage(loadId, scanCode, warehouseId, 0, "托盘正常卸车", incomingType); |
|
|
|
|
unloadPackage(loadId, scanCode, warehouseId, 0, "托盘正常卸车", incomingType,palletName,trayCode); |
|
|
|
|
} else if (type == 2) { |
|
|
|
|
String waybillNo = carsLoadScanEntity.getWaybillNo(); |
|
|
|
|
Integer num = carsLoadScanEntity.getNum(); |
|
|
|
|
String orderCode = carsLoadScanEntity.getOrderCode(); |
|
|
|
|
unloadZero(loadId, waybillNo, num, warehouseId, 0, trayCode, orderCode, "托盘零担正常卸车"); |
|
|
|
|
unloadZero(loadId, waybillNo, num, warehouseId, 0, trayCode, orderCode, "托盘零担正常卸车",palletName,trayCode); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|