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.
55 lines
2.3 KiB
XML
55 lines
2.3 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.thrsys.ThrInvOrderMapper">
|
|
<select id="filterThrInvOrder" parameterType="com.glxp.api.req.thrsys.FilterThrInvOrderRequest"
|
|
resultType="com.glxp.api.res.thrsys.ThrInvOrderResponse">
|
|
SELECT tio.*, bbt.name billTypeName, aw.name invName
|
|
FROM thr_inv_order tio
|
|
left join basic_bussiness_type bbt on tio.billType = bbt.action
|
|
left join auth_warehouse aw on tio.invCode = aw.code
|
|
<where>
|
|
<if test="billNo != '' and billNo != null">
|
|
AND billNo like concat('%', #{billNo}, '%')
|
|
</if>
|
|
<if test="billType != '' and billType != null">
|
|
AND billType = #{billType}
|
|
</if>
|
|
<if test="thirdSysFk != '' and thirdSysFk != null">
|
|
AND tio.thirdSysFk = #{thirdSysFk}
|
|
</if>
|
|
<if test="startDate != null and startDate != ''">
|
|
<![CDATA[
|
|
and DATE_FORMAT(billdate, '%Y-%m-%d') >= DATE_FORMAT(#{startDate}, '%Y-%m-%d')
|
|
]]>
|
|
</if>
|
|
<if test="endDate != null and endDate != ''">
|
|
<![CDATA[
|
|
and DATE_FORMAT(billdate, '%Y-%m-%d') <= DATE_FORMAT(#{endDate}, '%Y-%m-%d')
|
|
]]>
|
|
</if>
|
|
<if test="sourceType != '' and sourceType != null">
|
|
AND sourceType = #{sourceType}
|
|
</if>
|
|
|
|
<if test="chargeStartDate != null and chargeStartDate != ''">
|
|
<![CDATA[
|
|
and DATE_FORMAT(chargeTime, '%Y-%m-%d') >= DATE_FORMAT(#{chargeStartDate}, '%Y-%m-%d')
|
|
]]>
|
|
</if>
|
|
<if test="chargeEndDate != null and chargeEndDate != ''">
|
|
<![CDATA[
|
|
and DATE_FORMAT(chargeTime, '%Y-%m-%d') <= DATE_FORMAT(#{chargeEndDate}, '%Y-%m-%d')
|
|
]]>
|
|
</if>
|
|
<if test="sicker != '' and sicker != null">
|
|
AND (
|
|
sickerCode like concat('%', #{sicker}, '%')
|
|
OR
|
|
sickerName like concat('%', #{sicker}, '%')
|
|
)
|
|
</if>
|
|
</where>
|
|
ORDER BY tio.billdate DESC
|
|
</select>
|
|
</mapper>
|