From bc67669d141167fef9df43f7f08b970e6c6e8b99 Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Mon, 21 Oct 2024 14:29:26 +0800 Subject: [PATCH] =?UTF-8?q?opt:=E5=BC=80=E5=8F=91=E6=89=8B=E6=8C=81?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E7=82=B9=E4=BD=8D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nl/wms/pda/controller/PdaController.java | 16 ++++++++ .../org/nl/wms/pda/service/PdaService.java | 2 + .../wms/pda/service/impl/PdaServiceImpl.java | 38 +++++++++++++++++++ 3 files changed, 56 insertions(+) diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java index 4339e89..f0475da 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java @@ -66,6 +66,15 @@ public class PdaController { return new ResponseEntity<>(pointService.getPointListByPda(region), HttpStatus.OK); } + @PostMapping("/queryCleanPoint") + @Log("查询设备编号及状态") + @ApiOperation("查询设备编号及状态") + @SaIgnore + public ResponseEntity queryCleanPoint(@RequestBody Map whereJson) { + String region = whereJson.get("region_code"); + return new ResponseEntity<>(pointService.getPointsByRegionCodes(region), HttpStatus.OK); + } + @PostMapping("/region") @Log("区域列表") @ApiOperation("区域列表") @@ -123,4 +132,11 @@ public class PdaController { public ResponseEntity ycck(){ return new ResponseEntity<>(pdaService.ycck(), HttpStatus.OK); } + + @PostMapping("/pointclean") + @Log("点位清空") + @ApiOperation("点位清空") + public ResponseEntity pointclean(@RequestBody JSONObject param){ + return new ResponseEntity<>(pdaService.pointclean(param), HttpStatus.OK); + } } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java index a260646..211394c 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/PdaService.java @@ -23,4 +23,6 @@ public interface PdaService { PdaResponseVo ycck(); + PdaResponseVo pointclean(JSONObject param); + } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java index 42838b2..674be84 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java @@ -21,6 +21,7 @@ import org.nl.wms.sch.material.service.dao.Material; import org.nl.wms.sch.material.service.dao.mapper.MaterialMapper; import org.nl.wms.sch.point.service.ISchBasePointService; import org.nl.wms.sch.point.service.dao.SchBasePoint; +import org.nl.wms.sch.region.service.dao.SchBaseRegion; import org.nl.wms.sch.task.service.ISchBaseTaskService; import org.nl.wms.sch.task.service.dao.SchBaseTask; import org.nl.wms.sch.task_manage.GeneralDefinition; @@ -272,4 +273,41 @@ public class PdaServiceImpl implements PdaService { } return result; } + + @Override + public PdaResponseVo pointclean(JSONObject param) { + PdaResponseVo result = new PdaResponseVo(); + String point_code = param.getString("point"); + point_code = point_code.trim(); + String currentUserId = SecurityUtils.getCurrentUserId(); + String nickName = SecurityUtils.getCurrentNickName(); + String now = DateUtil.now(); + + if(ObjectUtil.isEmpty(point_code)){ + result = PdaResponseVo.pdaResultError("点位编码不能为空:"+point_code); + return result; + } + + SchBasePoint nowPoint = pointMapper.selectById(point_code); + if(ObjectUtil.isEmpty(nowPoint)){ + result = PdaResponseVo.pdaResultError("该点位信息查询失败:"+point_code); + return result; + } + if(ObjectUtil.isNotEmpty(nowPoint.getIng_task_code())){ + result = PdaResponseVo.pdaResultError("该点位有未完成的任务不允许清空信息:"+point_code); + return result; + } + log.info("pointclean手持管理端变更点位信息前为:{}",nowPoint.toString()); + + nowPoint.setUpdate_id(currentUserId); + nowPoint.setUpdate_name(nickName); + nowPoint.setUpdate_time(now); + nowPoint.setVehicle_code(""); + nowPoint.setVehicle_code2(""); + nowPoint.setVehicle_qty(0); + pointMapper.updateById(nowPoint); + + log.info("pointclean手持管理端变更点位信息前后:{}",nowPoint.toString()); + return PdaResponseVo.pdaResultOk("点位清空成功"); + } }