|
|
@@ -1594,4 +1594,346 @@ where FS_ISVALID = '1' and FS_DELETEDTAG = 'N' and (FS_BALANCETYPE='静态' or F
|
|
|
and matter_name LIKE '%${matterName}%'
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getAllNew" parameterType="java.util.HashMap" resultType="HashMap">
|
|
|
+ select car_type_no,
|
|
|
+ remark,
|
|
|
+ car_no,
|
|
|
+ matter_no,
|
|
|
+ matter_name,
|
|
|
+ sender_remark,
|
|
|
+ prediction_no,
|
|
|
+ gross_weight,
|
|
|
+ tare_weight,
|
|
|
+ net_weight,
|
|
|
+ forwarding_unit_name,
|
|
|
+ receiving_uint_name,
|
|
|
+ net_time,
|
|
|
+ net_spot3_no,
|
|
|
+ net_spot3_name,
|
|
|
+ gross_time,
|
|
|
+ base_spot1_name,
|
|
|
+ tare_time,
|
|
|
+ base_spot2_name
|
|
|
+ from
|
|
|
+ (
|
|
|
+ select '001002001' car_type_no,
|
|
|
+ '汽车衡' car_type_name,
|
|
|
+ '新系统' remark,
|
|
|
+ car_no car_no,
|
|
|
+ matter_no,
|
|
|
+ matter_name,
|
|
|
+ sender_remark,
|
|
|
+ prediction_no,
|
|
|
+ gross_weight,
|
|
|
+ tare_weight,
|
|
|
+ net_weight,
|
|
|
+ forwarding_unit_no,
|
|
|
+ forwarding_unit_name,
|
|
|
+ receiving_uint_no,
|
|
|
+ receiving_uint_name,
|
|
|
+ net_time,
|
|
|
+ net_spot3_no,
|
|
|
+ net_spot3_name,
|
|
|
+ gross_time,
|
|
|
+ base_spot1_no,
|
|
|
+ base_spot1_name,
|
|
|
+ tare_time,
|
|
|
+ base_spot2_no,
|
|
|
+ base_spot2_name,
|
|
|
+ value_flag,
|
|
|
+ upload_flag
|
|
|
+ from meter_work_car_actual
|
|
|
+ union
|
|
|
+ select railway_type_no car_type_no,
|
|
|
+ railway_type_name car_type_name,
|
|
|
+ '新系统' remark,
|
|
|
+ railway_no car_no,
|
|
|
+ matter_no,
|
|
|
+ matter_name,
|
|
|
+ sender_remark,
|
|
|
+ prediction_no,
|
|
|
+ gross_weight,
|
|
|
+ tare_weight,
|
|
|
+ net_weight,
|
|
|
+ forwarding_unit_no,
|
|
|
+ forwarding_unit_name,
|
|
|
+ receiving_uint_no,
|
|
|
+ receiving_uint_name,
|
|
|
+ net_time,
|
|
|
+ net_spot3_no,
|
|
|
+ net_spot3_name,
|
|
|
+ gross_time,
|
|
|
+ base_spot1_no,
|
|
|
+ base_spot1_name,
|
|
|
+ tare_time,
|
|
|
+ base_spot2_no,
|
|
|
+ base_spot2_name,
|
|
|
+ value_flag,
|
|
|
+ upload_flag
|
|
|
+ from meter_work_railway_actual
|
|
|
+ )
|
|
|
+ where VALUE_FLAG in ('1', '2')
|
|
|
+ and UPLOAD_FLAG='2'
|
|
|
+ <if test="carTypeNo != null and carTypeNo">
|
|
|
+ and car_type_no like '%${carTypeNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="carTypeName != null and carTypeName">
|
|
|
+ and car_type_Name like '%${carTypeName}%'
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and '新系统' LIKE '%${remark}%'
|
|
|
+ </if>
|
|
|
+ <if test="predictionNo != null and predictionNo != ''">
|
|
|
+ and prediction_no LIKE '%${predictionNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="senderRemark != null and senderRemark != ''">
|
|
|
+ and sender_remark LIKE '%${senderRemark}%'
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' 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="carNo != null and carNo != ''">
|
|
|
+ and car_no like '%${carNo}%'
|
|
|
+ </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="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="matterNo != null and matterNo != ''">
|
|
|
+ and matter_no LIKE '%${matterNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="matterName != null and matterName != ''">
|
|
|
+ and matter_name LIKE '%${matterName}%'
|
|
|
+ </if>
|
|
|
+ <if test="minWgt != null and minWgt != ''">
|
|
|
+ and NET_WEIGHT/1000 >= '${minWgt}'
|
|
|
+ </if>
|
|
|
+ <if test="maxWgt != null and maxWgt != ''">
|
|
|
+ and NET_WEIGHT/1000 <= '${maxWgt}'
|
|
|
+ </if>
|
|
|
+ order by net_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getAllOld" parameterType="java.util.HashMap" resultType="HashMap">
|
|
|
+ select fs_conveyancegroup car_type_no,
|
|
|
+ '老系统' remark,
|
|
|
+ replace(ch, '-', '') car_no,
|
|
|
+ wlbm matter_no,
|
|
|
+ wlmc matter_name,
|
|
|
+ hy sender_remark,
|
|
|
+ wt prediction_No,
|
|
|
+ mz*1000 gross_weight,
|
|
|
+ pz*1000 tare_weight,
|
|
|
+ jz*1000 net_weight,
|
|
|
+ fhdw forwarding_unit_name,
|
|
|
+ shdw receiving_uint_name,
|
|
|
+ jzsj net_time,
|
|
|
+ zdbh net_spot3_no,
|
|
|
+ jzzd net_spot3_name,
|
|
|
+ mzsj gross_time,
|
|
|
+ mzzd base_spot1_name,
|
|
|
+ pzsj tare_time,
|
|
|
+ pzzd base_spot2_name
|
|
|
+ from jgweight.VIEW_DATAQUERY
|
|
|
+ where 1 = 1
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and '老系统' LIKE '%${remark}%'
|
|
|
+ </if>
|
|
|
+ <if test="carTypeNo != null and carTypeNo != ''">
|
|
|
+ and fs_conveyancegroup LIKE '%${carTypeNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="predictionNo != null and predictionNo != ''">
|
|
|
+ and wt LIKE '%${predictionNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="netSpot3No != null and netSpot3No != ''">
|
|
|
+ and zdbh like '%${netSpot3No}%'
|
|
|
+ </if>
|
|
|
+ <if test="netSpot3Name != null and netSpot3Name != ''">
|
|
|
+ and jzzd like '%${netSpot3Name}%'
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
+ and jzsj >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and jzsj <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ </if>
|
|
|
+ <if test="forwardingUnitName != null and forwardingUnitName != ''">
|
|
|
+ and fhdw LIKE '%${forwardingUnitName}%'
|
|
|
+ </if>
|
|
|
+ <if test="receivingUintName != null and receivingUintName != ''">
|
|
|
+ and shdw LIKE '%${receivingUintName}%'
|
|
|
+ </if>
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
+ and replace(ch, '-', '') like '%${carNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="matterNo != null and matterNo != ''">
|
|
|
+ and wlbm LIKE '%${matterNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="matterName != null and matterName != ''">
|
|
|
+ and wlmc LIKE '%${matterName}%'
|
|
|
+ </if>
|
|
|
+ <if test="senderRemark != null and senderRemark != ''">
|
|
|
+ and hy LIKE '%${senderRemark}%'
|
|
|
+ </if>
|
|
|
+ <if test="minWgt != null and minWgt != ''">
|
|
|
+ and jz >= '${minWgt}'
|
|
|
+ </if>
|
|
|
+ <if test="maxWgt != null and maxWgt != ''">
|
|
|
+ and jz <= '${maxWgt}'
|
|
|
+ </if>
|
|
|
+ order by jzsj desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getCountAllNew" parameterType="java.util.HashMap" resultType="HashMap">
|
|
|
+ select * from
|
|
|
+ (
|
|
|
+ select '新系统' remark,
|
|
|
+ matter_no,
|
|
|
+ matter_name,
|
|
|
+ sender_remark,
|
|
|
+ count(1) countSum,
|
|
|
+ sum(gross_weight) gross_weight,
|
|
|
+ sum(tare_weight) tare_weight,
|
|
|
+ sum(net_weight) net_weight,
|
|
|
+ forwarding_unit_name,
|
|
|
+ receiving_uint_name
|
|
|
+ from meter_work_car_actual
|
|
|
+ where VALUE_FLAG in ('1', '2')
|
|
|
+ and UPLOAD_FLAG='2'
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' 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="forwardingUnitName != null and forwardingUnitName != ''">
|
|
|
+ and forwarding_unit_name LIKE '%${forwardingUnitName}%'
|
|
|
+ </if>
|
|
|
+ <if test="receivingUintName != null and receivingUintName != ''">
|
|
|
+ and receiving_uint_name LIKE '%${receivingUintName}%'
|
|
|
+ </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="senderRemark != null and senderRemark != ''">
|
|
|
+ and sender_remark LIKE '%${senderRemark}%'
|
|
|
+ </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="carNo != null and carNo != ''">
|
|
|
+ and car_no like '%${carNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and '新系统' like '%${remark}%'
|
|
|
+ </if>
|
|
|
+ group by matter_no,matter_name,sender_remark,forwarding_unit_name,receiving_uint_name
|
|
|
+ union
|
|
|
+ select '新系统' remark,
|
|
|
+ matter_no,
|
|
|
+ matter_name,
|
|
|
+ sender_remark,
|
|
|
+ count(1) countSum,
|
|
|
+ sum(gross_weight) grossWeight,
|
|
|
+ sum(tare_weight) tareWeight,
|
|
|
+ sum(net_weight) netWeight,
|
|
|
+ forwarding_unit_name,
|
|
|
+ receiving_uint_name
|
|
|
+ from meter_work_railway_actual
|
|
|
+ where VALUE_FLAG in ('1', '2')
|
|
|
+ and UPLOAD_FLAG='2'
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' 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="forwardingUnitName != null and forwardingUnitName != ''">
|
|
|
+ and forwarding_unit_name LIKE '%${forwardingUnitName}%'
|
|
|
+ </if>
|
|
|
+ <if test="receivingUintName != null and receivingUintName != ''">
|
|
|
+ and receiving_uint_name LIKE '%${receivingUintName}%'
|
|
|
+ </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="senderRemark != null and senderRemark != ''">
|
|
|
+ and sender_remark LIKE '%${senderRemark}%'
|
|
|
+ </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="carNo != null and carNo != ''">
|
|
|
+ and RAILWAY_NO like '%${carNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and '新系统' like '%${remark}%'
|
|
|
+ </if>
|
|
|
+ group by matter_no,matter_name,sender_remark, forwarding_unit_name, receiving_uint_name
|
|
|
+ )
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getCountAllOld" parameterType="java.util.HashMap" resultType="HashMap">
|
|
|
+ select '老系统' remark,
|
|
|
+ wlbm matter_no,
|
|
|
+ wlmc matter_name,
|
|
|
+ hy sender_remark,
|
|
|
+ count(1) countSum,
|
|
|
+ sum(mz*1000) gross_weight,
|
|
|
+ sum(pz*1000) tare_weight,
|
|
|
+ sum(jz*1000) net_weight,
|
|
|
+ fhdw forwarding_unit_name,
|
|
|
+ shdw receiving_uint_name
|
|
|
+ from jgweight.VIEW_DATAQUERY
|
|
|
+ where 1=1
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
+ and jzsj >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and jzsj <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ </if>
|
|
|
+ <if test="forwardingUnitName != null and forwardingUnitName != ''">
|
|
|
+ and fhdw LIKE '%${forwardingUnitName}%'
|
|
|
+ </if>
|
|
|
+ <if test="receivingUintName != null and receivingUintName != ''">
|
|
|
+ and shdw LIKE '%${receivingUintName}%'
|
|
|
+ </if>
|
|
|
+ <if test="matterNo != null and matterNo != ''">
|
|
|
+ and wlbm LIKE '%${matterNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="matterName != null and matterName != ''">
|
|
|
+ and wlmc LIKE '%${matterName}%'
|
|
|
+ </if>
|
|
|
+ <if test="senderRemark != null and senderRemark != ''">
|
|
|
+ and hy LIKE '%${senderRemark}%'
|
|
|
+ </if>
|
|
|
+ <if test="netSpot3No != null and netSpot3No != ''">
|
|
|
+ and zdbh like '%${netSpot3No}%'
|
|
|
+ </if>
|
|
|
+ <if test="netSpot3Name != null and netSpot3Name != ''">
|
|
|
+ and jzzd like '%${netSpot3Name}%'
|
|
|
+ </if>
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
+ and ch like '%${carNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and '老系统' like '%${remark}%'
|
|
|
+ </if>
|
|
|
+ group by wlbm, wlmc, hy, fhdw, shdw
|
|
|
+ </select>
|
|
|
</mapper>
|