diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BatchUnloadDTO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BatchUnloadDTO.java index a3b37652e..773499106 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BatchUnloadDTO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BatchUnloadDTO.java @@ -13,6 +13,8 @@ public class BatchUnloadDTO implements Serializable { private Long warehouseId; + private Integer incomingType; + private List unloadPackageList = new ArrayList<>(); private List unloadZeroList = new ArrayList<>(); diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java index 180fdf8ba..5a3b94d8f 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java @@ -112,4 +112,5 @@ public class LoadCarsDTO implements Serializable { private String remark; private String url; + private Integer incomingType; } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java index 263ac461f..55fa3c4a2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java @@ -532,6 +532,7 @@ public class CarsLoadApiController { log.info(method + "请求参数{}", loadCarsDTO); Long loadId = loadCarsDTO.getLoadId(); String orderPackageCode = loadCarsDTO.getOrderPackageCode(); + Integer incomingType = loadCarsDTO.getIncomingType(); try{ //当前登录人选择的仓库 @@ -549,9 +550,12 @@ public class CarsLoadApiController { log.warn(method+"包件码为空 orderPackageCode={}",orderPackageCode); return R.fail(405,"包件码为空"); } + if(Objects.isNull(incomingType)){ + log.warn(method+"入库类型为空 orderPackageCode={}",orderPackageCode); + return R.fail(405,"入库类型为空"); + } - - return carsLoadService.unloadPackage(loadId,orderPackageCode,myCurrentWarehouse.getId(),1,"正常卸车"); + return carsLoadService.unloadPackage(loadId,orderPackageCode,myCurrentWarehouse.getId(),1,"正常卸车",incomingType); }catch (CustomerException e){ log.error(e.message,e); return R.fail(e.code,e.message); @@ -654,6 +658,8 @@ public class CarsLoadApiController { log.info(method + "请求参数{}", loadCarsDTO); Long loadId = loadCarsDTO.getLoadId(); String trayCode = loadCarsDTO.getTrayCode(); + Integer incomingType = loadCarsDTO.getIncomingType(); + try{ //当前登录人选择的仓库 @@ -671,7 +677,12 @@ public class CarsLoadApiController { log.warn(method+"托盘码为空 trayCode={}",trayCode); return R.fail(405,"托盘码为空"); } - return carsLoadService.unloadTray(loadId,trayCode,myCurrentWarehouse.getId()); + if(Objects.isNull(incomingType)){ + log.warn(method+"入库类型为空 incomingType={}",incomingType); + return R.fail(405,"入库类型为空"); + } + + return carsLoadService.unloadTray(loadId,trayCode,myCurrentWarehouse.getId(),incomingType); }catch (CustomerException e){ log.error(e.message,e); return R.fail(e.code,e.message); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java index 7f038cfe2..690ed589d 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java @@ -1550,6 +1550,7 @@ public class CarsLoadController { String method = "############batchUnload: "; log.info(method + "请求参数{}", batchUnloadDTO); Long loadId = batchUnloadDTO.getLoadId(); + Integer incomingType = batchUnloadDTO.getIncomingType(); try{ @@ -1565,6 +1566,12 @@ public class CarsLoadController { log.warn(method+"配载id为空 loadId={}",loadId); return R.fail(405,"配载id为空"); } + if(Objects.isNull(incomingType)){ + log.warn(method+"入库方式为空 incomingType={}",incomingType); + return R.fail(405,"入库方式为空"); + } + + return carsLoadService.batchUnload(batchUnloadDTO); }catch (CustomerException e){ diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java index 72ee94089..862019cae 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java @@ -91,7 +91,7 @@ public interface ITrunklineCarsLoadService extends BaseService map = new HashMap<>(); map.put("trayType", trayType); map.put("trayCode", trayCode); @@ -3226,6 +3227,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl