保养工单-快速工单
parent
450ccdf163
commit
2c3f1996b9
@ -0,0 +1,182 @@
|
||||
package com.op.device.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 工单设备备件关联对象 equ_order_equ_spare
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-11-02
|
||||
*/
|
||||
public class EquOrderEquSpare extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 编码 */
|
||||
@Excel(name = "编码")
|
||||
private String code;
|
||||
|
||||
/** 主工单信息 */
|
||||
@Excel(name = "主工单信息")
|
||||
private String orderCode;
|
||||
|
||||
/** 关联上级code */
|
||||
@Excel(name = "关联上级code")
|
||||
private String parentCode;
|
||||
|
||||
/** 备件code */
|
||||
@Excel(name = "备件code")
|
||||
private String materialCode;
|
||||
|
||||
/** 备件名称 */
|
||||
@Excel(name = "备件名称")
|
||||
private String materialDesc;
|
||||
|
||||
/** 备件类型 */
|
||||
@Excel(name = "备件类型")
|
||||
private String spareType;
|
||||
|
||||
/** 申领数量 */
|
||||
@Excel(name = "申领数量")
|
||||
private BigDecimal applyNum;
|
||||
|
||||
/** 工厂 */
|
||||
@Excel(name = "工厂")
|
||||
private String factoryCode;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String attr1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String attr2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String attr3;
|
||||
|
||||
/** 删除标识 */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
public void setOrderCode(String orderCode) {
|
||||
this.orderCode = orderCode;
|
||||
}
|
||||
|
||||
public String getOrderCode() {
|
||||
return orderCode;
|
||||
}
|
||||
public void setParentCode(String parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
|
||||
public String getParentCode() {
|
||||
return parentCode;
|
||||
}
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
public void setMaterialDesc(String materialDesc) {
|
||||
this.materialDesc = materialDesc;
|
||||
}
|
||||
|
||||
public String getMaterialDesc() {
|
||||
return materialDesc;
|
||||
}
|
||||
public void setSpareType(String spareType) {
|
||||
this.spareType = spareType;
|
||||
}
|
||||
|
||||
public String getSpareType() {
|
||||
return spareType;
|
||||
}
|
||||
public void setApplyNum(BigDecimal applyNum) {
|
||||
this.applyNum = applyNum;
|
||||
}
|
||||
|
||||
public BigDecimal getApplyNum() {
|
||||
return applyNum;
|
||||
}
|
||||
public void setFactoryCode(String factoryCode) {
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getFactoryCode() {
|
||||
return factoryCode;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("code", getCode())
|
||||
.append("orderCode", getOrderCode())
|
||||
.append("parentCode", getParentCode())
|
||||
.append("materialCode", getMaterialCode())
|
||||
.append("materialDesc", getMaterialDesc())
|
||||
.append("spareType", getSpareType())
|
||||
.append("applyNum", getApplyNum())
|
||||
.append("factoryCode", getFactoryCode())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.device.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.device.domain.EquOrderEquSpare;
|
||||
|
||||
/**
|
||||
* 工单设备备件关联Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-11-02
|
||||
*/
|
||||
public interface EquOrderEquSpareMapper {
|
||||
/**
|
||||
* 查询工单设备备件关联
|
||||
*
|
||||
* @param id 工单设备备件关联主键
|
||||
* @return 工单设备备件关联
|
||||
*/
|
||||
public EquOrderEquSpare selectEquOrderEquSpareById(String id);
|
||||
|
||||
/**
|
||||
* 查询工单设备备件关联列表
|
||||
*
|
||||
* @param equOrderEquSpare 工单设备备件关联
|
||||
* @return 工单设备备件关联集合
|
||||
*/
|
||||
public List<EquOrderEquSpare> selectEquOrderEquSpareList(EquOrderEquSpare equOrderEquSpare);
|
||||
|
||||
/**
|
||||
* 新增工单设备备件关联
|
||||
*
|
||||
* @param equOrderEquSpare 工单设备备件关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquOrderEquSpare(EquOrderEquSpare equOrderEquSpare);
|
||||
|
||||
/**
|
||||
* 修改工单设备备件关联
|
||||
*
|
||||
* @param equOrderEquSpare 工单设备备件关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquOrderEquSpare(EquOrderEquSpare equOrderEquSpare);
|
||||
|
||||
/**
|
||||
* 删除工单设备备件关联
|
||||
*
|
||||
* @param id 工单设备备件关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOrderEquSpareById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除工单设备备件关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOrderEquSpareByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
<?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.device.mapper.EquOrderEquSpareMapper">
|
||||
|
||||
<resultMap type="EquOrderEquSpare" id="EquOrderEquSpareResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="parentCode" column="parent_code" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="materialDesc" column="material_desc" />
|
||||
<result property="spareType" column="spare_type" />
|
||||
<result property="applyNum" column="apply_num" />
|
||||
<result property="factoryCode" column="factory_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" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEquOrderEquSpareVo">
|
||||
select id, code, order_code, parent_code, material_code, material_desc, spare_type, apply_num, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_order_equ_spare
|
||||
</sql>
|
||||
|
||||
<select id="selectEquOrderEquSpareList" parameterType="EquOrderEquSpare" resultMap="EquOrderEquSpareResult">
|
||||
<include refid="selectEquOrderEquSpareVo"/>
|
||||
<where>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||||
<if test="parentCode != null and parentCode != ''"> and parent_code = #{parentCode}</if>
|
||||
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
|
||||
<if test="materialDesc != null and materialDesc != ''"> and material_desc = #{materialDesc}</if>
|
||||
<if test="spareType != null and spareType != ''"> and spare_type = #{spareType}</if>
|
||||
<if test="applyNum != null "> and apply_num = #{applyNum}</if>
|
||||
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</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>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEquOrderEquSpareById" parameterType="String" resultMap="EquOrderEquSpareResult">
|
||||
<include refid="selectEquOrderEquSpareVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEquOrderEquSpare" parameterType="EquOrderEquSpare">
|
||||
insert into equ_order_equ_spare
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="code != null">code,</if>
|
||||
<if test="orderCode != null">order_code,</if>
|
||||
<if test="parentCode != null">parent_code,</if>
|
||||
<if test="materialCode != null">material_code,</if>
|
||||
<if test="materialDesc != null">material_desc,</if>
|
||||
<if test="spareType != null">spare_type,</if>
|
||||
<if test="applyNum != null">apply_num,</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="code != null">#{code},</if>
|
||||
<if test="orderCode != null">#{orderCode},</if>
|
||||
<if test="parentCode != null">#{parentCode},</if>
|
||||
<if test="materialCode != null">#{materialCode},</if>
|
||||
<if test="materialDesc != null">#{materialDesc},</if>
|
||||
<if test="spareType != null">#{spareType},</if>
|
||||
<if test="applyNum != null">#{applyNum},</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEquOrderEquSpare" parameterType="EquOrderEquSpare">
|
||||
update equ_order_equ_spare
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="code != null">code = #{code},</if>
|
||||
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||||
<if test="parentCode != null">parent_code = #{parentCode},</if>
|
||||
<if test="materialCode != null">material_code = #{materialCode},</if>
|
||||
<if test="materialDesc != null">material_desc = #{materialDesc},</if>
|
||||
<if test="spareType != null">spare_type = #{spareType},</if>
|
||||
<if test="applyNum != null">apply_num = #{applyNum},</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</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 and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEquOrderEquSpareById" parameterType="String">
|
||||
delete from equ_order_equ_spare where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEquOrderEquSpareByIds" parameterType="String">
|
||||
delete from equ_order_equ_spare where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue