|
|
@ -45,6 +45,7 @@ import com.logpm.trunkline.service.*; |
|
|
|
import com.logpm.trunkline.vo.*; |
|
|
|
import com.logpm.trunkline.vo.*; |
|
|
|
import com.logpm.warehouse.entity.*; |
|
|
|
import com.logpm.warehouse.entity.*; |
|
|
|
import com.logpm.warehouse.feign.*; |
|
|
|
import com.logpm.warehouse.feign.*; |
|
|
|
|
|
|
|
import com.logpm.warehouse.vo.DownPackageTrayVO; |
|
|
|
import com.logpm.warehouse.vo.WarehouseWaybillVO; |
|
|
|
import com.logpm.warehouse.vo.WarehouseWaybillVO; |
|
|
|
import com.logpm.warehouse.vo.WaybillOrderTotalWeightAndVolumeVO; |
|
|
|
import com.logpm.warehouse.vo.WaybillOrderTotalWeightAndVolumeVO; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
@ -3606,68 +3607,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return Resp.scanFail(405,"包件不在当前仓","包件不在当前仓,不能装车"); |
|
|
|
return Resp.scanFail(405,"包件不在当前仓","包件不在当前仓,不能装车"); |
|
|
|
|
|
|
|
|
|
|
|
//先把其他仓在库的包件出库并下架
|
|
|
|
|
|
|
|
// try{
|
|
|
|
|
|
|
|
// List<DistributionParcelListEntity> parcelListEntities = distributionParcelListClient.findAllStockListByOrderPackageCode(orderPackageCode);
|
|
|
|
|
|
|
|
// for (DistributionParcelListEntity listEntity : parcelListEntities) {
|
|
|
|
|
|
|
|
// listEntity.setOrderPackageStatus("60");
|
|
|
|
|
|
|
|
// distributionParcelListClient.update(listEntity);
|
|
|
|
|
|
|
|
// Long warehouseId1 = listEntity.getWarehouseId();
|
|
|
|
|
|
|
|
// updownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId1);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }catch (Exception e){
|
|
|
|
|
|
|
|
// log.warn("################loadingScan: 下架及解托包件失败");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setIsData(1);
|
|
|
|
|
|
|
|
// isData = 1;
|
|
|
|
|
|
|
|
// Long otherPackageId = otherParcelListEntity.getId();
|
|
|
|
|
|
|
|
// String waybillNumber = otherParcelListEntity.getWaybillNumber();
|
|
|
|
|
|
|
|
// fromWarehouseId = otherParcelListEntity.getWarehouseId();
|
|
|
|
|
|
|
|
// orderCode = otherParcelListEntity.getOrderCode();
|
|
|
|
|
|
|
|
// brandName = otherParcelListEntity.getBrandName();
|
|
|
|
|
|
|
|
// BasicdataWarehouseEntity fromWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(fromWarehouseId);
|
|
|
|
|
|
|
|
// if (!Objects.isNull(fromWarehouseEntity)) {
|
|
|
|
|
|
|
|
// fromWarehouseName = fromWarehouseEntity.getName();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNumber);
|
|
|
|
|
|
|
|
// if (!Objects.isNull(waybillEntity)) {
|
|
|
|
|
|
|
|
// waybillId = waybillEntity.getId();
|
|
|
|
|
|
|
|
// waybillNo = waybillEntity.getWaybillNo();
|
|
|
|
|
|
|
|
// destinationWarehouse = waybillEntity.getDestinationWarehouseName();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setWaybillId(waybillId);
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setWaybillNo(waybillNo);
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setOrderCode(orderCode);
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setFromWarehouseId(fromWarehouseId);
|
|
|
|
|
|
|
|
// DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, fromWarehouseId);
|
|
|
|
|
|
|
|
// if (Objects.isNull(stockArticleEntity)) {
|
|
|
|
|
|
|
|
// log.warn("##################loadingScan: 订单信息不存在 orderCode={} warehouseId={}", orderCode, warehouseId);
|
|
|
|
|
|
|
|
// return R.fail(405, "订单信息不存在");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// Long articleId = stockArticleEntity.getId();
|
|
|
|
|
|
|
|
// stockArticleEntity.setHandQuantity(stockArticleEntity.getHandQuantity() - 1);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// distributionParcelListClient.updateOrderPackageCodeById(otherPackageId, "60");
|
|
|
|
|
|
|
|
// distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setCustomerName(stockArticleEntity.getCustomerName());
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setCustomerTelephone(stockArticleEntity.getCustomerTelephone());
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setCustomerAddress(stockArticleEntity.getCustomerAddress());
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setFirsts(otherParcelListEntity.getFirsts());
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setSenconds(otherParcelListEntity.getSecond());
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setThirds(otherParcelListEntity.getThirdProduct());
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setMaterialCode(otherParcelListEntity.getMaterialCode());
|
|
|
|
|
|
|
|
// carsLoadScanEntity.setMaterialName(otherParcelListEntity.getMaterialName());
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// remark = "有数据,不在当前仓,异常装车";
|
|
|
|
|
|
|
|
// audio = "包件未入库";
|
|
|
|
|
|
|
|
// if(StringUtils.isNotBlank(orderPackageCode)){
|
|
|
|
|
|
|
|
// updownTypeClient.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "干线装车下架解托");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -3759,7 +3698,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
distributionParcelListClient.updateOrderPackageCodeById(packageId, "60"); |
|
|
|
distributionParcelListClient.updateOrderPackageCodeById(packageId, "60"); |
|
|
|
// distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
|
|
|
|
// distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
|
|
|
|
if (StringUtil.isBlank(trayCode) && StringUtil.isNotBlank(orderPackageCode)) { |
|
|
|
if (StringUtil.isBlank(trayCode) && StringUtil.isNotBlank(orderPackageCode)) { |
|
|
|
updownTypeClient.downPackageOrDelTray(orderPackageCode, warehouseId, "干线装车下架解托"); |
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, warehouseId, "干线装车下架解托"); |
|
|
|
|
|
|
|
if(downPackageTrayVO!=null){ |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
carsLoadScanEntity.setCustomerName(stockArticleEntity.getCustomerName()); |
|
|
|
carsLoadScanEntity.setCustomerName(stockArticleEntity.getCustomerName()); |
|
|
|
carsLoadScanEntity.setCustomerTelephone(stockArticleEntity.getCustomerTelephone()); |
|
|
|
carsLoadScanEntity.setCustomerTelephone(stockArticleEntity.getCustomerTelephone()); |
|
|
@ -5442,7 +5384,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
String trayCode = trunklineCarsLoadScanEntity.getTrayCode(); |
|
|
|
String trayCode = trunklineCarsLoadScanEntity.getTrayCode(); |
|
|
|
String scanCode = trunklineCarsLoadScanEntity.getScanCode(); |
|
|
|
String scanCode = trunklineCarsLoadScanEntity.getScanCode(); |
|
|
|
if (StringUtil.isNotBlank(trayCode)) { |
|
|
|
if (StringUtil.isNotBlank(trayCode)) { |
|
|
|
updownTypeClient.downPackageOrDelTray(scanCode, warehouseId, "包件下架解托"); |
|
|
|
|
|
|
|
|
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(scanCode, warehouseId, "包件下架解托"); |
|
|
|
|
|
|
|
if(downPackageTrayVO!=null){ |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -7139,7 +7086,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
distributionStockArticleClient.submitHandleNumByOrderId(1, articleId); |
|
|
|
distributionStockArticleClient.submitHandleNumByOrderId(1, articleId); |
|
|
|
distributionParcelListClient.updateOrderPackageCodeById(pacakageId, "60"); |
|
|
|
distributionParcelListClient.updateOrderPackageCodeById(pacakageId, "60"); |
|
|
|
|
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(orderPackageCode, wid, "中转卸车下架解托"); |
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, wid, "中转卸车下架解托"); |
|
|
|
|
|
|
|
if(downPackageTrayVO!=null){ |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
String scanStatus = carsLoadScanEntity.getScanStatus(); |
|
|
|
String scanStatus = carsLoadScanEntity.getScanStatus(); |
|
|
@ -7188,7 +7139,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
trayName = trayEntity.getPalletName(); |
|
|
|
trayName = trayEntity.getPalletName(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (unbindTray == 1) { |
|
|
|
if (unbindTray == 1) { |
|
|
|
updownTypeClient.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "中转卸车下架解托"); |
|
|
|
|
|
|
|
|
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, fromWarehouseId, "中转卸车下架解托"); |
|
|
|
|
|
|
|
if(downPackageTrayVO!=null){ |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); |
|
|
|
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); |
|
|
|
|
|
|
|
|
|
|
@ -7861,7 +7816,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
//需要解托下架的包件嘛
|
|
|
|
//需要解托下架的包件嘛
|
|
|
|
unbingTrayAndDelAllocationPackages.keySet().forEach(w -> { |
|
|
|
unbingTrayAndDelAllocationPackages.keySet().forEach(w -> { |
|
|
|
List<String> list = unbingTrayAndDelAllocationPackages.get(w); |
|
|
|
List<String> list = unbingTrayAndDelAllocationPackages.get(w); |
|
|
|
updownTypeClient.downPackageOrDelTray(StringUtil.join(list), w, "批量入库解托下架"); |
|
|
|
|
|
|
|
|
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(StringUtil.join(list), w, "批量入库解托下架"); |
|
|
|
|
|
|
|
if(downPackageTrayVO!=null){ |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
//需要修改仓库信息的打托数据
|
|
|
|
//需要修改仓库信息的打托数据
|
|
|
@ -9272,7 +9232,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, e.getLoadCode(), e.getWaybillId(), e.getWaybillNo(), e.getOrderCode(), e.getScanCode(), 1, |
|
|
|
trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, e.getLoadCode(), e.getWaybillId(), e.getWaybillNo(), e.getOrderCode(), e.getScanCode(), 1, |
|
|
|
1, 1, 0, null, null, null, e.getFromWarehouseId(), e.getId(), remark); |
|
|
|
1, 1, 0, null, null, null, e.getFromWarehouseId(), e.getId(), remark); |
|
|
|
|
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(e.getScanCode(),e.getFromWarehouseId(),"手动批量装车下架解托"); |
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(e.getScanCode(), e.getFromWarehouseId(), "手动批量装车下架解托"); |
|
|
|
|
|
|
|
if(downPackageTrayVO!=null){ |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -11116,7 +11079,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
String trayCode = trunklineCarsLoadScanEntity.getTrayCode(); |
|
|
|
String trayCode = trunklineCarsLoadScanEntity.getTrayCode(); |
|
|
|
String scanCode = trunklineCarsLoadScanEntity.getScanCode(); |
|
|
|
String scanCode = trunklineCarsLoadScanEntity.getScanCode(); |
|
|
|
if (StringUtil.isNotBlank(trayCode)) { |
|
|
|
if (StringUtil.isNotBlank(trayCode)) { |
|
|
|
updownTypeClient.downPackageOrDelTray(scanCode, warehouseId, "包件下架解托"); |
|
|
|
|
|
|
|
|
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(scanCode, warehouseId, "包件下架解托"); |
|
|
|
|
|
|
|
if(downPackageTrayVO!=null){ |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -11227,129 +11194,6 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
updateNumByLoadId(loadId); |
|
|
|
updateNumByLoadId(loadId); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Long loadId = loadIdSet.stream().findFirst().get();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO 暂时注释
|
|
|
|
|
|
|
|
// carsLoadAsyncService.sendReportRemoveScanData(AuthUtil.getUserId(),AuthUtil.getNickName(),warehouseId,warehouseName,carsLoadScanEntityList,carsLoadEntity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Long loadId = null;
|
|
|
|
|
|
|
|
// for (String str : split) {
|
|
|
|
|
|
|
|
// long carsLoadScanId = Long.parseLong(str);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// TrunklineCarsLoadScanEntity carsLoadScanEntity = trunklineCarsLoadScanService.getById(carsLoadScanId);
|
|
|
|
|
|
|
|
// if (Objects.isNull(carsLoadScanEntity)) {
|
|
|
|
|
|
|
|
// log.warn("##################removeCarsLoadScan: 配载装车扫描不存在 carsLoadScanId={}", carsLoadScanId);
|
|
|
|
|
|
|
|
// return R.fail(405, "配载装车扫描不存在");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// loadId = carsLoadScanEntity.getLoadId();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
|
|
|
|
|
|
|
|
// if (Objects.isNull(carsLoadEntity)) {
|
|
|
|
|
|
|
|
// log.warn("##################removeCarsLoadScan: 配载计划不存在 loadId={}", loadId);
|
|
|
|
|
|
|
|
// return R.fail(405, "配载计划不存在");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// Long nowWarehouseId = carsLoadEntity.getNowWarehouseId();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// if (!nowWarehouseId.equals(warehouseId)) {
|
|
|
|
|
|
|
|
// log.warn("##################removeCarsLoadScan: 暂未有权限进行操作 nowWarehouseId={} warehouseId={}", nowWarehouseId, warehouseId);
|
|
|
|
|
|
|
|
// return R.fail(405, "暂未有权限进行操作");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// String loadStatus = carsLoadEntity.getLoadStatus();
|
|
|
|
|
|
|
|
// if (!"0".equals(loadStatus) && !"20".equals(loadStatus) && !"40".equals(loadStatus) && !"100".equals(loadStatus)) {
|
|
|
|
|
|
|
|
// log.warn("##################removeCarsLoadScan: 当前配载计划不属于到车状态 loadStatus={} warehouseId={}", loadStatus, warehouseId);
|
|
|
|
|
|
|
|
// return R.fail(405, "当前配载计划不属于到车状态");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId);
|
|
|
|
|
|
|
|
// if (Objects.isNull(carsLoadLineEntity)) {
|
|
|
|
|
|
|
|
// log.warn("##################removeCarsLoadScan: 当前节点信息不存在 loadId={} warehouseId={}", loadId, warehouseId);
|
|
|
|
|
|
|
|
// return R.fail(405, "当前节点信息不存在");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// String nodeStatus = carsLoadLineEntity.getNodeStatus();
|
|
|
|
|
|
|
|
// if (!"10".equals(nodeStatus)) {
|
|
|
|
|
|
|
|
// log.warn("##################removeCarsLoadScan: 当前节点不是到车状态 nodeStatus={} warehouseId={}", nodeStatus, warehouseId);
|
|
|
|
|
|
|
|
// return R.fail(405, "当前节点不是到车状态");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// //删除
|
|
|
|
|
|
|
|
// boolean b = trunklineCarsLoadScanService.deleteEntityByCarsLoadScanId(carsLoadScanId);
|
|
|
|
|
|
|
|
// if (b) {
|
|
|
|
|
|
|
|
// Integer isData = carsLoadScanEntity.getIsData();
|
|
|
|
|
|
|
|
// if (isData == 1) {
|
|
|
|
|
|
|
|
// updateNumByLoadId(loadId);
|
|
|
|
|
|
|
|
// String warehouseName = carsLoadScanEntity.getWarehouseName();
|
|
|
|
|
|
|
|
// Integer isAbnormal = carsLoadScanEntity.getLoadingAbnormal();
|
|
|
|
|
|
|
|
// Integer num = carsLoadScanEntity.getNum();
|
|
|
|
|
|
|
|
// Long trayId = carsLoadScanEntity.getTrayId();
|
|
|
|
|
|
|
|
// String trayCode = carsLoadScanEntity.getTrayCode();
|
|
|
|
|
|
|
|
// String orderCode = carsLoadScanEntity.getOrderCode();
|
|
|
|
|
|
|
|
// String waybillNo = carsLoadScanEntity.getWaybillNo();
|
|
|
|
|
|
|
|
// String scanCode = carsLoadScanEntity.getScanCode();
|
|
|
|
|
|
|
|
// Integer type = carsLoadScanEntity.getType();
|
|
|
|
|
|
|
|
// Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId();
|
|
|
|
|
|
|
|
// String fromWarehouseName = null;
|
|
|
|
|
|
|
|
// BasicdataWarehouseEntity fromWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(fromWarehouseId);
|
|
|
|
|
|
|
|
// if (!Objects.isNull(fromWarehouseEntity)) {
|
|
|
|
|
|
|
|
// fromWarehouseName = fromWarehouseEntity.getName();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, fromWarehouseId);
|
|
|
|
|
|
|
|
// if (!Objects.isNull(stockArticleEntity)) {
|
|
|
|
|
|
|
|
// Long articleId = stockArticleEntity.getId();
|
|
|
|
|
|
|
|
// distributionStockArticleClient.submitHandleNumByOrderId(-num, articleId);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// if (type == 1) {
|
|
|
|
|
|
|
|
// DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(scanCode, fromWarehouseId);
|
|
|
|
|
|
|
|
// if (Objects.isNull(parcelListEntity)) {
|
|
|
|
|
|
|
|
// log.warn("##################removeCarsLoadScan: 包件信息不存在 fromWarehouseId={} scanCode={}", fromWarehouseId, scanCode);
|
|
|
|
|
|
|
|
// return R.fail(405, "包件信息不存在");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// Long wid = parcelListEntity.getWarehouseId();
|
|
|
|
|
|
|
|
// String waybillNumber = parcelListEntity.getWaybillNumber();
|
|
|
|
|
|
|
|
// Long waybillId = parcelListEntity.getWaybillId();
|
|
|
|
|
|
|
|
// if (!Objects.isNull(waybillId)) {
|
|
|
|
|
|
|
|
// WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillId(waybillId);
|
|
|
|
|
|
|
|
// parcelListEntity.setIsTransfer(0);
|
|
|
|
|
|
|
|
// if (!Objects.isNull(waybillEntity)) {
|
|
|
|
|
|
|
|
// Long destinationWarehouseId = waybillEntity.getDestinationWarehouseId();
|
|
|
|
|
|
|
|
// parcelListEntity.setOrderPackageStatus("20");
|
|
|
|
|
|
|
|
// if (destinationWarehouseId.equals(wid)) {
|
|
|
|
|
|
|
|
// parcelListEntity.setIsTransfer(0);
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// parcelListEntity.setIsTransfer(1);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// distributionParcelListClient.update(parcelListEntity);
|
|
|
|
|
|
|
|
//// if (StringUtil.isNotBlank(trayCode)) {
|
|
|
|
|
|
|
|
//// updownTypeClient.downPackageOrDelTray(scanCode, warehouseId, "包件下架解托");
|
|
|
|
|
|
|
|
//// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// List<String> orderPackageCodes = new ArrayList<>();
|
|
|
|
|
|
|
|
// orderPackageCodes.add(scanCode);
|
|
|
|
|
|
|
|
// String content = "包件在 " + warehouseName + "取消装车,配载计划目的仓 " + carsLoadScanEntity.getFinalNodeName();
|
|
|
|
|
|
|
|
// packageTrackLogAsyncService.addPackageTrackLog(AuthUtil.getTenantId(), AuthUtil.getUserId(), Func.firstLong(AuthUtil.getDeptId()), AuthUtil.getNickName(), orderPackageCodes, warehouseId, warehouseName, WorkNodeEnums.CANCEL_INITIAL_WAREHOUSE_LOADING.getCode(), content);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
//// if (StringUtil.isNotBlank(trayCode)) {
|
|
|
|
|
|
|
|
//// trayTypeClient.deleteZeroOrderByTrayCode(orderCode, trayCode, warehouseId, "零担解托");
|
|
|
|
|
|
|
|
//// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (!Objects.isNull(loadId)) {
|
|
|
|
|
|
|
|
// updateNumByLoadId(loadId);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return R.success("删除成功"); |
|
|
|
return R.success("删除成功"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -11945,7 +11789,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
distributionParcelListClient.update(distributionParcelListEntity); |
|
|
|
distributionParcelListClient.update(distributionParcelListEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(orderPackageCode)){ |
|
|
|
if(StringUtils.isNotBlank(orderPackageCode)){ |
|
|
|
carsLoadAsyncService.downPackageOrDelTray(orderPackageCode, nowWarehouseId, "干线卸车下架解托"); |
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, nowWarehouseId, "干线卸车下架解托"); |
|
|
|
|
|
|
|
if(downPackageTrayVO!=null){ |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
@ -12150,7 +11998,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
distributionParcelListClient.update(distributionParcelListEntity); |
|
|
|
distributionParcelListClient.update(distributionParcelListEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(orderPackageCode)){ |
|
|
|
if(StringUtils.isNotBlank(orderPackageCode)){ |
|
|
|
carsLoadAsyncService.downPackageOrDelTray(orderPackageCode, wid, "干线卸车下架解托"); |
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, wid, "干线卸车下架解托"); |
|
|
|
|
|
|
|
if(downPackageTrayVO!=null){ |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -12201,7 +12052,10 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
trayName = trayEntity.getPalletName(); |
|
|
|
trayName = trayEntity.getPalletName(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (unbindTray == 1) { |
|
|
|
if (unbindTray == 1) { |
|
|
|
carsLoadAsyncService.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "干线卸车下架解托"); |
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, fromWarehouseId, "干线卸车下架解托"); |
|
|
|
|
|
|
|
if(downPackageTrayVO!=null){ |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); |
|
|
|
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); |
|
|
|
|
|
|
|
|
|
|
@ -12414,6 +12268,27 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
return Resp.scanSuccess("卸车成功", audio.toString()); |
|
|
|
return Resp.scanSuccess("卸车成功", audio.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 构架下架解脱对象 |
|
|
|
|
|
|
|
* @param orderPackageCode |
|
|
|
|
|
|
|
* @param warehouseId |
|
|
|
|
|
|
|
* @param remark |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private DownPackageTrayVO buildDownPackageTrayVO(String orderPackageCode,Long warehouseId,String remark){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(Objects.isNull(orderPackageCode) || Objects.isNull(warehouseId)){ |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DownPackageTrayVO downPackageTrayVO = new DownPackageTrayVO(); |
|
|
|
|
|
|
|
downPackageTrayVO.setOrderPackageCodes(orderPackageCode); |
|
|
|
|
|
|
|
downPackageTrayVO.setWarehouseId(warehouseId); |
|
|
|
|
|
|
|
downPackageTrayVO.setRemark(remark); |
|
|
|
|
|
|
|
return downPackageTrayVO; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@ -12722,46 +12597,17 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
distributionParcelListClient.update(distributionParcelListEntity); |
|
|
|
distributionParcelListClient.update(distributionParcelListEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(orderPackageCode)){ |
|
|
|
if(StringUtils.isNotBlank(orderPackageCode)){ |
|
|
|
updownTypeClient.downPackageOrDelTray(orderPackageCode, nowWarehouseId, "干线卸车下架解托"); |
|
|
|
|
|
|
|
|
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, nowWarehouseId, "干线卸车下架解托"); |
|
|
|
|
|
|
|
if(downPackageTrayVO!=null){ |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
|
|
|
|
|
|
|
|
log.info("################unloadPackageNoXz: 无系统编码 orderPackageCode={}",orderPackageCode); |
|
|
|
log.info("################unloadPackageNoXz: 无系统编码 orderPackageCode={}",orderPackageCode); |
|
|
|
return R.fail(405,"无系统编码"); |
|
|
|
return R.fail(405,"无系统编码"); |
|
|
|
|
|
|
|
|
|
|
|
//需要补装车扫记录
|
|
|
|
|
|
|
|
// TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity = new TrunklineCarsLoadScanEntity();
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setLoadId(loadId);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setLoadCode(loadCode);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setOrderCode("--");
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setScanCode(orderPackageCode);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setScanStatus("2");
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setNum(1);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setType(1);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setIsData(0);
|
|
|
|
|
|
|
|
// isData=0;
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setLoadingAbnormal(1);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setUnloadAbnormal(1);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setUnloadNodeName(warehouseName);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setUnloadNodeId(warehouseId);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setUnloadNum(1);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setIsSupple(1);
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName());
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setUnloadUserName(AuthUtil.getNickName());
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setUnloadTime(new Date());
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanEntity.setRemark("异常补录卸车");
|
|
|
|
|
|
|
|
// trunklineCarsLoadScanService.save(trunklineCarsLoadScanEntity);
|
|
|
|
|
|
|
|
// loadScanId = trunklineCarsLoadScanEntity.getId();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// trunklineCarsLoadingLogService.savaLoadingLog(warehouseId, warehouseName, loadId, loadCode, null, null, null, orderPackageCode, 1,
|
|
|
|
|
|
|
|
// 1, 0, 1, trayId, trayCode, trayName, null, loadScanId, "无数据,补装车计划,异常装车");
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, null, null, null, orderPackageCode, 1,
|
|
|
|
|
|
|
|
// 1, 0, 1, trayId, trayCode, trayName, null, loadScanId, "无数据,异常卸车");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
String waybillNumber = parcelListEntity.getWaybillNumber(); |
|
|
|
String waybillNumber = parcelListEntity.getWaybillNumber(); |
|
|
@ -12896,7 +12742,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(orderPackageCode)){ |
|
|
|
if(StringUtils.isNotBlank(orderPackageCode)){ |
|
|
|
updownTypeClient.downPackageOrDelTray(orderPackageCode, wid, "干线卸车下架解托"); |
|
|
|
|
|
|
|
|
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, wid, "干线卸车下架解托"); |
|
|
|
|
|
|
|
if(downPackageTrayVO!=null){ |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -12905,8 +12755,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
|
|
|
|
|
|
|
|
//无装车记录异常日志记录
|
|
|
|
//无装车记录异常日志记录
|
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
assert carsLoadAsyncService != null; |
|
|
|
|
|
|
|
|
|
|
|
carsLoadAsyncService.abnormalListUnloadByLoadIdAndWarehouseId(loadId, warehouseId, warehouseName, loadScanId, AuthUtil.getTenantId(), AuthUtil.getUserId(), AuthUtil.getNickName(), Func.firstLong(AuthUtil.getDeptId())); |
|
|
|
carsLoadAsyncService.abnormalListUnloadByLoadIdAndWarehouseId(loadId, warehouseId, warehouseName, loadScanId, AuthUtil.getTenantId(), AuthUtil.getUserId(), AuthUtil.getNickName(), Func.firstLong(AuthUtil.getDeptId())); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.warn("###############unloadPackage: 存入异常列表记录失败"); |
|
|
|
log.warn("###############unloadPackage: 存入异常列表记录失败"); |
|
|
@ -12952,7 +12801,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL |
|
|
|
trayName = trayEntity.getPalletName(); |
|
|
|
trayName = trayEntity.getPalletName(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (unbindTray == 1) { |
|
|
|
if (unbindTray == 1) { |
|
|
|
carsLoadAsyncService.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "干线卸车下架解托"); |
|
|
|
DownPackageTrayVO downPackageTrayVO = buildDownPackageTrayVO(orderPackageCode, fromWarehouseId, "干线卸车下架解托"); |
|
|
|
|
|
|
|
updownTypeClient.downPackageOrDelTray(downPackageTrayVO); |
|
|
|
} |
|
|
|
} |
|
|
|
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); |
|
|
|
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); |
|
|
|
|
|
|
|
|
|
|
|