工作中心

highway
A0010407 1 year ago
parent 897166b783
commit 5d87f9a24f

@ -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<BomComponent> list = proProcessService.selectBaseBomComponentList(bomComponent);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("mes:pro:process:list")
@GetMapping("/selectSysFactoryList")
public AjaxResult selectSysFactoryList(SysFactory sysFactory) {
List<SysFactory> list = proProcessService.selectSysFactoryList(sysFactory);
return success(list);
}
}

@ -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();
}
}

@ -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<Equipment> selectEquipmentList(Equipment equipment);
Equipment selectEquipmentByEquipmentId(Long equipmentId);
List<BomComponent> selectBaseBomComponentList(BomComponent bomComponent);
//查询工厂模型
public List<SysFactory> selectSysFactoryList(SysFactory sysFactory);
}

@ -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<BomComponent> selectBaseBomComponentList(BomComponent bomComponent);
//查询树形结构
public List<SysFactory> selectSysFactoryList(SysFactory sysFactory);
}

@ -222,4 +222,15 @@ public class ProProcessServiceImpl implements IProProcessService {
return proProcessMapper.selectBaseBomComponentList(bomComponent);
}
/**
*
*
* @param sysFactory
* @return
*/
@Override
@DS("#header.poolName")
public List<SysFactory> selectSysFactoryList(SysFactory sysFactory) {
return proProcessMapper.selectSysFactoryList(sysFactory);
}
}

@ -93,6 +93,28 @@
<result property="remark" column="remark" />
</resultMap>
<resultMap type="SysFactory" id="SysFactoryResult">
<result property="factoryId" column="factory_id" />
<result property="parentId" column="parent_id" />
<result property="ancestors" column="ancestors" />
<result property="factoryName" column="factory_name" />
<result property="orderNum" column="order_num" />
<result property="leader" column="leader" />
<result property="phone" column="phone" />
<result property="email" column="email" />
<result property="status" column="status" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="factoryCode" column="factory_code" />
</resultMap>
<sql id="selectSysFactoryVo">
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
</sql>
<sql id="selectBomVo">
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
</sql>
@ -108,6 +130,20 @@
from pro_process
</sql>
<select id="selectSysFactoryList" parameterType="SysFactory" resultMap="SysFactoryResult">
<include refid="selectSysFactoryVo"/>
<where>
<if test="parentId != null "> and parent_id = #{parentId}</if>
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
<if test="factoryName != null and factoryName != ''"> and factory_name like concat('%', #{factoryName}, '%')</if>
<if test="orderNum != null "> and order_num = #{orderNum}</if>
<if test="leader != null and leader != ''"> and leader = #{leader}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="email != null and email != ''"> and email = #{email}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
<select id="selectProProcessList" parameterType="ProProcess" resultMap="ProProcessResult">
<include refid="selectProProcessVo"/>
<where>

Loading…
Cancel
Save