|
@@ -30,6 +30,14 @@
|
|
|
LEFT JOIN project T4 ON T1.PROJECT_ID=T4.ID
|
|
|
<where>
|
|
|
T1.COST_TYPE LIKE '14%' and T2.FLOW_STATUS=90
|
|
|
+ <if test="params != null and params.collectionCompany != null and params.collectionCompany != ''">
|
|
|
+ <bind name="collectionCompany" value="'%'+params.collectionCompany+'%'"/>
|
|
|
+ AND T2.COLLECTION_COMPANY like #{collectionCompany}
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.REMARK != null and params.REMARK != ''">
|
|
|
+ <bind name="REMARK" value="'%'+params.REMARK+'%'"/>
|
|
|
+ AND T1.REMARK like #{REMARK}
|
|
|
+ </if>
|
|
|
<if test="params != null and params.costType != null and params.costType != ''">
|
|
|
AND T1.COST_TYPE = #{params.costType}
|
|
|
</if>
|
|
@@ -45,12 +53,18 @@
|
|
|
<if test="params != null and params.userId != null and params.userId != ''">
|
|
|
AND T2.USER_ID = #{params.userId}
|
|
|
</if>
|
|
|
- <if test="params != null and params.applyOn != null and params.applyOn != ''">
|
|
|
+ <if test="params != null and params.applyOn != null ">
|
|
|
AND T2.APPLY_TIME >= #{params.applyOn}
|
|
|
</if>
|
|
|
- <if test="params != null and params.applyOff != null and params.applyOff != ''">
|
|
|
+ <if test="params != null and params.applyOff != null ">
|
|
|
AND T2.APPLY_TIME <= #{params.applyOff}
|
|
|
</if>
|
|
|
+ <if test="params != null and params.writeOn != null ">
|
|
|
+ AND T1.WRITE_OFF_TIME >= #{params.writeOn}
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.writeOff != null ">
|
|
|
+ AND T1.WRITE_OFF_TIME <= #{params.writeOff}
|
|
|
+ </if>
|
|
|
<if test="params != null and params.DeptList != null and params.DeptList.size > 0">
|
|
|
AND T3.ZRBM_ID in
|
|
|
<foreach collection="params.DeptList" item="item" open="(" close=")" separator=",">
|
|
@@ -89,6 +103,14 @@
|
|
|
LEFT JOIN PROJECT T3 ON T1.PROJECT_ID=T3.ID
|
|
|
<where>
|
|
|
T1.COST_TYPE LIKE '14%' and T2.FLOW_STATUS=90
|
|
|
+ <if test="params != null and params.collectionCompany != null and params.collectionCompany != ''">
|
|
|
+ <bind name="collectionCompany" value="'%'+params.collectionCompany+'%'"/>
|
|
|
+ AND 1!=1
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.REMARK != null and params.REMARK != ''">
|
|
|
+ <bind name="REMARK" value="'%'+params.REMARK+'%'"/>
|
|
|
+ AND T1.BZ1 like #{REMARK}
|
|
|
+ </if>
|
|
|
<if test="params != null and params.costType != null and params.costType != ''">
|
|
|
AND T1.COST_TYPE = #{params.costType}
|
|
|
</if>
|
|
@@ -104,12 +126,18 @@
|
|
|
<if test="params != null and params.userId != null and params.userId != ''">
|
|
|
AND T2.USER_ID = #{params.userId}
|
|
|
</if>
|
|
|
- <if test="params != null and params.applyOn != null and params.applyOn != ''">
|
|
|
+ <if test="params != null and params.applyOn != null ">
|
|
|
AND T2.APPLY_TIME >= #{params.applyOn}
|
|
|
</if>
|
|
|
- <if test="params != null and params.applyOff != null and params.applyOff != ''">
|
|
|
+ <if test="params != null and params.applyOff != null">
|
|
|
AND T2.APPLY_TIME <= #{params.applyOff}
|
|
|
</if>
|
|
|
+ <if test="params != null and params.writeOn != null ">
|
|
|
+ AND T1.WRITE_OFF_TIME >= #{params.writeOn}
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.writeOff != null ">
|
|
|
+ AND T1.WRITE_OFF_TIME <= #{params.writeOff}
|
|
|
+ </if>
|
|
|
<if test="params != null and params.DeptList != null and params.DeptList.size > 0">
|
|
|
AND T3.ZRBM_ID in
|
|
|
<foreach collection="params.DeptList" item="item" open="(" close=")" separator=",">
|
|
@@ -168,6 +196,14 @@
|
|
|
</if>
|
|
|
)
|
|
|
</if>
|
|
|
+ <if test="params != null and params.collectionCompany != null and params.collectionCompany != ''">
|
|
|
+ <bind name="collectionCompany" value="'%'+params.collectionCompany+'%'"/>
|
|
|
+ AND T2.COLLECTION_COMPANY like #{collectionCompany}
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.REMARK != null and params.REMARK != ''">
|
|
|
+ <bind name="REMARK" value="'%'+params.REMARK+'%'"/>
|
|
|
+ AND T1.REMARK like #{REMARK}
|
|
|
+ </if>
|
|
|
<if test="params != null and params.costType != null and params.costType != ''">
|
|
|
AND T1.COST_TYPE = #{params.costType}
|
|
|
</if>
|
|
@@ -180,12 +216,18 @@
|
|
|
<if test="params != null and params.userId != null and params.userId != ''">
|
|
|
AND T2.USER_ID = #{params.userId}
|
|
|
</if>
|
|
|
- <if test="params != null and params.applyOn != null and params.applyOn != ''">
|
|
|
+ <if test="params != null and params.applyOn != null ">
|
|
|
AND T2.APPLY_TIME >= #{params.applyOn}
|
|
|
</if>
|
|
|
- <if test="params != null and params.applyOff != null and params.applyOff != ''">
|
|
|
+ <if test="params != null and params.applyOff != null ">
|
|
|
AND T2.APPLY_TIME <= #{params.applyOff}
|
|
|
</if>
|
|
|
+ <if test="params != null and params.writeOn != null ">
|
|
|
+ AND T1.WRITE_OFF_TIME >= #{params.writeOn}
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.writeOff != null ">
|
|
|
+ AND T1.WRITE_OFF_TIME <= #{params.writeOff}
|
|
|
+ </if>
|
|
|
<if test="params != null and params.DeptList != null and params.DeptList.size > 0">
|
|
|
AND T3.ZRBM_ID in
|
|
|
<foreach collection="params.DeptList" item="item" open="(" close=")" separator=",">
|
|
@@ -230,6 +272,14 @@
|
|
|
</if>
|
|
|
)
|
|
|
</if>
|
|
|
+ <if test="params != null and params.collectionCompany != null and params.collectionCompany != ''">
|
|
|
+ <bind name="collectionCompany" value="'%'+params.collectionCompany+'%'"/>
|
|
|
+ AND 1!=1
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.REMARK != null and params.REMARK != ''">
|
|
|
+ <bind name="REMARK" value="'%'+params.REMARK+'%'"/>
|
|
|
+ AND T1.BZ1 like #{REMARK}
|
|
|
+ </if>
|
|
|
<if test="params != null and params.costType != null and params.costType != ''">
|
|
|
AND T1.COST_TYPE = #{params.costType}
|
|
|
</if>
|
|
@@ -245,12 +295,18 @@
|
|
|
<if test="params != null and params.userId != null and params.userId != ''">
|
|
|
AND T2.USER_ID = #{params.userId}
|
|
|
</if>
|
|
|
- <if test="params != null and params.applyOn != null and params.applyOn != ''">
|
|
|
+ <if test="params != null and params.applyOn != null ">
|
|
|
AND T2.APPLY_TIME >= #{params.applyOn}
|
|
|
</if>
|
|
|
- <if test="params != null and params.applyOff != null and params.applyOff != ''">
|
|
|
+ <if test="params != null and params.applyOff != null ">
|
|
|
AND T2.APPLY_TIME <= #{params.applyOff}
|
|
|
</if>
|
|
|
+ <if test="params != null and params.writeOn != null ">
|
|
|
+ AND T1.WRITE_OFF_TIME >= #{params.writeOn}
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.writeOff != null ">
|
|
|
+ AND T1.WRITE_OFF_TIME <= #{params.writeOff}
|
|
|
+ </if>
|
|
|
<if test="params != null and params.DeptList != null and params.DeptList.size > 0">
|
|
|
AND T3.ZRBM_ID in
|
|
|
<foreach collection="params.DeptList" item="item" open="(" close=")" separator=",">
|
|
@@ -301,6 +357,14 @@ select sum(num) from (
|
|
|
LEFT JOIN project T3 ON T2.PROJECT_ID=T3.ID
|
|
|
<where>
|
|
|
T1.ISVALID = 1 and T2.FLOW_STATUS=90 AND T2.ISVALID = 1 and T1.COST_TYPE LIKE '14%'
|
|
|
+ <if test="params != null and params.collectionCompany != null and params.collectionCompany != ''">
|
|
|
+ <bind name="collectionCompany" value="'%'+params.collectionCompany+'%'"/>
|
|
|
+ AND T2.COLLECTION_COMPANY like #{collectionCompany}
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.REMARK != null and params.REMARK != ''">
|
|
|
+ <bind name="REMARK" value="'%'+params.REMARK+'%'"/>
|
|
|
+ AND T1.REMARK like #{REMARK}
|
|
|
+ </if>
|
|
|
<if test="params != null and params.costType != null and params.costType != ''">
|
|
|
AND T1.COST_TYPE = #{params.costType}
|
|
|
</if>
|
|
@@ -316,12 +380,18 @@ select sum(num) from (
|
|
|
<if test="params != null and params.userId != null and params.userId != ''">
|
|
|
AND T2.USER_ID = #{params.userId}
|
|
|
</if>
|
|
|
- <if test="params != null and params.applyOn != null and params.applyOn != ''">
|
|
|
+ <if test="params != null and params.applyOn != null ">
|
|
|
AND T2.APPLY_TIME >= #{params.applyOn}
|
|
|
</if>
|
|
|
- <if test="params != null and params.applyOff != null and params.applyOff != ''">
|
|
|
+ <if test="params != null and params.applyOff != null ">
|
|
|
AND T2.APPLY_TIME <= #{params.applyOff}
|
|
|
</if>
|
|
|
+ <if test="params != null and params.writeOn != null ">
|
|
|
+ AND T1.WRITE_OFF_TIME >= #{params.writeOn}
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.writeOff != null ">
|
|
|
+ AND T1.WRITE_OFF_TIME <= #{params.writeOff}
|
|
|
+ </if>
|
|
|
<if test="params != null and params.DeptList != null and params.DeptList.size > 0">
|
|
|
AND T3.ZRBM_ID in
|
|
|
<foreach collection="params.DeptList" item="item" open="(" close=")" separator=",">
|
|
@@ -359,6 +429,14 @@ select sum(num) from (
|
|
|
LEFT JOIN project T3 ON T2.PROJECT_ID=T3.ID
|
|
|
<where>
|
|
|
T1.ISVALID = 1 and T2.FLOW_STATUS=90 AND T2.ISVALID = 1 and T1.COST_TYPE LIKE '14%'
|
|
|
+ <if test="params != null and params.collectionCompany != null and params.collectionCompany != ''">
|
|
|
+ <bind name="collectionCompany" value="'%'+params.collectionCompany+'%'"/>
|
|
|
+ AND 1!=1
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.REMARK != null and params.REMARK != ''">
|
|
|
+ <bind name="REMARK" value="'%'+params.REMARK+'%'"/>
|
|
|
+ AND T1.BZ1 like #{REMARK}
|
|
|
+ </if>
|
|
|
<if test="params != null and params.costType != null and params.costType != ''">
|
|
|
AND T1.COST_TYPE = #{params.costType}
|
|
|
</if>
|
|
@@ -374,12 +452,18 @@ select sum(num) from (
|
|
|
<if test="params != null and params.userId != null and params.userId != ''">
|
|
|
AND T2.USER_ID = #{params.userId}
|
|
|
</if>
|
|
|
- <if test="params != null and params.applyOn != null and params.applyOn != ''">
|
|
|
+ <if test="params != null and params.applyOn != null ">
|
|
|
AND T2.APPLY_TIME >= #{params.applyOn}
|
|
|
</if>
|
|
|
- <if test="params != null and params.applyOff != null and params.applyOff != ''">
|
|
|
+ <if test="params != null and params.applyOff != null ">
|
|
|
AND T2.APPLY_TIME <= #{params.applyOff}
|
|
|
</if>
|
|
|
+ <if test="params != null and params.writeOn != null">
|
|
|
+ AND T1.WRITE_OFF_TIME >= #{params.writeOn}
|
|
|
+ </if>
|
|
|
+ <if test="params != null and params.writeOff != null ">
|
|
|
+ AND T1.WRITE_OFF_TIME <= #{params.writeOff}
|
|
|
+ </if>
|
|
|
<if test="params != null and params.DeptList != null and params.DeptList.size > 0">
|
|
|
AND T3.ZRBM_ID in
|
|
|
<foreach collection="params.DeptList" item="item" open="(" close=")" separator=",">
|