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.
152 lines
7.9 KiB
XML
152 lines
7.9 KiB
XML
1 year 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.EquRepairOrderMapper">
|
||
|
|
||
|
<resultMap type="EquRepairOrder" id="EquRepairOrderResult">
|
||
|
<result property="orderId" column="order_id" />
|
||
|
<result property="orderCode" column="order_code" />
|
||
|
<result property="equipmentCode" column="equipment_code" />
|
||
|
<result property="orderDesc" column="order_desc" />
|
||
|
<result property="orderBreakdownTime" column="order_breakdown_time" />
|
||
|
<result property="orderSource" column="order_source" />
|
||
|
<result property="orderTime" column="order_time" />
|
||
|
<result property="orderHandle" column="order_handle" />
|
||
|
<result property="orderRepairman" column="order_repairman" />
|
||
|
<result property="orderConnection" column="order_connection" />
|
||
|
<result property="orderStatus" column="order_status" />
|
||
|
<result property="orderRelevance" column="order_relevance" />
|
||
|
<result property="orderPicture" column="order_picture" />
|
||
|
<result property="attr1" column="attr1" />
|
||
|
<result property="attr2" column="attr2" />
|
||
|
<result property="attr3" column="attr3" />
|
||
|
<result property="delFlag" column="del_flag" />
|
||
|
<result property="craeteBy" column="craete_by" />
|
||
|
<result property="createTime" column="create_time" />
|
||
|
<result property="updateBy" column="update_by" />
|
||
|
<result property="updateTime" column="update_time" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectEquRepairOrderVo">
|
||
|
select order_id, order_code, equipment_code, order_desc, order_breakdown_time, order_source, order_time, order_handle, order_repairman, order_connection, order_status, order_relevance, order_picture, attr1, attr2, attr3, del_flag, craete_by, create_time, update_by, update_time from equ_repair_order
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectEquRepairOrderList" parameterType="EquRepairOrder" resultMap="EquRepairOrderResult">
|
||
|
<include refid="selectEquRepairOrderVo"/>
|
||
|
<where>
|
||
|
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||
|
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
|
||
|
<if test="orderDesc != null and orderDesc != ''"> and order_desc = #{orderDesc}</if>
|
||
|
<if test="orderBreakdownTime != null "> and order_breakdown_time = #{orderBreakdownTime}</if>
|
||
|
<if test="orderSource != null and orderSource != ''"> and order_source = #{orderSource}</if>
|
||
|
<if test="orderTime != null "> and order_time = #{orderTime}</if>
|
||
|
<if test="orderHandle != null and orderHandle != ''"> and order_handle = #{orderHandle}</if>
|
||
|
<if test="orderRepairman != null and orderRepairman != ''"> and order_repairman = #{orderRepairman}</if>
|
||
|
<if test="orderConnection != null and orderConnection != ''"> and order_connection = #{orderConnection}</if>
|
||
|
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
||
|
<if test="orderRelevance != null and orderRelevance != ''"> and order_relevance = #{orderRelevance}</if>
|
||
|
<if test="orderPicture != null and orderPicture != ''"> and order_picture = #{orderPicture}</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="craeteBy != null and craeteBy != ''"> and craete_by = #{craeteBy}</if>
|
||
|
and del_flag = '0'
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectEquRepairOrderByOrderId" parameterType="String" resultMap="EquRepairOrderResult">
|
||
|
<include refid="selectEquRepairOrderVo"/>
|
||
|
where order_id = #{orderId}
|
||
|
and del_flag = '0'
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertEquRepairOrder" parameterType="EquRepairOrder">
|
||
|
insert into equ_repair_order
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="orderId != null">order_id,</if>
|
||
|
<if test="orderCode != null">order_code,</if>
|
||
|
<if test="equipmentCode != null">equipment_code,</if>
|
||
|
<if test="orderDesc != null">order_desc,</if>
|
||
|
<if test="orderBreakdownTime != null">order_breakdown_time,</if>
|
||
|
<if test="orderSource != null">order_source,</if>
|
||
|
<if test="orderTime != null">order_time,</if>
|
||
|
<if test="orderHandle != null">order_handle,</if>
|
||
|
<if test="orderRepairman != null">order_repairman,</if>
|
||
|
<if test="orderConnection != null">order_connection,</if>
|
||
|
<if test="orderStatus != null">order_status,</if>
|
||
|
<if test="orderRelevance != null">order_relevance,</if>
|
||
|
<if test="orderPicture != null">order_picture,</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="craeteBy != null">craete_by,</if>
|
||
|
<if test="createTime != null">create_time,</if>
|
||
|
<if test="updateBy != null">update_by,</if>
|
||
|
<if test="updateTime != null">update_time,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="orderId != null">#{orderId},</if>
|
||
|
<if test="orderCode != null">#{orderCode},</if>
|
||
|
<if test="equipmentCode != null">#{equipmentCode},</if>
|
||
|
<if test="orderDesc != null">#{orderDesc},</if>
|
||
|
<if test="orderBreakdownTime != null">#{orderBreakdownTime},</if>
|
||
|
<if test="orderSource != null">#{orderSource},</if>
|
||
|
<if test="orderTime != null">#{orderTime},</if>
|
||
|
<if test="orderHandle != null">#{orderHandle},</if>
|
||
|
<if test="orderRepairman != null">#{orderRepairman},</if>
|
||
|
<if test="orderConnection != null">#{orderConnection},</if>
|
||
|
<if test="orderStatus != null">#{orderStatus},</if>
|
||
|
<if test="orderRelevance != null">#{orderRelevance},</if>
|
||
|
<if test="orderPicture != null">#{orderPicture},</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="craeteBy != null">#{craeteBy},</if>
|
||
|
<if test="createTime != null">#{createTime},</if>
|
||
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateEquRepairOrder" parameterType="EquRepairOrder">
|
||
|
update equ_repair_order
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||
|
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
|
||
|
<if test="orderDesc != null">order_desc = #{orderDesc},</if>
|
||
|
<if test="orderBreakdownTime != null">order_breakdown_time = #{orderBreakdownTime},</if>
|
||
|
<if test="orderSource != null">order_source = #{orderSource},</if>
|
||
|
<if test="orderTime != null">order_time = #{orderTime},</if>
|
||
|
<if test="orderHandle != null">order_handle = #{orderHandle},</if>
|
||
|
<if test="orderRepairman != null">order_repairman = #{orderRepairman},</if>
|
||
|
<if test="orderConnection != null">order_connection = #{orderConnection},</if>
|
||
|
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
||
|
<if test="orderRelevance != null">order_relevance = #{orderRelevance},</if>
|
||
|
<if test="orderPicture != null">order_picture = #{orderPicture},</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="craeteBy != null">craete_by = #{craeteBy},</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>
|
||
|
</trim>
|
||
|
where order_id = #{orderId}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteEquRepairOrderByOrderId" parameterType="String">
|
||
|
delete from equ_repair_order where order_id = #{orderId}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteEquRepairOrderByOrderIds" parameterType="String">
|
||
|
delete from equ_repair_order where order_id in
|
||
|
<foreach item="orderId" collection="array" open="(" separator="," close=")">
|
||
|
#{orderId}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|