From 520e95179dc0b21375747e3bd6fb9b35b8a1c4e4 Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Mon, 26 Aug 2024 17:12:09 +0800 Subject: [PATCH] =?UTF-8?q?rev:=E6=89=8B=E6=8C=81=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=82=B9=E4=BD=8D=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9=EF=BC=9A?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=97=B6=E6=B7=BB=E5=8A=A0=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=9C=89=E8=BD=BD=E5=85=B7=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/nl/wms/pda/controller/PdaController.java | 11 ++++++++--- .../sch/point/service/ISchBasePointService.java | 7 +++++++ .../service/impl/SchBasePointServiceImpl.java | 16 +++++++++++++++- 3 files changed, 30 insertions(+), 4 deletions(-) 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 34ae446..0b138d4 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 @@ -49,13 +49,18 @@ public class PdaController { @Log("查询设备编号及状态") @ApiOperation("查询设备编号及状态") @SaIgnore - //@PreAuthorize("@el.check('sect:list')") - //@RequestBody JSONObject json public ResponseEntity queryPoint(@RequestBody Map whereJson) { SchBasePoint region = new SchBasePoint(); region.setRegion_code(whereJson.get("region_code")); region.setPoint_code(whereJson.get("point_code")); - return new ResponseEntity<>(pointService.getPointList(region), HttpStatus.OK); + if(whereJson.containsKey("need_emtpy")){ + if("1".equals(whereJson.get("need_emtpy"))){ + region.setVehicle_qty(1); + }else{ + region.setVehicle_qty(0); + } + } + return new ResponseEntity<>(pointService.getPointListByPda(region), HttpStatus.OK); } @PostMapping("/region") diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java index a90575b..e738620 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java @@ -56,6 +56,13 @@ public interface ISchBasePointService extends IService { */ List getPointList(SchBasePoint region); + /** + * 获取点位 + * @param region + * @return + */ + List getPointListByPda(SchBasePoint region); + /** * 获取点位 * @param RegionCodes diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java index d6b5fdd..a6436bf 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java @@ -19,6 +19,7 @@ import org.nl.wms.sch.point.service.dao.SchBasePoint; import org.nl.wms.sch.point.service.dao.mapper.SchBasePointMapper; import org.nl.wms.sch.region.service.dao.SchBaseRegion; import org.nl.wms.sch.region.service.dao.mapper.SchBaseRegionMapper; +import org.nl.wms.sch.task.service.dao.SchBaseTask; import org.nl.wms.sch.task_manage.enums.PointStatusEnum; import org.nl.wms.util.PointUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -186,9 +187,22 @@ public class SchBasePointServiceImpl extends ServiceImpl() .eq(SchBasePoint::getRegion_code, region.getRegion_code()) .like(region.getPoint_code()!=null,SchBasePoint::getPoint_code, region.getPoint_code()) + .eq(SchBasePoint::getIs_used, 1) .eq(SchBasePoint::getIs_has_workder, 1)); } + @Override + public List getPointListByPda(SchBasePoint region) { + return pointMapper.selectList(new LambdaQueryWrapper() + .eq(ObjectUtil.isNotEmpty(region.getRegion_code()),SchBasePoint::getRegion_code, region.getRegion_code()) + .like(ObjectUtil.isNotEmpty(region.getPoint_code()),SchBasePoint::getPoint_code, region.getPoint_code()) + .and(slam -> slam.eq(SchBasePoint::getIng_task_code, "") + .or() + .isNull(SchBasePoint::getIng_task_code)) + .eq(SchBasePoint::getIs_used, 1) + .eq(ObjectUtil.isNotEmpty(region.getVehicle_qty()),SchBasePoint::getVehicle_qty, region.getVehicle_qty())); + } + @Override public List getPointsByRegionCodes(String RegionCodes) { Set regions = new HashSet<>(); @@ -196,7 +210,7 @@ public class SchBasePointServiceImpl extends ServiceImpl() .in(ObjectUtil.isNotEmpty(RegionCodes),SchBasePoint::getRegion_code,regions) - .eq(SchBasePoint::getIs_has_workder, 1) + .eq(SchBasePoint::getIs_used, 1) .orderByAsc(SchBasePoint::getPoint_code) ); }