From 3faf1b65c169b4af948e3598ed9b93c2a7dca0f5 Mon Sep 17 00:00:00 2001 From: gongbaoxiong <751575283@qq.com> Date: Tue, 2 Jul 2024 16:30:19 +0800 Subject: [PATCH] =?UTF-8?q?add:=E5=A2=9E=E5=8A=A0=E8=A3=85=E7=AE=B1?= =?UTF-8?q?=E5=8C=BA=E5=BA=93=E5=AD=98=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BstIvtPackageinfoivtController.java | 56 +++- .../service/IbstIvtPackageinfoivtService.java | 9 + .../impl/BstIvtPackageinfoivtServiceImpl.java | 50 +++- .../nl/common/enums/PackageInfoIvtEnum.java | 2 +- .../ivt/rest/DeliveryPointIvtController.java | 1 - .../wms/pdm/ivt/packageinfoivt/index.vue | 248 ++++++++++++++++++ .../pdm/ivt/packageinfoivt/packageinfoivt.js | 27 ++ 7 files changed, 372 insertions(+), 21 deletions(-) create mode 100644 lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/index.vue create mode 100644 lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/packageinfoivt.js diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/controller/BstIvtPackageinfoivtController.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/controller/BstIvtPackageinfoivtController.java index fb0fd0c6a..d9d4325c5 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/controller/BstIvtPackageinfoivtController.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/controller/BstIvtPackageinfoivtController.java @@ -1,21 +1,25 @@ package org.nl.b_lms.sch.point.controller; -import java.util.Set; - import cn.dev33.satoken.annotation.SaIgnore; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; -import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt; -import org.nl.modules.common.exception.BadRequestException; -import org.springframework.web.bind.annotation.*; import lombok.RequiredArgsConstructor; - -import javax.annotation.Resource; - import lombok.extern.slf4j.Slf4j; +import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt; +import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService; +import org.nl.common.TableDataInfo; +import org.nl.common.domain.query.PageQuery; +import org.nl.modules.common.exception.BadRequestException; +import org.nl.modules.logging.annotation.Log; +import org.nl.wms.pdm.ivt.service.dto.DeliveryPointIvtDto; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.Map; +import java.util.Set; /** @@ -35,6 +39,19 @@ public class BstIvtPackageinfoivtController { private IbstIvtPackageinfoivtService bstIvtPackageinfoivtService; + /** + * 分页查询 + * + * @param whereJson 查询条件 + * @param page 分页参数 + */ + @GetMapping + @Log("查询点位库存") + public ResponseEntity query(@RequestParam Map whereJson, PageQuery page) { + return new ResponseEntity<>(TableDataInfo.build(bstIvtPackageinfoivtService.queryAll(whereJson, page)), HttpStatus.OK); + } + + /** * 一楼装箱区点位二次分配 * @@ -53,10 +70,7 @@ public class BstIvtPackageinfoivtController { return new ResponseEntity<>(bstIvtPackageinfoivtService.secondaryAllocationPoint(taskCode, actionType), HttpStatus.OK); } - /** - * agv二次分配类型(1、普通任务 2、取货二次分配 3、防货二次分配 4、取放货二次分配) - */ - private String agv_action_type; + /** * 新增数据 @@ -65,12 +79,28 @@ public class BstIvtPackageinfoivtController { * @return 新增结果 */ @PostMapping + @Log("修改点位库存") public ResponseEntity create(@RequestBody BstIvtPackageinfoivt params) { bstIvtPackageinfoivtService.create(params); return new ResponseEntity<>(HttpStatus.OK); } + /** + * 修改数据 + * @param params 实体对象 + * @return 修改结果 + */ + @PutMapping + @Log("修改点位库存") + //@SaCheckPermission("@el.check('deliverypointivt:edit')") + public ResponseEntity update(@Validated @RequestBody BstIvtPackageinfoivt params) { + bstIvtPackageinfoivtService.update(params); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + + /** * 删除数据 * diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/service/IbstIvtPackageinfoivtService.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/service/IbstIvtPackageinfoivtService.java index 9b2f475c2..0ccba5603 100644 --- a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/service/IbstIvtPackageinfoivtService.java +++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/point/service/IbstIvtPackageinfoivtService.java @@ -75,6 +75,15 @@ public interface IbstIvtPackageinfoivtService extends IService queryAll(Map whereJson, PageQuery page) { - return bstIvtPackageinfoivtMapper.selectPage(new Page<>(page.getPage() + 1, page.getSize()), new QueryWrapper() - .lambda()); + LambdaQueryWrapper queryWrapper = new QueryWrapper().lambda(); + String isUsed = MapUtil.getStr(whereJson, "is_used"); + String pointCode = MapUtil.getStr(whereJson, "point_code"); + String packageInfoArea = MapUtil.getStr(whereJson, "packageinfo_area"); + String ivtStatus = MapUtil.getStr(whereJson, "ivt_status"); + if (StringUtils.isNotEmpty(isUsed)) { + queryWrapper.eq(BstIvtPackageinfoivt::getIs_used, isUsed); + } + if (StringUtils.isNotEmpty(pointCode)) { + queryWrapper.like(BstIvtPackageinfoivt::getPoint_code, pointCode); + } + if (StringUtils.isNotEmpty(packageInfoArea)) { + queryWrapper.eq(BstIvtPackageinfoivt::getPoint_status, packageInfoArea); + } + if (StringUtils.isNotEmpty(ivtStatus)) { + queryWrapper.eq(BstIvtPackageinfoivt::getIvt_status, ivtStatus); + } + return bstIvtPackageinfoivtMapper.selectPage(new Page<>(page.getPage() + 1, page.getSize()), queryWrapper); } @Override @@ -497,12 +515,27 @@ public class BstIvtPackageinfoivtServiceImpl extends ServiceImpl code; diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/rest/DeliveryPointIvtController.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/rest/DeliveryPointIvtController.java index aea178a94..e05427f54 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/rest/DeliveryPointIvtController.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/rest/DeliveryPointIvtController.java @@ -46,7 +46,6 @@ public class DeliveryPointIvtController { @PutMapping @Log("修改分切输送线") - //@SaCheckPermission("@el.check('deliverypointivt:edit')") public ResponseEntity update(@Validated @RequestBody DeliveryPointIvtDto dto) { deliverypointivtService.update(dto); diff --git a/lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/index.vue b/lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/index.vue new file mode 100644 index 000000000..f6662abeb --- /dev/null +++ b/lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/index.vue @@ -0,0 +1,248 @@ + + + + + diff --git a/lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/packageinfoivt.js b/lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/packageinfoivt.js new file mode 100644 index 000000000..f2ca94964 --- /dev/null +++ b/lms/nladmin-ui/src/views/wms/pdm/ivt/packageinfoivt/packageinfoivt.js @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +export function add(data) { + return request({ + url: 'api/bstIvtPackageInfoIvt', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/bstIvtPackageInfoIvt', + method: 'delete', + data: ids + }) +} + +export function edit(data) { + return request({ + url: 'api/bstIvtPackageInfoIvt', + method: 'put', + data + }) +} + +export default { add, edit, del }