You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
178 lines
9.7 KiB
XML
178 lines
9.7 KiB
XML
2 years ago
|
<?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.EquRepairWorkOrderMapper">
|
||
|
|
||
|
<resultMap type="EquRepairWorkOrder" id="EquRepairWorkOrderResult">
|
||
|
<result property="workId" column="work_id" />
|
||
|
<result property="orderId" column="order_id" />
|
||
|
<result property="orderCode" column="order_code" />
|
||
|
<result property="workHandle" column="work_handle" />
|
||
|
<result property="workPlanTime" column="work_plan_time" />
|
||
|
<result property="workPlanDownTime" column="work_plan_down_time" />
|
||
|
<result property="orderRelevance" column="order_relevance" />
|
||
|
<result property="workPerson" column="work_person" />
|
||
|
<result property="workTeam" column="work_team" />
|
||
|
<result property="workOutsource" column="work_outsource" />
|
||
|
<result property="workDownMachine" column="work_down_machine" />
|
||
|
<result property="equipmentCode" column="equipment_code" />
|
||
|
<result property="workReason" column="work_reason" />
|
||
|
<result property="workFaultDesc" column="work_fault_desc" />
|
||
|
<result property="workCostTime" column="work_cost_time" />
|
||
|
<result property="workCost" column="work_cost" />
|
||
|
<result property="outWorkId" column="out_work_id" />
|
||
|
<result property="outWorkCode" column="out_work_code" />
|
||
|
<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="updateTime" column="update_time" />
|
||
|
<result property="updateBy" column="update_by" />
|
||
|
<result property="delFlag" column="del_flag" />
|
||
|
<result property="factoryCode" column="factory_code" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectEquRepairWorkOrderVo">
|
||
|
select work_id, order_id, order_code, work_handle, work_plan_time, work_plan_down_time, order_relevance, work_person, work_team, work_outsource, work_down_machine, equipment_code, work_reason, work_fault_desc, work_cost_time, work_cost, out_work_id, out_work_code, attr1, attr2, attr3, create_by, create_time, update_time, update_by, del_flag, factory_code from equ_repair_work_order
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectEquRepairWorkOrderList" parameterType="EquRepairWorkOrder" resultMap="EquRepairWorkOrderResult">
|
||
|
<include refid="selectEquRepairWorkOrderVo"/>
|
||
|
<where>
|
||
|
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
||
|
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||
|
<if test="workHandle != null and workHandle != ''"> and work_handle = #{workHandle}</if>
|
||
|
<if test="workPlanTime != null "> and work_plan_time = #{workPlanTime}</if>
|
||
|
<if test="workPlanDownTime != null "> and work_plan_down_time = #{workPlanDownTime}</if>
|
||
|
<if test="orderRelevance != null and orderRelevance != ''"> and order_relevance = #{orderRelevance}</if>
|
||
|
<if test="workPerson != null and workPerson != ''"> and work_person = #{workPerson}</if>
|
||
|
<if test="workTeam != null and workTeam != ''"> and work_team = #{workTeam}</if>
|
||
|
<if test="workOutsource != null and workOutsource != ''"> and work_outsource = #{workOutsource}</if>
|
||
|
<if test="workDownMachine != null and workDownMachine != ''"> and work_down_machine = #{workDownMachine}</if>
|
||
|
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
|
||
|
<if test="workReason != null and workReason != ''"> and work_reason = #{workReason}</if>
|
||
|
<if test="workFaultDesc != null and workFaultDesc != ''"> and work_fault_desc = #{workFaultDesc}</if>
|
||
|
<if test="workCostTime != null "> and work_cost_time = #{workCostTime}</if>
|
||
|
<if test="workCost != null and workCost != ''"> and work_cost = #{workCost}</if>
|
||
|
<if test="outWorkId != null and outWorkId != ''"> and out_work_id = #{outWorkId}</if>
|
||
|
<if test="outWorkCode != null and outWorkCode != ''"> and out_work_code = #{outWorkCode}</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="selectEquRepairWorkOrderByWorkId" parameterType="String" resultMap="EquRepairWorkOrderResult">
|
||
|
<include refid="selectEquRepairWorkOrderVo"/>
|
||
|
where work_id = #{workId}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertEquRepairWorkOrder" parameterType="EquRepairWorkOrder">
|
||
|
insert into equ_repair_work_order
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="workId != null">work_id,</if>
|
||
|
<if test="orderId != null">order_id,</if>
|
||
|
<if test="orderCode != null">order_code,</if>
|
||
|
<if test="workHandle != null">work_handle,</if>
|
||
|
<if test="workPlanTime != null">work_plan_time,</if>
|
||
|
<if test="workPlanDownTime != null">work_plan_down_time,</if>
|
||
|
<if test="orderRelevance != null">order_relevance,</if>
|
||
|
<if test="workPerson != null">work_person,</if>
|
||
|
<if test="workTeam != null">work_team,</if>
|
||
|
<if test="workOutsource != null">work_outsource,</if>
|
||
|
<if test="workDownMachine != null">work_down_machine,</if>
|
||
|
<if test="equipmentCode != null">equipment_code,</if>
|
||
|
<if test="workReason != null">work_reason,</if>
|
||
|
<if test="workFaultDesc != null">work_fault_desc,</if>
|
||
|
<if test="workCostTime != null">work_cost_time,</if>
|
||
|
<if test="workCost != null">work_cost,</if>
|
||
|
<if test="outWorkId != null">out_work_id,</if>
|
||
|
<if test="outWorkCode != null">out_work_code,</if>
|
||
|
<if test="attr1 != null">attr1,</if>
|
||
|
<if test="attr2 != null">attr2,</if>
|
||
|
<if test="attr3 != null">attr3,</if>
|
||
|
<if test="createBy != null">create_by,</if>
|
||
|
<if test="createTime != null">create_time,</if>
|
||
|
<if test="updateTime != null">update_time,</if>
|
||
|
<if test="updateBy != null">update_by,</if>
|
||
|
<if test="delFlag != null">del_flag,</if>
|
||
|
<if test="factoryCode != null">factory_code,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="workId != null">#{workId},</if>
|
||
|
<if test="orderId != null">#{orderId},</if>
|
||
|
<if test="orderCode != null">#{orderCode},</if>
|
||
|
<if test="workHandle != null">#{workHandle},</if>
|
||
|
<if test="workPlanTime != null">#{workPlanTime},</if>
|
||
|
<if test="workPlanDownTime != null">#{workPlanDownTime},</if>
|
||
|
<if test="orderRelevance != null">#{orderRelevance},</if>
|
||
|
<if test="workPerson != null">#{workPerson},</if>
|
||
|
<if test="workTeam != null">#{workTeam},</if>
|
||
|
<if test="workOutsource != null">#{workOutsource},</if>
|
||
|
<if test="workDownMachine != null">#{workDownMachine},</if>
|
||
|
<if test="equipmentCode != null">#{equipmentCode},</if>
|
||
|
<if test="workReason != null">#{workReason},</if>
|
||
|
<if test="workFaultDesc != null">#{workFaultDesc},</if>
|
||
|
<if test="workCostTime != null">#{workCostTime},</if>
|
||
|
<if test="workCost != null">#{workCost},</if>
|
||
|
<if test="outWorkId != null">#{outWorkId},</if>
|
||
|
<if test="outWorkCode != null">#{outWorkCode},</if>
|
||
|
<if test="attr1 != null">#{attr1},</if>
|
||
|
<if test="attr2 != null">#{attr2},</if>
|
||
|
<if test="attr3 != null">#{attr3},</if>
|
||
|
<if test="createBy != null">#{createBy},</if>
|
||
|
<if test="createTime != null">#{createTime},</if>
|
||
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
<if test="delFlag != null">#{delFlag},</if>
|
||
|
<if test="factoryCode != null">#{factoryCode},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateEquRepairWorkOrder" parameterType="EquRepairWorkOrder">
|
||
|
update equ_repair_work_order
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="orderId != null">order_id = #{orderId},</if>
|
||
|
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||
|
<if test="workHandle != null">work_handle = #{workHandle},</if>
|
||
|
<if test="workPlanTime != null">work_plan_time = #{workPlanTime},</if>
|
||
|
<if test="workPlanDownTime != null">work_plan_down_time = #{workPlanDownTime},</if>
|
||
|
<if test="orderRelevance != null">order_relevance = #{orderRelevance},</if>
|
||
|
<if test="workPerson != null">work_person = #{workPerson},</if>
|
||
|
<if test="workTeam != null">work_team = #{workTeam},</if>
|
||
|
<if test="workOutsource != null">work_outsource = #{workOutsource},</if>
|
||
|
<if test="workDownMachine != null">work_down_machine = #{workDownMachine},</if>
|
||
|
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
|
||
|
<if test="workReason != null">work_reason = #{workReason},</if>
|
||
|
<if test="workFaultDesc != null">work_fault_desc = #{workFaultDesc},</if>
|
||
|
<if test="workCostTime != null">work_cost_time = #{workCostTime},</if>
|
||
|
<if test="workCost != null">work_cost = #{workCost},</if>
|
||
|
<if test="outWorkId != null">out_work_id = #{outWorkId},</if>
|
||
|
<if test="outWorkCode != null">out_work_code = #{outWorkCode},</if>
|
||
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||
|
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||
|
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
||
|
</trim>
|
||
|
where work_id = #{workId}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteEquRepairWorkOrderByWorkId" parameterType="String">
|
||
|
delete from equ_repair_work_order where work_id = #{workId}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteEquRepairWorkOrderByWorkIds" parameterType="String">
|
||
|
delete from equ_repair_work_order where work_id in
|
||
|
<foreach item="workId" collection="array" open="(" separator="," close=")">
|
||
|
#{workId}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|