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.
76 lines
2.9 KiB
XML
76 lines
2.9 KiB
XML
<?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.glxp.api.dao.inv.DeviceRepairOrderDao">
|
|
<select id="selectByOrderId" resultType="com.glxp.api.entity.inv.DeviceRepairOrderEntity">
|
|
select *
|
|
from device_repair_order
|
|
where orderId = #{orderId}
|
|
</select>
|
|
|
|
<select id="filterList" resultType="com.glxp.api.res.inv.DeviceRepairOrderResponse">
|
|
select t.id,
|
|
t.orderId,
|
|
t.deptCode,
|
|
t.invCode,
|
|
t.code,
|
|
t.`status`,
|
|
t.createUser,
|
|
t.auditUser,
|
|
t.msg,
|
|
t.createTime,
|
|
t.auditTime,
|
|
t.remark,
|
|
t.repairType,
|
|
t.urgencyType,
|
|
t.planTime,
|
|
t.uploadImage,
|
|
t.repariStartTime,
|
|
t.repariEndTime,
|
|
t.repariName,
|
|
t.repariImage,
|
|
t.repariRemark,
|
|
(select employeeName from auth_user where id = t.createUser) createUserName,
|
|
(select employeeName from auth_user where id = t.auditUser) auditUserName,
|
|
(select `name` from auth_dept where code = t.deptCode) deptName,
|
|
(select `name` from auth_warehouse where code = t.invCode) invName,
|
|
(select employeeName from auth_user where id = t.repariName) repName,
|
|
t1.deviceName,
|
|
t1.ggxh,
|
|
t1.batchNo
|
|
from device_repair_order t
|
|
left join dept_device_detail t1 on t.code = t1.code
|
|
<where>
|
|
<if test="orderId != null and orderId != ''">
|
|
AND t.orderId like concat('%', #{orderId}, '%')
|
|
</if>
|
|
<if test="deptCode != null and deptCode != ''">
|
|
AND t.deptCode = #{deptCode}
|
|
</if>
|
|
<if test="invCode != null and invCode != ''">
|
|
AND t.invCode = #{invCode}
|
|
</if>
|
|
<if test="repariName != null and repariName != ''">
|
|
AND t.repariName = #{repariName}
|
|
</if>
|
|
<if test="code != null and code != ''">
|
|
AND t.code like concat('%', #{code}, '%')
|
|
</if>
|
|
<if test="status != null">
|
|
AND t.status = #{status}
|
|
</if>
|
|
<if test="statusList != null and statusList.size >0">
|
|
and t.status in
|
|
<foreach collection="statusList" item="item" index="index" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
</if>
|
|
<if test="repairType !=null">
|
|
and t.repairType = #{repairType}
|
|
</if>
|
|
<if test="urgencyType !=null">
|
|
and t.urgencyType = #{urgencyType}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
</mapper>
|