|
@@ -209,19 +209,13 @@
|
|
|
select base_spot_no,
|
|
select base_spot_no,
|
|
|
base_spot_name,
|
|
base_spot_name,
|
|
|
create_man_no,
|
|
create_man_no,
|
|
|
- create_man_name,
|
|
|
|
|
- meter_mode,
|
|
|
|
|
- meter_type_no,
|
|
|
|
|
- meter_type_name
|
|
|
|
|
|
|
+ create_man_name
|
|
|
from
|
|
from
|
|
|
(
|
|
(
|
|
|
(select A.base_spot_no base_spot_no,
|
|
(select A.base_spot_no base_spot_no,
|
|
|
A.base_spot_name base_spot_name,
|
|
A.base_spot_name base_spot_name,
|
|
|
A.create_man_no create_man_no,
|
|
A.create_man_no create_man_no,
|
|
|
- A.create_man_name create_man_name,
|
|
|
|
|
- A.meter_mode meter_mode,
|
|
|
|
|
- B.meter_type_no meter_type_no,
|
|
|
|
|
- B.meter_type_name meter_type_name
|
|
|
|
|
|
|
+ A.create_man_name create_man_name
|
|
|
from meter_work_car_actual_first A
|
|
from meter_work_car_actual_first A
|
|
|
left join pre_track_scale B
|
|
left join pre_track_scale B
|
|
|
on A.prediction_no = B.prediction_no
|
|
on A.prediction_no = B.prediction_no
|
|
@@ -236,15 +230,12 @@
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
- group by A.base_spot_no, A.base_spot_name, A.create_man_no, A.create_man_name, A.meter_mode, B.meter_type_no, B.meter_type_name)
|
|
|
|
|
|
|
+ group by A.base_spot_no, A.base_spot_name, A.create_man_no, A.create_man_name)
|
|
|
union
|
|
union
|
|
|
(select A.net_spot3_no base_spot_no,
|
|
(select A.net_spot3_no base_spot_no,
|
|
|
A.net_spot3_name base_spot_name,
|
|
A.net_spot3_name base_spot_name,
|
|
|
A.net_man_no create_man_no,
|
|
A.net_man_no create_man_no,
|
|
|
- A.net_man_name create_man_name,
|
|
|
|
|
- A.net_mode meter_mode,
|
|
|
|
|
- B.meter_type_no meter_type_no,
|
|
|
|
|
- B.meter_type_name meter_type_name
|
|
|
|
|
|
|
+ A.net_man_name create_man_name
|
|
|
from meter_work_car_actual A
|
|
from meter_work_car_actual A
|
|
|
left join pre_track_scale B
|
|
left join pre_track_scale B
|
|
|
on A.prediction_no = B.prediction_no
|
|
on A.prediction_no = B.prediction_no
|
|
@@ -259,10 +250,10 @@
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
- group by A.net_spot3_no, A.net_spot3_name, A.net_man_no, A.net_man_name, A.net_mode, B.meter_type_no, B.meter_type_name)
|
|
|
|
|
|
|
+ group by A.net_spot3_no, A.net_spot3_name, A.net_man_no, A.net_man_name)
|
|
|
union
|
|
union
|
|
|
(
|
|
(
|
|
|
- select B.base_spot_no, B.base_spot_name,t.create_man_no,t.create_man_name,B.meter_mode,C.meter_type_no, C.meter_type_name
|
|
|
|
|
|
|
+ select B.base_spot_no, B.base_spot_name,t.create_man_no,t.create_man_name
|
|
|
from meter_base_operation_log t
|
|
from meter_base_operation_log t
|
|
|
left join meter_work_car_actual_First B
|
|
left join meter_work_car_actual_First B
|
|
|
on t.operation_id = B.Actual_First_No
|
|
on t.operation_id = B.Actual_First_No
|
|
@@ -281,7 +272,7 @@
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
- group by B.base_spot_no, B.base_spot_name,t.create_man_no,t.create_man_name,B.meter_mode,C.meter_type_no, C.meter_type_name)
|
|
|
|
|
|
|
+ group by B.base_spot_no, B.base_spot_name,t.create_man_no,t.create_man_name)
|
|
|
)
|
|
)
|
|
|
where 1 = 1
|
|
where 1 = 1
|
|
|
<if test="netSpot3NoStr != null and netSpot3NoStr != ''">
|
|
<if test="netSpot3NoStr != null and netSpot3NoStr != ''">
|
|
@@ -299,29 +290,20 @@
|
|
|
group by base_spot_no,
|
|
group by base_spot_no,
|
|
|
base_spot_name,
|
|
base_spot_name,
|
|
|
create_man_no,
|
|
create_man_no,
|
|
|
- create_man_name,
|
|
|
|
|
- meter_mode,
|
|
|
|
|
- meter_type_no,
|
|
|
|
|
- meter_type_name
|
|
|
|
|
|
|
+ create_man_name
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="groupByDayStaticReportInfo" parameterType="java.util.HashMap" resultMap="workLoadReportInfoBaseResultMap">
|
|
<select id="groupByDayStaticReportInfo" parameterType="java.util.HashMap" resultMap="workLoadReportInfoBaseResultMap">
|
|
|
select base_spot_no,
|
|
select base_spot_no,
|
|
|
base_spot_name,
|
|
base_spot_name,
|
|
|
create_man_no,
|
|
create_man_no,
|
|
|
- create_man_name,
|
|
|
|
|
- meter_mode,
|
|
|
|
|
- meter_type_no,
|
|
|
|
|
- meter_type_name
|
|
|
|
|
|
|
+ create_man_name
|
|
|
from
|
|
from
|
|
|
(
|
|
(
|
|
|
(select A.base_spot_no base_spot_no,
|
|
(select A.base_spot_no base_spot_no,
|
|
|
A.base_spot_name base_spot_name,
|
|
A.base_spot_name base_spot_name,
|
|
|
A.create_man_no create_man_no,
|
|
A.create_man_no create_man_no,
|
|
|
- A.create_man_name create_man_name,
|
|
|
|
|
- A.meter_mode meter_mode,
|
|
|
|
|
- B.meter_type_no meter_type_no,
|
|
|
|
|
- B.meter_type_name meter_type_name
|
|
|
|
|
|
|
+ A.create_man_name create_man_name
|
|
|
from meter_work_railway_act_first A
|
|
from meter_work_railway_act_first A
|
|
|
left join pre_railway_scale B
|
|
left join pre_railway_scale B
|
|
|
on A.prediction_no = B.prediction_no
|
|
on A.prediction_no = B.prediction_no
|
|
@@ -340,15 +322,12 @@
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
- group by A.base_spot_no, A.base_spot_name, A.create_man_no, A.create_man_name, A.meter_mode, B.meter_type_no, B.meter_type_name)
|
|
|
|
|
|
|
+ group by A.base_spot_no, A.base_spot_name, A.create_man_no, A.create_man_name)
|
|
|
union
|
|
union
|
|
|
(select A.net_spot3_no base_spot_no,
|
|
(select A.net_spot3_no base_spot_no,
|
|
|
A.net_spot3_name base_spot_name,
|
|
A.net_spot3_name base_spot_name,
|
|
|
A.net_man_no create_man_no,
|
|
A.net_man_no create_man_no,
|
|
|
- A.net_man_name create_man_name,
|
|
|
|
|
- A.net_mode meter_mode,
|
|
|
|
|
- B.meter_type_no meter_type_no,
|
|
|
|
|
- B.meter_type_name meter_type_name
|
|
|
|
|
|
|
+ A.net_man_name create_man_name
|
|
|
from meter_work_railway_actual A
|
|
from meter_work_railway_actual A
|
|
|
left join pre_railway_scale B
|
|
left join pre_railway_scale B
|
|
|
on A.prediction_no = B.prediction_no
|
|
on A.prediction_no = B.prediction_no
|
|
@@ -367,9 +346,9 @@
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
- group by A.net_spot3_no, A.net_spot3_name, A.net_man_no, A.net_man_name, A.net_mode, B.meter_type_no, B.meter_type_name)
|
|
|
|
|
|
|
+ group by A.net_spot3_no, A.net_spot3_name, A.net_man_no, A.net_man_name)
|
|
|
union
|
|
union
|
|
|
- (select B.base_spot_no, B.base_spot_name,t.create_man_no,t.create_man_name,B.meter_mode,C.meter_type_no, C.meter_type_name
|
|
|
|
|
|
|
+ (select B.base_spot_no, B.base_spot_name,t.create_man_no,t.create_man_name
|
|
|
from meter_base_operation_log t
|
|
from meter_base_operation_log t
|
|
|
left join meter_work_railway_act_first B
|
|
left join meter_work_railway_act_first B
|
|
|
on t.operation_id = B.Actual_First_No
|
|
on t.operation_id = B.Actual_First_No
|
|
@@ -392,7 +371,7 @@
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
- group by B.base_spot_no, B.base_spot_name,t.create_man_no,t.create_man_name,B.meter_mode,C.meter_type_no, C.meter_type_name)
|
|
|
|
|
|
|
+ group by B.base_spot_no, B.base_spot_name,t.create_man_no,t.create_man_name)
|
|
|
)
|
|
)
|
|
|
where 1 = 1
|
|
where 1 = 1
|
|
|
<if test="netSpot3NoStr != null and netSpot3NoStr != ''">
|
|
<if test="netSpot3NoStr != null and netSpot3NoStr != ''">
|
|
@@ -410,10 +389,7 @@
|
|
|
group by base_spot_no,
|
|
group by base_spot_no,
|
|
|
base_spot_name,
|
|
base_spot_name,
|
|
|
create_man_no,
|
|
create_man_no,
|
|
|
- create_man_name,
|
|
|
|
|
- meter_mode,
|
|
|
|
|
- meter_type_no,
|
|
|
|
|
- meter_type_name
|
|
|
|
|
|
|
+ create_man_name
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="truckHisTareComparison" parameterType="java.util.HashMap"
|
|
<select id="truckHisTareComparison" parameterType="java.util.HashMap"
|
|
@@ -980,6 +956,21 @@
|
|
|
group by A.car_no, A.matter_no, A.matter_name
|
|
group by A.car_no, A.matter_no, A.matter_name
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="carActualNetWeightComparisonDetail" parameterType="java.util.HashMap"
|
|
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkdatacount.model.CarActualTareWeightComparison">
|
|
|
|
|
+ select A.car_no carNo,
|
|
|
|
|
+ A.matter_no matterNo,
|
|
|
|
|
+ A.matter_name matterName,
|
|
|
|
|
+ to_char(round(avg(A.net_weight) / 1000, 2), 'FM9999999999999999.00') avgNetWeight
|
|
|
|
|
+ from meter_work_car_actual A
|
|
|
|
|
+ where 1 = 1
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and A.net_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ and A.net_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ group by A.car_no, A.matter_no, A.matter_name
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
<select id="railwayActualGrossWeightComparison" parameterType="java.util.HashMap"
|
|
<select id="railwayActualGrossWeightComparison" parameterType="java.util.HashMap"
|
|
|
resultType="com.steerinfo.meterwork.meterworkdatacount.model.RailwayActualGrossWeightComparison">
|
|
resultType="com.steerinfo.meterwork.meterworkdatacount.model.RailwayActualGrossWeightComparison">
|
|
|
select A.actual_no actualNo,
|
|
select A.actual_no actualNo,
|
|
@@ -1051,4 +1042,275 @@
|
|
|
A.matter_No,
|
|
A.matter_No,
|
|
|
A.matter_Name
|
|
A.matter_Name
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="railwayNetWeightAndTheoryAmount" parameterType="java.util.HashMap"
|
|
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkdatacount.model.NetWeightAndTheoryAmount">
|
|
|
|
|
+ select A.railway_type_name railwayTypeName,
|
|
|
|
|
+ A.railway_no railwayNo,
|
|
|
|
|
+ A.prediction_no predictionNo,
|
|
|
|
|
+ A.matter_no matterNo,
|
|
|
|
|
+ A.matter_name matterName,
|
|
|
|
|
+ to_char(round(A.gross_Weight/1000, 2),'FM9999999999999999.00') grossWeight,
|
|
|
|
|
+ to_char(round(A.tare_weight/1000, 2),'FM9999999999999999.00') tareWeight,
|
|
|
|
|
+ to_char(round(A.net_weight/1000, 2),'FM9999999999999999.00') netWeight,
|
|
|
|
|
+ A.theory_amount theoryAmount,
|
|
|
|
|
+ to_char(round(A.net_weight/1000, 2),'FM9999999999999999.00')-A.theory_amount netWeightSub,
|
|
|
|
|
+ A.forwarding_unit_name forwardingUnitName,
|
|
|
|
|
+ A.receiving_uint_name receivingUintName,
|
|
|
|
|
+ A.gross_time grossTime,
|
|
|
|
|
+ A.base_spot1_name baseSpot1Name,
|
|
|
|
|
+ A.tare_time tareTime,
|
|
|
|
|
+ A.base_spot2_name baseSpot2Name,
|
|
|
|
|
+ A.net_time netTime,
|
|
|
|
|
+ A.net_spot3_name netSpot3Name
|
|
|
|
|
+ from meter_work_railway_actual A
|
|
|
|
|
+ where A.theory_amount is not null
|
|
|
|
|
+ and A.actual_no is not null
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and A.net_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and A.net_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="railwayNo != null and railwayNo != ''">
|
|
|
|
|
+ and A.railway_no like '%${railwayNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
|
|
|
|
|
+ and A.FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="forwardingUnitName != null and forwardingUnitName != ''">
|
|
|
|
|
+ and A.FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receivingUintNo != null and receivingUintNo != ''">
|
|
|
|
|
+ and A.RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receivingUintName != null and receivingUintName != ''">
|
|
|
|
|
+ and A.RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="matterNo != null and matterNo != ''">
|
|
|
|
|
+ and A.matter_no LIKE '%${matterNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="matterName != null and matterName != ''">
|
|
|
|
|
+ and A.matter_name LIKE '%${matterName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ order by A.net_time desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="longCarMeterWeightComparison" parameterType="java.util.HashMap"
|
|
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkdatacount.model.LongCarMeterWeightComparison">
|
|
|
|
|
+ select A.railway_type_name railwayTypeName,
|
|
|
|
|
+ A.railway_no railwayNo,
|
|
|
|
|
+ A.lc_no lcNo,
|
|
|
|
|
+ A.prediction_no predictionNo,
|
|
|
|
|
+ case when A.weight_type = '0' then '毛重'
|
|
|
|
|
+ when A.weight_type = '1' then '皮重'
|
|
|
|
|
+ when A.weight_type = '2' then '标皮'
|
|
|
|
|
+ else A.weight_type end weightType,
|
|
|
|
|
+ to_char(round(A.meter_weight / 1000, 2), 'FM9999999999999999.00') meterWeight,
|
|
|
|
|
+ 10 lc15,
|
|
|
|
|
+ to_char(round(A.meter_weight / 1000, 2), 'FM9999999999999999.00')-10 meterWeightSub,
|
|
|
|
|
+ A.matter_no matterNo,
|
|
|
|
|
+ A.matter_name matterName,
|
|
|
|
|
+ A.sender_remark senderRemark,
|
|
|
|
|
+ A.create_time createTime,
|
|
|
|
|
+ A.forwarding_unit_name forwardingUnitName,
|
|
|
|
|
+ A.receiving_uint_name receivingUintName,
|
|
|
|
|
+ A.base_spot_name baseSpotName,
|
|
|
|
|
+ A.conveyance_type conveyanceType,
|
|
|
|
|
+ A.create_man_name createManName,
|
|
|
|
|
+ case when A.meter_type_Name = 'SendToOutTms' then '外发'
|
|
|
|
|
+ when A.meter_type_Name = 'GM2GM' or A.meter_type_name = 'InnerTms' then '厂内转储'
|
|
|
|
|
+ when A.meter_type_Name = 'PO2GM' then '外进'
|
|
|
|
|
+ else A.meter_type_Name end meterTypeName,
|
|
|
|
|
+ case when A.value_flag = '0' then '作废'
|
|
|
|
|
+ when A.value_flag = '1' then '有效'
|
|
|
|
|
+ when A.value_flag = '2' then '结净'
|
|
|
|
|
+ else A.value_flag end valueFlag
|
|
|
|
|
+ from meter_work_railway_act_first A
|
|
|
|
|
+ where A.value_flag != '0'
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and A.create_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and A.create_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="railwayNo != null and railwayNo != ''">
|
|
|
|
|
+ and A.railway_no like '%${railwayNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
|
|
|
|
|
+ and A.FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="forwardingUnitName != null and forwardingUnitName != ''">
|
|
|
|
|
+ and A.FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receivingUintNo != null and receivingUintNo != ''">
|
|
|
|
|
+ and A.RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receivingUintName != null and receivingUintName != ''">
|
|
|
|
|
+ and A.RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="matterNo != null and matterNo != ''">
|
|
|
|
|
+ and A.matter_no LIKE '%${matterNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="matterName != null and matterName != ''">
|
|
|
|
|
+ and A.matter_name LIKE '%${matterName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ order by A.create_time desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="scaleOrCarComparison" parameterType="java.util.HashMap"
|
|
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkdatacount.model.ScaleOrCarComparison">
|
|
|
|
|
+ select typeTemp,
|
|
|
|
|
+ actualNo,
|
|
|
|
|
+ actualPredictionNo,
|
|
|
|
|
+ first1PredictionNo,
|
|
|
|
|
+ first2PredictionNo,
|
|
|
|
|
+ carNo,
|
|
|
|
|
+ countA,
|
|
|
|
|
+ netTime,
|
|
|
|
|
+ grossWeight,
|
|
|
|
|
+ tareWeight,
|
|
|
|
|
+ netWeight,
|
|
|
|
|
+ matterNo,
|
|
|
|
|
+ matterName,
|
|
|
|
|
+ forwardingUnitNo,
|
|
|
|
|
+ forwardingUnitName,
|
|
|
|
|
+ receivingUintNo,
|
|
|
|
|
+ receivingUintName,
|
|
|
|
|
+ grossTime,
|
|
|
|
|
+ baseSpot1Name,
|
|
|
|
|
+ tareTime,
|
|
|
|
|
+ baseSpot2Name,
|
|
|
|
|
+ netSpot3Name,
|
|
|
|
|
+ valueFlag,
|
|
|
|
|
+ uploadFlag
|
|
|
|
|
+ from
|
|
|
|
|
+ (
|
|
|
|
|
+ (select '一个委托对应多个净重数据' typeTemp,
|
|
|
|
|
+ B.actual_no actualNo,
|
|
|
|
|
+ B.prediction_no actualPredictionNo,
|
|
|
|
|
+ C.prediction_no first1PredictionNo,
|
|
|
|
|
+ D.prediction_no first2PredictionNo,
|
|
|
|
|
+ A.car_no carNo,
|
|
|
|
|
+ (select count(B.prediction_no)
|
|
|
|
|
+ from meter_work_car_actual B
|
|
|
|
|
+ where B.prediction_no is not null
|
|
|
|
|
+ and A.prediction_no = B.prediction_no) countA,
|
|
|
|
|
+ B.net_time netTime,
|
|
|
|
|
+ to_char(round(B.gross_Weight / 1000, 2), 'FM9999999999999999.00') grossWeight,
|
|
|
|
|
+ to_char(round(B.tare_weight / 1000, 2), 'FM9999999999999999.00') tareWeight,
|
|
|
|
|
+ to_char(round(B.net_weight / 1000, 2), 'FM9999999999999999.00') netWeight,
|
|
|
|
|
+ B.matter_no matterNo,
|
|
|
|
|
+ B.matter_name matterName,
|
|
|
|
|
+ B.forwarding_unit_no forwardingUnitNo,
|
|
|
|
|
+ B.forwarding_unit_name forwardingUnitName,
|
|
|
|
|
+ B.receiving_uint_no receivingUintNo,
|
|
|
|
|
+ B.receiving_uint_name receivingUintName,
|
|
|
|
|
+ B.gross_time grossTime,
|
|
|
|
|
+ B.base_spot1_name baseSpot1Name,
|
|
|
|
|
+ B.tare_time tareTime,
|
|
|
|
|
+ B.base_spot2_name baseSpot2Name,
|
|
|
|
|
+ B.net_spot3_name netSpot3Name,
|
|
|
|
|
+ case when B.value_flag = '0' then '作废'
|
|
|
|
|
+ when B.value_flag = '1' then '有效'
|
|
|
|
|
+ else B.value_flag end valueFlag,
|
|
|
|
|
+ case when B.upload_flag = '1' then '待上传'
|
|
|
|
|
+ when B.upload_flag = '2' then '已上传'
|
|
|
|
|
+ else B.upload_flag end uploadFlag
|
|
|
|
|
+ from pre_track_scale A
|
|
|
|
|
+ left join meter_work_car_actual B
|
|
|
|
|
+ on A.prediction_no = B.prediction_no
|
|
|
|
|
+ left join meter_work_car_actual_first C
|
|
|
|
|
+ on B.actual_first1_no = C.actual_first_no
|
|
|
|
|
+ left join meter_work_car_actual_first D
|
|
|
|
|
+ on B.actual_first2_no = D.actual_first_no
|
|
|
|
|
+ where (select count(B.prediction_no)
|
|
|
|
|
+ from meter_work_car_actual B
|
|
|
|
|
+ where B.prediction_no is not null
|
|
|
|
|
+ and A.prediction_no = B.prediction_no
|
|
|
|
|
+ and B.value_flag != '0') > 1
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and B.net_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and B.net_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
|
|
+ and B.car_no like '%${carNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
|
|
|
|
|
+ and B.FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="forwardingUnitName != null and forwardingUnitName != ''">
|
|
|
|
|
+ and B.FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receivingUintNo != null and receivingUintNo != ''">
|
|
|
|
|
+ and B.RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receivingUintName != null and receivingUintName != ''">
|
|
|
|
|
+ and B.RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="matterNo != null and matterNo != ''">
|
|
|
|
|
+ and B.matter_no LIKE '%${matterNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="matterName != null and matterName != ''">
|
|
|
|
|
+ and B.matter_name LIKE '%${matterName}%'
|
|
|
|
|
+ </if>)
|
|
|
|
|
+ union
|
|
|
|
|
+ (select '净重数据毛皮委托不同' typeTemp,
|
|
|
|
|
+ A.actual_no actualNo,
|
|
|
|
|
+ A.prediction_no actualPredictionNo,
|
|
|
|
|
+ B.prediction_no first1PredictionNo,
|
|
|
|
|
+ C.prediction_no first2PredictionNo,
|
|
|
|
|
+ A.car_no carNo,
|
|
|
|
|
+ (select count(B.prediction_no)
|
|
|
|
|
+ from meter_work_car_actual B
|
|
|
|
|
+ where B.prediction_no is not null
|
|
|
|
|
+ and A.prediction_no = B.prediction_no) countA,
|
|
|
|
|
+ A.net_time netTime,
|
|
|
|
|
+ to_char(round(A.gross_Weight / 1000, 2), 'FM9999999999999999.00') grossWeight,
|
|
|
|
|
+ to_char(round(A.tare_weight / 1000, 2), 'FM9999999999999999.00') tareWeight,
|
|
|
|
|
+ to_char(round(A.net_weight / 1000, 2), 'FM9999999999999999.00') netWeight,
|
|
|
|
|
+ A.matter_no matterNo,
|
|
|
|
|
+ A.matter_name matterName,
|
|
|
|
|
+ A.forwarding_unit_no forwardingUnitNo,
|
|
|
|
|
+ A.forwarding_unit_name forwardingUnitName,
|
|
|
|
|
+ A.receiving_uint_no receivingUintNo,
|
|
|
|
|
+ A.receiving_uint_name receivingUintName,
|
|
|
|
|
+ A.gross_time grossTime,
|
|
|
|
|
+ A.base_spot1_name baseSpot1Name,
|
|
|
|
|
+ A.tare_time tareTime,
|
|
|
|
|
+ A.base_spot2_name baseSpot2Name,
|
|
|
|
|
+ A.net_spot3_name netSpot3Name,
|
|
|
|
|
+ case when A.value_flag = '0' then '作废'
|
|
|
|
|
+ when A.value_flag = '1' then '有效'
|
|
|
|
|
+ else A.value_flag end valueFlag,
|
|
|
|
|
+ case when A.upload_flag = '1' then '待上传'
|
|
|
|
|
+ when A.upload_flag = '2' then '已上传'
|
|
|
|
|
+ else A.upload_flag end uploadFlag
|
|
|
|
|
+ from meter_work_car_actual A
|
|
|
|
|
+ left join meter_work_car_actual_first B
|
|
|
|
|
+ on A.actual_first1_no = B.actual_first_no
|
|
|
|
|
+ left join meter_work_car_actual_first C
|
|
|
|
|
+ on A.actual_first2_no = C.actual_first_no
|
|
|
|
|
+ where A.value_flag != '0'
|
|
|
|
|
+ and B.prediction_no != C.prediction_no
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and A.net_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and A.net_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
|
|
+ and A.car_no like '%${carNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
|
|
|
|
|
+ and A.FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="forwardingUnitName != null and forwardingUnitName != ''">
|
|
|
|
|
+ and A.FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receivingUintNo != null and receivingUintNo != ''">
|
|
|
|
|
+ and A.RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="receivingUintName != null and receivingUintName != ''">
|
|
|
|
|
+ and A.RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="matterNo != null and matterNo != ''">
|
|
|
|
|
+ and A.matter_no LIKE '%${matterNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="matterName != null and matterName != ''">
|
|
|
|
|
+ and A.matter_name LIKE '%${matterName}%'
|
|
|
|
|
+ </if>)
|
|
|
|
|
+ )
|
|
|
|
|
+ order by netTime desc
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|