|
@@ -729,13 +729,6 @@
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
- <sql id="whereLikeTSDG">
|
|
|
|
|
- <where>
|
|
|
|
|
- <if test="railwayNo != null and railwayNo != ''">
|
|
|
|
|
- and RAILWAY_NO LIKE '%${railwayNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- </where>
|
|
|
|
|
- </sql>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
delete from METER_WORK_RAILWAY_ACT_FIRST
|
|
delete from METER_WORK_RAILWAY_ACT_FIRST
|
|
|
where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
|
|
where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
|
|
@@ -3501,13 +3494,73 @@
|
|
|
</where>
|
|
</where>
|
|
|
order by create_time desc
|
|
order by create_time desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
|
|
+ <!--001019003:静态铁水衡、001019005:吊钩秤 -->
|
|
|
|
|
+ <sql id="whereLikeTSDG">
|
|
|
|
|
+ <where> 1 = 1
|
|
|
|
|
+ <if test="actualFirstNo != null and actualFirstNo != ''">
|
|
|
|
|
+ and ACTUAL_FIRST_NO LIKE '%${actualFirstNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="railwayNo != null and railwayNo != ''">
|
|
|
|
|
+ and RAILWAY_NO LIKE '%${railwayNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="predictionNo != null and predictionNo != ''">
|
|
|
|
|
+ and PREDICTION_NO like '%${predictionNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="baseSpotNo != null and baseSpotNo != ''">
|
|
|
|
|
+ and BASE_SPOT_NO like '%${baseSpotNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="baseSpotName != null and baseSpotName != ''">
|
|
|
|
|
+ and BASE_SPOT_NAME like '%${baseSpotName}%'
|
|
|
|
|
+ </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="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="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="senderRemark != null and senderRemark != ''">
|
|
|
|
|
+ and SENDER_REMARK = #{senderRemark}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="isPreSacale != null and isPreSacale != ''">
|
|
|
|
|
+ and IS_PRE_SACALE = #{isPreSacale}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="valueFlag != null and valueFlag != ''">
|
|
|
|
|
+ and value_flag = #{valueFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="startTime != null and startTime != null and endTime != '' and endTime != ''">
|
|
|
|
|
+ and CREATE_TIME >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and CREATE_TIME <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ and railway_type_no in ('001019003', '001019005')
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </sql>
|
|
|
<select id="likeByDescTSDG" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
<select id="likeByDescTSDG" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
<include refid="select"/>
|
|
<include refid="select"/>
|
|
|
<include refid="whereLikeTSDG"/>
|
|
<include refid="whereLikeTSDG"/>
|
|
|
- and matter_no in
|
|
|
|
|
- <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
|
|
- #{id}
|
|
|
|
|
- </foreach>
|
|
|
|
|
and value_flag in ('0', '1')
|
|
and value_flag in ('0', '1')
|
|
|
order by create_time desc
|
|
order by create_time desc
|
|
|
</select>
|
|
</select>
|
|
@@ -3822,4 +3875,20 @@
|
|
|
<select id="getFirstLcNo" parameterType="java.lang.String" resultType="String">
|
|
<select id="getFirstLcNo" parameterType="java.lang.String" resultType="String">
|
|
|
select distinct lc_no from METER_WORK_RAILWAY_ACT_FIRST A where actual_first_no = #{actualFirstNo}
|
|
select distinct lc_no from METER_WORK_RAILWAY_ACT_FIRST A where actual_first_no = #{actualFirstNo}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="distinctHookRailwayNo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
+ SELECT distinct railway_no, create_time
|
|
|
|
|
+ from METER_WORK_RAILWAY_ACT_FIRST
|
|
|
|
|
+ <include refid="whereLikeTSDG" />
|
|
|
|
|
+ <if test="valueFlag != null and valueFlag != ''">
|
|
|
|
|
+ and value_flag = #{valueFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ order by create_time desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="hookFirstByDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
+ <include refid="select"/>
|
|
|
|
|
+ <include refid="whereLikeTSDG" />
|
|
|
|
|
+ order by create_time desc
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|