diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/rest/AcsToWmsController.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/rest/AcsToWmsController.java index b1b7391..e249df4 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/rest/AcsToWmsController.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/rest/AcsToWmsController.java @@ -75,12 +75,18 @@ public class AcsToWmsController { } @PostMapping("/getVehicleInfoBycode") - @Log("根据编码获取托盘信息") - @ApiOperation("根据编码获取托盘信息") - public ResponseEntity getVehicleInfoBycode(@RequestBody Map whereJson) { - return new ResponseEntity<>(acsToWmsService.getVehicleInfoBycode(whereJson), HttpStatus.OK); + @Log("根据设备编码编码获取托盘信息") + @ApiOperation("根据设备编码编码获取托盘信息") + public ResponseEntity getVehicleInfoByDevice_code(@RequestBody Map whereJson) { + return new ResponseEntity<>(acsToWmsService.getVehicleInfoByDevice_code(whereJson), HttpStatus.OK); } + @PostMapping("/getVehicleInfoByVehiclecode") + @Log("根据托盘编码获取托盘信息") + @ApiOperation("根据托盘编码获取托盘信息") + public ResponseEntity getVehicleInfoByVehiclecode(@RequestBody Map whereJson) { + return new ResponseEntity<>(acsToWmsService.getVehicleInfoByVehiclecode(whereJson), HttpStatus.OK); + } @PostMapping("/sureProduceTask") @Log("排产单确认") @ApiOperation("排产单确认") diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java index f83a2cc..fcbc2b9 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/AcsToWmsService.java @@ -47,13 +47,21 @@ public interface AcsToWmsService { Map getDevicecodeByVehicle_ype(Map jsonObject); /** - * 根据编码获取托盘信息 + * 根据设备编码获取托盘信息 * * @param jsonObject 条件 * @return Map */ - Map getVehicleInfoBycode(Map jsonObject); + Map getVehicleInfoByDevice_code(Map jsonObject); + /** + * 根据托盘编码获取托盘信息 + * + * @param jsonObject 条件 + * @return Map + */ + + Map getVehicleInfoByVehiclecode(Map jsonObject); /** * 排产单确认 * diff --git a/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index 7db5358..1e9bcd4 100644 --- a/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -178,7 +178,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { String material_id = (String) produceInfoByCode.get("material_id"); String cust_id = (String) produceInfoByCode.get("cust_id"); String producetask_id = (String) produceInfoByCode.get("producetask_id"); - WQLObject.getWQLObject("st_buss_vehiclegroup").delete("vehicle_code ='"+vehicle_code+"'"); + WQLObject.getWQLObject("st_buss_vehiclegroup").delete("vehicle_code ='" + vehicle_code + "'"); //如果上报不了,则去点位上取(木托盘情况) if (StrUtil.equals("0", vehicle_code)) { vehicle_code = produceInfoByCode.getString("vehicle_code"); @@ -349,7 +349,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { @Override @Transactional(rollbackFor = Exception.class) - public Map getVehicleInfoBycode(Map jsonObject) { + public Map getVehicleInfoByDevice_code(Map jsonObject) { String device_code = (String) jsonObject.get("device_code"); JSONObject pointObj = WQLObject.getWQLObject("sch_base_point").query("point_code='" + device_code + "'").uniqueResult(0); String vehicle_code = pointObj.getString("vehicle_code"); @@ -371,6 +371,20 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { return result; } + @Override + public Map getVehicleInfoByVehiclecode(Map jsonObject) { + String vehicle_code = (String) jsonObject.get("vehicle_code"); + JSONObject vehicleObj = WQLObject.getWQLObject("st_buss_vehiclegroup").query("vehicle_code='" + vehicle_code + "' AND is_delete='0'").uniqueResult(0); + if (ObjectUtil.isEmpty(vehicleObj)){ + throw new BadRequestException("未找到托盘编码为'"+vehicle_code+"'的组盘信息"); + } + JSONObject result = new JSONObject(); + result.put("status", HttpStatus.OK.value()); + result.put("message", "反馈成功!"); + result.put("data", vehicleObj); + return result; + } + @Override public Map sureProduceTask(Map jsonObject) { String producetask_code = (String) jsonObject.get("producetask_code");