|
|
@@ -1102,6 +1102,12 @@ where delete_sign != 1 and (approval = 0 or approval = 2) and outsource= #{o.ou
|
|
|
<if test="o.financeId != null and o.financeId != """>
|
|
|
and d.finance_id = #{o.financeId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="fids != null and o.financeId != """>
|
|
|
+ and d.finance_id =
|
|
|
+ <foreach item="item" collection="fids" separator="," open="(" close=")" index="">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
<if test="o.orderStatus != null and o.orderStatus != """>
|
|
|
and o.order_status = #{o.orderStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
@@ -1152,6 +1158,12 @@ where delete_sign != 1 and (approval = 0 or approval = 2) and outsource= #{o.ou
|
|
|
<if test="o.financeId != null and o.financeId != """>
|
|
|
and d.finance_id = #{o.financeId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="fids != null and o.financeId != """>
|
|
|
+ and d.finance_id =
|
|
|
+ <foreach item="item" collection="fids" separator="," open="(" close=")" index="">
|
|
|
+ #{item.id}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
<if test="o.orderStatus != null and o.orderStatus != """>
|
|
|
and o.order_status = #{o.orderStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
@@ -1518,37 +1530,43 @@ where super_id is null ) e on e.order_no=a.order_no
|
|
|
select sum(b.amount) actuallyTotalAmount,sum(o.total_amount) signTotalAmount from t_order_new o
|
|
|
left join department d on o.order_dep=d.id left join `user` u on o.buyer_id = u.id
|
|
|
left join ( select sum(transaction_amount) as amount , order_no from t_order_bill_new group by order_no ) b on b.order_no = o.order_no
|
|
|
- where delete_sign != 1 and (approval = 0 or approval = 2) and outsource= #{outsource,jdbcType=INTEGER}
|
|
|
- <if test="processStatus == 3">
|
|
|
- and o.process_status = #{processStatus,jdbcType=INTEGER}
|
|
|
+ where delete_sign != 1 and (approval = 0 or approval = 2) and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
|
+ <if test="o.processStatus == 3">
|
|
|
+ and o.process_status = #{o.processStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
- <if test="processStatus == 4">
|
|
|
- and o.process_status >= #{processStatus,jdbcType=INTEGER}
|
|
|
+ <if test="o.processStatus == 4">
|
|
|
+ and o.process_status >= #{o.processStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
- <if test="financeId != null and financeId != """>
|
|
|
- and d.finance_id = #{financeId,jdbcType=VARCHAR}
|
|
|
+ <if test="o.financeId != null and o.financeId != """>
|
|
|
+ and d.finance_id = #{o.financeId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- <if test="orderStatus != null and orderStatus != """>
|
|
|
- and o.order_status = #{orderStatus,jdbcType=INTEGER}
|
|
|
+ <if test="fids != null and o.financeId != """>
|
|
|
+ and d.finance_id =
|
|
|
+ <foreach item="item" collection="fids" separator="," open="(" close=")" index="">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="o.orderStatus != null and o.orderStatus != """>
|
|
|
+ and o.order_status = #{o.orderStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
- <if test="departmentId != null and departmentId != """>
|
|
|
- and o.order_dep = #{departmentId,jdbcType=INTEGER}
|
|
|
+ <if test="o.departmentId != null and o.departmentId != """>
|
|
|
+ and o.order_dep = #{o.departmentId,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
- <if test="contractNo != null and contractNo != """>
|
|
|
- and o.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
|
|
|
+ <if test="o.contractNo != null and o.contractNo != """>
|
|
|
+ and o.contract_no like CONCAT('%',#{o.contractNo,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
- <if test="liquidationStatus != null ">
|
|
|
- and o.liquidation_status = #{liquidationStatus,jdbcType=INTEGER}
|
|
|
+ <if test="o.liquidationStatus != null ">
|
|
|
+ and o.liquidation_status = #{o.liquidationStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
|
|
|
- <if test="orderNo != null and orderNo != """>
|
|
|
- and o.order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
+ <if test="o.orderNo != null and o.orderNo != """>
|
|
|
+ and o.order_no = #{o.orderNo,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- <if test="buyerName != null and buyerName != """>
|
|
|
+ <if test="o.buyerName != null and o.buyerName != """>
|
|
|
<bind name="n" value="'%' + buyerName + '%'" />
|
|
|
and u.nickname like #{n,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- <if test="startTime != null and startTime != "" and endTime != null and endTime != """>
|
|
|
+ <if test="o.startTime != null and o.startTime != "" and o.endTime != null and o.endTime != """>
|
|
|
<bind name="a" value="startTime + ' 00:00:00'" />
|
|
|
<bind name="b" value="endTime + ' 23:59:59'" />
|
|
|
and o.create_time between #{a,jdbcType=VARCHAR} and #{b,jdbcType=VARCHAR}
|