生产工序模块修改

highway
A0010407 1 year ago
parent 4984f9884c
commit 716c458333

@ -214,6 +214,7 @@
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.6.2" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.6.2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.mapstruct:mapstruct:1.3.1.Final" level="project" />
<orderEntry type="module" module-name="op-modules-wms" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-bootstrap:3.1.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:3.1.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.11.RELEASE" level="project" />

@ -82,6 +82,12 @@
<groupId>com.op</groupId>
<artifactId>op-common-swagger</artifactId>
</dependency>
<dependency>
<groupId>com.op</groupId>
<artifactId>op-modules-wms</artifactId>
<version>0.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>

@ -10,7 +10,9 @@ 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.ProProcess;
import com.op.technology.domain.Equipment;
import com.op.technology.service.IProProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -122,4 +124,35 @@ public class ProProcessController extends BaseController {
public AjaxResult remove(@PathVariable String[] processIds) {
return toAjax(proProcessService.deleteProProcessByProcessIds(processIds));
}
/**
*
*/
@RequiresPermissions("mes:pro:process:equipmentList")
@GetMapping("/selectEquipmentList")
public TableDataInfo selectEquipmentList(Equipment equipment) {
startPage();
List<Equipment> list = proProcessService.selectEquipmentList(equipment);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("mes:pro:process:queryEquipment")
@GetMapping(value = "/e/{equipmentId}")
public AjaxResult selectEquipmentByEquipmentId(@PathVariable("equipmentId") Long equipmentId) {
return success(proProcessService.selectEquipmentByEquipmentId(equipmentId));
}
/**
* BOM
*/
@RequiresPermissions("mes:pro:process:bomList")
@GetMapping("/bomList")
public TableDataInfo bomList(Bom bom) {
startPage();
List<Bom> list = proProcessService.selectBomList(bom);
return getDataTable(list);
}
}

@ -0,0 +1,262 @@
package com.op.technology.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* BOM base_bom
*
* @author Open Platform
* @date 2023-08-02
*/
public class Bom extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 工厂 */
@Excel(name = "工厂")
private String factoryCode;
/** 生产版本 */
@Excel(name = "生产版本")
private String productionVersion;
/** BOM单号 */
@Excel(name = "BOM单号")
private String bomCode;
/** 可选BOM */
@Excel(name = "可选BOM")
private String optionalBom;
/** 可选BOM文本 */
@Excel(name = "可选BOM文本")
private String optionalBomText;
/** 生产版本有效期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "生产版本有效期", width = 30, dateFormat = "yyyy-MM-dd")
private Date pvvd;
/** 生产版本截止日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "生产版本截止日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date pved;
/** BOM计算数量 */
@Excel(name = "BOM计算数量")
private Long bomCalculateNumber;
/** BOM计算单位 */
@Excel(name = "BOM计算单位")
private String bomCalculateUnit;
/** BOM基本数量 */
@Excel(name = "BOM基本数量")
private Long bomBaseNumber;
/** BOM基本单位 */
@Excel(name = "BOM基本单位")
private String bomBaseUnit;
/** 组件数量单位 */
@Excel(name = "组件数量单位")
private String componentUnit;
/** 组件采购标志 */
@Excel(name = "组件采购标志")
private String componentProFlag;
/** 物料供应标识 */
@Excel(name = "物料供应标识")
private String msi;
/** 成本核算标识相关 */
@Excel(name = "成本核算标识相关")
private String sanka;
/** 预留字段1 */
@Excel(name = "预留字段1")
private String attr1;
/** 预留字段2 */
@Excel(name = "预留字段2")
private String attr2;
/** 预留字段3 */
@Excel(name = "预留字段3")
private String attr3;
/** 是否在用 */
@Excel(name = "是否在用")
private String currentVersion;
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setProductionVersion(String productionVersion) {
this.productionVersion = productionVersion;
}
public String getProductionVersion() {
return productionVersion;
}
public void setBomCode(String bomCode) {
this.bomCode = bomCode;
}
public String getBomCode() {
return bomCode;
}
public void setOptionalBom(String optionalBom) {
this.optionalBom = optionalBom;
}
public String getOptionalBom() {
return optionalBom;
}
public void setOptionalBomText(String optionalBomText) {
this.optionalBomText = optionalBomText;
}
public String getOptionalBomText() {
return optionalBomText;
}
public void setPvvd(Date pvvd) {
this.pvvd = pvvd;
}
public Date getPvvd() {
return pvvd;
}
public void setPved(Date pved) {
this.pved = pved;
}
public Date getPved() {
return pved;
}
public void setBomCalculateNumber(Long bomCalculateNumber) {
this.bomCalculateNumber = bomCalculateNumber;
}
public Long getBomCalculateNumber() {
return bomCalculateNumber;
}
public void setBomCalculateUnit(String bomCalculateUnit) {
this.bomCalculateUnit = bomCalculateUnit;
}
public String getBomCalculateUnit() {
return bomCalculateUnit;
}
public void setBomBaseNumber(Long bomBaseNumber) {
this.bomBaseNumber = bomBaseNumber;
}
public Long getBomBaseNumber() {
return bomBaseNumber;
}
public void setBomBaseUnit(String bomBaseUnit) {
this.bomBaseUnit = bomBaseUnit;
}
public String getBomBaseUnit() {
return bomBaseUnit;
}
public void setComponentUnit(String componentUnit) {
this.componentUnit = componentUnit;
}
public String getComponentUnit() {
return componentUnit;
}
public void setComponentProFlag(String componentProFlag) {
this.componentProFlag = componentProFlag;
}
public String getComponentProFlag() {
return componentProFlag;
}
public void setMsi(String msi) {
this.msi = msi;
}
public String getMsi() {
return msi;
}
public void setSanka(String sanka) {
this.sanka = sanka;
}
public String getSanka() {
return sanka;
}
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 setCurrentVersion(String currentVersion) {
this.currentVersion = currentVersion;
}
public String getCurrentVersion() {
return currentVersion;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("factoryCode", getFactoryCode())
.append("productionVersion", getProductionVersion())
.append("bomCode", getBomCode())
.append("optionalBom", getOptionalBom())
.append("optionalBomText", getOptionalBomText())
.append("pvvd", getPvvd())
.append("pved", getPved())
.append("bomCalculateNumber", getBomCalculateNumber())
.append("bomCalculateUnit", getBomCalculateUnit())
.append("bomBaseNumber", getBomBaseNumber())
.append("bomBaseUnit", getBomBaseUnit())
.append("componentUnit", getComponentUnit())
.append("componentProFlag", getComponentProFlag())
.append("msi", getMsi())
.append("sanka", getSanka())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("currentVersion", getCurrentVersion())
.toString();
}
}

@ -0,0 +1,267 @@
package com.op.technology.domain;
import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* base_equipment
*
* @author Open Platform
* @date 2023-07-20
*/
public class Equipment extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 设备类型ID */
private Long equipmentId;
/** 设备类型编码 */
@Excel(name = "设备类型编码")
private String equipmentCode;
/** 设备类型名称 */
@Excel(name = "设备类型名称")
private String equipmentName;
/** 品牌 */
@Excel(name = "品牌")
private String equipmentBrand;
/** 规格型号 */
@Excel(name = "规格型号")
private String equipmentSpec;
/** 设备类型ID */
@Excel(name = "设备类型ID")
private Long equipmentTypeId;
/** 设备类型编码 */
@Excel(name = "设备类型编码")
private String equipmentTypeCode;
/** 设备类型名称 */
@Excel(name = "设备类型名称")
private String equipmentTypeName;
/** 所属车间ID */
@Excel(name = "所属车间ID")
private Long workshopId;
/** 所属车间编码 */
@Excel(name = "所属车间编码")
private String workshopCode;
/** 所属车间名称 */
@Excel(name = "所属车间名称")
private String workshopName;
/** 设备状态 */
@Excel(name = "设备状态")
private String status;
/** 预留字段1 */
@Excel(name = "预留字段1")
private String attr1;
/** 预留字段2 */
@Excel(name = "预留字段2")
private String attr2;
/** 预留字段3 */
@Excel(name = "预留字段3")
private Long attr3;
/** 预留字段4 */
@Excel(name = "预留字段4")
private Long attr4;
/** 单台能力工时 */
// @Excel(name = "单台能力工时")
// private String unitWorkingHours;
/** 工段 */
@Excel(name = "工段")
private String workshopSection;
/** 设备位置 */
@Excel(name = "设备位置")
private String equipmentLocation;
/** 工时单价 */
@Excel(name = "工时单价")
private String hourlyUnitPrice;
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
public Long getEquipmentId() {
return equipmentId;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getEquipmentName() {
return equipmentName;
}
public void setEquipmentBrand(String equipmentBrand) {
this.equipmentBrand = equipmentBrand;
}
public String getEquipmentBrand() {
return equipmentBrand;
}
public void setEquipmentSpec(String equipmentSpec) {
this.equipmentSpec = equipmentSpec;
}
public String getEquipmentSpec() {
return equipmentSpec;
}
public void setEquipmentTypeId(Long equipmentTypeId) {
this.equipmentTypeId = equipmentTypeId;
}
public Long getEquipmentTypeId() {
return equipmentTypeId;
}
public void setEquipmentTypeCode(String equipmentTypeCode) {
this.equipmentTypeCode = equipmentTypeCode;
}
public String getEquipmentTypeCode() {
return equipmentTypeCode;
}
public void setEquipmentTypeName(String equipmentTypeName) {
this.equipmentTypeName = equipmentTypeName;
}
public String getEquipmentTypeName() {
return equipmentTypeName;
}
public void setWorkshopId(Long workshopId) {
this.workshopId = workshopId;
}
public Long getWorkshopId() {
return workshopId;
}
public void setWorkshopCode(String workshopCode) {
this.workshopCode = workshopCode;
}
public String getWorkshopCode() {
return workshopCode;
}
public void setWorkshopName(String workshopName) {
this.workshopName = workshopName;
}
public String getWorkshopName() {
return workshopName;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
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(Long attr3) {
this.attr3 = attr3;
}
public Long getAttr3() {
return attr3;
}
public void setAttr4(Long attr4) {
this.attr4 = attr4;
}
public Long getAttr4() {
return attr4;
}
// public void setUnitWorkingHours(String unitWorkingHours) {
// this.unitWorkingHours = unitWorkingHours;
// }
//
// public String getUnitWorkingHours() {
// return unitWorkingHours;
// }
public void setWorkshopSection(String workshopSection) {
this.workshopSection = workshopSection;
}
public String getWorkshopSection() {
return workshopSection;
}
public void setEquipmentLocation(String equipmentLocation) {
this.equipmentLocation = equipmentLocation;
}
public String getEquipmentLocation() {
return equipmentLocation;
}
public void setHourlyUnitPrice(String hourlyUnitPrice) {
this.hourlyUnitPrice = hourlyUnitPrice;
}
public String getHourlyUnitPrice() {
return hourlyUnitPrice;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("equipmentId", getEquipmentId())
.append("equipmentCode", getEquipmentCode())
.append("equipmentName", getEquipmentName())
.append("equipmentBrand", getEquipmentBrand())
.append("equipmentSpec", getEquipmentSpec())
.append("equipmentTypeId", getEquipmentTypeId())
.append("equipmentTypeCode", getEquipmentTypeCode())
.append("equipmentTypeName", getEquipmentTypeName())
.append("workshopId", getWorkshopId())
.append("workshopCode", getWorkshopCode())
.append("workshopName", getWorkshopName())
.append("status", getStatus())
.append("remark", getRemark())
.append("attr1", getAttr1())
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("attr4", getAttr4())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
// .append("unitWorkingHours", getUnitWorkingHours())
.append("workshopSection", getWorkshopSection())
.append("equipmentLocation", getEquipmentLocation())
.append("hourlyUnitPrice", getHourlyUnitPrice())
.toString();
}
}

@ -63,6 +63,59 @@ public class ProProcess extends BaseEntity
private Double workTime;
//线体设备
private String equipment;
//参数1
private String param1;
//参数2
private String param2;
//参数3
private String param3;
//参数4
private String param4;
//参数5
private String param5;
//参数6
private String param6;
//参数7
private String param7;
//参数8
private String param8;
//参数9
private String param9;
//参数10
private String param10;
/** 设备类型ID */
private Long equipmentId;
/** 设备类型编码 */
@Excel(name = "设备类型编码")
private String equipmentCode;
/** 设备类型名称 */
@Excel(name = "设备类型名称")
private String equipmentName;
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
public Long getEquipmentId() {
return equipmentId;
}
public void setEquipmentCode(String equipmentCode) {
this.equipmentCode = equipmentCode;
}
public String getEquipmentCode() {
return equipmentCode;
}
public void setEquipmentName(String equipmentName) {
this.equipmentName = equipmentName;
}
public String getEquipmentName() {
return equipmentName;
}
public List<BaseFile> getFiles() {
return files;
@ -210,6 +263,97 @@ public class ProProcess extends BaseEntity
{
return equipment;
}
public void setParam1(String param1)
{
this.param1 = param1;
}
public String getParam1()
{
return param1;
}
public void setParam2(String param2)
{
this.param2 = param2;
}
public String getParam2()
{
return param2;
}
public void setParam3(String param3)
{
this.param3 = param3;
}
public String getParam3()
{
return param3;
}
public void setParam4(String param4)
{
this.param4 = param4;
}
public String getParam4()
{
return param4;
}
public void setParam5(String param5)
{
this.param5 = param5;
}
public String getParam5()
{
return param5;
}
public void setParam6(String param6)
{
this.param6 = param6;
}
public String getParam6()
{
return param6;
}
public void setParam7(String param7)
{
this.param7 = param7;
}
public String getParam7()
{
return param7;
}
public void setParam8(String param8)
{
this.param8 = param8;
}
public String getParam8()
{
return param8;
}
public void setParam9(String param9)
{
this.param9 = param9;
}
public String getParam9()
{
return param9;
}
public void setParam10(String param10)
{
this.param10 = param10;
}
public String getParam10()
{
return param10;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -227,6 +371,20 @@ public class ProProcess extends BaseEntity
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("workCenter", getWorkCenter())
.append("param1", getParam1())
.append("param2", getParam2())
.append("param3", getParam3())
.append("param4", getParam4())
.append("param5", getParam5())
.append("param6", getParam6())
.append("param7", getParam7())
.append("param8", getParam8())
.append("param9", getParam9())
.append("param10", getParam10())
.append("equipmentId", getEquipmentId())
.append("equipmentCode", getEquipmentCode())
.append("equipmentName", getEquipmentName())
.toString();
}
}

@ -1,5 +1,7 @@
package com.op.technology.mapper;
import com.op.technology.domain.Bom;
import com.op.technology.domain.Equipment;
import com.op.technology.domain.ProProcess;
import org.apache.ibatis.annotations.Mapper;
@ -66,4 +68,8 @@ public interface ProProcessMapper
* @return
*/
public int deleteProProcessByProcessIds(String[] processIds);
List<Equipment> selectEquipmentList(Equipment equipment);
Equipment selectEquipmentByEquipmentId(Long equipmentId);
List<Bom> selectBomList(Bom bom);
}

@ -1,5 +1,7 @@
package com.op.technology.service;
import com.op.technology.domain.Bom;
import com.op.technology.domain.Equipment;
import com.op.technology.domain.ProProcess;
import java.util.List;
@ -62,4 +64,13 @@ public interface IProProcessService
* @return
*/
public int deleteProProcessByProcessId(String processId);
/**
*
*/
public List<Equipment> selectEquipmentList(Equipment equipment);
public Equipment selectEquipmentByEquipmentId(Long equipmentId);
public List<Bom> selectBomList(Bom bom);
}

@ -8,11 +8,12 @@ import com.op.common.core.utils.StringUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.security.utils.SecurityUtils;
import com.op.technology.domain.BaseFile;
import com.op.technology.domain.Bom;
import com.op.technology.domain.Equipment;
import com.op.technology.domain.ProProcess;
import com.op.technology.mapper.BaseFileMapper;
import com.op.technology.mapper.ProProcessMapper;
import com.op.technology.service.IProProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@ -187,4 +188,41 @@ public class ProProcessServiceImpl implements IProProcessService {
public int deleteProProcessByProcessId(String processId) {
return proProcessMapper.deleteProProcessByProcessId(processId);
}
/**
*
*
* @param equipmentId
* @return
*/
@Override
@DS("#header.poolName")
public Equipment selectEquipmentByEquipmentId(Long equipmentId) {
return proProcessMapper.selectEquipmentByEquipmentId(equipmentId);
}
/**
*
*
* @param equipment
* @return
*/
@Override
@DS("#header.poolName")
public List<Equipment> selectEquipmentList(Equipment equipment) {
return proProcessMapper.selectEquipmentList(equipment);
}
/**
* BOM
*
* @param bom BOM
* @return BOM
*/
@Override
@DS("#header.poolName")
public List<Bom> selectBomList(Bom bom) {
return proProcessMapper.selectBomList(bom);
}
}

@ -25,12 +25,88 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="workCenter" column="work_center"/>
<result property="workTime" column="work_time"/>
<result property="equipment" column="equipment"/>
<result property="param1" column="param1"/>
<result property="param2" column="param2"/>
<result property="param3" column="param3"/>
<result property="param4" column="param4"/>
<result property="param5" column="param5"/>
<result property="param6" column="param6"/>
<result property="param7" column="param7"/>
<result property="param8" column="param8"/>
<result property="param9" column="param9"/>
<result property="param10" column="param10"/>
<result property="equipmentId" column="equipment_id"/>
<result property="equipmentCode" column="equipment_code"/>
<result property="equipmentName" column="equipment_name"/>
</resultMap>
<resultMap type="Equipment" id="EquipmentResult">
<result property="equipmentId" column="equipment_id" />
<result property="equipmentCode" column="equipment_code" />
<result property="equipmentName" column="equipment_name" />
<result property="equipmentBrand" column="equipment_brand" />
<result property="equipmentSpec" column="equipment_spec" />
<result property="equipmentTypeId" column="equipment_type_id" />
<result property="equipmentTypeCode" column="equipment_type_code" />
<result property="equipmentTypeName" column="equipment_type_name" />
<result property="workshopId" column="workshop_id" />
<result property="workshopCode" column="workshop_code" />
<result property="workshopName" column="workshop_name" />
<result property="status" column="status" />
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="attr4" column="attr4" />
<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="unitWorkingHours" column="unit_working_hours" />-->
<result property="workshopSection" column="workshop_section" />
<result property="equipmentLocation" column="equipment_location" />
<result property="hourlyUnitPrice" column="hourly_unit_price" />
</resultMap>
<resultMap type="Bom" id="BomResult">
<result property="factoryCode" column="factory_code" />
<result property="productionVersion" column="production_version" />
<result property="bomCode" column="bom_code" />
<result property="optionalBom" column="optional_bom" />
<result property="optionalBomText" column="optional_bom_text" />
<result property="pvvd" column="pvvd" />
<result property="pved" column="pved" />
<result property="bomCalculateNumber" column="bom_calculate_number" />
<result property="bomCalculateUnit" column="bom_calculate_unit" />
<result property="bomBaseNumber" column="bom_base_number" />
<result property="bomBaseUnit" column="bom_base_unit" />
<result property="componentUnit" column="component_unit" />
<result property="componentProFlag" column="component_pro_flag" />
<result property="msi" column="msi" />
<result property="sanka" column="sanka" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<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="remark" column="remark" />
<result property="currentVersion" column="current_version" />
</resultMap>
<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>
<sql id="selectEquipmentVo">
select equipment_id, equipment_code, equipment_name, equipment_brand, equipment_spec, equipment_type_id, equipment_type_code, equipment_type_name, workshop_id, workshop_code, workshop_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, workshop_section, equipment_location, hourly_unit_price from base_equipment
</sql>
<sql id="selectProProcessVo">
select process_id, process_code, process_name, attention,
enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time,
update_by, update_time,split_merge,split_merg_num,sync,work_center,work_time,equipment
update_by, update_time,split_merge,split_merg_num,sync,work_center,work_time,equipment,param1,param2,param3,param4,param5,param6,param7,param8,param9,param10
from pro_process
</sql>
@ -87,6 +163,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workCenter != null">work_center,</if>
<if test="workTime != null">work_time,</if>
<if test="equipment != null">equipment,</if>
<if test="param1 != null">param1,</if>
<if test="param2 != null">param2,</if>
<if test="param3 != null">param3,</if>
<if test="param4 != null">param4,</if>
<if test="param5 != null">param5,</if>
<if test="param6 != null">param6,</if>
<if test="param7 != null">param7,</if>
<if test="param8 != null">param8,</if>
<if test="param9 != null">param9,</if>
<if test="param10 != null">param10,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{processId},
@ -109,8 +195,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workCenter != null">#{workCenter},</if>
<if test="workTime != null">#{workTime},</if>
<if test="equipment != null">#{equipment},</if>
<if test="param1 != null">#{param1},</if>
<if test="param2 != null">#{param2},</if>
<if test="param3 != null">#{param3},</if>
<if test="param4 != null">#{param4},</if>
<if test="param5 != null">#{param5},</if>
<if test="param6 != null">#{param6},</if>
<if test="param7 != null">#{param7},</if>
<if test="param8 != null">#{param8},</if>
<if test="param9 != null">#{param9},</if>
<if test="param10 != null">#{param10},</if>
</trim>
</insert>
<update id="updateProProcess" parameterType="ProProcess">
update pro_process
<trim prefix="SET" suffixOverrides=",">
@ -133,6 +230,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workCenter != null">work_center = #{workCenter},</if>
<if test="workTime != null">work_time = #{workTime},</if>
<if test="equipment != null">equipment = #{equipment},</if>
<if test="param1 != null">param1 = #{param1},</if>
<if test="param2 != null">param2 = #{param2},</if>
<if test="param3 != null">param3 = #{param3},</if>
<if test="param4 != null">param4 = #{param4},</if>
<if test="param5 != null">param5 = #{param5},</if>
<if test="param6 != null">param6 = #{param6},</if>
<if test="param7 != null">param7 = #{param7},</if>
<if test="param8 != null">param8 = #{param8},</if>
<if test="param9 != null">param9 = #{param9},</if>
<if test="param10 != null">param10 = #{param10},</if>
</trim>
where process_id = #{processId}
</update>
@ -147,4 +254,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{processId}
</foreach>
</delete>
<select id="selectEquipmentByEquipmentId" parameterType="Long" resultMap="EquipmentResult">
<include refid="selectEquipmentVo"/>
where equipment_id = #{equipmentId}
</select>
<select id="selectEquipmentList" parameterType="Equipment" resultMap="EquipmentResult">
<include refid="selectEquipmentVo"/>
<where>
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="equipmentBrand != null and equipmentBrand != ''"> and equipment_brand = #{equipmentBrand}</if>
<if test="equipmentSpec != null and equipmentSpec != ''"> and equipment_spec = #{equipmentSpec}</if>
<if test="equipmentTypeId != null "> and equipment_type_id = #{equipmentTypeId}</if>
<if test="equipmentTypeCode != null and equipmentTypeCode != ''"> and equipment_type_code = #{equipmentTypeCode}</if>
<if test="equipmentTypeName != null and equipmentTypeName != ''"> and equipment_type_name like concat('%', #{equipmentTypeName}, '%')</if>
<if test="workshopId != null "> and workshop_id = #{workshopId}</if>
<if test="workshopCode != null and workshopCode != ''"> and workshop_code = #{workshopCode}</if>
<if test="workshopName != null and workshopName != ''"> and workshop_name like concat('%', #{workshopName}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null "> and attr3 = #{attr3}</if>
<if test="attr4 != null "> and attr4 = #{attr4}</if>
<!-- <if test="unitWorkingHours != null and unitWorkingHours != ''"> and unit_working_hours = #{unitWorkingHours}</if>-->
<if test="workshopSection != null and workshopSection != ''"> and workshop_section = #{workshopSection}</if>
<if test="equipmentLocation != null and equipmentLocation != ''"> and equipment_location = #{equipmentLocation}</if>
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''"> and hourly_unit_price = #{hourlyUnitPrice}</if>
</where>
</select>
<select id="selectBomList" parameterType="Bom" resultMap="BomResult">
<include refid="selectBomVo"/>
<where>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="productionVersion != null and productionVersion != ''"> and production_version = #{productionVersion}</if>
<if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if>
<if test="optionalBom != null and optionalBom != ''"> and optional_bom = #{optionalBom}</if>
<if test="optionalBomText != null and optionalBomText != ''"> and optional_bom_text = #{optionalBomText}</if>
<if test="pvvd != null "> and pvvd = #{pvvd}</if>
<if test="pved != null "> and pved = #{pved}</if>
<if test="bomCalculateNumber != null "> and bom_calculate_number = #{bomCalculateNumber}</if>
<if test="bomCalculateUnit != null and bomCalculateUnit != ''"> and bom_calculate_unit = #{bomCalculateUnit}</if>
<if test="bomBaseNumber != null "> and bom_base_number = #{bomBaseNumber}</if>
<if test="bomBaseUnit != null and bomBaseUnit != ''"> and bom_base_unit = #{bomBaseUnit}</if>
<if test="componentUnit != null and componentUnit != ''"> and component_unit = #{componentUnit}</if>
<if test="componentProFlag != null and componentProFlag != ''"> and component_pro_flag = #{componentProFlag}</if>
<if test="msi != null and msi != ''"> and msi = #{msi}</if>
<if test="sanka != null and sanka != ''"> and sanka = #{sanka}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="currentVersion != null and currentVersion != ''"> and current_version = #{currentVersion}</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save