|
|
@@ -3764,12 +3764,12 @@
|
|
|
</if>
|
|
|
<if test="grossLcNo != null and grossLcNo != ''">
|
|
|
and actual_first1_no in (
|
|
|
- select B.actual_first_no from meter_work_railway_act_first B where B.lc_no = #{grossLcNo}
|
|
|
+ select B.actual_first_no from meter_work_railway_act_first_bak B where B.lc_no = #{grossLcNo}
|
|
|
)
|
|
|
</if>
|
|
|
<if test="tareLcNo != null and tareLcNo != ''">
|
|
|
and actual_first2_no in (
|
|
|
- select C.actual_first_no from meter_work_railway_act_first C where C.lc_no = #{tareLcNo}
|
|
|
+ select C.actual_first_no from meter_work_railway_act_first_bak C where C.lc_no = #{tareLcNo}
|
|
|
)
|
|
|
</if>
|
|
|
<!--and RAILWAY_NO like '%${railwayNo}%'-->
|
|
|
@@ -3806,6 +3806,9 @@
|
|
|
<if test="valueFlag != null and valueFlag != ''">
|
|
|
and VALUE_FLAG = #{valueFlag}
|
|
|
</if>
|
|
|
+ <if test="isPreSacale != null and isPreSacale">
|
|
|
+ and is_pre_sacale = #{isPreSacale}
|
|
|
+ </if>
|
|
|
<if test="railwayNo != null and railwayNo != ''">
|
|
|
and railway_no like '%${railwayNo}%'
|
|
|
</if>
|
|
|
@@ -3926,6 +3929,133 @@
|
|
|
order by net_time desc
|
|
|
</select>
|
|
|
|
|
|
+ <!-- 查询:根据传入时间和车号,查询给定时间段去重车号 -->
|
|
|
+ <select id="likeByDescTemp" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
+ <include refid="select" />
|
|
|
+ <where>
|
|
|
+ 1 = 1
|
|
|
+ <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
|
|
+ and net_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and net_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ </if>
|
|
|
+ <if test="actualNo != null and actualNo != ''">
|
|
|
+ and ACTUAL_NO LIKE '%${actualNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="predictionNo != null and predictionNo != ''">
|
|
|
+ and PREDICTION_NO LIKE '%${predictionNo}%'
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="railwayNo != null and railwayNo != ''">
|
|
|
+ and RAILWAY_NO LIKE '%${railwayNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="railwayCarriageNo != null and railwayCarriageNo != ''">
|
|
|
+ and RAILWAY_CARRIAGE_NO LIKE '%${railwayCarriageNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="matterNo != null and matterNo != ''">
|
|
|
+ and MATTER_NO LIKE '%${matterNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="matterName != null and matterName != ''">
|
|
|
+ and MATTER_NAME LIKE '%${matterName}%'
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
|
|
|
+ and FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="forwardingUnitName != null and forwardingUnitName != ''">
|
|
|
+ and FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
|
|
|
+ </if>
|
|
|
+ <if test="receivingUintNo != null and receivingUintNo != ''">
|
|
|
+ and RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="receivingUintName != null and receivingUintName != ''">
|
|
|
+ and RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
|
|
|
+ </if>
|
|
|
+ <if test="materialNo != null and materialNo != ''">
|
|
|
+ and MATERIAL_NO LIKE '%${materialNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="materialName != null and materialName != ''">
|
|
|
+ and MATERIAL_NAME LIKE '%${materialName}%'
|
|
|
+ </if>
|
|
|
+ <if test="meterTypeNo != null and meterTypeNo != ''">
|
|
|
+ and METER_TYPE_NO LIKE '%${meterTypeNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="meterTypeName != null and meterTypeName != ''">
|
|
|
+ and METER_TYPE_NAME LIKE '%${meterTypeName}%'
|
|
|
+ </if>
|
|
|
+ <if test="netManNo != null and netManNo != ''">
|
|
|
+ and NET_MAN_NO LIKE '%${netManNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="netManName != null and netManName != ''">
|
|
|
+ and NET_MAN_NAME LIKE '%${netManName}%'
|
|
|
+ </if>
|
|
|
+ <if test="netTime != null">
|
|
|
+ and TO_CHAR(NET_TIME,'yyyy-MM-dd') = #{netTime}
|
|
|
+ </if>
|
|
|
+ <if test="netSpot3No != null and netSpot3No != ''">
|
|
|
+ and NET_SPOT3_NO LIKE '%${netSpot3No}%'
|
|
|
+ </if>
|
|
|
+ <if test="netSpot3Name != null and netSpot3Name != ''">
|
|
|
+ and NET_SPOT3_NAME LIKE '%${netSpot3Name}%'
|
|
|
+ </if>
|
|
|
+ <if test="netMode != null and netMode != ''">
|
|
|
+ and NET_MODE LIKE '%${netMode}%'
|
|
|
+ </if>
|
|
|
+ <if test="valueFlag != null and valueFlag != ''">
|
|
|
+ and VALUE_FLAG LIKE '%${valueFlag}%'
|
|
|
+ </if>
|
|
|
+ <if test="uploadFlag != null and uploadFlag != ''">
|
|
|
+ and UPLOAD_FLAG LIKE '%${uploadFlag}%'
|
|
|
+ </if>
|
|
|
+ <if test="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and RAILWAY_TYPE_NO LIKE '%${railwayTypeNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="railwayTypeName != null and railwayTypeName != ''">
|
|
|
+ and RAILWAY_TYPE_NAME LIKE '%${railwayTypeName}%'
|
|
|
+ </if>
|
|
|
+ <if test="senderType != null and senderType != ''">
|
|
|
+ and SENDER_TYPE LIKE '%${senderType}%'
|
|
|
+ </if>
|
|
|
+ <if test="senderRemark != null and senderRemark != ''">
|
|
|
+ and SENDER_REMARK LIKE '%${senderRemark}%'
|
|
|
+ </if>
|
|
|
+ <if test="receiverRemark != null and receiverRemark != ''">
|
|
|
+ and RECEIVER_REMARK LIKE '%${receiverRemark}%'
|
|
|
+ </if>
|
|
|
+ <if test="dataSource != null and dataSource != ''">
|
|
|
+ and DATA_SOURCE LIKE '%${dataSource}%'
|
|
|
+ </if>
|
|
|
+ <if test="isPreSacale != null and isPreSacale != ''">
|
|
|
+ and IS_PRE_SACALE LIKE '%${isPreSacale}%'
|
|
|
+ </if>
|
|
|
+ <if test="lcNo != null and lcNo != ''">
|
|
|
+ and LC_NO LIKE '%${lcNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="baseSpotNo != null and baseSpotNo != ''">
|
|
|
+ and NET_SPOT3_NO LIKE '%${baseSpotNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="baseSpotName != null and baseSpotName != ''">
|
|
|
+ and NET_SPOT3_NAME LIKE '%${baseSpotName}%'
|
|
|
+ </if>
|
|
|
+ <if test="predictionType != null and predictionType != ''">
|
|
|
+ and PREDICTION_TYPE LIKE '%${predictionType}%'
|
|
|
+ </if>
|
|
|
+ <if test="flag != null and flag !=''">
|
|
|
+ and lc_no is null
|
|
|
+ </if>
|
|
|
+ <if test="grossLcNo != null and grossLcNo != ''">
|
|
|
+ and actual_first1_no in (
|
|
|
+ select B.actual_first_no from meter_work_railway_act_first B where B.lc_no = #{grossLcNo}
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="tareLcNo != null and tareLcNo != ''">
|
|
|
+ and actual_first2_no in (
|
|
|
+ select C.actual_first_no from meter_work_railway_act_first C where C.lc_no = #{tareLcNo}
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ and value_flag != '0'
|
|
|
+ order by net_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="likeByDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
<include refid="select" />
|
|
|
<where>
|