From 2cbc14495f32f490c12ac43a01ab7c13626b74e3 Mon Sep 17 00:00:00 2001 From: A0010407 Date: Thu, 14 Sep 2023 09:39:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ProProcessController.java | 21 ++++++++--- .../technology/mapper/ProProcessMapper.java | 7 ++-- .../service/IProProcessService.java | 7 ++-- .../service/impl/ProProcessServiceImpl.java | 16 +++++++-- .../mapper/technology/ProProcessMapper.xml | 5 +++ .../wms/controller/SysFactoryController.java | 14 ++++++++ .../java/com/op/wms/domain/SysFactory.java | 35 +++++++++++++++++-- .../com/op/wms/mapper/SysFactoryMapper.java | 2 ++ .../op/wms/service/ISysFactoryService.java | 3 ++ .../service/impl/SysFactoryServiceImpl.java | 13 +++++++ .../resources/mapper/wms/SysFactoryMapper.xml | 6 ++++ 11 files changed, 116 insertions(+), 13 deletions(-) diff --git a/op-modules/op-technology/src/main/java/com/op/technology/controller/ProProcessController.java b/op-modules/op-technology/src/main/java/com/op/technology/controller/ProProcessController.java index f9459cc3..ddc19e17 100644 --- a/op-modules/op-technology/src/main/java/com/op/technology/controller/ProProcessController.java +++ b/op-modules/op-technology/src/main/java/com/op/technology/controller/ProProcessController.java @@ -162,10 +162,21 @@ public class ProProcessController extends BaseController { /** * 查询工厂模型列表 */ - @RequiresPermissions("mes:pro:process:list") - @GetMapping("/selectSysFactoryList") - public AjaxResult selectSysFactoryList(SysFactory sysFactory) { - List list = proProcessService.selectSysFactoryList(sysFactory); - return success(list); +// @RequiresPermissions("mes:pro:process:list") +// @GetMapping("/selectSysFactoryList") +// public AjaxResult selectSysFactoryList(SysFactory sysFactory) { +// List list = proProcessService.selectSysFactoryList(sysFactory); +// return success(list); +// } + + /** + * 查询设工作中心 + */ + @RequiresPermissions("wms:factory:getWorkCenterList") + @GetMapping("/getWorkCenterList") + public TableDataInfo getWorkCenterList(SysFactory sysFactory) { + startPage(); + List list = proProcessService.getWorkCenterList(sysFactory); + return getDataTable(list); } } diff --git a/op-modules/op-technology/src/main/java/com/op/technology/mapper/ProProcessMapper.java b/op-modules/op-technology/src/main/java/com/op/technology/mapper/ProProcessMapper.java index 2003b590..35eba4b2 100644 --- a/op-modules/op-technology/src/main/java/com/op/technology/mapper/ProProcessMapper.java +++ b/op-modules/op-technology/src/main/java/com/op/technology/mapper/ProProcessMapper.java @@ -71,6 +71,9 @@ public interface ProProcessMapper Equipment selectEquipmentByEquipmentId(Long equipmentId); List selectBaseBomComponentList(BomComponent bomComponent); - //查询工厂模型 - public List selectSysFactoryList(SysFactory sysFactory); + //查询树形工厂模型 +// public List selectSysFactoryList(SysFactory sysFactory); + + //查询下拉式工作中心 + public List getWorkCenterList(SysFactory sysFactory); } diff --git a/op-modules/op-technology/src/main/java/com/op/technology/service/IProProcessService.java b/op-modules/op-technology/src/main/java/com/op/technology/service/IProProcessService.java index 58a01716..0c3b7537 100644 --- a/op-modules/op-technology/src/main/java/com/op/technology/service/IProProcessService.java +++ b/op-modules/op-technology/src/main/java/com/op/technology/service/IProProcessService.java @@ -72,6 +72,9 @@ public interface IProProcessService public List selectBaseBomComponentList(BomComponent bomComponent); - //查询树形结构 - public List selectSysFactoryList(SysFactory sysFactory); + //查询树形工作中心结构 + //public List selectSysFactoryList(SysFactory sysFactory); + + //查询下拉式工作中心 + List getWorkCenterList(SysFactory sysFactory); } diff --git a/op-modules/op-technology/src/main/java/com/op/technology/service/impl/ProProcessServiceImpl.java b/op-modules/op-technology/src/main/java/com/op/technology/service/impl/ProProcessServiceImpl.java index 63752afd..6f58e225 100644 --- a/op-modules/op-technology/src/main/java/com/op/technology/service/impl/ProProcessServiceImpl.java +++ b/op-modules/op-technology/src/main/java/com/op/technology/service/impl/ProProcessServiceImpl.java @@ -222,6 +222,18 @@ public class ProProcessServiceImpl implements IProProcessService { return proProcessMapper.selectBaseBomComponentList(bomComponent); } +// /** +// * 查询工厂模型列表 +// * +// * @param sysFactory 工厂模型 +// * @return 工厂模型 +// */ +// @Override +// @DS("#header.poolName") +// public List selectSysFactoryList(SysFactory sysFactory) { +// return proProcessMapper.selectSysFactoryList(sysFactory); +// } + /** * 查询工厂模型列表 * @@ -230,7 +242,7 @@ public class ProProcessServiceImpl implements IProProcessService { */ @Override @DS("#header.poolName") - public List selectSysFactoryList(SysFactory sysFactory) { - return proProcessMapper.selectSysFactoryList(sysFactory); + public List getWorkCenterList(SysFactory sysFactory) { + return proProcessMapper.getWorkCenterList(sysFactory); } } diff --git a/op-modules/op-technology/src/main/resources/mapper/technology/ProProcessMapper.xml b/op-modules/op-technology/src/main/resources/mapper/technology/ProProcessMapper.xml index 7705a107..ece10a43 100644 --- a/op-modules/op-technology/src/main/resources/mapper/technology/ProProcessMapper.xml +++ b/op-modules/op-technology/src/main/resources/mapper/technology/ProProcessMapper.xml @@ -318,4 +318,9 @@ and bom_code = #{bomCode} + + diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/SysFactoryController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/SysFactoryController.java index 745f03f4..5227fb5e 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/SysFactoryController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/SysFactoryController.java @@ -2,6 +2,8 @@ package com.op.wms.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.op.common.core.web.page.TableDataInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -92,4 +94,16 @@ public class SysFactoryController extends BaseController { public AjaxResult remove(@PathVariable Long[] factoryIds) { return toAjax(sysFactoryService.deleteSysFactoryByFactoryIds(factoryIds)); } + + // 查询工作中心 + /** + * 查询设备管理列表 + */ + @RequiresPermissions("wms:factory:getWorkCenterList") + @GetMapping("/getWorkCenterList") + public TableDataInfo getWorkCenterList(SysFactory sysFactory) { + startPage(); + List list = sysFactoryService.getWorkCenterList(sysFactory); + return getDataTable(list); + } } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/SysFactory.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/SysFactory.java index 3d491ed5..f2f0d7ed 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/SysFactory.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/SysFactory.java @@ -5,6 +5,9 @@ import org.apache.commons.lang3.builder.ToStringStyle; import com.op.common.core.annotation.Excel; import com.op.common.core.web.domain.TreeEntity; +import java.util.List; +import java.util.Map; + /** * 工厂模型对象 sys_factory * @@ -44,6 +47,11 @@ public class SysFactory extends TreeEntity { @Excel(name = "工厂编码") private String factoryCode; + //虚拟字段 + private List> workCenter; + private String value; + private String label; + public void setFactoryId(Long factoryId) { this.factoryId = factoryId; } @@ -103,6 +111,27 @@ public class SysFactory extends TreeEntity { this.factoryCode = factoryCode; } + public String getValue() { + return value; + } + public void setValue(String value) { + this.value = value; + } + + public String getLabel() { + return label; + } + public void setLabel(String label) { + this.label = label; + } + + public List> getWorkCenter() { + return workCenter; + } + public void setWorkCenter(List> workCenter) { + this.workCenter = workCenter; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -120,7 +149,9 @@ public class SysFactory extends TreeEntity { .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) - .append("factoryCode", getFactoryCode()) - .toString(); + .append("factoryCode", getFactoryCode()) + .append("value", getValue()) + .append("label", getLabel()) + .toString(); } } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/SysFactoryMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/SysFactoryMapper.java index 39f64ae5..cc2b8d96 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/SysFactoryMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/SysFactoryMapper.java @@ -58,4 +58,6 @@ public interface SysFactoryMapper { * @return 结果 */ public int deleteSysFactoryByFactoryIds(Long[] factoryIds); + + public List getWorkCenterList(SysFactory sysFactory); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/ISysFactoryService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/ISysFactoryService.java index ef3c43ef..5d9f879b 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/ISysFactoryService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/ISysFactoryService.java @@ -57,4 +57,7 @@ public interface ISysFactoryService { * @return 结果 */ public int deleteSysFactoryByFactoryId(Long factoryId); + + //好 + List getWorkCenterList(SysFactory sysFactory); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/SysFactoryServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/SysFactoryServiceImpl.java index 38177af3..2d30269c 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/SysFactoryServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/SysFactoryServiceImpl.java @@ -97,4 +97,17 @@ public class SysFactoryServiceImpl implements ISysFactoryService { public int deleteSysFactoryByFactoryId(Long factoryId) { return sysFactoryMapper.deleteSysFactoryByFactoryId(factoryId); } + + /** + * 查询工厂模型列表 + * + * @param sysFactory 工厂模型 + * @return 工厂模型 + */ + @Override + @DS("#header.poolName") + public List getWorkCenterList(SysFactory sysFactory) { + return sysFactoryMapper.getWorkCenterList(sysFactory); + } + } diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/SysFactoryMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/SysFactoryMapper.xml index e168a235..ebeb957e 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/SysFactoryMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/SysFactoryMapper.xml @@ -112,4 +112,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{factoryId} + + + \ No newline at end of file