|
|
@@ -1906,7 +1906,7 @@
|
|
|
|
|
|
<select id="selectAcceptCarriageFinishOrder" resultType="com.sckw.transport.model.vo.StatisticsByOrderVO">
|
|
|
SELECT
|
|
|
- IFNULL( SUM( t1.WaitingAmount ), 0 ) AS WaitingAmount ,
|
|
|
+ IFNULL( SUM( t1.waitingAmount ), 0 ) AS waitingAmount ,
|
|
|
IFNULL( SUM( t1.amount ), 0 ) AS amount ,
|
|
|
IFNULL( SUM( t1.entrustAmount ), 0 ) AS entrustAmount ,
|
|
|
IFNULL( SUM( t1.subcontractAmount ), 0 ) AS subcontractAmount ,
|
|
|
@@ -1914,7 +1914,13 @@
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
- ( a.amount - IFNULL(a.total_load_amount,0)) AS WaitingAmount,
|
|
|
+<!-- ( a.amount - IFNULL(a.total_load_amount,0)) AS waitingAmount,-->
|
|
|
+ case a.status when
|
|
|
+ 4 then 0
|
|
|
+ when 5 then 0
|
|
|
+ when 6 then 0
|
|
|
+ else ( a.amount - IFNULL(a.total_load_amount,0))
|
|
|
+ end waitingAmount,
|
|
|
a.amount,
|
|
|
a.entrust_amount AS entrustAmount,
|
|
|
a.subcontract_amount AS subcontractAmount,
|
|
|
@@ -1955,7 +1961,12 @@
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
- ( a.amount - a.entrust_amount - a.subcontract_amount ) AS WaitingAmount,
|
|
|
+ CASE
|
|
|
+ a.STATUS
|
|
|
+ WHEN 4 THEN
|
|
|
+ 0 ELSE ( a.amount - a.entrust_amount - a.subcontract_amount )
|
|
|
+ END waitingAmount,
|
|
|
+<!-- ( a.amount - a.entrust_amount - a.subcontract_amount ) AS WaitingAmount,-->
|
|
|
a.amount,
|
|
|
a.entrust_amount AS entrustAmount,
|
|
|
a.subcontract_amount AS subcontractAmount,
|
|
|
@@ -1971,7 +1982,7 @@
|
|
|
<if test="topId != null and topId !=''">
|
|
|
and b.top_ent_id = #{topId}
|
|
|
</if>
|
|
|
- <if test="statusList != null and statusList.size()>0">
|
|
|
+ <if test="statusList != null and statusList.size() > 0">
|
|
|
and a.`status` IN
|
|
|
<foreach collection="statusList" item="item" separator="," open="(" close=")">
|
|
|
#{item}
|