优化问题
This commit is contained in:
@@ -998,4 +998,144 @@
|
||||
ORDER BY ri.create_time DESC, ri.id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectStatistics" resultType="java.lang.Long" parameterType="java.lang.Object" >
|
||||
SELECT sum(ri.ht_dj*ri.real_qty)
|
||||
FROM rk_info ri
|
||||
<where>
|
||||
(ri.is_delete = '0' OR ri.is_delete = 0 OR ri.is_delete IS NULL)
|
||||
|
||||
<if test="isChuku != null and isChuku != ''">
|
||||
AND ri.is_chuku = #{isChuku}
|
||||
</if>
|
||||
|
||||
<if test="cangku != null and cangku != ''">
|
||||
AND ri.cangku = #{cangku}
|
||||
</if>
|
||||
|
||||
<if test="startTime != null">
|
||||
AND ri.rk_time <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
AND ri.rk_time <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
|
||||
<if test="lyStartTime != null">
|
||||
AND ri.ly_time <![CDATA[ >= ]]> #{lyStartTime}
|
||||
</if>
|
||||
<if test="lyEndTime != null">
|
||||
AND ri.ly_time <![CDATA[ <= ]]> #{lyEndTime}
|
||||
</if>
|
||||
|
||||
<if test="xmNo != null and xmNo != ''">
|
||||
AND ri.xm_no LIKE CONCAT('%', #{xmNo}, '%')
|
||||
</if>
|
||||
<if test="xmMs != null and xmMs != ''">
|
||||
AND ri.xm_ms LIKE CONCAT('%', #{xmMs}, '%')
|
||||
</if>
|
||||
<if test="wlNo != null and wlNo != ''">
|
||||
AND ri.wl_no LIKE CONCAT('%', #{wlNo}, '%')
|
||||
</if>
|
||||
<if test="wlMs != null and wlMs != ''">
|
||||
AND ri.wl_ms LIKE CONCAT('%', #{wlMs}, '%')
|
||||
</if>
|
||||
<if test="gysNo != null and gysNo != ''">
|
||||
AND ri.gys_no LIKE CONCAT('%', #{gysNo}, '%')
|
||||
</if>
|
||||
<if test="gysMc != null and gysMc != ''">
|
||||
AND ri.gys_mc LIKE CONCAT('%', #{gysMc}, '%')
|
||||
</if>
|
||||
<if test="sapNo != null and sapNo != ''">
|
||||
AND ri.sap_no LIKE CONCAT('%', #{sapNo}, '%')
|
||||
</if>
|
||||
<if test="billNo != null and billNo != ''">
|
||||
AND ri.bill_no LIKE CONCAT('%', #{billNo}, '%')
|
||||
</if>
|
||||
<if test="billNoCk != null and billNoCk != ''">
|
||||
AND ri.bill_no_ck LIKE CONCAT('%', #{billNoCk}, '%')
|
||||
</if>
|
||||
<if test="ckType != null and ckType != ''">
|
||||
AND ri.ck_type LIKE CONCAT('%', #{ckType}, '%')
|
||||
</if>
|
||||
<if test="pcode != null and pcode != ''">
|
||||
AND ri.pcode LIKE CONCAT('%', #{pcode}, '%')
|
||||
</if>
|
||||
<if test="fycde1 != null and fycde1 != ''">
|
||||
AND ri.fycde_1 LIKE CONCAT('%', #{fycde1}, '%')
|
||||
</if>
|
||||
<if test="fycde2 != null and fycde2 != ''">
|
||||
AND ri.fycde_2 LIKE CONCAT('%', #{fycde2}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPcde" resultType="java.lang.Long" parameterType="java.lang.Object" >
|
||||
SELECT count(distinct pcode)
|
||||
FROM rk_info ri
|
||||
<where>
|
||||
(ri.is_delete = '0' OR ri.is_delete = 0 OR ri.is_delete IS NULL)
|
||||
|
||||
<if test="isChuku != null and isChuku != ''">
|
||||
AND ri.is_chuku = #{isChuku}
|
||||
</if>
|
||||
|
||||
<if test="cangku != null and cangku != ''">
|
||||
AND ri.cangku = #{cangku}
|
||||
</if>
|
||||
|
||||
<if test="startTime != null">
|
||||
AND ri.rk_time <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
AND ri.rk_time <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
|
||||
<if test="lyStartTime != null">
|
||||
AND ri.ly_time <![CDATA[ >= ]]> #{lyStartTime}
|
||||
</if>
|
||||
<if test="lyEndTime != null">
|
||||
AND ri.ly_time <![CDATA[ <= ]]> #{lyEndTime}
|
||||
</if>
|
||||
|
||||
<if test="xmNo != null and xmNo != ''">
|
||||
AND ri.xm_no LIKE CONCAT('%', #{xmNo}, '%')
|
||||
</if>
|
||||
<if test="xmMs != null and xmMs != ''">
|
||||
AND ri.xm_ms LIKE CONCAT('%', #{xmMs}, '%')
|
||||
</if>
|
||||
<if test="wlNo != null and wlNo != ''">
|
||||
AND ri.wl_no LIKE CONCAT('%', #{wlNo}, '%')
|
||||
</if>
|
||||
<if test="wlMs != null and wlMs != ''">
|
||||
AND ri.wl_ms LIKE CONCAT('%', #{wlMs}, '%')
|
||||
</if>
|
||||
<if test="gysNo != null and gysNo != ''">
|
||||
AND ri.gys_no LIKE CONCAT('%', #{gysNo}, '%')
|
||||
</if>
|
||||
<if test="gysMc != null and gysMc != ''">
|
||||
AND ri.gys_mc LIKE CONCAT('%', #{gysMc}, '%')
|
||||
</if>
|
||||
<if test="sapNo != null and sapNo != ''">
|
||||
AND ri.sap_no LIKE CONCAT('%', #{sapNo}, '%')
|
||||
</if>
|
||||
<if test="billNo != null and billNo != ''">
|
||||
AND ri.bill_no LIKE CONCAT('%', #{billNo}, '%')
|
||||
</if>
|
||||
<if test="billNoCk != null and billNoCk != ''">
|
||||
AND ri.bill_no_ck LIKE CONCAT('%', #{billNoCk}, '%')
|
||||
</if>
|
||||
<if test="ckType != null and ckType != ''">
|
||||
AND ri.ck_type LIKE CONCAT('%', #{ckType}, '%')
|
||||
</if>
|
||||
<if test="pcode != null and pcode != ''">
|
||||
AND ri.pcode LIKE CONCAT('%', #{pcode}, '%')
|
||||
</if>
|
||||
<if test="fycde1 != null and fycde1 != ''">
|
||||
AND ri.fycde_1 LIKE CONCAT('%', #{fycde1}, '%')
|
||||
</if>
|
||||
<if test="fycde2 != null and fycde2 != ''">
|
||||
AND ri.fycde_2 LIKE CONCAT('%', #{fycde2}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user