From 5d87f9a24fd5670e660f8c8c9677fbc472f056aa Mon Sep 17 00:00:00 2001 From: A0010407 Date: Sun, 10 Sep 2023 20:48:28 +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 | 15 +- .../com/op/technology/domain/SysFactory.java | 128 ++++++++++++++++++ .../technology/mapper/ProProcessMapper.java | 8 +- .../service/IProProcessService.java | 8 +- .../service/impl/ProProcessServiceImpl.java | 11 ++ .../mapper/technology/ProProcessMapper.xml | 36 +++++ 6 files changed, 194 insertions(+), 12 deletions(-) create mode 100644 op-modules/op-technology/src/main/java/com/op/technology/domain/SysFactory.java 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 7e2a5909..f9459cc3 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 @@ -10,10 +10,7 @@ import com.op.common.core.web.page.TableDataInfo; import com.op.common.log.annotation.Log; import com.op.common.log.enums.BusinessType; import com.op.common.security.annotation.RequiresPermissions; -import com.op.technology.domain.Bom; -import com.op.technology.domain.BomComponent; -import com.op.technology.domain.ProProcess; -import com.op.technology.domain.Equipment; +import com.op.technology.domain.*; import com.op.technology.service.IProProcessService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -161,4 +158,14 @@ public class ProProcessController extends BaseController { List list = proProcessService.selectBaseBomComponentList(bomComponent); return getDataTable(list); } + + /** + * 查询工厂模型列表 + */ + @RequiresPermissions("mes:pro:process:list") + @GetMapping("/selectSysFactoryList") + public AjaxResult selectSysFactoryList(SysFactory sysFactory) { + List list = proProcessService.selectSysFactoryList(sysFactory); + return success(list); + } } diff --git a/op-modules/op-technology/src/main/java/com/op/technology/domain/SysFactory.java b/op-modules/op-technology/src/main/java/com/op/technology/domain/SysFactory.java new file mode 100644 index 00000000..e57aa107 --- /dev/null +++ b/op-modules/op-technology/src/main/java/com/op/technology/domain/SysFactory.java @@ -0,0 +1,128 @@ +package com.op.technology.domain; + +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.TreeEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.List; + +/** + * 工厂模型对象 sys_factory + * + * @author Open Platform + * @date 2023-07-03 + */ +public class SysFactory extends TreeEntity { + private static final long serialVersionUID = 1L; + + /** 工厂id */ + private Long factoryId; + + /** 部门名称 */ + @Excel(name = "工厂名称") + private String factoryName; + + /** 负责人 */ + @Excel(name = "负责人") + private String leader; + + /** 联系电话 */ + @Excel(name = "联系电话") + private String phone; + + /** 邮箱 */ + @Excel(name = "邮箱") + private String email; + + /** 部门状态(0正常 */ + @Excel(name = "工厂状态") + private String status; + + /** 删除标志(0代表存在 */ + private String delFlag; + + /** 工厂编码 */ + @Excel(name = "工厂编码") + private String factoryCode; + + public void setFactoryId(Long factoryId) { + this.factoryId = factoryId; + } + + public Long getFactoryId() { + return factoryId; + } + + public void setFactoryName(String factoryName) { + this.factoryName = factoryName; + } + + public String getFactoryName() { + return factoryName; + } + + public void setLeader(String leader) { + this.leader = leader; + } + + public String getLeader() { + return leader; + } + public void setPhone(String phone) { + this.phone = phone; + } + + public String getPhone() { + return phone; + } + public void setEmail(String email) { + this.email = email; + } + + public String getEmail() { + return email; + } + public void setStatus(String status) { + this.status = status; + } + + public String getStatus() { + return status; + } + public void setDelFlag(String delFlag) { + this.delFlag = delFlag; + } + + public String getDelFlag() { + return delFlag; + } + + public String getFactoryCode() { + return factoryCode; + } + public void setFactoryCode(String factoryCode) { + this.factoryCode = factoryCode; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("factoryId", getFactoryId()) + .append("parentId", getParentId()) + .append("ancestors", getAncestors()) + .append("factoryName", getFactoryName()) + .append("orderNum", getOrderNum()) + .append("leader", getLeader()) + .append("phone", getPhone()) + .append("email", getEmail()) + .append("status", getStatus()) + .append("delFlag", getDelFlag()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("factoryCode", getFactoryCode()) + .toString(); + } +} 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 74279eb7..2003b590 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 @@ -1,9 +1,6 @@ package com.op.technology.mapper; -import com.op.technology.domain.Bom; -import com.op.technology.domain.BomComponent; -import com.op.technology.domain.Equipment; -import com.op.technology.domain.ProProcess; +import com.op.technology.domain.*; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -73,4 +70,7 @@ public interface ProProcessMapper List selectEquipmentList(Equipment equipment); Equipment selectEquipmentByEquipmentId(Long equipmentId); List selectBaseBomComponentList(BomComponent bomComponent); + + //查询工厂模型 + public List selectSysFactoryList(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 70e5b86f..58a01716 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 @@ -1,9 +1,6 @@ package com.op.technology.service; -import com.op.technology.domain.Bom; -import com.op.technology.domain.BomComponent; -import com.op.technology.domain.Equipment; -import com.op.technology.domain.ProProcess; +import com.op.technology.domain.*; import java.util.List; @@ -74,4 +71,7 @@ public interface IProProcessService public Equipment selectEquipmentByEquipmentId(Long equipmentId); public List selectBaseBomComponentList(BomComponent bomComponent); + + //查询树形结构 + public List selectSysFactoryList(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 3b1abc02..63752afd 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,4 +222,15 @@ 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); + } } 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 1a445283..7705a107 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 @@ -93,6 +93,28 @@ + + + + + + + + + + + + + + + + + + + + select factory_id, parent_id, ancestors, factory_name, order_num, leader, phone, email, status, del_flag, create_by, create_time, update_by, update_time, factory_code from sys_factory + + select factory_code, production_version, bom_code, optional_bom, optional_bom_text, pvvd, pved, bom_calculate_number, bom_calculate_unit, bom_base_number, bom_base_unit, component_unit, component_pro_flag, msi, sanka, attr1, attr2, attr3, create_by, create_time, update_by, update_time, remark, current_version from base_bom @@ -108,6 +130,20 @@ from pro_process + +