From 94bb517ca948494e342dadd24386cb8a51be8b73 Mon Sep 17 00:00:00 2001 From: HanLong <404402223@qq.com> Date: Mon, 2 Mar 2026 17:31:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86][?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E4=BD=8D=E7=BD=AE=E9=80=89=E6=8B=A9=E5=99=A8?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/StorageLocationController.java | 5 +- .../com/hxhq/business/domain/StorageLocation.java | 11 +++ .../form/yq/StorageLocationSearchForm.java | 92 ++++++++++++++++++++++ .../business/service/IStorageLocationService.java | 5 +- .../service/impl/StorageLocationServiceImpl.java | 9 ++- .../system/controller/SysDictDataController.java | 11 ++- .../mapper/business/StorageLocationMapper.xml | 2 +- 7 files changed, 124 insertions(+), 11 deletions(-) create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/yq/StorageLocationSearchForm.java diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StorageLocationController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StorageLocationController.java index c606b62..0066d19 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StorageLocationController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StorageLocationController.java @@ -3,6 +3,7 @@ package com.hxhq.business.controller; import java.util.Arrays; import java.util.List; +import com.hxhq.business.form.yq.StorageLocationSearchForm; import com.hxhq.common.security.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -31,10 +32,10 @@ public class StorageLocationController extends BaseController */ @GetMapping("/list") @RequiresPermissions("business:storageLocation:list") - public TableDataInfo list(StorageLocation storageLocation) + public TableDataInfo list(StorageLocationSearchForm form) { startPage(); - List list = storageLocationService.queryList(storageLocation); + List list = storageLocationService.queryList(form); return getDataTable(list); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StorageLocation.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StorageLocation.java index b718d51..04ff765 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StorageLocation.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StorageLocation.java @@ -37,6 +37,17 @@ public class StorageLocation extends MpBaseEntity @TableField(exist = false) private String deptName; + @TableField(exist = false) + private String wc; + + public String getWc() { + return wc; + } + + public void setWc(String wc) { + this.wc = wc; + } + public String getDeptName() { return deptName; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/yq/StorageLocationSearchForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/yq/StorageLocationSearchForm.java new file mode 100644 index 0000000..5070203 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/yq/StorageLocationSearchForm.java @@ -0,0 +1,92 @@ +package com.hxhq.business.form.yq; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.hxhq.common.core.annotation.Excel; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.Date; +import java.util.List; + +/** + * @author hanlong + */ +public class StorageLocationSearchForm { + + /** 放置地点 */ + private String location; + + /** 设备名称或编号 */ + private String name; + + /** 放置货架 */ + private String shelfPlacement; + + /** 温层 */ + private String compartment; + + /** 部门id */ + private Long deptId; + + /** 状态 1-禁用 10-启用 */ + private Integer status; + + private List deptIdList; + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getShelfPlacement() { + return shelfPlacement; + } + + public void setShelfPlacement(String shelfPlacement) { + this.shelfPlacement = shelfPlacement; + } + + public String getCompartment() { + return compartment; + } + + public void setCompartment(String compartment) { + this.compartment = compartment; + } + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public List getDeptIdList() { + return deptIdList; + } + + public void setDeptIdList(List deptIdList) { + this.deptIdList = deptIdList; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStorageLocationService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStorageLocationService.java index 1d8e4b4..d71324d 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStorageLocationService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStorageLocationService.java @@ -3,6 +3,7 @@ package com.hxhq.business.service; import java.util.List; import com.hxhq.business.domain.StorageLocation; import com.baomidou.mybatisplus.extension.service.IService; +import com.hxhq.business.form.yq.StorageLocationSearchForm; /** * 存储位置Service接口 @@ -15,9 +16,9 @@ public interface IStorageLocationService extends IService /** * 查询存储位置列表 * - * @param storageLocation 存储位置 + * @param form 存储位置 * @return 存储位置集合 */ - public List queryList(StorageLocation storageLocation); + public List queryList(StorageLocationSearchForm form); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StorageLocationServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StorageLocationServiceImpl.java index 182a2c2..0d666af 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StorageLocationServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StorageLocationServiceImpl.java @@ -2,8 +2,10 @@ package com.hxhq.business.service.impl; import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; - import com.hxhq.common.core.utils.DateUtils; +import com.hxhq.business.form.yq.StorageLocationSearchForm; +import com.hxhq.common.core.utils.DateUtils; import com.hxhq.common.core.utils.StringUtils; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.StorageLocationMapper; @@ -27,7 +29,7 @@ public class StorageLocationServiceImpl extends ServiceImpl queryList(StorageLocation form) + public List queryList(StorageLocationSearchForm form) { QueryWrapper queryWrapper = Wrappers.query(); queryWrapper.eq("s.del_flag", 0); @@ -43,6 +45,9 @@ public class StorageLocationServiceImpl extends ServiceImpl superiorAndSubordinate = sysDeptService.getSuperiorAndSubordinate(SecurityUtils.getLoginUser().getSysUser().getDeptId()); List deptIdList = superiorAndSubordinate.stream().map(SysDept::getDeptId).collect(Collectors.toList()); form.setDeptIdList(deptIdList); - form.setCcwz(NormalEnum.yes.getValue()); + form.setStatus(NormalEnum.yes.getValue()); startPage(); - List list = yqService.queryList(form); + List list = storageLocationService.queryList(form); return getDataTable(list); } else { diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StorageLocationMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StorageLocationMapper.xml index a3871ec..7f054ca 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StorageLocationMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StorageLocationMapper.xml @@ -4,7 +4,7 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">