|
@@ -11,6 +11,17 @@
|
|
WHERE
|
|
WHERE
|
|
delete_flag = '0'
|
|
delete_flag = '0'
|
|
AND comp_id = #{compId}
|
|
AND comp_id = #{compId}
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 2">
|
|
|
|
+ AND amount_ing_payable-amount_ed_payable>0
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 3">
|
|
|
|
+ AND amount_ing_payable-amount_ed_payable=0
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="contractNo != null and contractNo != ''">
|
|
|
|
+ AND contract_no = #{contractNo}
|
|
|
|
+ </if>
|
|
<if test="businessKeys != null and businessKeys.size > 0">
|
|
<if test="businessKeys != null and businessKeys.size > 0">
|
|
and(
|
|
and(
|
|
<foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">
|
|
<foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">
|
|
@@ -28,36 +39,6 @@
|
|
</foreach>
|
|
</foreach>
|
|
)
|
|
)
|
|
</if>
|
|
</if>
|
|
- <if test="statusFlag != null and statusFlag != ''">
|
|
|
|
- status_flag = #{statusFlag}
|
|
|
|
- </if>
|
|
|
|
- <if test="searchType != null and searchType != ''">
|
|
|
|
- <if test="searchType == 1 and roleFlag==1" >
|
|
|
|
- AND status_flag = '1'
|
|
|
|
- OR status_flag = '8'
|
|
|
|
- OR status_flag = '11'
|
|
|
|
- </if>
|
|
|
|
- <if test="searchType == 1 and roleFlag==2" >
|
|
|
|
- AND status_flag = '2'
|
|
|
|
- </if>
|
|
|
|
- <if test="searchType == 1 and roleFlag==3" >
|
|
|
|
- AND status_flag = '7'
|
|
|
|
- </if>
|
|
|
|
- <if test="searchType == 1 and roleFlag==4" >
|
|
|
|
- AND status_flag = '3'
|
|
|
|
- OR status_flag = '4'
|
|
|
|
- OR status_flag = '9'
|
|
|
|
- </if>
|
|
|
|
- <if test="searchType == 2">
|
|
|
|
- AND amount_ing_payable-amount_ed_payable>0
|
|
|
|
- </if>
|
|
|
|
- <if test="searchType == 3">
|
|
|
|
- AND amount_ing_payable-amount_ed_payable=0
|
|
|
|
- </if>
|
|
|
|
- </if>
|
|
|
|
- <if test="contractNo != null and contractNo != ''">
|
|
|
|
- AND contract_no = #{contractNo}
|
|
|
|
- </if>
|
|
|
|
</select>
|
|
</select>
|
|
<!-- 获得采购平仓统计列表 -->
|
|
<!-- 获得采购平仓统计列表 -->
|
|
<select id="getListByCondition" parameterType="Map"
|
|
<select id="getListByCondition" parameterType="Map"
|
|
@@ -91,6 +72,17 @@
|
|
WHERE
|
|
WHERE
|
|
delete_flag = '0'
|
|
delete_flag = '0'
|
|
AND comp_id = #{compId}
|
|
AND comp_id = #{compId}
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 2">
|
|
|
|
+ AND amount_ing_payable-amount_ed_payable>0
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType == 3">
|
|
|
|
+ AND amount_ing_payable-amount_ed_payable=0
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="contractNo != null and contractNo != ''">
|
|
|
|
+ AND contract_no = #{contractNo}
|
|
|
|
+ </if>
|
|
<if test="businessKeys != null and businessKeys.size > 0">
|
|
<if test="businessKeys != null and businessKeys.size > 0">
|
|
and(
|
|
and(
|
|
<foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">
|
|
<foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">
|
|
@@ -108,36 +100,6 @@
|
|
</foreach>
|
|
</foreach>
|
|
)
|
|
)
|
|
</if>
|
|
</if>
|
|
- <if test="statusFlag != null and statusFlag != ''">
|
|
|
|
- status_flag = #{statusFlag}
|
|
|
|
- </if>
|
|
|
|
- <if test="searchType != null and searchType != ''">
|
|
|
|
- <if test="searchType == 1 and roleFlag==1" >
|
|
|
|
- AND status_flag = '1'
|
|
|
|
- OR status_flag = '8'
|
|
|
|
- OR status_flag = '11'
|
|
|
|
- </if>
|
|
|
|
- <if test="searchType == 1 and roleFlag==2" >
|
|
|
|
- AND status_flag = '2'
|
|
|
|
- </if>
|
|
|
|
- <if test="searchType == 1 and roleFlag==3" >
|
|
|
|
- AND status_flag = '7'
|
|
|
|
- </if>
|
|
|
|
- <if test="searchType == 1 and roleFlag==4" >
|
|
|
|
- AND status_flag = '3'
|
|
|
|
- OR status_flag = '4'
|
|
|
|
- OR status_flag = '9'
|
|
|
|
- </if>
|
|
|
|
- <if test="searchType == 2">
|
|
|
|
- AND amount_ing_payable-amount_ed_payable>0
|
|
|
|
- </if>
|
|
|
|
- <if test="searchType == 3">
|
|
|
|
- AND amount_ing_payable-amount_ed_payable=0
|
|
|
|
- </if>
|
|
|
|
- </if>
|
|
|
|
- <if test="contractNo != null and contractNo != ''">
|
|
|
|
- AND contract_no = #{contractNo}
|
|
|
|
- </if>
|
|
|
|
ORDER BY close_position_date DESC
|
|
ORDER BY close_position_date DESC
|
|
<if test="currentPage != null and currentPage != ''">
|
|
<if test="currentPage != null and currentPage != ''">
|
|
LIMIT ${startRecord}, ${pageSize}
|
|
LIMIT ${startRecord}, ${pageSize}
|