|
@@ -2,4 +2,75 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="org.jeecg.modules.equipmentDisposal.deviceTransfer.mapper.DeviceTransferMapper">
|
|
|
|
|
|
+ <select id="queryTransferItemsPage" resultType="org.jeecg.modules.equipmentDisposal.deviceTransfer.vo.DeviceTransferItemVO">
|
|
|
+ SELECT
|
|
|
+ dt.id AS transferId,
|
|
|
+ dt.transfer_number,
|
|
|
+ dt.application_time,
|
|
|
+ dt.transfer_type,
|
|
|
+ dt.out_company,
|
|
|
+ dt.applicant,
|
|
|
+ dt.application_reason,
|
|
|
+ dt.current_node,
|
|
|
+ dt.approval_status,
|
|
|
+ dt.approval_end_time,
|
|
|
+ ti.id AS itemId,
|
|
|
+ ti.device_code,
|
|
|
+ ti.device_name,
|
|
|
+ ti.asset_code,
|
|
|
+ ti.serial_number,
|
|
|
+ ti.spec,
|
|
|
+ ti.transfer_out_dept,
|
|
|
+ ti.transfer_out_location,
|
|
|
+ ti.original_responsible,
|
|
|
+ ti.transfer_in_dept,
|
|
|
+ ti.transfer_in_location,
|
|
|
+ ti.new_responsible,
|
|
|
+ ti.remark
|
|
|
+ FROM device_transfer dt
|
|
|
+ LEFT JOIN sbsmzq_transfer_item ti
|
|
|
+ ON dt.id COLLATE utf8mb4_general_ci = ti.transfer_id COLLATE utf8mb4_general_ci
|
|
|
+ <where>
|
|
|
+ <if test="query.transferNumber != null and query.transferNumber != ''">
|
|
|
+ AND dt.transfer_number LIKE CONCAT('%', #{query.transferNumber}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="query.transferType != null and query.transferType != ''">
|
|
|
+ AND dt.transfer_type = #{query.transferType}
|
|
|
+ </if>
|
|
|
+ <if test="query.outCompany != null and query.outCompany != ''">
|
|
|
+ AND dt.out_company LIKE CONCAT('%', #{query.outCompany}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="query.applicant != null and query.applicant != ''">
|
|
|
+ AND dt.applicant LIKE CONCAT('%', #{query.applicant}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="query.deviceCode != null and query.deviceCode != ''">
|
|
|
+ AND ti.device_code LIKE CONCAT('%', #{query.deviceCode}, '%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="countTransferItems" resultType="java.lang.Long">
|
|
|
+ SELECT COUNT(1)
|
|
|
+ FROM device_transfer dt
|
|
|
+ LEFT JOIN sbsmzq_transfer_item ti
|
|
|
+ ON dt.id COLLATE utf8mb4_general_ci = ti.transfer_id COLLATE utf8mb4_general_ci
|
|
|
+ <where>
|
|
|
+ <if test="query.transferNumber != null and query.transferNumber != ''">
|
|
|
+ AND dt.transfer_number LIKE CONCAT('%', #{query.transferNumber}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="query.transferType != null and query.transferType != ''">
|
|
|
+ AND dt.transfer_type = #{query.transferType}
|
|
|
+ </if>
|
|
|
+ <if test="query.outCompany != null and query.outCompany != ''">
|
|
|
+ AND dt.out_company LIKE CONCAT('%', #{query.outCompany}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="query.applicant != null and query.applicant != ''">
|
|
|
+ AND dt.applicant LIKE CONCAT('%', #{query.applicant}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="query.deviceCode != null and query.deviceCode != ''">
|
|
|
+ AND ti.device_code LIKE CONCAT('%', #{query.deviceCode}, '%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|