|
@@ -693,12 +693,18 @@
|
|
|
|
|
|
<select id="selectHomeUpperLeftCntrs" parameterType="ftmsorderbills" resultType="Map">
|
|
<select id="selectHomeUpperLeftCntrs" parameterType="ftmsorderbills" resultType="Map">
|
|
SELECT
|
|
SELECT
|
|
- IFNULL(SUM( cntr_qty ), 0) planQuantity, IFNULL(SUM( cntr_blc_qty ), 0) surplusQuantity
|
|
|
|
|
|
+ IFNULL( SUM( p.cntr_qty ), 0 ) planQuantity,
|
|
|
|
+ IFNULL( SUM( ( p.cntr_qty - p.car_qty ) ), 0 ) surplusQuantity
|
|
FROM
|
|
FROM
|
|
- F_TMSORDERBILLSCNTRS
|
|
|
|
- where
|
|
|
|
- create_time >= #{currentDay[0]}
|
|
|
|
- and create_time <= #{currentDay[1]}
|
|
|
|
|
|
+ F_TMSORDERBILLSPLANS p
|
|
|
|
+ LEFT JOIN t_corps fleet ON fleet.f_id = p.carcor_pid
|
|
|
|
+ WHERE
|
|
|
|
+ p.create_time >= #{currentDay[0]}
|
|
|
|
+ AND p.create_time <= #{currentDay[1]}
|
|
|
|
+ AND p.bill_status = 6
|
|
|
|
+ <if test="isFleet != null and isFleet == 1">
|
|
|
|
+ AND fleet.f_id = #{fleetId}
|
|
|
|
+ </if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectHomeUpperLeftCars" parameterType="ftmsorderbills" resultType="int">
|
|
<select id="selectHomeUpperLeftCars" parameterType="ftmsorderbills" resultType="int">
|