|
|
@@ -117,6 +117,7 @@
|
|
|
<result column="CONTRACT_ID" jdbcType="VARCHAR" property="contractId" />
|
|
|
<result column="IS_BOUND_LIST_DOWNLOADED" jdbcType="VARCHAR" property="isBoundListDownloaded" />
|
|
|
<result column="DOCUMENT_ID" jdbcType="VARCHAR" property="documentId" />
|
|
|
+ <result column="CHECK_FLAG" jdbcType="VARCHAR" property="checkFlag" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
ACTUAL_NO, PREDICTION_NO, NOTICE_NO, CAR_NO, TRAILER_NO, MATTER_NO, MATTER_NAME,
|
|
|
@@ -138,7 +139,7 @@
|
|
|
THEORY_AMOUNT, MEASURE_BATCH, MEASURE_BATCH_COUNT, SENDER_TYPE, SENDER_REMARK, RECEIVER_TYPE,
|
|
|
RECEIVER_REMARK, AMOUNT_UNIT, MEASURE_OBJECT_TYPE, MEASURE_TASK_NUM, BILL_TYPE, CREATE_MAN_NAME,
|
|
|
CREATE_TIME, DATA_SOURCE, IS_PRE_SCALE, BOUND_LIST_URL, IS_BOUND_LIST, CONTRACT_ID,
|
|
|
- IS_BOUND_LIST_DOWNLOADED, DOCUMENT_ID
|
|
|
+ IS_BOUND_LIST_DOWNLOADED, DOCUMENT_ID, CHECK_FLAG
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
t.ACTUAL_NO, t.PREDICTION_NO, t.NOTICE_NO, t.CAR_NO, t.TRAILER_NO, t.MATTER_NO, t.MATTER_NAME,
|
|
|
@@ -162,7 +163,7 @@
|
|
|
t.MEASURE_BATCH_COUNT, t.SENDER_TYPE, t.SENDER_REMARK, t.RECEIVER_TYPE, t.RECEIVER_REMARK,
|
|
|
t.AMOUNT_UNIT, t.MEASURE_OBJECT_TYPE, t.MEASURE_TASK_NUM, t.BILL_TYPE, t.CREATE_MAN_NAME,
|
|
|
t.CREATE_TIME, t.DATA_SOURCE, t.IS_PRE_SCALE, t.BOUND_LIST_URL, t.IS_BOUND_LIST,
|
|
|
- t.CONTRACT_ID, t.IS_BOUND_LIST_DOWNLOADED, t.DOCUMENT_ID
|
|
|
+ t.CONTRACT_ID, t.IS_BOUND_LIST_DOWNLOADED, t.DOCUMENT_ID, t.CHECK_FLAG
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM METER_WORK_CAR_ACTUAL
|
|
|
@@ -517,6 +518,9 @@
|
|
|
<if test="documentId != null and documentId != ''">
|
|
|
and DOCUMENT_ID = #{documentId}
|
|
|
</if>
|
|
|
+ <if test="checkFlag != null and checkFlag != ''">
|
|
|
+ and CHECK_FLAG = #{checkFlag}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
|
@@ -866,6 +870,9 @@
|
|
|
<if test="documentId != null and documentId != ''">
|
|
|
and DOCUMENT_ID LIKE '%${documentId}%'
|
|
|
</if>
|
|
|
+ <if test="checkFlag != null and checkFlag != ''">
|
|
|
+ and CHECK_FLAG LIKE '%${checkFlag}%'
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
@@ -1217,6 +1224,9 @@
|
|
|
<if test="documentId != null and documentId != ''">
|
|
|
or DOCUMENT_ID = #{documentId}
|
|
|
</if>
|
|
|
+ <if test="checkFlag != null and checkFlag != ''">
|
|
|
+ or CHECK_FLAG = #{checkFlag}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual">
|
|
|
insert into METER_WORK_CAR_ACTUAL (ACTUAL_NO, PREDICTION_NO, NOTICE_NO,
|
|
|
@@ -1257,7 +1267,8 @@
|
|
|
MEASURE_TASK_NUM, BILL_TYPE, CREATE_MAN_NAME,
|
|
|
CREATE_TIME, DATA_SOURCE, IS_PRE_SCALE,
|
|
|
BOUND_LIST_URL, IS_BOUND_LIST, CONTRACT_ID,
|
|
|
- IS_BOUND_LIST_DOWNLOADED, DOCUMENT_ID)
|
|
|
+ IS_BOUND_LIST_DOWNLOADED, DOCUMENT_ID, CHECK_FLAG
|
|
|
+ )
|
|
|
values (#{actualNo,jdbcType=VARCHAR}, #{predictionNo,jdbcType=VARCHAR}, #{noticeNo,jdbcType=VARCHAR},
|
|
|
#{carNo,jdbcType=VARCHAR}, #{trailerNo,jdbcType=VARCHAR}, #{matterNo,jdbcType=VARCHAR},
|
|
|
#{matterName,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR}, #{batchNo,jdbcType=VARCHAR},
|
|
|
@@ -1296,7 +1307,8 @@
|
|
|
#{measureTaskNum,jdbcType=VARCHAR}, #{billType,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR},
|
|
|
#{createTime,jdbcType=TIMESTAMP}, #{dataSource,jdbcType=VARCHAR}, #{isPreScale,jdbcType=VARCHAR},
|
|
|
#{boundListUrl,jdbcType=VARCHAR}, #{isBoundList,jdbcType=VARCHAR}, #{contractId,jdbcType=VARCHAR},
|
|
|
- #{isBoundListDownloaded,jdbcType=VARCHAR}, #{documentId,jdbcType=VARCHAR})
|
|
|
+ #{isBoundListDownloaded,jdbcType=VARCHAR}, #{documentId,jdbcType=VARCHAR}, #{checkFlag,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual">
|
|
|
insert into METER_WORK_CAR_ACTUAL
|
|
|
@@ -1646,6 +1658,9 @@
|
|
|
<if test="documentId != null">
|
|
|
DOCUMENT_ID,
|
|
|
</if>
|
|
|
+ <if test="checkFlag != null">
|
|
|
+ CHECK_FLAG,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="actualNo != null">
|
|
|
@@ -1993,6 +2008,9 @@
|
|
|
<if test="documentId != null">
|
|
|
#{documentId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="checkFlag != null">
|
|
|
+ #{checkFlag,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual">
|
|
|
@@ -2110,7 +2128,8 @@
|
|
|
IS_BOUND_LIST = #{isBoundList,jdbcType=VARCHAR},
|
|
|
CONTRACT_ID = #{contractId,jdbcType=VARCHAR},
|
|
|
IS_BOUND_LIST_DOWNLOADED = #{isBoundListDownloaded,jdbcType=VARCHAR},
|
|
|
- DOCUMENT_ID = #{documentId,jdbcType=VARCHAR}
|
|
|
+ DOCUMENT_ID = #{documentId,jdbcType=VARCHAR},
|
|
|
+ CHECK_FLAG = #{checkFlag,jdbcType=VARCHAR}
|
|
|
where ACTUAL_NO = #{actualNo,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual">
|
|
|
@@ -2458,6 +2477,9 @@
|
|
|
<if test="documentId != null">
|
|
|
DOCUMENT_ID = #{documentId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="checkFlag != null">
|
|
|
+ CHECK_FLAG = #{checkFlag,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where ACTUAL_NO = #{actualNo,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -2518,8 +2540,8 @@
|
|
|
MEASURE_TASK_NUM, BILL_TYPE, CREATE_MAN_NAME,
|
|
|
CREATE_TIME, DATA_SOURCE, IS_PRE_SCALE,
|
|
|
BOUND_LIST_URL, IS_BOUND_LIST, CONTRACT_ID,
|
|
|
- IS_BOUND_LIST_DOWNLOADED, DOCUMENT_ID
|
|
|
- )
|
|
|
+ IS_BOUND_LIST_DOWNLOADED, DOCUMENT_ID,
|
|
|
+ CHECK_FLAG)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.actualNo,jdbcType=VARCHAR},
|
|
|
@@ -2565,8 +2587,8 @@
|
|
|
#{item.measureTaskNum,jdbcType=VARCHAR}, #{item.billType,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR},
|
|
|
#{item.createTime,jdbcType=TIMESTAMP}, #{item.dataSource,jdbcType=VARCHAR}, #{item.isPreScale,jdbcType=VARCHAR},
|
|
|
#{item.boundListUrl,jdbcType=VARCHAR}, #{item.isBoundList,jdbcType=VARCHAR}, #{item.contractId,jdbcType=VARCHAR},
|
|
|
- #{item.isBoundListDownloaded,jdbcType=VARCHAR}, #{item.documentId,jdbcType=VARCHAR}
|
|
|
- from dual
|
|
|
+ #{item.isBoundListDownloaded,jdbcType=VARCHAR}, #{item.documentId,jdbcType=VARCHAR},
|
|
|
+ #{item.checkFlag,jdbcType=VARCHAR} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
@@ -3032,6 +3054,10 @@
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
|
|
|
when #{item.actualNo,jdbcType=VARCHAR} then #{item.documentId,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
+ ,CHECK_FLAG=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
|
|
|
+ when #{item.actualNo,jdbcType=VARCHAR} then #{item.checkFlag,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
where ACTUAL_NO in
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.actualNo,jdbcType=VARCHAR}
|
|
|
@@ -3907,10 +3933,10 @@
|
|
|
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="netSpot3NoStr != null and netSpot3NoStr != ''">
|
|
|
- and net_spot3_no in
|
|
|
- <foreach collection="spotNoStr" item="item" open="(" separator="," close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
+ and net_spot3_no in
|
|
|
+ <foreach collection="spotNoStr" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
</if>
|
|
|
<if test="flag != null and flag != ''">
|
|
|
and value_flag != '0'
|
|
|
@@ -3930,185 +3956,185 @@
|
|
|
|
|
|
<select id="selectOldAndNew" parameterType="java.util.HashMap" resultType="HashMap">
|
|
|
SELECT *
|
|
|
- FROM (
|
|
|
+ FROM (
|
|
|
select ACTUAL_NO,
|
|
|
- prediction_no,
|
|
|
- CAR_NO,
|
|
|
- GROSS_WEIGHT,
|
|
|
- BASE_SPOT1_NAME,
|
|
|
- GROSS_TIME,
|
|
|
- TARE_WEIGHT,
|
|
|
- BASE_SPOT2_NAME,
|
|
|
- TARE_TIME,
|
|
|
- NET_WEIGHT,
|
|
|
- net_spot3_no,
|
|
|
- NET_SPOT3_NAME,
|
|
|
- NET_TIME,
|
|
|
- forwarding_unit_no,
|
|
|
- FORWARDING_UNIT_NAME,
|
|
|
- receiving_uint_no,
|
|
|
- RECEIVING_UINT_NAME,
|
|
|
- matter_no,
|
|
|
- MATTER_NAME,
|
|
|
- sender_remark,
|
|
|
- '新系统' as REMARK
|
|
|
- from METER_WORK_CAR_ACTUAL
|
|
|
- where IS_PRE_SCALE='1'
|
|
|
- and VALUE_FLAG in ('1', '2')
|
|
|
- and UPLOAD_FLAG='2'
|
|
|
- and NET_TIME > to_date('2022-07-21','YYYY-MM-DD')
|
|
|
- union
|
|
|
- (
|
|
|
- select FS_WEIGHTNO as ACTUAL_NO,
|
|
|
- fs_noticeId as prediction_no,
|
|
|
- REPLACE(FS_CARNO,'-','') as CAR_NO,
|
|
|
- FS_GROSSWEIGHT * 1000 as GROSS_WEIGHT,
|
|
|
- FS_GROSSPOINTNAME as BASE_SPOT1_NAME,
|
|
|
- FS_GROSSWEIGHTTIME as GROSS_TIME,
|
|
|
- FS_TAREWEIGHT * 1000 as TARE_WEIGHT,
|
|
|
- FS_TAREPOINTNAME as BASE_SPOT2_NAME,
|
|
|
- FS_TAREWEIGHTTIME as TARE_TIME,
|
|
|
- FS_NETWEIGHT * 1000 as NET_WEIGHT,
|
|
|
- fs_netPointId as net_spot3_no,
|
|
|
- FS_NETPOINTNAME as NET_SPOT3_NAME,
|
|
|
- FS_NETWEIGHTTIME as NET_TIME,
|
|
|
- fs_sender as FORWARDING_UNIT_No,
|
|
|
- FS_SENDERNAME as FORWARDING_UNIT_NAME,
|
|
|
- fs_receiver as RECEIVING_UINT_No,
|
|
|
- FS_RECEIVERNAME as RECEIVING_UINT_NAME,
|
|
|
- fs_material as matter_no,
|
|
|
- FS_MATERIALNAME as MATTER_NAME,
|
|
|
- fs_senderRemark sender_remark,
|
|
|
- '老系统' as REMARK
|
|
|
- from jgweight.view_car_net @MCMS
|
|
|
- where FS_NETWEIGHTTIME > to_date('2022-07-21','YYYY-MM-DD') AND FS_DELETEDTAG='N'
|
|
|
- and fs_noticeId is not null )
|
|
|
- )
|
|
|
- where 1 = 1
|
|
|
- <if test="remark != null and remark != ''">
|
|
|
- and remark 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>
|
|
|
+ prediction_no,
|
|
|
+ CAR_NO,
|
|
|
+ GROSS_WEIGHT,
|
|
|
+ BASE_SPOT1_NAME,
|
|
|
+ GROSS_TIME,
|
|
|
+ TARE_WEIGHT,
|
|
|
+ BASE_SPOT2_NAME,
|
|
|
+ TARE_TIME,
|
|
|
+ NET_WEIGHT,
|
|
|
+ net_spot3_no,
|
|
|
+ NET_SPOT3_NAME,
|
|
|
+ NET_TIME,
|
|
|
+ forwarding_unit_no,
|
|
|
+ FORWARDING_UNIT_NAME,
|
|
|
+ receiving_uint_no,
|
|
|
+ RECEIVING_UINT_NAME,
|
|
|
+ matter_no,
|
|
|
+ MATTER_NAME,
|
|
|
+ sender_remark,
|
|
|
+ '新系统' as REMARK
|
|
|
+ from METER_WORK_CAR_ACTUAL
|
|
|
+ where IS_PRE_SCALE='1'
|
|
|
+ and VALUE_FLAG in ('1', '2')
|
|
|
+ and UPLOAD_FLAG='2'
|
|
|
+ and NET_TIME > to_date('2022-07-21','YYYY-MM-DD')
|
|
|
+ union
|
|
|
+ (
|
|
|
+ select FS_WEIGHTNO as ACTUAL_NO,
|
|
|
+ fs_noticeId as prediction_no,
|
|
|
+ REPLACE(FS_CARNO,'-','') as CAR_NO,
|
|
|
+ FS_GROSSWEIGHT * 1000 as GROSS_WEIGHT,
|
|
|
+ FS_GROSSPOINTNAME as BASE_SPOT1_NAME,
|
|
|
+ FS_GROSSWEIGHTTIME as GROSS_TIME,
|
|
|
+ FS_TAREWEIGHT * 1000 as TARE_WEIGHT,
|
|
|
+ FS_TAREPOINTNAME as BASE_SPOT2_NAME,
|
|
|
+ FS_TAREWEIGHTTIME as TARE_TIME,
|
|
|
+ FS_NETWEIGHT * 1000 as NET_WEIGHT,
|
|
|
+ fs_netPointId as net_spot3_no,
|
|
|
+ FS_NETPOINTNAME as NET_SPOT3_NAME,
|
|
|
+ FS_NETWEIGHTTIME as NET_TIME,
|
|
|
+ fs_sender as FORWARDING_UNIT_No,
|
|
|
+ FS_SENDERNAME as FORWARDING_UNIT_NAME,
|
|
|
+ fs_receiver as RECEIVING_UINT_No,
|
|
|
+ FS_RECEIVERNAME as RECEIVING_UINT_NAME,
|
|
|
+ fs_material as matter_no,
|
|
|
+ FS_MATERIALNAME as MATTER_NAME,
|
|
|
+ fs_senderRemark sender_remark,
|
|
|
+ '老系统' as REMARK
|
|
|
+ from jgweight.view_car_net @MCMS
|
|
|
+ where FS_NETWEIGHTTIME > to_date('2022-07-21','YYYY-MM-DD') AND FS_DELETEDTAG='N'
|
|
|
+ and fs_noticeId is not null )
|
|
|
+ )
|
|
|
+ where 1 = 1
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and remark 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>
|
|
|
</select>
|
|
|
|
|
|
<select id="doQueryFirstOldAndNew" parameterType="java.util.HashMap" resultType="HashMap">
|
|
|
select *
|
|
|
- from (
|
|
|
- select actual_first_no,
|
|
|
- prediction_no,
|
|
|
- car_no,
|
|
|
- meter_weight,
|
|
|
- create_time,
|
|
|
- base_spot_no,
|
|
|
- base_spot_name,
|
|
|
- forwarding_unit_no,
|
|
|
- forwarding_unit_name,
|
|
|
- receiving_uint_no,
|
|
|
- receiving_uint_name,
|
|
|
- matter_no,
|
|
|
- matter_name,
|
|
|
- sender_remark,
|
|
|
- '新系统' remark
|
|
|
- from meter_work_car_actual_first
|
|
|
- where is_pre_scale = '1'
|
|
|
- and value_flag in ('1', '2')
|
|
|
- and create_time > to_date('2022-07-21','YYYY-MM-DD')
|
|
|
- union
|
|
|
- (
|
|
|
- select weightNo actual_first_no,
|
|
|
- noticeId prediction_no,
|
|
|
- replace(carNo, '-', '') car_no,
|
|
|
- weight*1000 meter_weight,
|
|
|
- weightTime create_time,
|
|
|
- fs_pointId base_spot_no,
|
|
|
- pointName base_spot_name,
|
|
|
- sender forwarding_unit_no,
|
|
|
- senderName forwarding_unit_name,
|
|
|
- receiver receiving_uint_no,
|
|
|
- receiverName receiving_uint_name,
|
|
|
- material matter_no,
|
|
|
- materialName matter_name,
|
|
|
- senderRemark sender_remark,
|
|
|
- '老系统' remark
|
|
|
- from jgweight.VIEW_CAR_FIRST @MCMS
|
|
|
- where weightTime > to_date('2022-07-21','YYYY-MM-DD') AND FS_DELETEDTAG='N'
|
|
|
- and noticeId is not null)
|
|
|
- ) A
|
|
|
- where 1 = 1
|
|
|
- <if test="remark != null and remark != ''">
|
|
|
- and remark LIKE '%${remark}%'
|
|
|
- </if>
|
|
|
- <if test="predictionNo != null and predictionNo != ''">
|
|
|
- and prediction_no LIKE '%${predictionNo}%'
|
|
|
- </if>
|
|
|
- <if test="startTime != null and endTime != null and startTime != '' 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>
|
|
|
- <if test="senderRemark != null and senderRemark != ''">
|
|
|
- and sender_remark LIKE '%${senderRemark}%'
|
|
|
- </if>
|
|
|
- <if test="carNo != null and carNo != ''">
|
|
|
- and car_no like '%${carNo}%'
|
|
|
- </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="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>
|
|
|
+ from (
|
|
|
+ select actual_first_no,
|
|
|
+ prediction_no,
|
|
|
+ car_no,
|
|
|
+ meter_weight,
|
|
|
+ create_time,
|
|
|
+ base_spot_no,
|
|
|
+ base_spot_name,
|
|
|
+ forwarding_unit_no,
|
|
|
+ forwarding_unit_name,
|
|
|
+ receiving_uint_no,
|
|
|
+ receiving_uint_name,
|
|
|
+ matter_no,
|
|
|
+ matter_name,
|
|
|
+ sender_remark,
|
|
|
+ '新系统' remark
|
|
|
+ from meter_work_car_actual_first
|
|
|
+ where is_pre_scale = '1'
|
|
|
+ and value_flag in ('1', '2')
|
|
|
+ and create_time > to_date('2022-07-21','YYYY-MM-DD')
|
|
|
+ union
|
|
|
+ (
|
|
|
+ select weightNo actual_first_no,
|
|
|
+ noticeId prediction_no,
|
|
|
+ replace(carNo, '-', '') car_no,
|
|
|
+ weight*1000 meter_weight,
|
|
|
+ weightTime create_time,
|
|
|
+ fs_pointId base_spot_no,
|
|
|
+ pointName base_spot_name,
|
|
|
+ sender forwarding_unit_no,
|
|
|
+ senderName forwarding_unit_name,
|
|
|
+ receiver receiving_uint_no,
|
|
|
+ receiverName receiving_uint_name,
|
|
|
+ material matter_no,
|
|
|
+ materialName matter_name,
|
|
|
+ senderRemark sender_remark,
|
|
|
+ '老系统' remark
|
|
|
+ from jgweight.VIEW_CAR_FIRST @MCMS
|
|
|
+ where weightTime > to_date('2022-07-21','YYYY-MM-DD') AND FS_DELETEDTAG='N'
|
|
|
+ and noticeId is not null)
|
|
|
+ ) A
|
|
|
+ where 1 = 1
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and remark LIKE '%${remark}%'
|
|
|
+ </if>
|
|
|
+ <if test="predictionNo != null and predictionNo != ''">
|
|
|
+ and prediction_no LIKE '%${predictionNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' 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>
|
|
|
+ <if test="senderRemark != null and senderRemark != ''">
|
|
|
+ and sender_remark LIKE '%${senderRemark}%'
|
|
|
+ </if>
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
+ and car_no like '%${carNo}%'
|
|
|
+ </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="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>
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@@ -4128,59 +4154,59 @@
|
|
|
'新系统' remark
|
|
|
from meter_work_car_actual
|
|
|
where 1= 1
|
|
|
- and IS_PRE_SCALE='1'
|
|
|
- and 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="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="senderRemark != null and senderRemark != ''">
|
|
|
- and sender_remark LIKE '%${senderRemark}%'
|
|
|
- </if>
|
|
|
- <if test="carNo != null and carNo != ''">
|
|
|
- and car_no LIKE '%${carNo}%'
|
|
|
- </if>
|
|
|
+ and IS_PRE_SCALE='1'
|
|
|
+ and 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="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="senderRemark != null and senderRemark != ''">
|
|
|
+ and sender_remark LIKE '%${senderRemark}%'
|
|
|
+ </if>
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
+ and car_no LIKE '%${carNo}%'
|
|
|
+ </if>
|
|
|
group by matter_no, matter_name, forwarding_unit_no, forwarding_unit_name, receiving_uint_no, receiving_uint_name
|
|
|
union
|
|
|
- (
|
|
|
- select fs_material matter_no,
|
|
|
- fs_materialName matter_name,
|
|
|
- count(1) countSum,
|
|
|
- sum(fs_netWeight*1000) net_weight,
|
|
|
- sum(fs_grossWeight*1000) gross_weight,
|
|
|
- sum(fs_tareWeight*1000) tare_weight,
|
|
|
- fs_sender forwarding_unit_no,
|
|
|
- fs_senderName forwarding_unit_name,
|
|
|
- fs_receiver receiving_uint_no,
|
|
|
- fs_receiverName receiving_uint_name,
|
|
|
- '老系统' remark
|
|
|
- from jgweight.view_car_net @MCMS
|
|
|
- where 1 = 1
|
|
|
- and fs_noticeId is not null
|
|
|
- and FS_DELETEDTAG='N'
|
|
|
- <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
- and fs_netweightTime >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and fs_netweightTime <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
- </if>
|
|
|
- <if test="netSpot3No != null and netSpot3No != ''">
|
|
|
- and fs_netPointId like '%${netSpot3No}%'
|
|
|
- </if>
|
|
|
- <if test="netSpot3Name != null and netSpot3Name != ''">
|
|
|
- and fs_netPointName like '%${netSpot3Name}%'
|
|
|
- </if>
|
|
|
- <if test="senderRemark != null and senderRemark != ''">
|
|
|
- and fs_senderRemark LIKE '%${senderRemark}%'
|
|
|
- </if>
|
|
|
- <if test="carNo != null and carNo != ''">
|
|
|
- and FS_CARNO LIKE '%${carNo}%'
|
|
|
- </if>
|
|
|
- group by fs_material, fs_materialName, fs_sender , fs_senderName , fs_receiver , fs_receiverName
|
|
|
- )
|
|
|
+ (
|
|
|
+ select fs_material matter_no,
|
|
|
+ fs_materialName matter_name,
|
|
|
+ count(1) countSum,
|
|
|
+ sum(fs_netWeight*1000) net_weight,
|
|
|
+ sum(fs_grossWeight*1000) gross_weight,
|
|
|
+ sum(fs_tareWeight*1000) tare_weight,
|
|
|
+ fs_sender forwarding_unit_no,
|
|
|
+ fs_senderName forwarding_unit_name,
|
|
|
+ fs_receiver receiving_uint_no,
|
|
|
+ fs_receiverName receiving_uint_name,
|
|
|
+ '老系统' remark
|
|
|
+ from jgweight.view_car_net @MCMS
|
|
|
+ where 1 = 1
|
|
|
+ and fs_noticeId is not null
|
|
|
+ and FS_DELETEDTAG='N'
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
+ and fs_netweightTime >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and fs_netweightTime <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ </if>
|
|
|
+ <if test="netSpot3No != null and netSpot3No != ''">
|
|
|
+ and fs_netPointId like '%${netSpot3No}%'
|
|
|
+ </if>
|
|
|
+ <if test="netSpot3Name != null and netSpot3Name != ''">
|
|
|
+ and fs_netPointName like '%${netSpot3Name}%'
|
|
|
+ </if>
|
|
|
+ <if test="senderRemark != null and senderRemark != ''">
|
|
|
+ and fs_senderRemark LIKE '%${senderRemark}%'
|
|
|
+ </if>
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
+ and FS_CARNO LIKE '%${carNo}%'
|
|
|
+ </if>
|
|
|
+ group by fs_material, fs_materialName, fs_sender , fs_senderName , fs_receiver , fs_receiverName
|
|
|
+ )
|
|
|
)
|
|
|
where 1=1
|
|
|
<if test="remark != null and remark != ''">
|
|
|
@@ -4247,26 +4273,26 @@
|
|
|
|
|
|
<select id="netWeightAndTheoryAmount" parameterType="java.util.HashMap" resultType="hashmap">
|
|
|
select A.car_no,
|
|
|
- A.prediction_no,
|
|
|
- A.matter_name,
|
|
|
- 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,
|
|
|
- A.theory_amount,
|
|
|
- to_char(round(B.net_weight/1000,2),'FM9999999999999999.00') - A.theory_amount netWeightSubTheoryWeight,
|
|
|
- A.forwarding_unit_name,
|
|
|
- A.receiving_uint_name,
|
|
|
- B.gross_time,
|
|
|
- B.base_spot1_name,
|
|
|
- B.tare_time,
|
|
|
- B.base_spot2_name,
|
|
|
- B.net_time,
|
|
|
- B.net_spot3_name
|
|
|
+ A.prediction_no,
|
|
|
+ A.matter_name,
|
|
|
+ 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,
|
|
|
+ A.theory_amount,
|
|
|
+ to_char(round(B.net_weight/1000,2),'FM9999999999999999.00') - A.theory_amount netWeightSubTheoryWeight,
|
|
|
+ A.forwarding_unit_name,
|
|
|
+ A.receiving_uint_name,
|
|
|
+ B.gross_time,
|
|
|
+ B.base_spot1_name,
|
|
|
+ B.tare_time,
|
|
|
+ B.base_spot2_name,
|
|
|
+ B.net_time,
|
|
|
+ B.net_spot3_name
|
|
|
from pre_track_scale A
|
|
|
left join meter_work_car_actual B
|
|
|
- on A.prediction_no = B.prediction_no
|
|
|
+ on A.prediction_no = B.prediction_no
|
|
|
where A.theory_amount is not null
|
|
|
- and B.actual_no is not null
|
|
|
+ and B.actual_no is not null
|
|
|
<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>
|
|
|
@@ -4297,123 +4323,123 @@
|
|
|
<!-- 查询符合内倒双委托车辆在铁合金秤点用普通委托信息过磅的结净信息倒序 -->
|
|
|
<select id="findTHJNetWeight" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
select A.*
|
|
|
- from meter_work_car_actual A
|
|
|
- where A.car_no in (select distinct base_name
|
|
|
- from com_base_info
|
|
|
- where p_base_code = '001047')
|
|
|
- and A.net_spot3_no = 'JT0026'
|
|
|
- and ( A.prediction_type is null or A.prediction_type = '1' )
|
|
|
- and A.is_pre_scale = '1'
|
|
|
+ from meter_work_car_actual A
|
|
|
+ where A.car_no in (select distinct base_name
|
|
|
+ from com_base_info
|
|
|
+ where p_base_code = '001047')
|
|
|
+ and A.net_spot3_no = 'JT0026'
|
|
|
+ and ( A.prediction_type is null or A.prediction_type = '1' )
|
|
|
+ and A.is_pre_scale = '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>
|
|
|
<if test="carNo != null and carNo != ''">
|
|
|
and A.car_no like '%${carNo}%'
|
|
|
</if>
|
|
|
- order by A.net_time desc
|
|
|
+ order by A.net_time desc
|
|
|
</select>
|
|
|
|
|
|
<select id="findFiveNetWeight" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
select A.*
|
|
|
- from meter_work_car_actual A
|
|
|
- where 1 = 1
|
|
|
- and A.net_spot3_no in ('JT0035', 'JT0034')
|
|
|
- and A.prediction_type = '5'
|
|
|
- and A.is_pre_scale = '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>
|
|
|
- <if test="carNo != null and carNo != ''">
|
|
|
- and A.car_no like '%${carNo}%'
|
|
|
- </if>
|
|
|
- order by A.net_time ASC
|
|
|
+ from meter_work_car_actual A
|
|
|
+ where 1 = 1
|
|
|
+ and A.net_spot3_no in ('JT0035', 'JT0034')
|
|
|
+ and A.prediction_type = '5'
|
|
|
+ and A.is_pre_scale = '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>
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
+ and A.car_no like '%${carNo}%'
|
|
|
+ </if>
|
|
|
+ order by A.net_time ASC
|
|
|
</select>
|
|
|
|
|
|
<select id="countDayAllState" parameterType="java.util.HashMap" resultType="hashmap">
|
|
|
SELECT A.net_spot3_no,
|
|
|
- A.net_spot3_name,
|
|
|
- A.net_man_no,
|
|
|
- A.net_man_name,
|
|
|
- count(1) count_actual
|
|
|
+ A.net_spot3_name,
|
|
|
+ A.net_man_no,
|
|
|
+ A.net_man_name,
|
|
|
+ count(1) count_actual
|
|
|
from meter_work_car_actual A
|
|
|
- left join pre_track_scale B
|
|
|
- on A.prediction_no = B.prediction_no
|
|
|
+ left join pre_track_scale B
|
|
|
+ on A.prediction_no = B.prediction_no
|
|
|
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>
|
|
|
- <if test="netSpot3NoStr != null and netSpot3NoStr != ''">
|
|
|
- and A.net_spot3_no in
|
|
|
- <foreach collection="spotNoStr" item="item" open="(" separator="," close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="createManNoStr != null and createManNoStr != ''">
|
|
|
- and A.net_man_no in
|
|
|
- <foreach collection="manNoStr" item="item" open="(" separator="," close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="baseSpotNo != null and baseSpotNo != ''">
|
|
|
- and A.net_spot3_no like '%${baseSpotNo}%'
|
|
|
- </if>
|
|
|
- <if test="baseSpotName != null and baseSpotName != ''">
|
|
|
- and A.net_spot3_name like '%${baseSpotName}%'
|
|
|
- </if>
|
|
|
- <if test="valueFlag != null and valueFlag != ''">
|
|
|
- and A.value_flag like '%${valueFlag}%'
|
|
|
- </if>
|
|
|
- <if test="validFlag != null and validFlag != ''">
|
|
|
- and A.value_flag != '0'
|
|
|
- </if>
|
|
|
- <if test="isPreScale != null and isPreScale != ''">
|
|
|
- and A.is_pre_scale like '%${isPreScale}%'
|
|
|
- </if>
|
|
|
+ <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="netSpot3NoStr != null and netSpot3NoStr != ''">
|
|
|
+ and A.net_spot3_no in
|
|
|
+ <foreach collection="spotNoStr" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="createManNoStr != null and createManNoStr != ''">
|
|
|
+ and A.net_man_no in
|
|
|
+ <foreach collection="manNoStr" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="baseSpotNo != null and baseSpotNo != ''">
|
|
|
+ and A.net_spot3_no like '%${baseSpotNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="baseSpotName != null and baseSpotName != ''">
|
|
|
+ and A.net_spot3_name like '%${baseSpotName}%'
|
|
|
+ </if>
|
|
|
+ <if test="valueFlag != null and valueFlag != ''">
|
|
|
+ and A.value_flag like '%${valueFlag}%'
|
|
|
+ </if>
|
|
|
+ <if test="validFlag != null and validFlag != ''">
|
|
|
+ and A.value_flag != '0'
|
|
|
+ </if>
|
|
|
+ <if test="isPreScale != null and isPreScale != ''">
|
|
|
+ and A.is_pre_scale like '%${isPreScale}%'
|
|
|
+ </if>
|
|
|
group by A.net_spot3_no,
|
|
|
- A.net_spot3_name,
|
|
|
- A.net_man_no,
|
|
|
- A.net_man_name
|
|
|
+ A.net_spot3_name,
|
|
|
+ A.net_man_no,
|
|
|
+ A.net_man_name
|
|
|
</select>
|
|
|
|
|
|
<select id="smallAndNegativeNetWeightRatio" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
select A.car_no,
|
|
|
- A.prediction_no,
|
|
|
- A.matter_name,
|
|
|
- A.gross_weight,
|
|
|
- A.tare_weight,
|
|
|
- A.net_weight,
|
|
|
- A.update_man_name,
|
|
|
- A.update_time,
|
|
|
- A.note,
|
|
|
- A.sender_remark,
|
|
|
- A.forwarding_unit_name,
|
|
|
- A.receiving_uint_name,
|
|
|
- A.gross_time,
|
|
|
- A.base_spot1_name,
|
|
|
- case when A.gross_mode = '1' then '远程计量'
|
|
|
- when A.gross_mode = '2' then '智能计量'
|
|
|
- when A.gross_mode = '3' then '手工计量'
|
|
|
- else null end gross_mode,
|
|
|
- A.gross_man_name,
|
|
|
- A.tare_time,
|
|
|
- A.base_spot2_name,
|
|
|
- case when A.tare_mode = '1' then '远程计量'
|
|
|
- when A.tare_mode = '2' then '智能计量'
|
|
|
- when A.tare_mode = '3' then '手工计量'
|
|
|
- else null end tare_mode,
|
|
|
- A.tare_man_name,
|
|
|
- A.net_time,
|
|
|
- A.net_spot3_name,
|
|
|
- A.net_man_name,
|
|
|
- case when A.value_flag = '0' then '作废'
|
|
|
- when A.value_flag = '1' then '有效'
|
|
|
- else null end value_flag,
|
|
|
- case when A.upload_flag = '1' then '未同步'
|
|
|
- when A.upload_flag = '2' then '已同步'
|
|
|
- else null end upload_flag
|
|
|
+ A.prediction_no,
|
|
|
+ A.matter_name,
|
|
|
+ A.gross_weight,
|
|
|
+ A.tare_weight,
|
|
|
+ A.net_weight,
|
|
|
+ A.update_man_name,
|
|
|
+ A.update_time,
|
|
|
+ A.note,
|
|
|
+ A.sender_remark,
|
|
|
+ A.forwarding_unit_name,
|
|
|
+ A.receiving_uint_name,
|
|
|
+ A.gross_time,
|
|
|
+ A.base_spot1_name,
|
|
|
+ case when A.gross_mode = '1' then '远程计量'
|
|
|
+ when A.gross_mode = '2' then '智能计量'
|
|
|
+ when A.gross_mode = '3' then '手工计量'
|
|
|
+ else null end gross_mode,
|
|
|
+ A.gross_man_name,
|
|
|
+ A.tare_time,
|
|
|
+ A.base_spot2_name,
|
|
|
+ case when A.tare_mode = '1' then '远程计量'
|
|
|
+ when A.tare_mode = '2' then '智能计量'
|
|
|
+ when A.tare_mode = '3' then '手工计量'
|
|
|
+ else null end tare_mode,
|
|
|
+ A.tare_man_name,
|
|
|
+ A.net_time,
|
|
|
+ A.net_spot3_name,
|
|
|
+ A.net_man_name,
|
|
|
+ case when A.value_flag = '0' then '作废'
|
|
|
+ when A.value_flag = '1' then '有效'
|
|
|
+ else null end value_flag,
|
|
|
+ case when A.upload_flag = '1' then '未同步'
|
|
|
+ when A.upload_flag = '2' then '已同步'
|
|
|
+ else null end upload_flag
|
|
|
from meter_work_car_actual A
|
|
|
where A.net_weight <= 2000
|
|
|
- and A.value_flag != '0'
|
|
|
+ and A.value_flag != '0'
|
|
|
<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>
|