|
|
|
@ -13,7 +13,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<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="orderRepairmanCode" column="order_repairman_code" />
|
|
|
|
|
<result property="orderRepairmanName" column="order_repairman_name" />
|
|
|
|
|
<result property="orderConnection" column="order_connection" />
|
|
|
|
|
<result property="orderStatus" column="order_status" />
|
|
|
|
|
<result property="orderRelevance" column="order_relevance" />
|
|
|
|
@ -46,8 +48,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="outSourceReason" column="work_reason" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.op.common.core.domain.BaseFileData" id="BaseFileResult">
|
|
|
|
|
<result property="fileId" column="file_id" />
|
|
|
|
|
<result property="fileName" column="file_name" />
|
|
|
|
|
<result property="fileAddress" column="file_address" />
|
|
|
|
|
<result property="sourceId" column="source_id" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
<result property="attr1" column="attr1" />
|
|
|
|
|
<result property="attr2" column="attr2" />
|
|
|
|
|
<result property="attr3" column="attr3" />
|
|
|
|
|
<result property="attr4" column="attr4" />
|
|
|
|
|
<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="imageType" column="image_type" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseFileVo">
|
|
|
|
|
select file_id, file_name, file_address, source_id, remark, attr1,
|
|
|
|
|
attr2, attr3, attr4, create_by, create_time, update_by,
|
|
|
|
|
update_time,image_type from base_file
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<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, create_by, create_time, update_by, update_time,factory_code,repair_destination from equ_repair_order
|
|
|
|
|
select order_id, order_code, equipment_code, order_desc, order_breakdown_time, order_source, order_time, order_handle, order_repairman_code,order_repairman_name, order_connection, order_status, order_relevance, order_picture, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time,factory_code,repair_destination from equ_repair_order
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectEquRepairOrderList" parameterType="EquRepairOrder" resultMap="EquRepairOrderResult">
|
|
|
|
@ -60,7 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="orderSource != null and orderSource != ''"> and order_source like concat('%', #{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 like concat('%', #{orderRepairman}, '%')</if>
|
|
|
|
|
<if test="orderRepairmanCode != null and orderRepairmanCode != ''"> and order_repairman_code like concat('%', #{orderRepairmanCode}, '%')</if>
|
|
|
|
|
<if test="orderRepairmanName != null and orderRepairmanName != ''"> and order_repairman_name like concat('%', #{orderRepairmanName}, '%')</if>
|
|
|
|
|
<if test="orderConnection != null and orderConnection != ''"> and order_connection like concat('%', #{orderConnection}, '%')</if>
|
|
|
|
|
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
|
|
|
|
<if test="orderRelevance != null and orderRelevance != ''"> and order_relevance = #{orderRelevance}</if>
|
|
|
|
@ -87,7 +113,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
ero.order_source,
|
|
|
|
|
ero.order_time,
|
|
|
|
|
ero.order_handle,
|
|
|
|
|
ero.order_repairman,
|
|
|
|
|
ero.order_repairman_code,
|
|
|
|
|
ero.order_repairman_name,
|
|
|
|
|
ero.order_connection,
|
|
|
|
|
ero.order_status,
|
|
|
|
|
ero.order_relevance,
|
|
|
|
@ -114,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
from equ_repair_order ero
|
|
|
|
|
left join base_equipment be on ero.equipment_code = be.equipment_code
|
|
|
|
|
left join equ_repair_work_order rwo on ero.order_code = rwo.order_code
|
|
|
|
|
left join equ_outsource_work eow on ero.order_code = eow.work_code
|
|
|
|
|
left join equ_outsource_work eow on ero.order_code = eow.order_code
|
|
|
|
|
where ero.order_id = #{orderId}
|
|
|
|
|
and ero.del_flag = '0'
|
|
|
|
|
ORDER BY create_time DESC
|
|
|
|
@ -131,7 +158,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<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="orderRepairmanCode != null">order_repairman_code,</if>
|
|
|
|
|
<if test="orderRepairmanName != null">order_repairman_name,</if>
|
|
|
|
|
<if test="orderConnection != null">order_connection,</if>
|
|
|
|
|
<if test="orderStatus != null">order_status,</if>
|
|
|
|
|
<if test="orderRelevance != null">order_relevance,</if>
|
|
|
|
@ -156,7 +184,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<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="orderRepairmanCode != null">#{orderRepairmanCode},</if>
|
|
|
|
|
<if test="orderRepairmanName != null">#{orderRepairmanName},</if>
|
|
|
|
|
<if test="orderConnection != null">#{orderConnection},</if>
|
|
|
|
|
<if test="orderStatus != null">#{orderStatus},</if>
|
|
|
|
|
<if test="orderRelevance != null">#{orderRelevance},</if>
|
|
|
|
@ -184,7 +213,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<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="orderRepairmanCode != null">order_repairman_code = #{orderRepairmanCode},</if>
|
|
|
|
|
<if test="orderRepairmanName != null">order_repairman_name = #{orderRepairmanName},</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>
|
|
|
|
@ -246,4 +276,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
where order_code = #{repairCode} and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertBaseFileBatch">
|
|
|
|
|
INSERT INTO base_file(file_id, file_name, file_address, source_id, remark, create_by, create_time,image_type)
|
|
|
|
|
VALUES
|
|
|
|
|
<foreach collection="baseFiles" index="" item="baseFile" separator=",">
|
|
|
|
|
(
|
|
|
|
|
#{baseFile.fileId},
|
|
|
|
|
#{baseFile.fileName},
|
|
|
|
|
#{baseFile.fileAddress},
|
|
|
|
|
#{baseFile.sourceId},
|
|
|
|
|
#{baseFile.remark},
|
|
|
|
|
#{baseFile.createBy},
|
|
|
|
|
#{baseFile.createTime},
|
|
|
|
|
#{baseFile.imageType}
|
|
|
|
|
)
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseFileBySourceId">
|
|
|
|
|
delete from base_file where source_id = #{sourceId}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<select id="getBaseFileBatch" resultMap="BaseFileResult">
|
|
|
|
|
<include refid="selectBaseFileVo"/>
|
|
|
|
|
where source_id = #{sourceId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|