|
|
@@ -1493,4 +1493,67 @@
|
|
|
and A.create_man_name is not null
|
|
|
order by A.create_man_name
|
|
|
</select>
|
|
|
+ <select id="dynamicRailwayRemoteComparison"
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkdatacount.model.StaticRailwayRemoteComparison">
|
|
|
+ select A.actual_no actualNo,
|
|
|
+ A.railway_no railwayNo,
|
|
|
+ A.lc_no lcNo,
|
|
|
+ A.prediction_no predictionNo,
|
|
|
+ A.matter_no matterNo,
|
|
|
+ A.matter_name matterName,
|
|
|
+ A.forwarding_unit_name forwardingUnitName,
|
|
|
+ A.receiving_uint_name receivingUintName,
|
|
|
+ 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,
|
|
|
+ to_char(round(to_number(B.theory_amount), 2),'FM9999999999999999.00') theoryAmount,
|
|
|
+ case when A.meter_type_no = 'SendToOutTms' then '外发'
|
|
|
+ when A.meter_type_no = 'GM2GM' then '厂内转储'
|
|
|
+ when A.meter_type_no = 'PO2GM' then '外进'
|
|
|
+ else null end meterTypeNo,
|
|
|
+ case when A.meter_type_Name = 'SendToOutTms' then '外发'
|
|
|
+ when A.meter_type_Name = 'GM2GM' then '厂内转储'
|
|
|
+ when A.meter_type_Name = 'PO2GM' then '外进'
|
|
|
+ else null end meterTypeName,
|
|
|
+ A.sender_remark senderRemark,
|
|
|
+ A.gross_time grossTime,
|
|
|
+ A.base_spot1_name baseSpot1Name,
|
|
|
+ case when A.gross_mode = '1' then '远程计量'
|
|
|
+ when A.gross_mode = '2' then '智能计量'
|
|
|
+ when A.gross_mode = '3' then '手工计量'
|
|
|
+ else null end grossMode,
|
|
|
+ A.gross_man_name grossManName,
|
|
|
+ A.tare_time tareTime,
|
|
|
+ A.base_spot2_name baseSpot2Name,
|
|
|
+ case when A.tare_mode = '1' then '远程计量'
|
|
|
+ when A.tare_mode = '2' then '智能计量'
|
|
|
+ when A.tare_mode = '3' then '手工计量'
|
|
|
+ else null end tareMode,
|
|
|
+ A.tare_man_name tareManName,
|
|
|
+ A.net_time netTime,
|
|
|
+ A.net_spot3_name netSpot3Name,
|
|
|
+ A.net_man_name netManName,
|
|
|
+ case when A.value_flag = '0' then '作废'
|
|
|
+ when A.value_flag = '1' then '有效-未发布'
|
|
|
+ when A.value_flag = '2' then '有效-已发布'
|
|
|
+ else null end valueFlag,
|
|
|
+ case when A.upload_flag = '1' then '未同步'
|
|
|
+ when A.upload_flag = '2' then '已同步'
|
|
|
+ else null end uploadFlag,
|
|
|
+ A.check_man_no checkManNo,
|
|
|
+ A.check_man_name checkManName,
|
|
|
+ A.check_time checkTime,
|
|
|
+ A.memo memo
|
|
|
+ from meter_work_railway_actual A
|
|
|
+ left join pre_railway_scale B on A.prediction_no = B.prediction_no
|
|
|
+ where A.railway_type_no in ('001019002')
|
|
|
+ and A.base_spot1_no != base_spot2_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="railwayNo != null and railwayNo != ''">
|
|
|
+ and A.railway_no like '%${railwayNo}%'
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|