保养计划-新增
parent
35b354562b
commit
8152b17171
@ -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_plan_equ_spare
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-26
|
||||
*/
|
||||
public class EquPlanEquSpare extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 编码 */
|
||||
@Excel(name = "编码")
|
||||
private String code;
|
||||
|
||||
/** 主计划code */
|
||||
@Excel(name = "主计划code")
|
||||
private String planCode;
|
||||
|
||||
/** 关联上级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 setPlanCode(String planCode) {
|
||||
this.planCode = planCode;
|
||||
}
|
||||
|
||||
public String getPlanCode() {
|
||||
return planCode;
|
||||
}
|
||||
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("planCode", getPlanCode())
|
||||
.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.EquPlanEquSpare;
|
||||
|
||||
/**
|
||||
* 计划设备备件关联Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-26
|
||||
*/
|
||||
public interface EquPlanEquSpareMapper {
|
||||
/**
|
||||
* 查询计划设备备件关联
|
||||
*
|
||||
* @param id 计划设备备件关联主键
|
||||
* @return 计划设备备件关联
|
||||
*/
|
||||
public EquPlanEquSpare selectEquPlanEquSpareById(String id);
|
||||
|
||||
/**
|
||||
* 查询计划设备备件关联列表
|
||||
*
|
||||
* @param equPlanEquSpare 计划设备备件关联
|
||||
* @return 计划设备备件关联集合
|
||||
*/
|
||||
public List<EquPlanEquSpare> selectEquPlanEquSpareList(EquPlanEquSpare equPlanEquSpare);
|
||||
|
||||
/**
|
||||
* 新增计划设备备件关联
|
||||
*
|
||||
* @param equPlanEquSpare 计划设备备件关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquPlanEquSpare(EquPlanEquSpare equPlanEquSpare);
|
||||
|
||||
/**
|
||||
* 修改计划设备备件关联
|
||||
*
|
||||
* @param equPlanEquSpare 计划设备备件关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquPlanEquSpare(EquPlanEquSpare equPlanEquSpare);
|
||||
|
||||
/**
|
||||
* 删除计划设备备件关联
|
||||
*
|
||||
* @param id 计划设备备件关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquPlanEquSpareById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除计划设备备件关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquPlanEquSpareByIds(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.EquPlanEquSpareMapper">
|
||||
|
||||
<resultMap type="EquPlanEquSpare" id="EquPlanEquSpareResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="planCode" column="plan_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="selectEquPlanEquSpareVo">
|
||||
select id, code, plan_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_plan_equ_spare
|
||||
</sql>
|
||||
|
||||
<select id="selectEquPlanEquSpareList" parameterType="EquPlanEquSpare" resultMap="EquPlanEquSpareResult">
|
||||
<include refid="selectEquPlanEquSpareVo"/>
|
||||
<where>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</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="selectEquPlanEquSpareById" parameterType="String" resultMap="EquPlanEquSpareResult">
|
||||
<include refid="selectEquPlanEquSpareVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEquPlanEquSpare" parameterType="EquPlanEquSpare">
|
||||
insert into equ_plan_equ_spare
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="code != null">code,</if>
|
||||
<if test="planCode != null">plan_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="planCode != null">#{planCode},</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="updateEquPlanEquSpare" parameterType="EquPlanEquSpare">
|
||||
update equ_plan_equ_spare
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="code != null">code = #{code},</if>
|
||||
<if test="planCode != null">plan_code = #{planCode},</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="deleteEquPlanEquSpareById" parameterType="String">
|
||||
delete from equ_plan_equ_spare where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEquPlanEquSpareByIds" parameterType="String">
|
||||
delete from equ_plan_equ_spare where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue