|
@@ -3354,1506 +3354,38 @@
|
|
|
</delete>
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
<!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
- <sql id="whereTime">
|
|
|
|
|
- <where>
|
|
|
|
|
- <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>
|
|
|
|
|
- </where>
|
|
|
|
|
- </sql>
|
|
|
|
|
- <select id="selectView" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- SELECT *
|
|
|
|
|
- from meter_work_car_actual_view
|
|
|
|
|
- <where>
|
|
|
|
|
- <if test="carNo != null and carNo != ''">
|
|
|
|
|
- and CAR_NO LIKE '%${carNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="matterNo != null and matterNo != ''">
|
|
|
|
|
- and MATTER_NO = #{matterNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="matterName != null and matterName != ''">
|
|
|
|
|
- and MATTER_NAME = #{matterName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterTypeNo != null and meterTypeNo != ''">
|
|
|
|
|
- and METER_TYPE_NO = #{meterTypeNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterTypeName != null and meterTypeName != '' and meterTypeName !='驻外检测'.toString() and meterTypeName !='单包计量'.toString()">
|
|
|
|
|
- and METER_TYPE_NAME = #{meterTypeName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterTypeName != null and meterTypeName != '' and meterTypeName =='驻外检测'.toString()">
|
|
|
|
|
- and METER_TYPE_NAME like '${meterTypeName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterTypeName != null and meterTypeName != '' and meterTypeName =='单包计量'.toString()">
|
|
|
|
|
- and METER_TYPE_NAME like '${meterTypeName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpotNo != null and baseSpotNo != ''">
|
|
|
|
|
- and BASE_SPOT_NO = #{baseSpotNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpotName != null and baseSpotName != ''">
|
|
|
|
|
- and BASE_SPOT_NAME = #{baseSpotName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="uploadFlag != null and uploadFlag != ''">
|
|
|
|
|
- and UPLOAD_FLAG = #{uploadFlag}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="contractNo != null and contractNo != ''">
|
|
|
|
|
- and CONTRACT_NO LIKE '%${contractNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="batchNo != null and batchNo != ''">
|
|
|
|
|
- and BATCH_NO LIKE '%${batchNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="customerSupplierNo != null and customerSupplierNo != ''">
|
|
|
|
|
- and CUSTOMER_SUPPLIER_NO LIKE '%${customerSupplierNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="customerSupplierName != null and customerSupplierName != ''">
|
|
|
|
|
- and CUSTOMER_SUPPLIER_NAME LIKE '%${customerSupplierName}%'
|
|
|
|
|
- </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="specNo != null and specNo != ''">
|
|
|
|
|
- and SPEC_NO LIKE '%${specNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="specName != null and specName != ''">
|
|
|
|
|
- and SPEC_NAME LIKE '%${specName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="loadPointNo != null and loadPointNo != ''">
|
|
|
|
|
- and LOAD_POINT_NO LIKE '%${loadPointNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="loadPointName != null and loadPointName != ''">
|
|
|
|
|
- and LOAD_POINT_NAME LIKE '%${loadPointName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="sampleNo != null and sampleNo != ''">
|
|
|
|
|
- and SAMPLE_NO LIKE '%${sampleNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="sampleVoucher != null and sampleVoucher != ''">
|
|
|
|
|
- and SAMPLE_VOUCHER LIKE '%${sampleVoucher}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="carrierUnitNo != null and carrierUnitNo != ''">
|
|
|
|
|
- and CARRIER_UNIT_NO LIKE '%${carrierUnitNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="carrierUnitName != null and carrierUnitName != ''">
|
|
|
|
|
- and CARRIER_UNIT_NAME LIKE '%${carrierUnitName}%'
|
|
|
|
|
- </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="meterProcessNo != null and meterProcessNo != ''">
|
|
|
|
|
- and METER_PROCESS_NO LIKE '%${meterProcessNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterProcessEditionNo != null and meterProcessEditionNo != ''">
|
|
|
|
|
- and METER_PROCESS_EDITION_NO LIKE '%${meterProcessEditionNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="actualFirst1No != null and actualFirst1No != ''">
|
|
|
|
|
- and ACTUAL_FIRST1_NO LIKE '%${actualFirst1No}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossWeight != null">
|
|
|
|
|
- and GROSS_WEIGHT = #{grossWeight}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossManNo != null and grossManNo != ''">
|
|
|
|
|
- and GROSS_MAN_NO LIKE '%${grossManNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossManName != null and grossManName != ''">
|
|
|
|
|
- and GROSS_MAN_NAME LIKE '%${grossManName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossTime != null">
|
|
|
|
|
- and TO_CHAR(GROSS_TIME,'yyyy-MM-dd') = #{grossTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot1No != null and baseSpot1No != ''">
|
|
|
|
|
- and BASE_SPOT1_NO LIKE '%${baseSpot1No}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot1Name != null and baseSpot1Name != ''">
|
|
|
|
|
- and BASE_SPOT1_NAME LIKE '%${baseSpot1Name}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossClass != null and grossClass != ''">
|
|
|
|
|
- and GROSS_CLASS LIKE '%${grossClass}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossGroup != null and grossGroup != ''">
|
|
|
|
|
- and GROSS_GROUP LIKE '%${grossGroup}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossMode != null and grossMode != ''">
|
|
|
|
|
- and GROSS_MODE LIKE '%${grossMode}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="actualFirst2No != null and actualFirst2No != ''">
|
|
|
|
|
- and ACTUAL_FIRST2_NO LIKE '%${actualFirst2No}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareWeight != null">
|
|
|
|
|
- and TARE_WEIGHT = #{tareWeight}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareManNo != null and tareManNo != ''">
|
|
|
|
|
- and TARE_MAN_NO LIKE '%${tareManNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareManName != null and tareManName != ''">
|
|
|
|
|
- and TARE_MAN_NAME LIKE '%${tareManName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareTime != null">
|
|
|
|
|
- and TO_CHAR(TARE_TIME,'yyyy-MM-dd') = #{tareTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot2No != null and baseSpot2No != ''">
|
|
|
|
|
- and BASE_SPOT2_NO LIKE '%${baseSpot2No}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot2Name != null and baseSpot2Name != ''">
|
|
|
|
|
- and BASE_SPOT2_NAME LIKE '%${baseSpot2Name}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareClass != null and tareClass != ''">
|
|
|
|
|
- and TARE_CLASS LIKE '%${tareClass}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareGroup != null and tareGroup != ''">
|
|
|
|
|
- and TARE_GROUP LIKE '%${tareGroup}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareMode != null and tareMode != ''">
|
|
|
|
|
- and TARE_MODE LIKE '%${tareMode}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="netWeight != null">
|
|
|
|
|
- and NET_WEIGHT = #{netWeight}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterNum != null">
|
|
|
|
|
- and METER_NUM = #{meterNum}
|
|
|
|
|
- </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="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="valueFlag != null and valueFlag != ''">
|
|
|
|
|
- and value_flag = #{valueFlag}
|
|
|
|
|
- </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>
|
|
|
|
|
- </where>
|
|
|
|
|
- order by NET_TIME desc
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="manualAdd" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
- select t1.prediction_no PREDICTION_NO, t1.notice_no NOTICE_NO, t1.car_no CAR_NO, t1.trailer_no TRAILER_NO, t1.matter_no MATTER_NO,
|
|
|
|
|
- t1.matter_name MATTER_NAME, t1.contract_no CONTRACT_NO, t1.batch_no BATCH_NO, t1.customer_supplier_no CUSTOMER_SUPPLIER_NO,
|
|
|
|
|
- t1.customer_supplier_name CUSTOMER_SUPPLIER_NAME, t1.forwarding_unit_no FORWARDING_UNIT_NO, t1.forwarding_unit_name FORWARDING_UNIT_NAME,
|
|
|
|
|
- t1.receiving_uint_no RECEIVING_UINT_NO, t1.receiving_uint_name RECEIVING_UINT_NAME, t1.material_no MATERIAL_NO,
|
|
|
|
|
- t1.voucher_identity, t1.voucher_item, t1.business_group, t1.temp_conveyance, t1.conveyance_type,
|
|
|
|
|
- t1.resource_system, t1.group_package_amount, t1.group_package_unit, t1.package_amount,
|
|
|
|
|
- t1.package_unit, t1.theory_amount, t1.measure_batch,t1.measure_batch_count,t1.sender_type,
|
|
|
|
|
- t1.sender_remark,t1.receiver_type, t1.receiver_remark,t1.amount_unit,
|
|
|
|
|
- t1.material_name MATERIAL_NAME, t1.spec_no SPEC_NO, t1.spec_name SPEC_NAME, t1.load_point_no LOAD_POINT_NO, t1.load_point_name LOAD_POINT_NAME,
|
|
|
|
|
- t1.sample_no SAMPLE_NO,t1.sample_voucher SAMPLE_VOUCHER,t1.carrier_unit_no CARRIER_UNIT_NO,t1.carrier_unit_name CARRIER_UNIT_NAME,
|
|
|
|
|
- t1.meter_type_no METER_TYPE_NO, t1.meter_type_name METER_TYPE_NAME,t1.meter_process_no METER_PROCESS_NO, t1.meter_process_edition_no METER_PROCESS_EDITION_NO,
|
|
|
|
|
- t1.actual_first_no ACTUAL_FIRST1_NO, t1.meter_weight GROSS_WEIGHT, t1.create_man_no GROSS_MAN_NO, t1.create_man_name GROSS_MAN_NAME, t1.create_time GROSS_TIME,
|
|
|
|
|
- t1.base_spot_no BASE_SPOT1_NO, t1.base_spot_name BASE_SPOT1_NAME,t1.meter_class GROSS_CLASS, t1.meter_group GROSS_GROUP, t1.meter_mode GROSS_MODE,t2.data_source,
|
|
|
|
|
- t2.actual_first_no ACTUAL_FIRST2_NO, t2.meter_weight TARE_WEIGHT, t2.create_man_no TARE_MAN_NO, t2.create_man_name TARE_MAN_NAME, t2.create_time TARE_TIME,
|
|
|
|
|
- t2.base_spot_no BASE_SPOT2_NO, t2.base_spot_name BASE_SPOT2_NAME, t2.create_man_no net_man_no, t2.create_man_name net_man_name, t2.create_time net_time,t2.base_spot_no net_spot3_no, t2.base_spot_name net_spot3_name, t2.create_time create_time, t2.create_man_name create_man_name, t2.meter_class TARE_CLASS, t2.meter_group TARE_GROUP,t2.meter_mode TARE_MODE,t1.METER_NUM METER_NUM
|
|
|
|
|
- from METER_WORK_CAR_ACTUAL_FIRST t1,METER_WORK_CAR_ACTUAL_FIRST t2
|
|
|
|
|
- where t1.actual_first_no=#{actualFirstNo,jdbcType=VARCHAR} and t2.actual_first_no=#{dataNo,jdbcType=VARCHAR}
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="manualAddPre" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
- select T3.prediction_no PREDICTION_NO, T3.notice_no NOTICE_NO, t1.car_no CAR_NO, T3.trailer_no TRAILER_NO, T3.matter_no MATTER_NO,
|
|
|
|
|
- T3.voucher_identity, T3.voucher_item, T3.business_group, T3.temp_conveyance, T3.conveyance_type,
|
|
|
|
|
- T3.resource_system, T3.group_package_amount, T3.group_package_unit, T3.package_amount,
|
|
|
|
|
- T3.package_unit, T3.theory_amount, T3.measure_batch,T3.measure_batch_count,T3.sender_type,
|
|
|
|
|
- T3.sender_remark,T3.receiver_type, T3.receiver_remark,T3.amount_unit,t1.data_source,
|
|
|
|
|
- T3.matter_name MATTER_NAME, T3.contract_no CONTRACT_NO, T3.batch_no BATCH_NO, T3.customer_supplier_no CUSTOMER_SUPPLIER_NO,
|
|
|
|
|
- T3.customer_supplier_name CUSTOMER_SUPPLIER_NAME, T3.forwarding_unit_no FORWARDING_UNIT_NO, T3.forwarding_unit_name FORWARDING_UNIT_NAME,
|
|
|
|
|
- T3.receiving_uint_no RECEIVING_UINT_NO, T3.receiving_uint_name RECEIVING_UINT_NAME, T3.material_no MATERIAL_NO,
|
|
|
|
|
- T3.material_name MATERIAL_NAME, T3.spec_no SPEC_NO, T3.spec_name SPEC_NAME, T3.load_point_no LOAD_POINT_NO, T3.load_point_name LOAD_POINT_NAME,
|
|
|
|
|
- t1.sample_no SAMPLE_NO,t1.sample_voucher SAMPLE_VOUCHER,T3.carrier_unit_no CARRIER_UNIT_NO,T3.carrier_unit_name CARRIER_UNIT_NAME,
|
|
|
|
|
- T3.meter_type_no METER_TYPE_NO, T3.meter_type_name METER_TYPE_NAME,T3.meter_process_no METER_PROCESS_NO, T3.meter_process_edition_no METER_PROCESS_EDITION_NO,
|
|
|
|
|
- t1.actual_first_no ACTUAL_FIRST1_NO, t1.meter_weight GROSS_WEIGHT, t1.create_man_no GROSS_MAN_NO, t1.create_man_name GROSS_MAN_NAME, t1.create_time GROSS_TIME,
|
|
|
|
|
- t1.base_spot_no BASE_SPOT1_NO, t1.base_spot_name BASE_SPOT1_NAME,t1.meter_class GROSS_CLASS, t1.meter_group GROSS_GROUP, t1.meter_mode GROSS_MODE,
|
|
|
|
|
- t2.actual_first_no ACTUAL_FIRST2_NO, t2.meter_weight TARE_WEIGHT, t2.create_man_no TARE_MAN_NO, t2.create_man_name TARE_MAN_NAME, t2.create_time TARE_TIME,
|
|
|
|
|
- t2.base_spot_no BASE_SPOT2_NO, t2.base_spot_name BASE_SPOT2_NAME, t2.create_man_no net_man_no, t2.create_man_name net_man_name, t2.create_time net_time, t2.base_spot_no net_spot3_no, t2.base_spot_name net_spot3_name, t2.create_time create_time, t2.create_man_name create_man_name, t2.meter_class TARE_CLASS, t2.meter_group TARE_GROUP,t2.meter_mode TARE_MODE,t1.METER_NUM METER_NUM
|
|
|
|
|
- from METER_WORK_CAR_ACTUAL_FIRST t1,METER_WORK_CAR_ACTUAL_FIRST t2, PRE_TRACK_SCALE T3
|
|
|
|
|
- where t1.actual_first_no=#{actualFirstNo,jdbcType=VARCHAR} and t2.actual_first_no=#{dataNo,jdbcType=VARCHAR} AND T3.prediction_no =#{predictionNo,jdbcType=VARCHAR}
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="mathPredcition" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
- select t.actual_no, t1.prediction_no, t1.notice_no, t.car_no,
|
|
|
|
|
- t1.trailer_no, t1.matter_no, t1.matter_name, t1.contract_no,
|
|
|
|
|
- t1.batch_no, t1.customer_supplier_no, t1.customer_supplier_name,
|
|
|
|
|
- t1.forwarding_unit_no, t1.forwarding_unit_name, t1.receiving_uint_no,
|
|
|
|
|
- t1.receiving_uint_name, t1.material_no, t1.material_name,
|
|
|
|
|
- t1.voucher_identity, t1.voucher_item, t1.business_group, t1.temp_conveyance, t1.conveyance_type,
|
|
|
|
|
- t1.resource_system, t1.group_package_amount, t1.group_package_unit, t1.package_amount,
|
|
|
|
|
- t1.package_unit, t1.theory_amount, t1.measure_batch,t1.measure_batch_count,t1.sender_type,
|
|
|
|
|
- t1.sender_remark,t1.receiver_type, t1.receiver_remark,t1.amount_unit,
|
|
|
|
|
- t1.spec_no, t1.spec_name, t1.load_point_no, t1.load_point_name,
|
|
|
|
|
- t1.sample_no, t1.sample_voucher, t1.carrier_unit_no, t1.carrier_unit_name,
|
|
|
|
|
- t1.meter_type_no, t1.meter_type_name, t1.meter_process_no, t1.meter_process_edition_no,
|
|
|
|
|
- t.actual_first1_no, t.gross_weight, t.gross_man_no, t.gross_man_name, t.gross_time,
|
|
|
|
|
- t.base_spot1_no, t.base_spot1_name, t.gross_class, t.gross_group, t.gross_mode,
|
|
|
|
|
- t.actual_first2_no, t.tare_weight, t.tare_man_no, t.tare_man_name, t.tare_time,
|
|
|
|
|
- t.base_spot2_no, t.base_spot2_name, t.tare_class, t.tare_group, t.tare_mode,t.data_source,
|
|
|
|
|
- t.net_weight, t.meter_num, t.net_man_no, t.net_man_name, t.net_time, t.net_spot3_no,
|
|
|
|
|
- t.net_spot3_name, t.net_group, t.net_mode, t.value_flag, t.upload_flag, t.check_man_no,
|
|
|
|
|
- t.check_man_name, t.check_time, t.upload_man_no, t.upload_man_name, t.upload_time, t.add_weight,
|
|
|
|
|
- t.net_class, t.tb_flage, t1.railway_no, t.update_man_no, t.update_man_name, t.update_time,
|
|
|
|
|
- t.create_man_name, t.create_time,
|
|
|
|
|
- t.memo, t1.heat_no, t1.shipment_gross_weight, t1.shipment_net_weight, t1.shipment_num,
|
|
|
|
|
- t1.bind_card_no, t1.prediction_type, t1.prediction_combination, t.meter_pier_name,
|
|
|
|
|
- t.meter_pier_no, t.note
|
|
|
|
|
- from meter_work_car_actual t, pre_track_scale t1 where t.actual_no = #{actualNo,jdbcType=VARCHAR} and t1.prediction_no = #{predictionNo,jdbcType=VARCHAR}
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="cleanPredcition" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
- select t.actual_no, t.actual_first1_no,t.car_no, t.gross_weight, t.gross_man_no, t.gross_man_name, t.gross_time,
|
|
|
|
|
- t.base_spot1_no, t.base_spot1_name, t.gross_class, t.gross_group, t.gross_mode,
|
|
|
|
|
- t.actual_first2_no, t.tare_weight, t.tare_man_no, t.tare_man_name, t.tare_time,
|
|
|
|
|
- t.base_spot2_no, t.base_spot2_name, t.tare_class, t.tare_group, t.tare_mode,t.data_source,
|
|
|
|
|
- t.net_weight, t.meter_num, t.net_man_no, t.net_man_name, t.net_time, t.net_spot3_no,
|
|
|
|
|
- t.net_spot3_name, t.net_group, t.net_mode, t.value_flag, t.upload_flag, t.check_man_no,
|
|
|
|
|
- t.check_man_name, t.check_time, t.upload_man_no, t.upload_man_name, t.upload_time, t.add_weight,
|
|
|
|
|
- t.net_class, t.tb_flage, t.update_man_no, t.update_man_name, t.update_time,
|
|
|
|
|
- t.memo, t.meter_pier_name, t.meter_pier_no, t.note
|
|
|
|
|
- from meter_work_car_actual t where t.actual_no = #{actualNo,jdbcType=VARCHAR}
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
|
|
|
|
|
- SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(ACTUAL_NO,9))),0) + 1,4,'0') ACTUAL_NO
|
|
|
|
|
- FROM METER_WORK_CAR_ACTUAL where instr(ACTUAL_NO,#{afl,jdbcType=VARCHAR})>0
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="tareAdd" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
- select t1.PREDICTION_NO PREDICTION_NO, t1.notice_no NOTICE_NO, t1.car_no CAR_NO, t1.trailer_no TRAILER_NO, t1.matter_no MATTER_NO,
|
|
|
|
|
- t1.matter_name MATTER_NAME, t1.contract_no CONTRACT_NO, t1.batch_no BATCH_NO, t1.customer_supplier_no CUSTOMER_SUPPLIER_NO,
|
|
|
|
|
- t1.customer_supplier_name CUSTOMER_SUPPLIER_NAME, t1.forwarding_unit_no FORWARDING_UNIT_NO, t1.forwarding_unit_name FORWARDING_UNIT_NAME,
|
|
|
|
|
- t1.receiving_uint_no RECEIVING_UINT_NO, t1.receiving_uint_name RECEIVING_UINT_NAME, t1.material_no MATERIAL_NO,
|
|
|
|
|
- t1.voucher_identity, t1.voucher_item, t1.business_group, t1.temp_conveyance, t1.conveyance_type,
|
|
|
|
|
- t1.resource_system, t1.group_package_amount, t1.group_package_unit, t1.package_amount,
|
|
|
|
|
- t1.package_unit, t1.theory_amount, t1.measure_batch,t1.measure_batch_count,t1.sender_type,
|
|
|
|
|
- t1.sender_remark,t1.receiver_type, t1.receiver_remark,t1.amount_unit,t1.data_source,
|
|
|
|
|
- t1.material_name MATERIAL_NAME, t1.spec_no SPEC_NO, t1.spec_name SPEC_NAME, t1.load_point_no LOAD_POINT_NO, t1.load_point_name LOAD_POINT_NAME,
|
|
|
|
|
- t1.sample_no SAMPLE_NO,t1.sample_voucher SAMPLE_VOUCHER,t1.carrier_unit_no CARRIER_UNIT_NO,t1.carrier_unit_name CARRIER_UNIT_NAME,
|
|
|
|
|
- t1.meter_type_no METER_TYPE_NO, t1.meter_type_name METER_TYPE_NAME,t1.meter_process_no METER_PROCESS_NO, t1.meter_process_edition_no METER_PROCESS_EDITION_NO,
|
|
|
|
|
- t1.actual_first_no ACTUAL_FIRST1_NO, t1.meter_weight GROSS_WEIGHT, t1.create_man_no GROSS_MAN_NO, t1.create_man_name GROSS_MAN_NAME, t1.create_time GROSS_TIME,
|
|
|
|
|
- t1.base_spot_no BASE_SPOT1_NO, t1.base_spot_name BASE_SPOT1_NAME,t1.meter_class GROSS_CLASS, t1.meter_group GROSS_GROUP, t1.meter_mode GROSS_MODE,
|
|
|
|
|
- t2.data_no ACTUAL_FIRST2_NO, t2.meter_weight TARE_WEIGHT, t2.create_man_no TARE_MAN_NO, t2.create_man_name TARE_MAN_NAME, t2.create_time TARE_TIME,
|
|
|
|
|
- t2.base_spot_no BASE_SPOT2_NO, t2.base_spot_name BASE_SPOT2_NAME,t1.meter_num METER_NUM
|
|
|
|
|
- from METER_WORK_CAR_ACTUAL_FIRST t1,METER_BASE_TERM_TARE_DATA t2
|
|
|
|
|
- where t1.actual_first_no=#{actualFirstNo,jdbcType=VARCHAR} and t2.DATA_NO=#{dataNo,jdbcType=VARCHAR}
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="selectByTime" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- SELECT
|
|
|
|
|
- <include refid="columns"/>
|
|
|
|
|
- from METER_WORK_CAR_ACTUAL_VIEW
|
|
|
|
|
- <where>
|
|
|
|
|
- <if test="matterNo != null and matterNo != ''">
|
|
|
|
|
- and MATTER_NO = #{matterNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="matterName != null and matterName != ''">
|
|
|
|
|
- and MATTER_NAME = #{matterName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterTypeNo != null and meterTypeNo != ''">
|
|
|
|
|
- and METER_TYPE_NO = #{meterTypeNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterTypeName != null and meterTypeName != ''">
|
|
|
|
|
- and METER_TYPE_NAME = #{meterTypeName}
|
|
|
|
|
- </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>
|
|
|
|
|
- </where>
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="selectParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- SELECT t.ACTUAL_NO, t.PREDICTION_NO, t.NOTICE_NO, t.CAR_NO, t.TRAILER_NO, t.MATTER_NO,
|
|
|
|
|
- m.matter_name_old MATTER_NAME,
|
|
|
|
|
- t.CONTRACT_NO, t.BATCH_NO, t.CUSTOMER_SUPPLIER_NO, t.CUSTOMER_SUPPLIER_NAME, t.FORWARDING_UNIT_NO,
|
|
|
|
|
- t.FORWARDING_UNIT_NAME,
|
|
|
|
|
- t.RECEIVING_UINT_NO, t.RECEIVING_UINT_NAME, t.MATERIAL_NO, t.MATERIAL_NAME, t.SPEC_NO, t.SPEC_NAME,
|
|
|
|
|
- t.LOAD_POINT_NO, t.LOAD_POINT_NAME, t.SAMPLE_NO, t.SAMPLE_VOUCHER, t.CARRIER_UNIT_NO, t.CARRIER_UNIT_NAME,
|
|
|
|
|
- t.METER_TYPE_NO, t.METER_TYPE_NAME, t.METER_PROCESS_NO, t.METER_PROCESS_EDITION_NO, t.ACTUAL_FIRST1_NO,
|
|
|
|
|
- nvl(t.GROSS_WEIGHT,0) GROSS_WEIGHT, t.GROSS_MAN_NO, t.GROSS_MAN_NAME, t.GROSS_TIME, t.BASE_SPOT1_NO,
|
|
|
|
|
- t.BASE_SPOT1_NAME, t.GROSS_CLASS,
|
|
|
|
|
- t.GROSS_GROUP, t.GROSS_MODE, t.ACTUAL_FIRST2_NO, nvl(t.TARE_WEIGHT,0) TARE_WEIGHT, t.TARE_MAN_NO,
|
|
|
|
|
- t.TARE_MAN_NAME, t.TARE_TIME,
|
|
|
|
|
- t.BASE_SPOT2_NO, t.BASE_SPOT2_NAME, t.TARE_CLASS, t.TARE_GROUP, t.TARE_MODE, nvl(t.NET_WEIGHT,0) NET_WEIGHT,
|
|
|
|
|
- t.METER_NUM,
|
|
|
|
|
- t.NET_MAN_NO, t.NET_MAN_NAME, t.NET_TIME, t.NET_SPOT3_NO, t.NET_SPOT3_NAME, t.NET_GROUP, t.NET_MODE,
|
|
|
|
|
- t.VALUE_FLAG,
|
|
|
|
|
- t.UPLOAD_FLAG, t.CHECK_MAN_NO, t.CHECK_MAN_NAME, t.CHECK_TIME, t.UPLOAD_MAN_NO, t.UPLOAD_MAN_NAME,
|
|
|
|
|
- t.UPLOAD_TIME,
|
|
|
|
|
- nvl(t.ADD_WEIGHT,0) ADD_WEIGHT, t.NET_CLASS
|
|
|
|
|
- from METER_WORK_CAR_ACTUAL t,METER_BASE_MATTER_INFO_MATCH m
|
|
|
|
|
- where t.matter_name=m.matter_name(+)
|
|
|
|
|
- <if test="matterNo != null and matterNo != ''">
|
|
|
|
|
- and t.MATTER_NO = #{matterNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="matterName != null and matterName != ''">
|
|
|
|
|
- and t.MATTER_NAME = #{matterName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterTypeNo != null and meterTypeNo != ''">
|
|
|
|
|
- and t.METER_TYPE_NO = #{meterTypeNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterTypeName != null and meterTypeName != ''">
|
|
|
|
|
- and t.METER_TYPE_NAME = #{meterTypeName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterTypeName != null and meterTypeName != ''">
|
|
|
|
|
- and t.METER_TYPE_NAME = #{meterTypeName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="valueFlag != null and valueFlag != ''">
|
|
|
|
|
- and t.value_flag = #{valueFlag}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot1No != null and baseSpot1No != ''">
|
|
|
|
|
- and t.base_spot1_no = #{baseSpot1No}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot2No != null and baseSpot2No != ''">
|
|
|
|
|
- and t.base_spot2_no = #{baseSpot2No}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
- and t.NET_TIME between to_date(#{startTime},'yyyy-MM-dd HH24:mi:ss') and to_date(#{endTime}, 'yyyy-MM-dd
|
|
|
|
|
- HH24:mi:ss')
|
|
|
|
|
- </if>
|
|
|
|
|
- order by t.net_time
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="selectCarNoCount" parameterType="java.util.HashMap" resultType="java.lang.Integer">
|
|
|
|
|
- SELECT count(1) from METER_WORK_CAR_ACTUAL t
|
|
|
|
|
- where value_flag='0'
|
|
|
|
|
- <if test="carNo != null and carNo != ''">
|
|
|
|
|
- and t.CAR_NO = #{carNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="matterNo != null and matterNo != ''">
|
|
|
|
|
- and t.MATTER_NO = #{matterNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="matterName != null and matterName != ''">
|
|
|
|
|
- and t.MATTER_NAME = #{matterName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterTypeNo != null and meterTypeNo != ''">
|
|
|
|
|
- and t.METER_TYPE_NO = #{meterTypeNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterTypeName != null and meterTypeName != ''">
|
|
|
|
|
- and t.METER_TYPE_NAME = #{meterTypeName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterTypeName != null and meterTypeName != ''">
|
|
|
|
|
- and t.METER_TYPE_NAME = #{meterTypeName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="valueFlag != null and valueFlag != ''">
|
|
|
|
|
- and t.value_flag = #{valueFlag}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot1No != null and baseSpot1No != ''">
|
|
|
|
|
- and t.base_spot1_no = #{baseSpot1No}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot2No != null and baseSpot2No != ''">
|
|
|
|
|
- and t.base_spot2_no = #{baseSpot2No}
|
|
|
|
|
- </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>
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 查询计量票据录入产生的数据 -->
|
|
|
|
|
- <select id="selectManualData" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- <include refid="select"/>
|
|
|
|
|
- <where>
|
|
|
|
|
- (DATA_SOURCE = 4)
|
|
|
|
|
- <if test="predictionNo != null and predictionNo != ''">
|
|
|
|
|
- and PREDICTION_NO = #{predictionNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="carNo != null and carNo != ''">
|
|
|
|
|
- and CAR_NO = #{carNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="matterNo != null and matterNo != ''">
|
|
|
|
|
- and MATTER_NO = #{matterNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="matterName != null and matterName != ''">
|
|
|
|
|
- and MATTER_NAME = #{matterName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
|
|
|
|
|
- and FORWARDING_UNIT_NO = #{forwardingUnitNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="forwardingUnitName != null and forwardingUnitName != ''">
|
|
|
|
|
- and FORWARDING_UNIT_NAME = #{forwardingUnitName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receivingUintNo != null and receivingUintNo != ''">
|
|
|
|
|
- and RECEIVING_UINT_NO = #{receivingUintNo}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receivingUintName != null and receivingUintName != ''">
|
|
|
|
|
- and RECEIVING_UINT_NAME = #{receivingUintName}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossTime != null">
|
|
|
|
|
- and TO_CHAR(GROSS_TIME,'yyyy-MM-dd') = #{grossTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot1No != null and baseSpot1No != ''">
|
|
|
|
|
- and BASE_SPOT1_NO = #{baseSpot1No}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot1Name != null and baseSpot1Name != ''">
|
|
|
|
|
- and BASE_SPOT1_NAME = #{baseSpot1Name}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareTime != null">
|
|
|
|
|
- and TO_CHAR(TARE_TIME,'yyyy-MM-dd') = #{tareTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot2No != null and baseSpot2No != ''">
|
|
|
|
|
- and BASE_SPOT2_NO = #{baseSpot2No}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot2Name != null and baseSpot2Name != ''">
|
|
|
|
|
- and BASE_SPOT2_NAME = #{baseSpot2Name}
|
|
|
|
|
- </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>
|
|
|
|
|
- </where> order by net_time asc
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <!--查询需要转换到老系统的数据-->
|
|
|
|
|
- <select id="selectDataConversionOfCar" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- <include refid="select"/>
|
|
|
|
|
- where net_time > sysdate -0.3 and tb_flage = 0 order by net_time asc
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <!--查询车号今天是第几次出现-->
|
|
|
|
|
- <select id="selectRepeatCarNO" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- <include refid="select"/>
|
|
|
|
|
- where CAR_NO = #{carNo} and instr(ACTUAL_NO,#{startTime})>0 order by NET_TIME asc
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 查询:根据传入时间和车号,查询给定时间段去重车号 -->
|
|
|
|
|
- <select id="distinctCarNo" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
- SELECT distinct car_No, net_time
|
|
|
|
|
- from METER_WORK_CAR_ACTUAL
|
|
|
|
|
- where VALUE_FLAG != '0'
|
|
|
|
|
- <if test="baseSpotNames != null and baseSpotNames.size() != 0">
|
|
|
|
|
- and NET_SPOT3_NAME in
|
|
|
|
|
- <foreach collection="baseSpotNames" item="id" open="(" close=")" separator=",">
|
|
|
|
|
- #{id}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
- <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="predictionNo != null and predictionNo != ''">
|
|
|
|
|
- and PREDICTION_NO LIKE '%${predictionNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="dataSource != null and dataSource != null">
|
|
|
|
|
- and data_source = '${dataSource}'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="valueFlag != null and valueFlag != ''">
|
|
|
|
|
- and value_flag = #{valueFlag}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="carNo != null and carNo != null">
|
|
|
|
|
- and CAR_NO like '%${carNo}%'
|
|
|
|
|
- </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="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="isPreScale != null and isPreScale != ''">
|
|
|
|
|
- and is_pre_scale = #{isPreScale}
|
|
|
|
|
- </if>
|
|
|
|
|
-
|
|
|
|
|
- order by net_time desc
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <select id="selectActual" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
|
|
- SELECT *
|
|
|
|
|
- from METER_WORK_CAR_ACTUAL
|
|
|
|
|
- where ACTUAL_FIRST1_NO = #{actualFirstNo} or ACTUAL_FIRST2_NO = #{actualFirstNo}
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="getCarActual" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- select * from METER_WORK_CAR_ACTUAL WHERE CAR_NO IN (select CAR_NO from METER_BASE_CAR where CUSTOMER_SUPPLIER_NO = #{customerSupplierNo} and CUSTOMER_SUPPLIER_NAME = #{customerSupplierName})
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="likeByDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- <include refid="select"/>
|
|
|
|
|
- <where>
|
|
|
|
|
- 1=1
|
|
|
|
|
- <if test="baseSpotNames != null and baseSpotNames.size() != 0">
|
|
|
|
|
- and NET_SPOT3_NAME in
|
|
|
|
|
- <foreach collection="baseSpotNames" item="id" open="(" close=")" separator=",">
|
|
|
|
|
- #{id}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </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="noticeNo != null and noticeNo != ''">
|
|
|
|
|
- and NOTICE_NO LIKE '%${noticeNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="carNo != null and carNo != ''">
|
|
|
|
|
- and CAR_NO LIKE '%${carNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="trailerNo != null and trailerNo != ''">
|
|
|
|
|
- and TRAILER_NO LIKE '%${trailerNo}%'
|
|
|
|
|
- </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="contractNo != null and contractNo != ''">
|
|
|
|
|
- and CONTRACT_NO LIKE '%${contractNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="batchNo != null and batchNo != ''">
|
|
|
|
|
- and BATCH_NO LIKE '%${batchNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="customerSupplierNo != null and customerSupplierNo != ''">
|
|
|
|
|
- and CUSTOMER_SUPPLIER_NO LIKE '%${customerSupplierNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="customerSupplierName != null and customerSupplierName != ''">
|
|
|
|
|
- and CUSTOMER_SUPPLIER_NAME LIKE '%${customerSupplierName}%'
|
|
|
|
|
- </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="specNo != null and specNo != ''">
|
|
|
|
|
- and SPEC_NO LIKE '%${specNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="specName != null and specName != ''">
|
|
|
|
|
- and SPEC_NAME LIKE '%${specName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="loadPointNo != null and loadPointNo != ''">
|
|
|
|
|
- and LOAD_POINT_NO LIKE '%${loadPointNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="loadPointName != null and loadPointName != ''">
|
|
|
|
|
- and LOAD_POINT_NAME LIKE '%${loadPointName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="sampleNo != null and sampleNo != ''">
|
|
|
|
|
- and SAMPLE_NO LIKE '%${sampleNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="sampleVoucher != null and sampleVoucher != ''">
|
|
|
|
|
- and SAMPLE_VOUCHER LIKE '%${sampleVoucher}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="carrierUnitNo != null and carrierUnitNo != ''">
|
|
|
|
|
- and CARRIER_UNIT_NO LIKE '%${carrierUnitNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="carrierUnitName != null and carrierUnitName != ''">
|
|
|
|
|
- and CARRIER_UNIT_NAME LIKE '%${carrierUnitName}%'
|
|
|
|
|
- </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="meterProcessNo != null and meterProcessNo != ''">
|
|
|
|
|
- and METER_PROCESS_NO LIKE '%${meterProcessNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterProcessEditionNo != null and meterProcessEditionNo != ''">
|
|
|
|
|
- and METER_PROCESS_EDITION_NO LIKE '%${meterProcessEditionNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="actualFirst1No != null and actualFirst1No != ''">
|
|
|
|
|
- and ACTUAL_FIRST1_NO LIKE '%${actualFirst1No}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossWeight != null">
|
|
|
|
|
- and GROSS_WEIGHT = #{grossWeight}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossManNo != null and grossManNo != ''">
|
|
|
|
|
- and GROSS_MAN_NO LIKE '%${grossManNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossManName != null and grossManName != ''">
|
|
|
|
|
- and GROSS_MAN_NAME LIKE '%${grossManName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossTime != null">
|
|
|
|
|
- and TO_CHAR(GROSS_TIME,'yyyy-MM-dd') = #{grossTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot1No != null and baseSpot1No != ''">
|
|
|
|
|
- and BASE_SPOT1_NO LIKE '%${baseSpot1No}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot1Name != null and baseSpot1Name != ''">
|
|
|
|
|
- and BASE_SPOT1_NAME LIKE '%${baseSpot1Name}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossClass != null and grossClass != ''">
|
|
|
|
|
- and GROSS_CLASS LIKE '%${grossClass}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossGroup != null and grossGroup != ''">
|
|
|
|
|
- and GROSS_GROUP LIKE '%${grossGroup}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="grossMode != null and grossMode != ''">
|
|
|
|
|
- and GROSS_MODE LIKE '%${grossMode}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="actualFirst2No != null and actualFirst2No != ''">
|
|
|
|
|
- and ACTUAL_FIRST2_NO LIKE '%${actualFirst2No}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareWeight != null">
|
|
|
|
|
- and TARE_WEIGHT = #{tareWeight}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareManNo != null and tareManNo != ''">
|
|
|
|
|
- and TARE_MAN_NO LIKE '%${tareManNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareManName != null and tareManName != ''">
|
|
|
|
|
- and TARE_MAN_NAME LIKE '%${tareManName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareTime != null">
|
|
|
|
|
- and TO_CHAR(TARE_TIME,'yyyy-MM-dd') = #{tareTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot2No != null and baseSpot2No != ''">
|
|
|
|
|
- and BASE_SPOT2_NO LIKE '%${baseSpot2No}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="baseSpot2Name != null and baseSpot2Name != ''">
|
|
|
|
|
- and BASE_SPOT2_NAME LIKE '%${baseSpot2Name}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareClass != null and tareClass != ''">
|
|
|
|
|
- and TARE_CLASS LIKE '%${tareClass}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareGroup != null and tareGroup != ''">
|
|
|
|
|
- and TARE_GROUP LIKE '%${tareGroup}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tareMode != null and tareMode != ''">
|
|
|
|
|
- and TARE_MODE LIKE '%${tareMode}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="netWeight != null">
|
|
|
|
|
- and NET_WEIGHT = #{netWeight}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterNum != null">
|
|
|
|
|
- and METER_NUM = #{meterNum}
|
|
|
|
|
- </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="netGroup != null and netGroup != ''">
|
|
|
|
|
- and NET_GROUP LIKE '%${netGroup}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="netMode != null and netMode != ''">
|
|
|
|
|
- and NET_MODE LIKE '%${netMode}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="valueFlag != null and valueFlag != ''">
|
|
|
|
|
- and VALUE_FLAG = #{valueFlag}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="uploadFlag != null and uploadFlag != ''">
|
|
|
|
|
- and UPLOAD_FLAG LIKE '%${uploadFlag}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="checkManNo != null and checkManNo != ''">
|
|
|
|
|
- and CHECK_MAN_NO LIKE '%${checkManNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="checkManName != null and checkManName != ''">
|
|
|
|
|
- and CHECK_MAN_NAME LIKE '%${checkManName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="checkTime != null">
|
|
|
|
|
- and TO_CHAR(CHECK_TIME,'yyyy-MM-dd') = #{checkTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="uploadManNo != null and uploadManNo != ''">
|
|
|
|
|
- and UPLOAD_MAN_NO LIKE '%${uploadManNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="uploadManName != null and uploadManName != ''">
|
|
|
|
|
- and UPLOAD_MAN_NAME LIKE '%${uploadManName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="uploadTime != null">
|
|
|
|
|
- and TO_CHAR(UPLOAD_TIME,'yyyy-MM-dd') = #{uploadTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="addWeight != null">
|
|
|
|
|
- and ADD_WEIGHT = #{addWeight}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="netClass != null and netClass != ''">
|
|
|
|
|
- and NET_CLASS LIKE '%${netClass}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tbFlage != null and tbFlage != ''">
|
|
|
|
|
- and TB_FLAGE LIKE '%${tbFlage}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="railwayNo != null and railwayNo != ''">
|
|
|
|
|
- and RAILWAY_NO LIKE '%${railwayNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManNo != null and updateManNo != ''">
|
|
|
|
|
- and UPDATE_MAN_NO LIKE '%${updateManNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateManName != null and updateManName != ''">
|
|
|
|
|
- and UPDATE_MAN_NAME LIKE '%${updateManName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="updateTime != null">
|
|
|
|
|
- and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="memo != null and memo != ''">
|
|
|
|
|
- and MEMO LIKE '%${memo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="heatNo != null and heatNo != ''">
|
|
|
|
|
- and HEAT_NO LIKE '%${heatNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="shipmentGrossWeight != null">
|
|
|
|
|
- and SHIPMENT_GROSS_WEIGHT = #{shipmentGrossWeight}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="shipmentNetWeight != null">
|
|
|
|
|
- and SHIPMENT_NET_WEIGHT = #{shipmentNetWeight}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="shipmentNum != null">
|
|
|
|
|
- and SHIPMENT_NUM = #{shipmentNum}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="bindCardNo != null and bindCardNo != ''">
|
|
|
|
|
- and BIND_CARD_NO LIKE '%${bindCardNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="predictionType != null and predictionType != ''">
|
|
|
|
|
- and PREDICTION_TYPE LIKE '%${predictionType}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="predictionCombination != null and predictionCombination != ''">
|
|
|
|
|
- and PREDICTION_COMBINATION LIKE '%${predictionCombination}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterPierName != null and meterPierName != ''">
|
|
|
|
|
- and METER_PIER_NAME LIKE '%${meterPierName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="meterPierNo != null and meterPierNo != ''">
|
|
|
|
|
- and METER_PIER_NO LIKE '%${meterPierNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="shipNo != null and shipNo != ''">
|
|
|
|
|
- and SHIP_NO LIKE '%${shipNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="note != null and note != ''">
|
|
|
|
|
- and NOTE LIKE '%${note}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="voucherIdentity != null and voucherIdentity != ''">
|
|
|
|
|
- and VOUCHER_IDENTITY LIKE '%${voucherIdentity}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="voucherItem != null and voucherItem != ''">
|
|
|
|
|
- and VOUCHER_ITEM LIKE '%${voucherItem}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="businessGroup != null and businessGroup != ''">
|
|
|
|
|
- and BUSINESS_GROUP LIKE '%${businessGroup}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="tempConveyance != null and tempConveyance != ''">
|
|
|
|
|
- and TEMP_CONVEYANCE LIKE '%${tempConveyance}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="conveyanceType != null and conveyanceType != ''">
|
|
|
|
|
- and CONVEYANCE_TYPE LIKE '%${conveyanceType}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="resourceSystem != null and resourceSystem != ''">
|
|
|
|
|
- and RESOURCE_SYSTEM LIKE '%${resourceSystem}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="groupPackageAmount != null">
|
|
|
|
|
- and GROUP_PACKAGE_AMOUNT = #{groupPackageAmount}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="groupPackageUnit != null and groupPackageUnit != ''">
|
|
|
|
|
- and GROUP_PACKAGE_UNIT LIKE '%${groupPackageUnit}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="packageAmount != null">
|
|
|
|
|
- and PACKAGE_AMOUNT = #{packageAmount}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="packageUnit != null and packageUnit != ''">
|
|
|
|
|
- and PACKAGE_UNIT LIKE '%${packageUnit}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="theoryAmount != null">
|
|
|
|
|
- and THEORY_AMOUNT = #{theoryAmount}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="measureBatch != null and measureBatch != ''">
|
|
|
|
|
- and MEASURE_BATCH LIKE '%${measureBatch}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="measureBatchCount != null">
|
|
|
|
|
- and MEASURE_BATCH_COUNT = #{measureBatchCount}
|
|
|
|
|
- </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="receiverType != null and receiverType != ''">
|
|
|
|
|
- and RECEIVER_TYPE LIKE '%${receiverType}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receiverRemark != null and receiverRemark != ''">
|
|
|
|
|
- and RECEIVER_REMARK LIKE '%${receiverRemark}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="amountUnit != null and amountUnit != ''">
|
|
|
|
|
- and AMOUNT_UNIT LIKE '%${amountUnit}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="measureObjectType != null and measureObjectType != ''">
|
|
|
|
|
- and MEASURE_OBJECT_TYPE LIKE '%${measureObjectType}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="measureTaskNum != null and measureTaskNum != ''">
|
|
|
|
|
- and MEASURE_TASK_NUM LIKE '%${measureTaskNum}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="billType != null and billType != ''">
|
|
|
|
|
- and BILL_TYPE LIKE '%${billType}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="createManName != null and createManName != ''">
|
|
|
|
|
- and CREATE_MAN_NAME LIKE '%${createManName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="dataSource != null and dataSource != ''">
|
|
|
|
|
- and DATA_SOURCE LIKE '%${dataSource}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="isPreScale != null and isPreScale != ''">
|
|
|
|
|
- and IS_PRE_SCALE = #{isPreScale}
|
|
|
|
|
- </if>
|
|
|
|
|
- </where>
|
|
|
|
|
- <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="netSpot3NoStr != null and netSpot3NoStr != ''">
|
|
|
|
|
- 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'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="groupId != null and groupId != ''">
|
|
|
|
|
- and NET_SPOT3_NO in (SELECT METER_BASE_GROUP_SPOT.SPOT_ID FROM METER_BASE_GROUP_SPOT WHERE METER_BASE_GROUP_SPOT.GROUP_ID = #{groupId})
|
|
|
|
|
- </if>
|
|
|
|
|
-
|
|
|
|
|
- order by net_time desc
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="selectByMap" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- <include refid="select"/>
|
|
|
|
|
- <include refid="whereLike"/>
|
|
|
|
|
- and value_flag != '0'
|
|
|
|
|
- order by ACTUAL_NO desc
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="selectOldAndNew" parameterType="java.util.HashMap" resultType="HashMap">
|
|
|
|
|
- SELECT *
|
|
|
|
|
- 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>
|
|
|
|
|
- </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>
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <select id="countOldAndNew" parameterType="java.util.HashMap" resultType="HashMap">
|
|
|
|
|
- select * from
|
|
|
|
|
- (
|
|
|
|
|
- select matter_no,
|
|
|
|
|
- matter_name,
|
|
|
|
|
- count(1) countSum,
|
|
|
|
|
- sum(net_weight) net_weight,
|
|
|
|
|
- sum(gross_weight) gross_weight,
|
|
|
|
|
- sum(tare_weight) tare_weight,
|
|
|
|
|
- forwarding_unit_no,
|
|
|
|
|
- forwarding_unit_name,
|
|
|
|
|
- receiving_uint_no,
|
|
|
|
|
- receiving_uint_name,
|
|
|
|
|
- '新系统' 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>
|
|
|
|
|
- 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
|
|
|
|
|
- )
|
|
|
|
|
- )
|
|
|
|
|
- where 1=1
|
|
|
|
|
- <if test="remark != null and remark != ''">
|
|
|
|
|
- and remark LIKE '%${remark}%'
|
|
|
|
|
- </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="countAllState" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- <include refid="select"/>
|
|
|
|
|
- where 1 = 1
|
|
|
|
|
- <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="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="netSpot3NoStr != null and netSpot3NoStr != ''">
|
|
|
|
|
- and net_spot3_no in
|
|
|
|
|
- <foreach collection="spotNoStr" item="item" open="(" separator="," close=")">
|
|
|
|
|
- #{item}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="carActualDataDetail" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- <include refid="select"/>
|
|
|
|
|
- where 1 = 1
|
|
|
|
|
- <if test="validFlag != null and validFlag != ''">
|
|
|
|
|
- and value_flag != '0'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="valueFlag != null and valueFlag != ''">
|
|
|
|
|
- and value_flag = #{valueFlag}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="isPreScale != null and isPreScale != ''">
|
|
|
|
|
- and IS_PRE_SCALE = #{isPreScale}
|
|
|
|
|
- </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>
|
|
|
|
|
- order by net_time desc
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <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
|
|
|
|
|
- from pre_track_scale A
|
|
|
|
|
- left join meter_work_car_actual B
|
|
|
|
|
- on A.prediction_no = B.prediction_no
|
|
|
|
|
- where A.theory_amount 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>
|
|
|
|
|
- <if test="carNo != null and carNo != ''">
|
|
|
|
|
- and B.car_no like '%${carNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
|
|
|
|
|
- and B.FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="forwardingUnitName != null and forwardingUnitName != ''">
|
|
|
|
|
- and B.FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receivingUintNo != null and receivingUintNo != ''">
|
|
|
|
|
- and B.RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="receivingUintName != null and receivingUintName != ''">
|
|
|
|
|
- and B.RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="matterNo != null and matterNo != ''">
|
|
|
|
|
- and B.matter_no LIKE '%${matterNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="matterName != null and matterName != ''">
|
|
|
|
|
- and B.matter_name LIKE '%${matterName}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- order by B.net_time desc
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 查询符合内倒双委托车辆在铁合金秤点用普通委托信息过磅的结净信息倒序 -->
|
|
|
|
|
- <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'
|
|
|
|
|
- <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
|
|
|
|
|
- </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
|
|
|
|
|
- </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
|
|
|
|
|
- from meter_work_car_actual A
|
|
|
|
|
- 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 = #{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 = #{isPreScale}
|
|
|
|
|
- </if>
|
|
|
|
|
- group by A.net_spot3_no,
|
|
|
|
|
- A.net_spot3_name,
|
|
|
|
|
- A.net_man_no,
|
|
|
|
|
- A.net_man_name
|
|
|
|
|
- </select>
|
|
|
|
|
-
|
|
|
|
|
- <select id="smallAndNegativeNetWeightRatio" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- select A.actual_no,
|
|
|
|
|
- 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
|
|
|
|
|
- from meter_work_car_actual A
|
|
|
|
|
- where A.net_weight <= 2000
|
|
|
|
|
- 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>
|
|
|
|
|
- <if test="carNo != null and carNo != ''">
|
|
|
|
|
- and A.car_no like '%${carNo}%'
|
|
|
|
|
- </if>
|
|
|
|
|
- </select>
|
|
|
|
|
- <select id="getNetFilterCheck"
|
|
|
|
|
- resultType="java.util.LinkedHashMap">
|
|
|
|
|
- <include refid="select"></include>
|
|
|
|
|
- <where>
|
|
|
|
|
- <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>
|
|
|
|
|
- </where>
|
|
|
|
|
- order by net_time desc
|
|
|
|
|
- </select>
|
|
|
|
|
- <select id="getNetFilterCheckWeightReversal" resultType="java.util.LinkedHashMap">
|
|
|
|
|
- <include refid="select"></include>
|
|
|
|
|
- <where>
|
|
|
|
|
- <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 maxWgt != null and maxWgt != ''">
|
|
|
|
|
- and (NET_WEIGHT/1000 < '${minWgt}' or NET_WEIGHT/1000 > '${maxWgt}')
|
|
|
|
|
- </if>
|
|
|
|
|
- </where>
|
|
|
|
|
- order by net_time desc
|
|
|
|
|
|
|
+ <select id="selectDuplicatePredictions" resultType="com.steerinfo.abnormalHandler.dto.DuplicatePrediction">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ PREDICTION_NO "predictionNo",
|
|
|
|
|
+ COUNT( 1 ) "count"
|
|
|
|
|
+ FROM
|
|
|
|
|
+ METER_WORK_CAR_ACTUAL
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ VALUE_FLAG != '0'
|
|
|
|
|
+ AND PREDICTION_NO IS NOT NULL
|
|
|
|
|
+ AND CREATE_TIME >= SYSDATE - 3
|
|
|
|
|
+ GROUP BY
|
|
|
|
|
+ PREDICTION_NO,
|
|
|
|
|
+ CAR_NO,
|
|
|
|
|
+ NET_WEIGHT,
|
|
|
|
|
+ FORWARDING_UNIT_NO,
|
|
|
|
|
+ RECEIVING_UINT_NO
|
|
|
|
|
+ HAVING
|
|
|
|
|
+ COUNT( 1 ) > 1 FETCH NEXT 20 ROWS ONLY
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="selectActualRecordsByPrediction" resultType="com.steerinfo.abnormalHandler.dto.ActualRecord">
|
|
|
|
|
+ SELECT ACTUAL_NO,
|
|
|
|
|
+ PREDICTION_NO,
|
|
|
|
|
+ ACTUAL_FIRST1_NO,
|
|
|
|
|
+ ACTUAL_FIRST2_NO,
|
|
|
|
|
+ CREATE_TIME,
|
|
|
|
|
+ VALUE_FLAG
|
|
|
|
|
+ FROM METER_WORK_CAR_ACTUAL
|
|
|
|
|
+ WHERE PREDICTION_NO = #{predictionNo}
|
|
|
|
|
+ AND VALUE_FLAG != '0'
|
|
|
|
|
+ ORDER BY CREATE_TIME ASC, ACTUAL_NO ASC
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="findCommonRemove" resultMap="BaseResultMap">
|
|
|
|
|
- select * from METER_WORK_CAR_ACTUAL t where t.car_no in ('甘B07522','甘AQY023','甘B07268','晋B91232','晋JW5922')
|
|
|
|
|
- AND TO_CHAR(T.NET_TIME,'yyyy-MM-dd') >= '2026-04-25'
|
|
|
|
|
- AND TO_CHAR(T.NET_TIME,'yyyy-MM-dd') <= '2026-05-25'
|
|
|
|
|
- AND T.VALUE_FLAG = '1'
|
|
|
|
|
- </select>
|
|
|
|
|
- <select id="selectByMapRe" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
|
|
- <include refid="select"/>
|
|
|
|
|
- WHERE CAR_NO = #{carNo}
|
|
|
|
|
- and value_flag != '0'
|
|
|
|
|
- order by ACTUAL_NO desc
|
|
|
|
|
- FETCH FIRST 1 ROW ONLY
|
|
|
|
|
- </select>
|
|
|
|
|
- <select id="selectLastUpWeightByCarNo" resultType="java.math.BigDecimal">
|
|
|
|
|
- SELECT * FROM METER_WORK_CAR_ACTUAL WHERE CAR_NO = #{carNo} AND VALUE_FLAG != '0' AND prediction_Type = 1 ORDER BY NET_TIME DESC
|
|
|
|
|
- FETCH FIRST 1 ROW ONLY
|
|
|
|
|
- </select>
|
|
|
|
|
|
|
+ <update id="invalidateActualRecord">
|
|
|
|
|
|
|
|
|
|
+ </update>
|
|
|
</mapper>
|
|
</mapper>
|