From 8f58ad7a575ba18aa2f06a37a7bcb436b2b8ff77 Mon Sep 17 00:00:00 2001 From: liumingxiy Date: Mon, 11 Nov 2024 17:34:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=9B=98=E7=82=B9=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E7=AE=A1=E7=90=86=E7=9A=84=E5=9F=BA=E7=A1=80=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WmsInventoryConfigureController.java | 104 ++++++++++++ .../mes/md/domain/WmsInventoryConfigure.java | 149 ++++++++++++++++++ .../mapper/WmsInventoryConfigureMapper.java | 61 +++++++ .../IWmsInventoryConfigureService.java | 61 +++++++ .../WmsInventoryConfigureServiceImpl.java | 96 +++++++++++ .../mapper/md/WmsInventoryConfigureMapper.xml | 107 +++++++++++++ 6 files changed, 578 insertions(+) create mode 100644 ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsInventoryConfigureController.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/md/domain/WmsInventoryConfigure.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/md/mapper/WmsInventoryConfigureMapper.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/md/service/IWmsInventoryConfigureService.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsInventoryConfigureServiceImpl.java create mode 100644 ktg-mes/src/main/resources/mapper/md/WmsInventoryConfigureMapper.xml diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsInventoryConfigureController.java b/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsInventoryConfigureController.java new file mode 100644 index 0000000..d92664b --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsInventoryConfigureController.java @@ -0,0 +1,104 @@ +package com.ktg.mes.md.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ktg.common.annotation.Log; +import com.ktg.common.core.controller.BaseController; +import com.ktg.common.core.domain.AjaxResult; +import com.ktg.common.enums.BusinessType; +import com.ktg.mes.md.domain.WmsInventoryConfigure; +import com.ktg.mes.md.service.IWmsInventoryConfigureService; +import com.ktg.common.utils.poi.ExcelUtil; +import com.ktg.common.core.page.TableDataInfo; + +/** + * 盘点计划配置Controller + * + * @author yinjinlu + * @date 2024-11-11 + */ +@RestController +@RequestMapping("/md/CONFIGURE") +public class WmsInventoryConfigureController extends BaseController +{ + @Autowired + private IWmsInventoryConfigureService wmsInventoryConfigureService; + + /** + * 查询盘点计划配置列表 + */ + @PreAuthorize("@ss.hasPermi('md:CONFIGURE:list')") + @GetMapping("/list") + public TableDataInfo list(WmsInventoryConfigure wmsInventoryConfigure) + { + startPage(); + List list = wmsInventoryConfigureService.selectWmsInventoryConfigureList(wmsInventoryConfigure); + return getDataTable(list); + } + + /** + * 导出盘点计划配置列表 + */ + @PreAuthorize("@ss.hasPermi('md:CONFIGURE:export')") + @Log(title = "盘点计划配置", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, WmsInventoryConfigure wmsInventoryConfigure) + { + List list = wmsInventoryConfigureService.selectWmsInventoryConfigureList(wmsInventoryConfigure); + ExcelUtil util = new ExcelUtil(WmsInventoryConfigure.class); + util.exportExcel(response, list, "盘点计划配置数据"); + } + + /** + * 获取盘点计划配置详细信息 + */ + @PreAuthorize("@ss.hasPermi('md:CONFIGURE:query')") + @GetMapping(value = "/{wmsInventoryConfigureId}") + public AjaxResult getInfo(@PathVariable("wmsInventoryConfigureId") Long wmsInventoryConfigureId) + { + return AjaxResult.success(wmsInventoryConfigureService.selectWmsInventoryConfigureByWmsInventoryConfigureId(wmsInventoryConfigureId)); + } + + /** + * 新增盘点计划配置 + */ + @PreAuthorize("@ss.hasPermi('md:CONFIGURE:add')") + @Log(title = "盘点计划配置", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WmsInventoryConfigure wmsInventoryConfigure) + { + return toAjax(wmsInventoryConfigureService.insertWmsInventoryConfigure(wmsInventoryConfigure)); + } + + /** + * 修改盘点计划配置 + */ + @PreAuthorize("@ss.hasPermi('md:CONFIGURE:edit')") + @Log(title = "盘点计划配置", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WmsInventoryConfigure wmsInventoryConfigure) + { + return toAjax(wmsInventoryConfigureService.updateWmsInventoryConfigure(wmsInventoryConfigure)); + } + + /** + * 删除盘点计划配置 + */ + @PreAuthorize("@ss.hasPermi('md:CONFIGURE:remove')") + @Log(title = "盘点计划配置", businessType = BusinessType.DELETE) + @DeleteMapping("/{wmsInventoryConfigureIds}") + public AjaxResult remove(@PathVariable Long[] wmsInventoryConfigureIds) + { + return toAjax(wmsInventoryConfigureService.deleteWmsInventoryConfigureByWmsInventoryConfigureIds(wmsInventoryConfigureIds)); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/domain/WmsInventoryConfigure.java b/ktg-mes/src/main/java/com/ktg/mes/md/domain/WmsInventoryConfigure.java new file mode 100644 index 0000000..e3b8a9d --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/md/domain/WmsInventoryConfigure.java @@ -0,0 +1,149 @@ +package com.ktg.mes.md.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ktg.common.annotation.Excel; +import com.ktg.common.core.domain.BaseEntity; + +/** + * 盘点计划配置对象 WMS_INVENTORY_CONFIGURE + * + * @author yinjinlu + * @date 2024-11-11 + */ +public class WmsInventoryConfigure extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long wmsInventoryConfigureId; + + /** 配置名称 */ + @Excel(name = "配置名称") + private String configureName; + + /** 盘点类型 */ + @Excel(name = "盘点类型") + private String dataType; + + /** 盘点形式 */ + @Excel(name = "盘点形式") + private String inventoryType; + + /** 盘点仓库 */ + @Excel(name = "盘点仓库") + private Long mWarehouseId; + + /** 预留字段1 */ + private String attr1; + + /** 预留字段2 */ + private String attr2; + + /** 预留字段3 */ + private String attr3; + + /** 预留字段4 */ + private String attr4; + + public void setWmsInventoryConfigureId(Long wmsInventoryConfigureId) + { + this.wmsInventoryConfigureId = wmsInventoryConfigureId; + } + + public Long getWmsInventoryConfigureId() + { + return wmsInventoryConfigureId; + } + public void setConfigureName(String configureName) + { + this.configureName = configureName; + } + + public String getConfigureName() + { + return configureName; + } + public void setDataType(String dataType) + { + this.dataType = dataType; + } + + public String getDataType() + { + return dataType; + } + public void setInventoryType(String inventoryType) + { + this.inventoryType = inventoryType; + } + + public String getInventoryType() + { + return inventoryType; + } + public void setmWarehouseId(Long mWarehouseId) + { + this.mWarehouseId = mWarehouseId; + } + + public Long getmWarehouseId() + { + return mWarehouseId; + } + public void setAttr1(String attr1) + { + this.attr1 = attr1; + } + + public String getAttr1() + { + return attr1; + } + public void setAttr2(String attr2) + { + this.attr2 = attr2; + } + + public String getAttr2() + { + return attr2; + } + public void setAttr3(String attr3) + { + this.attr3 = attr3; + } + + public String getAttr3() + { + return attr3; + } + public void setAttr4(String attr4) + { + this.attr4 = attr4; + } + + public String getAttr4() + { + return attr4; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("wmsInventoryConfigureId", getWmsInventoryConfigureId()) + .append("configureName", getConfigureName()) + .append("dataType", getDataType()) + .append("inventoryType", getInventoryType()) + .append("mWarehouseId", getmWarehouseId()) + .append("attr1", getAttr1()) + .append("attr2", getAttr2()) + .append("attr3", getAttr3()) + .append("attr4", getAttr4()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/WmsInventoryConfigureMapper.java b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/WmsInventoryConfigureMapper.java new file mode 100644 index 0000000..c7da690 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/WmsInventoryConfigureMapper.java @@ -0,0 +1,61 @@ +package com.ktg.mes.md.mapper; + +import java.util.List; +import com.ktg.mes.md.domain.WmsInventoryConfigure; + +/** + * 盘点计划配置Mapper接口 + * + * @author yinjinlu + * @date 2024-11-11 + */ +public interface WmsInventoryConfigureMapper +{ + /** + * 查询盘点计划配置 + * + * @param wmsInventoryConfigureId 盘点计划配置主键 + * @return 盘点计划配置 + */ + public WmsInventoryConfigure selectWmsInventoryConfigureByWmsInventoryConfigureId(Long wmsInventoryConfigureId); + + /** + * 查询盘点计划配置列表 + * + * @param wmsInventoryConfigure 盘点计划配置 + * @return 盘点计划配置集合 + */ + public List selectWmsInventoryConfigureList(WmsInventoryConfigure wmsInventoryConfigure); + + /** + * 新增盘点计划配置 + * + * @param wmsInventoryConfigure 盘点计划配置 + * @return 结果 + */ + public int insertWmsInventoryConfigure(WmsInventoryConfigure wmsInventoryConfigure); + + /** + * 修改盘点计划配置 + * + * @param wmsInventoryConfigure 盘点计划配置 + * @return 结果 + */ + public int updateWmsInventoryConfigure(WmsInventoryConfigure wmsInventoryConfigure); + + /** + * 删除盘点计划配置 + * + * @param wmsInventoryConfigureId 盘点计划配置主键 + * @return 结果 + */ + public int deleteWmsInventoryConfigureByWmsInventoryConfigureId(Long wmsInventoryConfigureId); + + /** + * 批量删除盘点计划配置 + * + * @param wmsInventoryConfigureIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteWmsInventoryConfigureByWmsInventoryConfigureIds(Long[] wmsInventoryConfigureIds); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/IWmsInventoryConfigureService.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/IWmsInventoryConfigureService.java new file mode 100644 index 0000000..ce1408f --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/IWmsInventoryConfigureService.java @@ -0,0 +1,61 @@ +package com.ktg.mes.md.service; + +import java.util.List; +import com.ktg.mes.md.domain.WmsInventoryConfigure; + +/** + * 盘点计划配置Service接口 + * + * @author yinjinlu + * @date 2024-11-11 + */ +public interface IWmsInventoryConfigureService +{ + /** + * 查询盘点计划配置 + * + * @param wmsInventoryConfigureId 盘点计划配置主键 + * @return 盘点计划配置 + */ + public WmsInventoryConfigure selectWmsInventoryConfigureByWmsInventoryConfigureId(Long wmsInventoryConfigureId); + + /** + * 查询盘点计划配置列表 + * + * @param wmsInventoryConfigure 盘点计划配置 + * @return 盘点计划配置集合 + */ + public List selectWmsInventoryConfigureList(WmsInventoryConfigure wmsInventoryConfigure); + + /** + * 新增盘点计划配置 + * + * @param wmsInventoryConfigure 盘点计划配置 + * @return 结果 + */ + public int insertWmsInventoryConfigure(WmsInventoryConfigure wmsInventoryConfigure); + + /** + * 修改盘点计划配置 + * + * @param wmsInventoryConfigure 盘点计划配置 + * @return 结果 + */ + public int updateWmsInventoryConfigure(WmsInventoryConfigure wmsInventoryConfigure); + + /** + * 批量删除盘点计划配置 + * + * @param wmsInventoryConfigureIds 需要删除的盘点计划配置主键集合 + * @return 结果 + */ + public int deleteWmsInventoryConfigureByWmsInventoryConfigureIds(Long[] wmsInventoryConfigureIds); + + /** + * 删除盘点计划配置信息 + * + * @param wmsInventoryConfigureId 盘点计划配置主键 + * @return 结果 + */ + public int deleteWmsInventoryConfigureByWmsInventoryConfigureId(Long wmsInventoryConfigureId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsInventoryConfigureServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsInventoryConfigureServiceImpl.java new file mode 100644 index 0000000..8053a09 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/WmsInventoryConfigureServiceImpl.java @@ -0,0 +1,96 @@ +package com.ktg.mes.md.service.impl; + +import java.util.List; +import com.ktg.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ktg.mes.md.mapper.WmsInventoryConfigureMapper; +import com.ktg.mes.md.domain.WmsInventoryConfigure; +import com.ktg.mes.md.service.IWmsInventoryConfigureService; + +/** + * 盘点计划配置Service业务层处理 + * + * @author yinjinlu + * @date 2024-11-11 + */ +@Service +public class WmsInventoryConfigureServiceImpl implements IWmsInventoryConfigureService +{ + @Autowired + private WmsInventoryConfigureMapper wmsInventoryConfigureMapper; + + /** + * 查询盘点计划配置 + * + * @param wmsInventoryConfigureId 盘点计划配置主键 + * @return 盘点计划配置 + */ + @Override + public WmsInventoryConfigure selectWmsInventoryConfigureByWmsInventoryConfigureId(Long wmsInventoryConfigureId) + { + return wmsInventoryConfigureMapper.selectWmsInventoryConfigureByWmsInventoryConfigureId(wmsInventoryConfigureId); + } + + /** + * 查询盘点计划配置列表 + * + * @param wmsInventoryConfigure 盘点计划配置 + * @return 盘点计划配置 + */ + @Override + public List selectWmsInventoryConfigureList(WmsInventoryConfigure wmsInventoryConfigure) + { + return wmsInventoryConfigureMapper.selectWmsInventoryConfigureList(wmsInventoryConfigure); + } + + /** + * 新增盘点计划配置 + * + * @param wmsInventoryConfigure 盘点计划配置 + * @return 结果 + */ + @Override + public int insertWmsInventoryConfigure(WmsInventoryConfigure wmsInventoryConfigure) + { + wmsInventoryConfigure.setCreateTime(DateUtils.getNowDate()); + return wmsInventoryConfigureMapper.insertWmsInventoryConfigure(wmsInventoryConfigure); + } + + /** + * 修改盘点计划配置 + * + * @param wmsInventoryConfigure 盘点计划配置 + * @return 结果 + */ + @Override + public int updateWmsInventoryConfigure(WmsInventoryConfigure wmsInventoryConfigure) + { + wmsInventoryConfigure.setUpdateTime(DateUtils.getNowDate()); + return wmsInventoryConfigureMapper.updateWmsInventoryConfigure(wmsInventoryConfigure); + } + + /** + * 批量删除盘点计划配置 + * + * @param wmsInventoryConfigureIds 需要删除的盘点计划配置主键 + * @return 结果 + */ + @Override + public int deleteWmsInventoryConfigureByWmsInventoryConfigureIds(Long[] wmsInventoryConfigureIds) + { + return wmsInventoryConfigureMapper.deleteWmsInventoryConfigureByWmsInventoryConfigureIds(wmsInventoryConfigureIds); + } + + /** + * 删除盘点计划配置信息 + * + * @param wmsInventoryConfigureId 盘点计划配置主键 + * @return 结果 + */ + @Override + public int deleteWmsInventoryConfigureByWmsInventoryConfigureId(Long wmsInventoryConfigureId) + { + return wmsInventoryConfigureMapper.deleteWmsInventoryConfigureByWmsInventoryConfigureId(wmsInventoryConfigureId); + } +} diff --git a/ktg-mes/src/main/resources/mapper/md/WmsInventoryConfigureMapper.xml b/ktg-mes/src/main/resources/mapper/md/WmsInventoryConfigureMapper.xml new file mode 100644 index 0000000..35493a9 --- /dev/null +++ b/ktg-mes/src/main/resources/mapper/md/WmsInventoryConfigureMapper.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + select WMS_INVENTORY_CONFIGURE_ID, CONFIGURE_NAME, DATA_TYPE, INVENTORY_TYPE, M_WAREHOUSE_ID, ATTR1, ATTR2, ATTR3, ATTR4, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME from WMS_INVENTORY_CONFIGURE + + + + + + + + insert into WMS_INVENTORY_CONFIGURE + + CONFIGURE_NAME, + DATA_TYPE, + INVENTORY_TYPE, + M_WAREHOUSE_ID, + ATTR1, + ATTR2, + ATTR3, + ATTR4, + CREATE_BY, + CREATE_TIME, + UPDATE_BY, + UPDATE_TIME, + + + #{configureName}, + #{dataType}, + #{inventoryType}, + #{mWarehouseId}, + #{attr1}, + #{attr2}, + #{attr3}, + #{attr4}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update WMS_INVENTORY_CONFIGURE + + CONFIGURE_NAME = #{configureName}, + DATA_TYPE = #{dataType}, + INVENTORY_TYPE = #{inventoryType}, + M_WAREHOUSE_ID = #{mWarehouseId}, + ATTR1 = #{attr1}, + ATTR2 = #{attr2}, + ATTR3 = #{attr3}, + ATTR4 = #{attr4}, + CREATE_BY = #{createBy}, + CREATE_TIME = #{createTime}, + UPDATE_BY = #{updateBy}, + UPDATE_TIME = #{updateTime}, + + where WMS_INVENTORY_CONFIGURE_ID = #{wmsInventoryConfigureId} + + + + delete from WMS_INVENTORY_CONFIGURE where WMS_INVENTORY_CONFIGURE_ID = #{wmsInventoryConfigureId} + + + + delete from WMS_INVENTORY_CONFIGURE where WMS_INVENTORY_CONFIGURE_ID in + + #{wmsInventoryConfigureId} + + + \ No newline at end of file