基础信息设备+设备优化
parent
685bdc34bf
commit
71c9cb591d
@ -0,0 +1,169 @@
|
||||
package com.op.wms.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 备件设备关联对象 equ_spare_equipment
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-24
|
||||
*/
|
||||
public class EquSpareEquipment extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
private String id;
|
||||
|
||||
/** 备件编码 */
|
||||
@Excel(name = "备件编码")
|
||||
private String spareCode;
|
||||
|
||||
/** 备件类型 */
|
||||
@Excel(name = "备件类型")
|
||||
private String spareType;
|
||||
|
||||
/** 备件名称 */
|
||||
@Excel(name = "备件名称")
|
||||
private String spareName;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String equipmentName;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
private String equipmentCode;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String attr1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String attr2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String attr3;
|
||||
|
||||
/** 删除字段 */
|
||||
private String delFlag;
|
||||
|
||||
/** 工厂号 */
|
||||
@Excel(name = "工厂号")
|
||||
private String factoryCode;
|
||||
|
||||
private List<String> rightData;
|
||||
|
||||
public void setRightData(List<String> rightData) {
|
||||
this.rightData = rightData;
|
||||
}
|
||||
|
||||
public List<String> getRightData() {
|
||||
return rightData;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public void setSpareCode(String spareCode) {
|
||||
this.spareCode = spareCode;
|
||||
}
|
||||
|
||||
public String getSpareCode() {
|
||||
return spareCode;
|
||||
}
|
||||
public void setSpareType(String spareType) {
|
||||
this.spareType = spareType;
|
||||
}
|
||||
|
||||
public String getSpareType() {
|
||||
return spareType;
|
||||
}
|
||||
public void setSpareName(String spareName) {
|
||||
this.spareName = spareName;
|
||||
}
|
||||
|
||||
public String getSpareName() {
|
||||
return spareName;
|
||||
}
|
||||
public void setEquipmentName(String equipmentName) {
|
||||
this.equipmentName = equipmentName;
|
||||
}
|
||||
|
||||
public String getEquipmentName() {
|
||||
return equipmentName;
|
||||
}
|
||||
public void setEquipmentCode(String equipmentCode) {
|
||||
this.equipmentCode = equipmentCode;
|
||||
}
|
||||
|
||||
public String getEquipmentCode() {
|
||||
return equipmentCode;
|
||||
}
|
||||
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 setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
public void setFactoryCode(String factoryCode) {
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getFactoryCode() {
|
||||
return factoryCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("spareCode", getSpareCode())
|
||||
.append("spareType", getSpareType())
|
||||
.append("spareName", getSpareName())
|
||||
.append("equipmentName", getEquipmentName())
|
||||
.append("equipmentCode", getEquipmentCode())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("factoryCode", getFactoryCode())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.op.wms.mapper.EquSpareEquipmentMapper">
|
||||
|
||||
<resultMap type="EquSpareEquipment" id="EquSpareEquipmentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="spareCode" column="spare_code" />
|
||||
<result property="spareType" column="spare_type" />
|
||||
<result property="spareName" column="spare_name" />
|
||||
<result property="equipmentName" column="equipment_name" />
|
||||
<result property="equipmentCode" column="equipment_code" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<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="selectEquSpareEquipmentVo">
|
||||
select id, spare_code, spare_type, spare_name, equipment_name, equipment_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time, factory_code from equ_spare_equipment
|
||||
</sql>
|
||||
|
||||
<select id="selectEquSpareEquipmentList" parameterType="EquSpareEquipment" resultMap="EquSpareEquipmentResult">
|
||||
<include refid="selectEquSpareEquipmentVo"/>
|
||||
<where>
|
||||
<if test="spareCode != null and spareCode != ''"> and spare_code = #{spareCode}</if>
|
||||
<if test="spareType != null and spareType != ''"> and spare_type = #{spareType}</if>
|
||||
<if test="spareName != null and spareName != ''"> and spare_name like concat('%', #{spareName}, '%')</if>
|
||||
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
|
||||
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</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="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEquSpareEquipmentById" parameterType="String" resultMap="EquSpareEquipmentResult">
|
||||
<include refid="selectEquSpareEquipmentVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEquSpareEquipment" parameterType="EquSpareEquipment">
|
||||
insert into equ_spare_equipment
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="spareCode != null">spare_code,</if>
|
||||
<if test="spareType != null">spare_type,</if>
|
||||
<if test="spareName != null">spare_name,</if>
|
||||
<if test="equipmentName != null">equipment_name,</if>
|
||||
<if test="equipmentCode != null">equipment_code,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="factoryCode != null">factory_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="spareCode != null">#{spareCode},</if>
|
||||
<if test="spareType != null">#{spareType},</if>
|
||||
<if test="spareName != null">#{spareName},</if>
|
||||
<if test="equipmentName != null">#{equipmentName},</if>
|
||||
<if test="equipmentCode != null">#{equipmentCode},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="factoryCode != null">#{factoryCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEquSpareEquipment" parameterType="EquSpareEquipment">
|
||||
update equ_spare_equipment
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="spareCode != null">spare_code = #{spareCode},</if>
|
||||
<if test="spareType != null">spare_type = #{spareType},</if>
|
||||
<if test="spareName != null">spare_name = #{spareName},</if>
|
||||
<if test="equipmentName != null">equipment_name = #{equipmentName},</if>
|
||||
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEquSpareEquipmentById" parameterType="String">
|
||||
delete from equ_spare_equipment where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEquSpareEquipmentByIds" parameterType="String">
|
||||
delete from equ_spare_equipment where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue