|
|
@@ -15,11 +15,11 @@
|
|
|
<result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- ID, CHECK_ID, CHECK_START_TIME, CHECK_END_TIME, CHECK_USED_SECONDS, CHECK_MAN_NO,
|
|
|
+ ID, CHECK_ID, CHECK_START_TIME, CHECK_END_TIME, CHECK_USED_SECONDS, CHECK_MAN_NO,
|
|
|
CHECK_MAN_NAME, CHECK_RESULT, TYPE_NO, TYPE_NAME, VALUE_FLAG
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.ID, t.CHECK_ID, t.CHECK_START_TIME, t.CHECK_END_TIME, t.CHECK_USED_SECONDS, t.CHECK_MAN_NO,
|
|
|
+ t.ID, t.CHECK_ID, t.CHECK_START_TIME, t.CHECK_END_TIME, t.CHECK_USED_SECONDS, t.CHECK_MAN_NO,
|
|
|
t.CHECK_MAN_NAME, t.CHECK_RESULT, t.TYPE_NO, t.TYPE_NAME, t.VALUE_FLAG
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
@@ -29,7 +29,7 @@
|
|
|
SELECT <include refid="columns_alias" /> FROM METER_WORK_CHECK_FIRST_ACTUAL t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="id != null and id != ''">
|
|
|
and ID = #{id}
|
|
|
</if>
|
|
|
@@ -66,7 +66,7 @@
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="id != null and id != ''">
|
|
|
and ID LIKE '%${id}%'
|
|
|
</if>
|
|
|
@@ -108,7 +108,7 @@
|
|
|
</delete>
|
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
delete from METER_WORK_CHECK_FIRST_ACTUAL
|
|
|
- where 1!=1
|
|
|
+ where 1!=1
|
|
|
<if test="checkId != null and checkId != ''">
|
|
|
or CHECK_ID = #{checkId}
|
|
|
</if>
|
|
|
@@ -141,13 +141,13 @@
|
|
|
</if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActual">
|
|
|
- insert into METER_WORK_CHECK_FIRST_ACTUAL (ID, CHECK_ID, CHECK_START_TIME,
|
|
|
- CHECK_END_TIME, CHECK_USED_SECONDS, CHECK_MAN_NO,
|
|
|
- CHECK_MAN_NAME, CHECK_RESULT, TYPE_NO,
|
|
|
+ insert into METER_WORK_CHECK_FIRST_ACTUAL (ID, CHECK_ID, CHECK_START_TIME,
|
|
|
+ CHECK_END_TIME, CHECK_USED_SECONDS, CHECK_MAN_NO,
|
|
|
+ CHECK_MAN_NAME, CHECK_RESULT, TYPE_NO,
|
|
|
TYPE_NAME, VALUE_FLAG)
|
|
|
- values (#{id,jdbcType=VARCHAR}, #{checkId,jdbcType=VARCHAR}, #{checkStartTime,jdbcType=TIMESTAMP},
|
|
|
- #{checkEndTime,jdbcType=TIMESTAMP}, #{checkUsedSeconds,jdbcType=DECIMAL}, #{checkManNo,jdbcType=VARCHAR},
|
|
|
- #{checkManName,jdbcType=VARCHAR}, #{checkResult,jdbcType=VARCHAR}, #{typeNo,jdbcType=VARCHAR},
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{checkId,jdbcType=VARCHAR}, #{checkStartTime,jdbcType=TIMESTAMP},
|
|
|
+ #{checkEndTime,jdbcType=TIMESTAMP}, #{checkUsedSeconds,jdbcType=DECIMAL}, #{checkManNo,jdbcType=VARCHAR},
|
|
|
+ #{checkManName,jdbcType=VARCHAR}, #{checkResult,jdbcType=VARCHAR}, #{typeNo,jdbcType=VARCHAR},
|
|
|
#{typeName,jdbcType=VARCHAR}, #{valueFlag,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActual">
|
|
|
@@ -286,19 +286,19 @@
|
|
|
<include refid="whereLike" />
|
|
|
</select>
|
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
|
- insert into METER_WORK_CHECK_FIRST_ACTUAL
|
|
|
- (ID,
|
|
|
- CHECK_ID, CHECK_START_TIME, CHECK_END_TIME,
|
|
|
- CHECK_USED_SECONDS, CHECK_MAN_NO,
|
|
|
- CHECK_MAN_NAME, CHECK_RESULT, TYPE_NO,
|
|
|
+ insert into METER_WORK_CHECK_FIRST_ACTUAL
|
|
|
+ (ID,
|
|
|
+ CHECK_ID, CHECK_START_TIME, CHECK_END_TIME,
|
|
|
+ CHECK_USED_SECONDS, CHECK_MAN_NO,
|
|
|
+ CHECK_MAN_NAME, CHECK_RESULT, TYPE_NO,
|
|
|
TYPE_NAME, VALUE_FLAG)
|
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
- select
|
|
|
- #{item.id,jdbcType=VARCHAR},
|
|
|
- #{item.checkId,jdbcType=VARCHAR}, #{item.checkStartTime,jdbcType=TIMESTAMP}, #{item.checkEndTime,jdbcType=TIMESTAMP},
|
|
|
- #{item.checkUsedSeconds,jdbcType=DECIMAL}, #{item.checkManNo,jdbcType=VARCHAR},
|
|
|
- #{item.checkManName,jdbcType=VARCHAR}, #{item.checkResult,jdbcType=VARCHAR}, #{item.typeNo,jdbcType=VARCHAR},
|
|
|
- #{item.typeName,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR} from dual
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.id,jdbcType=VARCHAR},
|
|
|
+ #{item.checkId,jdbcType=VARCHAR}, #{item.checkStartTime,jdbcType=TIMESTAMP}, #{item.checkEndTime,jdbcType=TIMESTAMP},
|
|
|
+ #{item.checkUsedSeconds,jdbcType=DECIMAL}, #{item.checkManNo,jdbcType=VARCHAR},
|
|
|
+ #{item.checkManName,jdbcType=VARCHAR}, #{item.checkResult,jdbcType=VARCHAR}, #{item.typeNo,jdbcType=VARCHAR},
|
|
|
+ #{item.typeName,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
@@ -348,14 +348,14 @@
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case ID" separator=" ">
|
|
|
when #{item.id,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
- where ID in
|
|
|
+ where ID in
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.id,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
+ </foreach>
|
|
|
</update>
|
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
|
delete from METER_WORK_CHECK_FIRST_ACTUAL
|
|
|
- where ID in
|
|
|
+ where ID in
|
|
|
<foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
@@ -497,6 +497,7 @@
|
|
|
select *
|
|
|
from meter_work_car_actual_first
|
|
|
where 1 = 1
|
|
|
+ and value_flag != '0'
|
|
|
<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')
|
|
|
@@ -522,6 +523,7 @@
|
|
|
<if test="typeName != null and typeName != ''">
|
|
|
and C.type_Name = #{typeName}
|
|
|
</if>)
|
|
|
+ and A.value_flag != '0'
|
|
|
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
and A.create_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
and A.create_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
@@ -650,6 +652,7 @@
|
|
|
select *
|
|
|
from meter_work_car_actual
|
|
|
where 1 = 1
|
|
|
+ and value_flag != '0'
|
|
|
<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')
|
|
|
@@ -675,6 +678,7 @@
|
|
|
<if test="typeName != null and typeName != ''">
|
|
|
and C.type_Name = #{typeName}
|
|
|
</if>)
|
|
|
+ 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')
|
|
|
@@ -746,6 +750,7 @@
|
|
|
<if test="typeName != null and typeName != ''">
|
|
|
and C.type_Name = #{typeName}
|
|
|
</if>)
|
|
|
+ and A.value_flag != '0'
|
|
|
<if test="actualNo != null and actualNo != ''">
|
|
|
and A.actual_no = #{actualNo}
|
|
|
</if>
|
|
|
@@ -842,6 +847,7 @@
|
|
|
<if test="typeName != null and typeName != ''">
|
|
|
and C.type_Name = #{typeName}
|
|
|
</if>)
|
|
|
+ and A.value_flag != '0'
|
|
|
<if test="actualFirstNo != null and actualFirstNo != ''">
|
|
|
and A.actual_first_no = #{actualFirstNo}
|
|
|
</if>
|
|
|
@@ -994,6 +1000,7 @@
|
|
|
where 1 = 1
|
|
|
and C.value_flag = '0'
|
|
|
and C.type_no = '001002001')
|
|
|
+ and A.value_flag != '0'
|
|
|
<if test="actualFirstNo != null and actualFirstNo != ''">
|
|
|
and A.actual_first_no = #{actualFirstNo}
|
|
|
</if>
|
|
|
@@ -1068,6 +1075,7 @@
|
|
|
where 1 = 1
|
|
|
and B.value_flag = '1'
|
|
|
and B.type_no = '001002001')
|
|
|
+ and A.value_flag != '0'
|
|
|
<if test="actualNo != null and actualNo != ''">
|
|
|
and A.actual_no = #{actualNo}
|
|
|
</if>
|
|
|
@@ -1083,4 +1091,796 @@
|
|
|
</if>
|
|
|
order by A.net_time desc
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+
|
|
|
+ <resultMap id="railwayFirstResultMap" type="com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst">
|
|
|
+ <id column="ACTUAL_FIRST_NO" jdbcType="VARCHAR" property="actualFirstNo" />
|
|
|
+ <result column="PREDICTION_NO" jdbcType="VARCHAR" property="predictionNo" />
|
|
|
+ <result column="NOTICE_NO" jdbcType="VARCHAR" property="noticeNo" />
|
|
|
+ <result column="RAILWAY_NO" jdbcType="VARCHAR" property="railwayNo" />
|
|
|
+ <result column="RAILWAY_CARRIAGE_NO" jdbcType="VARCHAR" property="railwayCarriageNo" />
|
|
|
+ <result column="RAILWAY_WORK_NO" jdbcType="VARCHAR" property="railwayWorkNo" />
|
|
|
+ <result column="RAILWAY_SPEED" jdbcType="DECIMAL" property="railwaySpeed" />
|
|
|
+ <result column="MATTER_NO" jdbcType="VARCHAR" property="matterNo" />
|
|
|
+ <result column="MATTER_NAME" jdbcType="VARCHAR" property="matterName" />
|
|
|
+ <result column="CONTRACT_NO" jdbcType="VARCHAR" property="contractNo" />
|
|
|
+ <result column="BATCH_NO" jdbcType="VARCHAR" property="batchNo" />
|
|
|
+ <result column="CUSTOMER_SUPPLIER_NO" jdbcType="VARCHAR" property="customerSupplierNo" />
|
|
|
+ <result column="CUSTOMER_SUPPLIER_NAME" jdbcType="VARCHAR" property="customerSupplierName" />
|
|
|
+ <result column="FORWARDING_UNIT_NO" jdbcType="VARCHAR" property="forwardingUnitNo" />
|
|
|
+ <result column="FORWARDING_UNIT_NAME" jdbcType="VARCHAR" property="forwardingUnitName" />
|
|
|
+ <result column="RECEIVING_UINT_NO" jdbcType="VARCHAR" property="receivingUintNo" />
|
|
|
+ <result column="RECEIVING_UINT_NAME" jdbcType="VARCHAR" property="receivingUintName" />
|
|
|
+ <result column="MATERIAL_NO" jdbcType="VARCHAR" property="materialNo" />
|
|
|
+ <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName" />
|
|
|
+ <result column="SPEC_NO" jdbcType="VARCHAR" property="specNo" />
|
|
|
+ <result column="SPEC_NAME" jdbcType="VARCHAR" property="specName" />
|
|
|
+ <result column="SHIPMENT_GROSS_WEIGHT" jdbcType="DECIMAL" property="shipmentGrossWeight" />
|
|
|
+ <result column="SHIPMENT_NET_WEIGHT" jdbcType="DECIMAL" property="shipmentNetWeight" />
|
|
|
+ <result column="SHIPMENT_NUM" jdbcType="DECIMAL" property="shipmentNum" />
|
|
|
+ <result column="BIND_CARD_NO" jdbcType="VARCHAR" property="bindCardNo" />
|
|
|
+ <result column="LOAD_POINT_NO" jdbcType="VARCHAR" property="loadPointNo" />
|
|
|
+ <result column="LOAD_POINT_NAME" jdbcType="VARCHAR" property="loadPointName" />
|
|
|
+ <result column="SAMPLE_NO" jdbcType="VARCHAR" property="sampleNo" />
|
|
|
+ <result column="SAMPLE_VOUCHER" jdbcType="VARCHAR" property="sampleVoucher" />
|
|
|
+ <result column="CARRIER_UNIT_NO" jdbcType="VARCHAR" property="carrierUnitNo" />
|
|
|
+ <result column="CARRIER_UNIT_NAME" jdbcType="VARCHAR" property="carrierUnitName" />
|
|
|
+ <result column="PREDICTION_TYPE" jdbcType="VARCHAR" property="predictionType" />
|
|
|
+ <result column="PREDICTION_COMBINATION" jdbcType="VARCHAR" property="predictionCombination" />
|
|
|
+ <result column="METER_TYPE_NO" jdbcType="VARCHAR" property="meterTypeNo" />
|
|
|
+ <result column="METER_TYPE_NAME" jdbcType="VARCHAR" property="meterTypeName" />
|
|
|
+ <result column="METER_PROCESS_NO" jdbcType="VARCHAR" property="meterProcessNo" />
|
|
|
+ <result column="METER_PROCESS_EDITION_NO" jdbcType="VARCHAR" property="meterProcessEditionNo" />
|
|
|
+ <result column="METER_WEIGHT" jdbcType="DECIMAL" property="meterWeight" />
|
|
|
+ <result column="WEIGHT_TYPE" jdbcType="VARCHAR" property="weightType" />
|
|
|
+ <result column="METER_SORT_WEIGHT" jdbcType="DECIMAL" property="meterSortWeight" />
|
|
|
+ <result column="METER_BALANCE_WEIGHT" jdbcType="DECIMAL" property="meterBalanceWeight" />
|
|
|
+ <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
|
|
|
+ <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
|
|
|
+ <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
|
|
|
+ <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
|
|
|
+ <result column="METER_CLASS" jdbcType="VARCHAR" property="meterClass" />
|
|
|
+ <result column="METER_GROUP" jdbcType="VARCHAR" property="meterGroup" />
|
|
|
+ <result column="MEMO" jdbcType="VARCHAR" property="memo" />
|
|
|
+ <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
|
|
|
+ <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
|
|
|
+ <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
|
|
|
+ <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="CHECK_FLAG" jdbcType="VARCHAR" property="checkFlag" />
|
|
|
+ <result column="CHECK_MAN_NO" jdbcType="VARCHAR" property="checkManNo" />
|
|
|
+ <result column="CHECK_MAN_NAME" jdbcType="VARCHAR" property="checkManName" />
|
|
|
+ <result column="CHECK_TIME" jdbcType="TIMESTAMP" property="checkTime" />
|
|
|
+ <result column="METER_MODE" jdbcType="VARCHAR" property="meterMode" />
|
|
|
+ <result column="RAILWAY_TYPE_NO" jdbcType="VARCHAR" property="railwayTypeNo" />
|
|
|
+ <result column="RAILWAY_TYPE_NAME" jdbcType="VARCHAR" property="railwayTypeName" />
|
|
|
+ <result column="IS_CHEMICAL" jdbcType="VARCHAR" property="isChemical" />
|
|
|
+ <result column="LIMIT_WEIGHT" jdbcType="DECIMAL" property="limitWeight" />
|
|
|
+ <result column="RAILWAY_MODEL_NO" jdbcType="VARCHAR" property="railwayModelNo" />
|
|
|
+ <result column="RAILWAY_MODEL_NAME" jdbcType="VARCHAR" property="railwayModelName" />
|
|
|
+ <result column="RAILWAY_FACTORY_WEIGHT" jdbcType="DECIMAL" property="railwayFactoryWeight" />
|
|
|
+ <result column="WATER_NUM" jdbcType="DECIMAL" property="waterNum" />
|
|
|
+ <result column="ARRIVAL" jdbcType="VARCHAR" property="arrival" />
|
|
|
+ <result column="STATION" jdbcType="VARCHAR" property="station" />
|
|
|
+ <result column="SOURCE_AREA" jdbcType="VARCHAR" property="sourceArea" />
|
|
|
+ <result column="VOUCHER_IDENTITY" jdbcType="VARCHAR" property="voucherIdentity" />
|
|
|
+ <result column="VOUCHER_ITEM" jdbcType="VARCHAR" property="voucherItem" />
|
|
|
+ <result column="BUSINESS_GROUP" jdbcType="VARCHAR" property="businessGroup" />
|
|
|
+ <result column="TEMP_CONVEYANCE" jdbcType="VARCHAR" property="tempConveyance" />
|
|
|
+ <result column="CONVEYANCE_TYPE" jdbcType="VARCHAR" property="conveyanceType" />
|
|
|
+ <result column="RESOURCE_SYSTEM" jdbcType="VARCHAR" property="resourceSystem" />
|
|
|
+ <result column="GROUP_PACKAGE_AMOUNT" jdbcType="DECIMAL" property="groupPackageAmount" />
|
|
|
+ <result column="GROUP_PACKAGE_UNIT" jdbcType="VARCHAR" property="groupPackageUnit" />
|
|
|
+ <result column="PACKAGE_AMOUNT" jdbcType="DECIMAL" property="packageAmount" />
|
|
|
+ <result column="PACKAGE_UNIT" jdbcType="VARCHAR" property="packageUnit" />
|
|
|
+ <result column="THEORY_AMOUNT" jdbcType="DECIMAL" property="theoryAmount" />
|
|
|
+ <result column="MEASURE_BATCH" jdbcType="VARCHAR" property="measureBatch" />
|
|
|
+ <result column="MEASURE_BATCH_COUNT" jdbcType="DECIMAL" property="measureBatchCount" />
|
|
|
+ <result column="SENDER_TYPE" jdbcType="VARCHAR" property="senderType" />
|
|
|
+ <result column="SENDER_REMARK" jdbcType="VARCHAR" property="senderRemark" />
|
|
|
+ <result column="RECEIVER_TYPE" jdbcType="VARCHAR" property="receiverType" />
|
|
|
+ <result column="RECEIVER_REMARK" jdbcType="VARCHAR" property="receiverRemark" />
|
|
|
+ <result column="AMOUNT_UNIT" jdbcType="VARCHAR" property="amountUnit" />
|
|
|
+ <result column="MEASURE_OBJECT_TYPE" jdbcType="VARCHAR" property="measureObjectType" />
|
|
|
+ <result column="MEASURE_TASK_NUM" jdbcType="VARCHAR" property="measureTaskNum" />
|
|
|
+ <result column="DATA_SOURCE" jdbcType="VARCHAR" property="dataSource" />
|
|
|
+ <result column="NOTE" jdbcType="VARCHAR" property="note" />
|
|
|
+ <result column="TRAIN_NUMBER_NO" jdbcType="VARCHAR" property="trainNumberNo" />
|
|
|
+ <result column="IS_PRE_SACALE" jdbcType="VARCHAR" property="isPreSacale" />
|
|
|
+ <result column="HC15" jdbcType="VARCHAR" property="hc15" />
|
|
|
+ <result column="CANCEL_TYPE" jdbcType="VARCHAR" property="cancelType" />
|
|
|
+ <result column="LC_NO" jdbcType="VARCHAR" property="lcNo" />
|
|
|
+ <result column="CHECK_MEMO" jdbcType="VARCHAR" property="checkMemo" />
|
|
|
+ <result column="CHECK_MAN1_NO" jdbcType="VARCHAR" property="checkMan1No" />
|
|
|
+ <result column="CHECK_MAN1_NAME" jdbcType="VARCHAR" property="checkMan1Name" />
|
|
|
+ <result column="CHECK_TIME1" jdbcType="TIMESTAMP" property="checkTime1" />
|
|
|
+ <result column="CHECK_MEMO1" jdbcType="VARCHAR" property="checkMemo1" />
|
|
|
+ <result column="CHECK_MAN2_NO" jdbcType="VARCHAR" property="checkMan2No" />
|
|
|
+ <result column="CHECK_MAN2_NAME" jdbcType="VARCHAR" property="checkMan2Name" />
|
|
|
+ <result column="CHECK_TIME2" jdbcType="TIMESTAMP" property="checkTime2" />
|
|
|
+ <result column="CHECK_MEMO2" jdbcType="VARCHAR" property="checkMemo2" />
|
|
|
+ <result column="CHECK_FLAG1" jdbcType="VARCHAR" property="checkFlag1" />
|
|
|
+ <result column="CHECK_FLAG2" jdbcType="VARCHAR" property="checkFlag2" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="railwayFirstDataList" resultMap="railwayFirstResultMap">
|
|
|
+ select *
|
|
|
+ from meter_work_railway_act_first
|
|
|
+ where 1 = 1
|
|
|
+ and value_flag != '0'
|
|
|
+ <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="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <resultMap id="railwayActualResultMap" type="com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual">
|
|
|
+ <id column="ACTUAL_NO" jdbcType="VARCHAR" property="actualNo" />
|
|
|
+ <result column="PREDICTION_NO" jdbcType="VARCHAR" property="predictionNo" />
|
|
|
+ <result column="NOTICE_NO" jdbcType="VARCHAR" property="noticeNo" />
|
|
|
+ <result column="RAILWAY_NO" jdbcType="VARCHAR" property="railwayNo" />
|
|
|
+ <result column="RAILWAY_CARRIAGE_NO" jdbcType="VARCHAR" property="railwayCarriageNo" />
|
|
|
+ <result column="MATTER_NO" jdbcType="VARCHAR" property="matterNo" />
|
|
|
+ <result column="MATTER_NAME" jdbcType="VARCHAR" property="matterName" />
|
|
|
+ <result column="CONTRACT_NO" jdbcType="VARCHAR" property="contractNo" />
|
|
|
+ <result column="BATCH_NO" jdbcType="VARCHAR" property="batchNo" />
|
|
|
+ <result column="CUSTOMER_SUPPLIER_NO" jdbcType="VARCHAR" property="customerSupplierNo" />
|
|
|
+ <result column="CUSTOMER_SUPPLIER_NAME" jdbcType="VARCHAR" property="customerSupplierName" />
|
|
|
+ <result column="FORWARDING_UNIT_NO" jdbcType="VARCHAR" property="forwardingUnitNo" />
|
|
|
+ <result column="FORWARDING_UNIT_NAME" jdbcType="VARCHAR" property="forwardingUnitName" />
|
|
|
+ <result column="RECEIVING_UINT_NO" jdbcType="VARCHAR" property="receivingUintNo" />
|
|
|
+ <result column="RECEIVING_UINT_NAME" jdbcType="VARCHAR" property="receivingUintName" />
|
|
|
+ <result column="MATERIAL_NO" jdbcType="VARCHAR" property="materialNo" />
|
|
|
+ <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName" />
|
|
|
+ <result column="SPEC_NO" jdbcType="VARCHAR" property="specNo" />
|
|
|
+ <result column="SPEC_NAME" jdbcType="VARCHAR" property="specName" />
|
|
|
+ <result column="LOAD_POINT_NO" jdbcType="VARCHAR" property="loadPointNo" />
|
|
|
+ <result column="LOAD_POINT_NAME" jdbcType="VARCHAR" property="loadPointName" />
|
|
|
+ <result column="SAMPLE_VOUCHER" jdbcType="VARCHAR" property="sampleVoucher" />
|
|
|
+ <result column="CARRIER_UNIT_NO" jdbcType="VARCHAR" property="carrierUnitNo" />
|
|
|
+ <result column="CARRIER_UNIT_NAME" jdbcType="VARCHAR" property="carrierUnitName" />
|
|
|
+ <result column="METER_TYPE_NO" jdbcType="VARCHAR" property="meterTypeNo" />
|
|
|
+ <result column="METER_TYPE_NAME" jdbcType="VARCHAR" property="meterTypeName" />
|
|
|
+ <result column="METER_PROCESS_NO" jdbcType="VARCHAR" property="meterProcessNo" />
|
|
|
+ <result column="METER_PROCESS_EDITION_NO" jdbcType="VARCHAR" property="meterProcessEditionNo" />
|
|
|
+ <result column="ACTUAL_FIRST1_NO" jdbcType="VARCHAR" property="actualFirst1No" />
|
|
|
+ <result column="GROSS_WEIGHT" jdbcType="DECIMAL" property="grossWeight" />
|
|
|
+ <result column="GROSS_MAN_NO" jdbcType="VARCHAR" property="grossManNo" />
|
|
|
+ <result column="GROSS_MAN_NAME" jdbcType="VARCHAR" property="grossManName" />
|
|
|
+ <result column="GROSS_TIME" jdbcType="TIMESTAMP" property="grossTime" />
|
|
|
+ <result column="BASE_SPOT1_NO" jdbcType="VARCHAR" property="baseSpot1No" />
|
|
|
+ <result column="BASE_SPOT1_NAME" jdbcType="VARCHAR" property="baseSpot1Name" />
|
|
|
+ <result column="GROSS_CLASS" jdbcType="VARCHAR" property="grossClass" />
|
|
|
+ <result column="GROSS_GROUP" jdbcType="VARCHAR" property="grossGroup" />
|
|
|
+ <result column="GROSS_MODE" jdbcType="VARCHAR" property="grossMode" />
|
|
|
+ <result column="ACTUAL_FIRST2_NO" jdbcType="VARCHAR" property="actualFirst2No" />
|
|
|
+ <result column="TARE_WEIGHT" jdbcType="DECIMAL" property="tareWeight" />
|
|
|
+ <result column="TARE_MAN_NO" jdbcType="VARCHAR" property="tareManNo" />
|
|
|
+ <result column="TARE_MAN_NAME" jdbcType="VARCHAR" property="tareManName" />
|
|
|
+ <result column="TARE_TIME" jdbcType="TIMESTAMP" property="tareTime" />
|
|
|
+ <result column="BASE_SPOT2_NO" jdbcType="VARCHAR" property="baseSpot2No" />
|
|
|
+ <result column="BASE_SPOT2_NAME" jdbcType="VARCHAR" property="baseSpot2Name" />
|
|
|
+ <result column="TARE_CLASS" jdbcType="VARCHAR" property="tareClass" />
|
|
|
+ <result column="TARE_GROUP" jdbcType="VARCHAR" property="tareGroup" />
|
|
|
+ <result column="TARE_MODE" jdbcType="VARCHAR" property="tareMode" />
|
|
|
+ <result column="NET_WEIGHT" jdbcType="DECIMAL" property="netWeight" />
|
|
|
+ <result column="NET_MAN_NO" jdbcType="VARCHAR" property="netManNo" />
|
|
|
+ <result column="NET_MAN_NAME" jdbcType="VARCHAR" property="netManName" />
|
|
|
+ <result column="NET_TIME" jdbcType="TIMESTAMP" property="netTime" />
|
|
|
+ <result column="NET_SPOT3_NO" jdbcType="VARCHAR" property="netSpot3No" />
|
|
|
+ <result column="NET_SPOT3_NAME" jdbcType="VARCHAR" property="netSpot3Name" />
|
|
|
+ <result column="NET_CLASS" jdbcType="VARCHAR" property="netClass" />
|
|
|
+ <result column="NET_GROUP" jdbcType="VARCHAR" property="netGroup" />
|
|
|
+ <result column="NET_MODE" jdbcType="VARCHAR" property="netMode" />
|
|
|
+ <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
|
|
|
+ <result column="UPLOAD_FLAG" jdbcType="VARCHAR" property="uploadFlag" />
|
|
|
+ <result column="CHECK_MAN_NO" jdbcType="VARCHAR" property="checkManNo" />
|
|
|
+ <result column="CHECK_MAN_NAME" jdbcType="VARCHAR" property="checkManName" />
|
|
|
+ <result column="CHECK_TIME" jdbcType="TIMESTAMP" property="checkTime" />
|
|
|
+ <result column="UPLOAD_MAN_NO" jdbcType="VARCHAR" property="uploadManNo" />
|
|
|
+ <result column="UPLOAD_MAN_NAME" jdbcType="VARCHAR" property="uploadManName" />
|
|
|
+ <result column="UPLOAD_TIME" jdbcType="TIMESTAMP" property="uploadTime" />
|
|
|
+ <result column="SAMPLE_NO" jdbcType="VARCHAR" property="sampleNo" />
|
|
|
+ <result column="RAILWAY_TYPE_NO" jdbcType="VARCHAR" property="railwayTypeNo" />
|
|
|
+ <result column="RAILWAY_TYPE_NAME" jdbcType="VARCHAR" property="railwayTypeName" />
|
|
|
+ <result column="MEMO" jdbcType="VARCHAR" property="memo" />
|
|
|
+ <result column="WATER_NUM" jdbcType="DECIMAL" property="waterNum" />
|
|
|
+ <result column="ARRIVAL" jdbcType="VARCHAR" property="arrival" />
|
|
|
+ <result column="STATION" jdbcType="VARCHAR" property="station" />
|
|
|
+ <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
|
|
|
+ <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
|
|
|
+ <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="SOURCE_AREA" jdbcType="VARCHAR" property="sourceArea" />
|
|
|
+ <result column="VOUCHER_IDENTITY" jdbcType="VARCHAR" property="voucherIdentity" />
|
|
|
+ <result column="VOUCHER_ITEM" jdbcType="VARCHAR" property="voucherItem" />
|
|
|
+ <result column="BUSINESS_GROUP" jdbcType="VARCHAR" property="businessGroup" />
|
|
|
+ <result column="TEMP_CONVEYANCE" jdbcType="VARCHAR" property="tempConveyance" />
|
|
|
+ <result column="CONVEYANCE_TYPE" jdbcType="VARCHAR" property="conveyanceType" />
|
|
|
+ <result column="RESOURCE_SYSTEM" jdbcType="VARCHAR" property="resourceSystem" />
|
|
|
+ <result column="GROUP_PACKAGE_AMOUNT" jdbcType="DECIMAL" property="groupPackageAmount" />
|
|
|
+ <result column="GROUP_PACKAGE_UNIT" jdbcType="VARCHAR" property="groupPackageUnit" />
|
|
|
+ <result column="PACKAGE_AMOUNT" jdbcType="DECIMAL" property="packageAmount" />
|
|
|
+ <result column="PACKAGE_UNIT" jdbcType="VARCHAR" property="packageUnit" />
|
|
|
+ <result column="THEORY_AMOUNT" jdbcType="DECIMAL" property="theoryAmount" />
|
|
|
+ <result column="MEASURE_BATCH" jdbcType="VARCHAR" property="measureBatch" />
|
|
|
+ <result column="MEASURE_BATCH_COUNT" jdbcType="DECIMAL" property="measureBatchCount" />
|
|
|
+ <result column="SENDER_TYPE" jdbcType="VARCHAR" property="senderType" />
|
|
|
+ <result column="SENDER_REMARK" jdbcType="VARCHAR" property="senderRemark" />
|
|
|
+ <result column="RECEIVER_TYPE" jdbcType="VARCHAR" property="receiverType" />
|
|
|
+ <result column="RECEIVER_REMARK" jdbcType="VARCHAR" property="receiverRemark" />
|
|
|
+ <result column="AMOUNT_UNIT" jdbcType="VARCHAR" property="amountUnit" />
|
|
|
+ <result column="MEASURE_OBJECT_TYPE" jdbcType="VARCHAR" property="measureObjectType" />
|
|
|
+ <result column="MEASURE_TASK_NUM" jdbcType="VARCHAR" property="measureTaskNum" />
|
|
|
+ <result column="BILL_TYPE" jdbcType="VARCHAR" property="billType" />
|
|
|
+ <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
|
|
|
+ <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="DATA_SOURCE" jdbcType="VARCHAR" property="dataSource" />
|
|
|
+ <result column="NOTE" jdbcType="VARCHAR" property="note" />
|
|
|
+ <result column="IS_PRE_SACALE" jdbcType="VARCHAR" property="isPreSacale" />
|
|
|
+ <result column="LC_NO" jdbcType="VARCHAR" property="lcNo" />
|
|
|
+ <result column="PREDICTION_TYPE" jdbcType="VARCHAR" property="predictionType" />
|
|
|
+ <result column="PREDICTION_COMBINATION" jdbcType="VARCHAR" property="predictionCombination" />
|
|
|
+ <result column="BOUND_LIST_URL" jdbcType="VARCHAR" property="boundListUrl" />
|
|
|
+ <result column="IS_BOUND_LIST" jdbcType="VARCHAR" property="isBoundList" />
|
|
|
+ <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="IS_AUTO_PUBLISH" jdbcType="VARCHAR" property="isAutoPublish" />
|
|
|
+ <result column="CHECK_FLAG" jdbcType="VARCHAR" property="checkFlag" />
|
|
|
+ <result column="CHECK_MEMO" jdbcType="VARCHAR" property="checkMemo" />
|
|
|
+ <result column="CHECK_MAN1_NO" jdbcType="VARCHAR" property="checkMan1No" />
|
|
|
+ <result column="CHECK_MAN1_NAME" jdbcType="VARCHAR" property="checkMan1Name" />
|
|
|
+ <result column="CHECK_TIME1" jdbcType="TIMESTAMP" property="checkTime1" />
|
|
|
+ <result column="CHECK_MEMO1" jdbcType="VARCHAR" property="checkMemo1" />
|
|
|
+ <result column="CHECK_MAN2_NO" jdbcType="VARCHAR" property="checkMan2No" />
|
|
|
+ <result column="CHECK_MAN2_NAME" jdbcType="VARCHAR" property="checkMan2Name" />
|
|
|
+ <result column="CHECK_TIME2" jdbcType="TIMESTAMP" property="checkTime2" />
|
|
|
+ <result column="CHECK_MEMO2" jdbcType="VARCHAR" property="checkMemo2" />
|
|
|
+ <result column="CHECK_FLAG1" jdbcType="VARCHAR" property="checkFlag1" />
|
|
|
+ <result column="CHECK_FLAG2" jdbcType="VARCHAR" property="checkFlag2" />
|
|
|
+ </resultMap>
|
|
|
+ <select id="railwayActualDataList" resultMap="railwayActualResultMap">
|
|
|
+ select *
|
|
|
+ from meter_work_railway_actual
|
|
|
+ where 1 = 1
|
|
|
+ and value_flag != '0'
|
|
|
+ <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="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="railwayFirstImgDataList"
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.RailwayFirstActualImgData">
|
|
|
+ select A.base_spot_no baseSpotNo,
|
|
|
+ A.base_spot_name baseSpotName
|
|
|
+ from meter_work_railway_act_first A
|
|
|
+ where 1 = 1
|
|
|
+ and A.actual_first_no not in (
|
|
|
+ select distinct C.check_id
|
|
|
+ from meter_work_check_first_actual C
|
|
|
+ where 1 = 1
|
|
|
+ and C.value_flag = '0'
|
|
|
+ <if test="typeNo != null and typeName != ''">
|
|
|
+ and C.type_No = #{typeNo}
|
|
|
+ </if>
|
|
|
+ <if test="typeName != null and typeName != ''">
|
|
|
+ and C.type_Name = #{typeName}
|
|
|
+ </if>)
|
|
|
+ and A.value_flag != '0'
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
+ and A.create_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ and A.create_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ </if>
|
|
|
+ <if test="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="railwayActualImgDataList"
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.RailwayFirstActualImgData">
|
|
|
+ select A.net_spot3_no baseSpotNo,
|
|
|
+ A.net_spot3_name baseSpotName
|
|
|
+ from meter_work_railway_actual A
|
|
|
+ where 1 = 1
|
|
|
+ and A.actual_no not in (
|
|
|
+ select distinct C.check_id
|
|
|
+ from meter_work_check_first_actual C
|
|
|
+ where 1 = 1
|
|
|
+ and C.value_flag = '1'
|
|
|
+ <if test="typeNo != null and typeName != ''">
|
|
|
+ and C.type_No = #{typeNo}
|
|
|
+ </if>
|
|
|
+ <if test="typeName != null and typeName != ''">
|
|
|
+ and C.type_Name = #{typeName}
|
|
|
+ </if>)
|
|
|
+ and A.value_flag != '0'
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
+ and A.create_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ and A.create_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ </if>
|
|
|
+ <if test="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="railwaySpotInfoList"
|
|
|
+ resultType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
|
|
|
+ select baseSpotNo,
|
|
|
+ baseSpotName
|
|
|
+ from (
|
|
|
+ (
|
|
|
+ select A.base_spot_no baseSpotNo,
|
|
|
+ A.base_spot_name baseSpotName
|
|
|
+ from meter_work_railway_act_first A
|
|
|
+ left join meter_work_check_first_actual B
|
|
|
+ on A.actual_first_no = B.check_id
|
|
|
+ where 1 = 1
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
+ and A.create_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ and A.create_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and A.railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>
|
|
|
+ group by A.base_spot_no,
|
|
|
+ A.base_spot_name)
|
|
|
+ union
|
|
|
+ (select A.net_spot3_no baseSpotNo,
|
|
|
+ A.net_spot3_name baseSpotName
|
|
|
+ from meter_work_railway_actual A
|
|
|
+ left join meter_work_check_first_actual B
|
|
|
+ on A.actual_no = B.check_id
|
|
|
+ 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="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and A.railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>
|
|
|
+ group by A.net_spot3_no,
|
|
|
+ A.net_spot3_name)
|
|
|
+ )
|
|
|
+ group by baseSpotNo,
|
|
|
+ baseSpotName
|
|
|
+ order by baseSpotName asc
|
|
|
+ </select>
|
|
|
+ <select id="railwayFirstCountCheckNum"
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.RailwayFirstCountCheckNum">
|
|
|
+ select count(1) countCheckNum,
|
|
|
+ sum(CHECK_USED_SECONDS) countSumCheckUsed,
|
|
|
+ avg(B.CHECK_USED_SECONDS) countAvgCheckUsed,
|
|
|
+ A.actual_first_no actualFirstNo,
|
|
|
+ case when A.meter_mode = '1' then '远程计量'
|
|
|
+ when A.meter_mode = '2' then '智能计量'
|
|
|
+ when A.meter_mode = '3' then '手工计量'
|
|
|
+ else A.meter_mode end meterMode,
|
|
|
+ A.prediction_no predictionNo,
|
|
|
+ A.railway_no railwayNo,
|
|
|
+ A.conveyance_type conveyanceType,
|
|
|
+ A.matter_no matterNo,
|
|
|
+ A.matter_name matterName,
|
|
|
+ to_char(round(A.meter_Weight/1000, 2),'FM9999999999999999.00') meterWeight,
|
|
|
+ case when A.weight_type = '0' then '毛重'
|
|
|
+ when A.weight_type = '1' then '皮重'
|
|
|
+ when A.weight_type = '2' then '期限皮'
|
|
|
+ else A.weight_type end weightType,
|
|
|
+ A.forwarding_unit_name forwardingUnitName,
|
|
|
+ A.receiving_uint_name receivingUintName,
|
|
|
+ case when A.meter_type_Name = 'SendToOutTms' then '外发'
|
|
|
+ when A.meter_type_Name = 'GM2GM' or A.meter_type_name = 'InnerTms' then '厂内转储'
|
|
|
+ when A.meter_type_Name = 'PO2GM' then '外进'
|
|
|
+ else A.meter_type_Name end meterTypeName,
|
|
|
+ A.theory_amount theoryAmount,
|
|
|
+ A.create_man_name createManName,
|
|
|
+ A.create_time createTime,
|
|
|
+ A.base_spot_name baseSpotName,
|
|
|
+ case when A.is_pre_sacale = '0' then '未匹配'
|
|
|
+ when A.is_pre_sacale = '1' then '已匹配'
|
|
|
+ else A.is_pre_sacale end isPreScale,
|
|
|
+ case when A.value_flag = '0' then '作废'
|
|
|
+ when A.value_flag = '1' then '有效'
|
|
|
+ when A.value_flag = '2' then '结净'
|
|
|
+ else A.value_flag end valueFlag
|
|
|
+ from meter_work_railway_act_first A
|
|
|
+ left join meter_work_check_first_actual B
|
|
|
+ on A.actual_first_no = B.check_id
|
|
|
+ where 1 = 1
|
|
|
+ and A.actual_first_no in (
|
|
|
+ select distinct C.check_id
|
|
|
+ from meter_work_check_first_actual C
|
|
|
+ where 1 = 1
|
|
|
+ and C.value_flag = '0'
|
|
|
+ <if test="typeNo != null and typeName != ''">
|
|
|
+ and C.type_No = #{typeNo}
|
|
|
+ </if>
|
|
|
+ <if test="typeName != null and typeName != ''">
|
|
|
+ and C.type_Name = #{typeName}
|
|
|
+ </if>
|
|
|
+ <if test="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and A.railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>)
|
|
|
+ and A.value_flag != '0'
|
|
|
+ <if test="actualFirstNo != null and actualFirstNo != ''">
|
|
|
+ and A.actual_first_no = #{actualFirstNo}
|
|
|
+ </if>
|
|
|
+ <if test="netSpot3NoStr != null and netSpot3NoStr != ''">
|
|
|
+ and A.base_spot_no in
|
|
|
+ <foreach collection="spotNoStr" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
+ and A.create_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ and A.create_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ </if>
|
|
|
+ <if test="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and A.railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>
|
|
|
+ group by A.actual_first_no,
|
|
|
+ A.meter_mode,
|
|
|
+ A.prediction_no,
|
|
|
+ A.railway_no,
|
|
|
+ A.conveyance_type,
|
|
|
+ A.matter_no,
|
|
|
+ A.matter_name,
|
|
|
+ A.meter_weight,
|
|
|
+ A.weight_type,
|
|
|
+ A.forwarding_unit_name,
|
|
|
+ A.receiving_uint_name,
|
|
|
+ A.meter_type_Name,
|
|
|
+ A.theory_amount,
|
|
|
+ A.create_man_name,
|
|
|
+ A.create_time,
|
|
|
+ A.base_spot_name,
|
|
|
+ A.is_pre_sacale,
|
|
|
+ A.value_flag
|
|
|
+ </select>
|
|
|
+ <select id="railwayFirstLikeByDesc"
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.RailwayFirstCountCheckNum">
|
|
|
+ select A.actual_first_no actualFirstNo,
|
|
|
+ case when A.meter_mode = '1' then '远程计量'
|
|
|
+ when A.meter_mode = '2' then '智能计量'
|
|
|
+ when A.meter_mode = '3' then '手工计量'
|
|
|
+ else A.meter_mode end meterMode,
|
|
|
+ A.prediction_no predictionNo,
|
|
|
+ A.railway_No railwayNo,
|
|
|
+ A.conveyance_type conveyanceType,
|
|
|
+ A.matter_no matterNo,
|
|
|
+ A.matter_name matterName,
|
|
|
+ to_char(round(A.meter_Weight/1000, 2),'FM9999999999999999.00') meterWeight,
|
|
|
+ case when A.weight_type = '0' then '毛重'
|
|
|
+ when A.weight_type = '1' then '皮重'
|
|
|
+ when A.weight_type = '2' then '期限皮'
|
|
|
+ else A.weight_type end weightType,
|
|
|
+ A.forwarding_unit_name forwardingUnitName,
|
|
|
+ A.receiving_uint_name receivingUintName,
|
|
|
+ case when A.meter_type_Name = 'SendToOutTms' then '外发'
|
|
|
+ when A.meter_type_Name = 'GM2GM' or A.meter_type_name = 'InnerTms' then '厂内转储'
|
|
|
+ when A.meter_type_Name = 'PO2GM' then '外进'
|
|
|
+ else A.meter_type_Name end meterTypeName,
|
|
|
+ A.theory_amount theoryAmount,
|
|
|
+ A.create_man_name createManName,
|
|
|
+ A.create_time createTime,
|
|
|
+ A.base_spot_name baseSpotName,
|
|
|
+ case when A.is_pre_sacale = '0' then '未匹配'
|
|
|
+ when A.is_pre_sacale = '1' then '已匹配'
|
|
|
+ else A.is_pre_sacale end isPreScale,
|
|
|
+ case when A.value_flag = '0' then '作废'
|
|
|
+ when A.value_flag = '1' then '有效'
|
|
|
+ when A.value_flag = '2' then '结净'
|
|
|
+ else A.value_flag end valueFlag
|
|
|
+ from meter_work_railway_act_first A
|
|
|
+ left join meter_work_check_first_actual B
|
|
|
+ on A.actual_first_no = B.check_id
|
|
|
+ where 1 = 1
|
|
|
+ and A.actual_first_no not in (select distinct C.check_id
|
|
|
+ from meter_work_check_first_actual C
|
|
|
+ where 1 = 1
|
|
|
+ and C.value_flag = '0'
|
|
|
+ <if test="typeNo != null and typeName != ''">
|
|
|
+ and C.type_No = #{typeNo}
|
|
|
+ </if>)
|
|
|
+ and A.value_flag != '0'
|
|
|
+ <if test="actualFirstNo != null and actualFirstNo != ''">
|
|
|
+ and A.actual_first_no = #{actualFirstNo}
|
|
|
+ </if>
|
|
|
+ <if test="netSpot3NoStr != null and netSpot3NoStr != ''">
|
|
|
+ and A.base_spot_no in
|
|
|
+ <foreach collection="spotNoStr" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
+ and A.create_time >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ and A.create_time <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ </if>
|
|
|
+ <if test="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and A.railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>
|
|
|
+ order by A.create_time desc
|
|
|
+ </select>
|
|
|
+ <select id="railwayActualCountCheckNum"
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.RailwayActualCountCheckNum">
|
|
|
+ select count(1) countCheckNum,
|
|
|
+ sum(CHECK_USED_SECONDS) countSumCheckUsed,
|
|
|
+ avg(B.CHECK_USED_SECONDS) countAvgCheckUsed,
|
|
|
+ A.actual_no actualNo,
|
|
|
+ A.actual_first1_no actualFirst1No,
|
|
|
+ A.actual_first2_no actualFirst2No,
|
|
|
+ case when A.net_mode = '1' then '远程计量'
|
|
|
+ when A.net_mode = '2' then '智能计量'
|
|
|
+ when A.net_mode = '3' then '手工计量'
|
|
|
+ else A.net_mode end netMode,
|
|
|
+ case when A.gross_mode = '1' then '远程计量'
|
|
|
+ when A.gross_mode = '2' then '智能计量'
|
|
|
+ when A.gross_mode = '3' then '手工计量'
|
|
|
+ else A.gross_mode end grossMode,
|
|
|
+ case when A.tare_mode = '1' then '远程计量'
|
|
|
+ when A.tare_mode = '2' then '智能计量'
|
|
|
+ when A.tare_mode = '3' then '手工计量'
|
|
|
+ else A.tare_mode end tareMode,
|
|
|
+ A.prediction_no predictionNo,
|
|
|
+ A.railway_No carNo,
|
|
|
+ A.conveyance_type conveyanceType,
|
|
|
+ A.matter_no matterNo,
|
|
|
+ A.matter_name matterName,
|
|
|
+ to_char(round(A.gross_Weight/1000, 2),'FM9999999999999999.00') grossWeight,
|
|
|
+ to_char(round(A.tare_weight/1000, 2),'FM9999999999999999.00') tareWeight,
|
|
|
+ to_char(round(A.net_weight/1000, 2),'FM9999999999999999.00') netWeight,
|
|
|
+ A.forwarding_unit_name forwardingUnitName,
|
|
|
+ A.receiving_uint_name receivingUintName,
|
|
|
+ case when A.meter_type_Name = 'SendToOutTms' then '外发'
|
|
|
+ when A.meter_type_Name = 'GM2GM' or A.meter_type_name = 'InnerTms' then '厂内转储'
|
|
|
+ when A.meter_type_Name = 'PO2GM' then '外进'
|
|
|
+ else A.meter_type_Name end meterTypeName,
|
|
|
+ A.theory_amount theoryAmount,
|
|
|
+ A.sender_remark senderRemark,
|
|
|
+ A.gross_time grossTime,
|
|
|
+ A.base_spot1_name baseSpot1Name,
|
|
|
+ A.gross_man_name grossManName,
|
|
|
+ A.tare_time tareTime,
|
|
|
+ A.base_spot2_name baseSpot2Name,
|
|
|
+ A.tare_man_name tareManName,
|
|
|
+ A.net_time netTime,
|
|
|
+ A.net_spot3_name netSpot3Name,
|
|
|
+ A.net_man_name netManName,
|
|
|
+ case when A.value_flag = '0' then '作废'
|
|
|
+ when A.value_flag = '1' then '有效'
|
|
|
+ else A.value_flag end valueFlag,
|
|
|
+ case when A.upload_flag = '1' then '未同步'
|
|
|
+ when A.upload_flag = '2' then '已同步'
|
|
|
+ else A.upload_flag end uploadFlag
|
|
|
+ from meter_work_railway_actual A
|
|
|
+ left join meter_work_check_first_actual B
|
|
|
+ on A.actual_no = B.check_id
|
|
|
+ where 1 = 1
|
|
|
+ and A.actual_no in (
|
|
|
+ select distinct C.check_id
|
|
|
+ from meter_work_check_first_actual C
|
|
|
+ where 1 = 1
|
|
|
+ and C.value_flag = '1'
|
|
|
+ <if test="typeNo != null and typeName != ''">
|
|
|
+ and C.type_No = #{typeNo}
|
|
|
+ </if>
|
|
|
+ <if test="typeName != null and typeName != ''">
|
|
|
+ and C.type_Name = #{typeName}
|
|
|
+ </if>)
|
|
|
+ and A.value_flag != '0'
|
|
|
+ <if test="actualNo != null and actualNo != ''">
|
|
|
+ and A.actual_no = #{actualNo}
|
|
|
+ </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="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="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and A.railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>
|
|
|
+ group by A.actual_no,
|
|
|
+ A.actual_first1_no,
|
|
|
+ A.actual_first2_no,
|
|
|
+ A.net_mode,
|
|
|
+ A.gross_mode,
|
|
|
+ A.tare_mode,
|
|
|
+ A.prediction_no,
|
|
|
+ A.railway_No,
|
|
|
+ A.conveyance_type,
|
|
|
+ A.matter_no,
|
|
|
+ A.matter_name,
|
|
|
+ A.gross_weight,
|
|
|
+ A.tare_weight,
|
|
|
+ A.net_weight,
|
|
|
+ A.forwarding_unit_name,
|
|
|
+ A.receiving_uint_name,
|
|
|
+ A.meter_type_Name,
|
|
|
+ A.theory_amount,
|
|
|
+ A.sender_remark,
|
|
|
+ A.gross_time,
|
|
|
+ A.base_spot1_name,
|
|
|
+ A.gross_man_name,
|
|
|
+ A.tare_time,
|
|
|
+ A.base_spot2_name,
|
|
|
+ A.tare_man_name,
|
|
|
+ A.net_time,
|
|
|
+ A.net_spot3_name,
|
|
|
+ A.net_man_name,
|
|
|
+ A.value_flag,
|
|
|
+ A.upload_flag
|
|
|
+ </select>
|
|
|
+ <select id="railwayActualLikeByDesc"
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.RailwayActualCountCheckNum">
|
|
|
+
|
|
|
+ select A.actual_no actualNo,
|
|
|
+ A.actual_first1_no actualFirst1No,
|
|
|
+ A.actual_first2_no actualFirst2No,
|
|
|
+ case when A.net_mode = '1' then '远程计量'
|
|
|
+ when A.net_mode = '2' then '智能计量'
|
|
|
+ when A.net_mode = '3' then '手工计量'
|
|
|
+ else A.net_mode end netMode,
|
|
|
+ case when A.gross_mode = '1' then '远程计量'
|
|
|
+ when A.gross_mode = '2' then '智能计量'
|
|
|
+ when A.gross_mode = '3' then '手工计量'
|
|
|
+ else A.gross_mode end grossMode,
|
|
|
+ case when A.tare_mode = '1' then '远程计量'
|
|
|
+ when A.tare_mode = '2' then '智能计量'
|
|
|
+ when A.tare_mode = '3' then '手工计量'
|
|
|
+ else A.tare_mode end tareMode,
|
|
|
+ A.prediction_no predictionNo,
|
|
|
+ A.railway_No railwayNo,
|
|
|
+ A.conveyance_type conveyanceType,
|
|
|
+ A.matter_no matterNo,
|
|
|
+ A.matter_name matterName,
|
|
|
+ to_char(round(A.gross_Weight/1000, 2),'FM9999999999999999.00') grossWeight,
|
|
|
+ to_char(round(A.tare_weight/1000, 2),'FM9999999999999999.00') tareWeight,
|
|
|
+ to_char(round(A.net_weight/1000, 2),'FM9999999999999999.00') netWeight,
|
|
|
+ A.forwarding_unit_name forwardingUnitName,
|
|
|
+ A.receiving_uint_name receivingUintName,
|
|
|
+ case when A.meter_type_Name = 'SendToOutTms' then '外发'
|
|
|
+ when A.meter_type_Name = 'GM2GM' or A.meter_type_name = 'InnerTms' then '厂内转储'
|
|
|
+ when A.meter_type_Name = 'PO2GM' then '外进'
|
|
|
+ else A.meter_type_Name end meterTypeName,
|
|
|
+ A.theory_amount theoryAmount,
|
|
|
+ A.sender_remark senderRemark,
|
|
|
+ A.gross_time grossTime,
|
|
|
+ A.base_spot1_name baseSpot1Name,
|
|
|
+ A.gross_man_name grossManName,
|
|
|
+ A.tare_time tareTime,
|
|
|
+ A.base_spot2_name baseSpot2Name,
|
|
|
+ A.tare_man_name tareManName,
|
|
|
+ A.net_time netTime,
|
|
|
+ A.net_spot3_name netSpot3Name,
|
|
|
+ A.net_man_name netManName,
|
|
|
+ case when A.value_flag = '0' then '作废'
|
|
|
+ when A.value_flag = '1' then '有效'
|
|
|
+ else A.value_flag end valueFlag,
|
|
|
+ case when A.upload_flag = '1' then '未同步'
|
|
|
+ when A.upload_flag = '2' then '已同步'
|
|
|
+ else A.upload_flag end uploadFlag
|
|
|
+ from meter_work_railway_actual A
|
|
|
+ left join meter_work_check_first_actual B
|
|
|
+ on A.actual_no = B.check_id
|
|
|
+ where 1 = 1
|
|
|
+ and A.actual_no not in (
|
|
|
+ select distinct C.check_id
|
|
|
+ from meter_work_check_first_actual C
|
|
|
+ where 1 = 1
|
|
|
+ and B.value_flag = '1'
|
|
|
+ <if test="typeNo != null and typeName != ''">
|
|
|
+ and B.type_No = #{typeNo}
|
|
|
+ </if>)
|
|
|
+ and A.value_flag != '0'
|
|
|
+ <if test="actualNo != null and actualNo != ''">
|
|
|
+ and A.actual_no = #{actualNo}
|
|
|
+ </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="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="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and A.railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>
|
|
|
+ order by A.net_time desc
|
|
|
+ </select>
|
|
|
+ <select id="railwayLikeByDesc"
|
|
|
+ resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActualRailwayTemp">
|
|
|
+ select baseSpotNo, baseSpotName,railwayNo,checkId,checkStartTime,checkEndTime,checkUsedSeconds,checkManNo,checkManName,checkResult,typeNo,typeName, valueFlag
|
|
|
+ from ((SELECT B.base_spot_no baseSpotNo,
|
|
|
+ B.base_spot_name baseSpotName,
|
|
|
+ B.railway_no railwayNo,
|
|
|
+ A.check_id checkId,
|
|
|
+ A.check_start_time checkStartTime,
|
|
|
+ A.check_end_time checkEndTime,
|
|
|
+ A.check_used_seconds checkUsedSeconds,
|
|
|
+ A.check_man_no checkManNo,
|
|
|
+ A.check_man_name checkManName,
|
|
|
+ A.check_result checkResult,
|
|
|
+ A.type_no typeNo,
|
|
|
+ A.type_name typeName,
|
|
|
+ A.value_flag valueFlag
|
|
|
+ FROM METER_WORK_CHECK_FIRST_ACTUAL A
|
|
|
+ inner join meter_work_railway_act_first B
|
|
|
+ on A.check_id = B.actual_first_no
|
|
|
+ <if test="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and B.railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>
|
|
|
+ <if test="typeNo != null and typeName != ''">
|
|
|
+ and A.type_No = #{typeNo}
|
|
|
+ </if>
|
|
|
+ and A.value_flag = '0') union
|
|
|
+ (SELECT B.net_spot3_no baseSpotNo,
|
|
|
+ B.net_spot3_name baseSpotName,
|
|
|
+ B.railway_no railwayNo,
|
|
|
+ A.check_id checkId,
|
|
|
+ A.check_start_time checkStartTime,
|
|
|
+ A.check_end_time checkEndTime,
|
|
|
+ A.check_used_seconds checkUsedSeconds,
|
|
|
+ A.check_man_no checkManNo,
|
|
|
+ A.check_man_name checkManName,
|
|
|
+ A.check_result checkResult,
|
|
|
+ A.type_no typeNo,
|
|
|
+ A.type_name typeName,
|
|
|
+ A.value_flag valueFlag
|
|
|
+ FROM METER_WORK_CHECK_FIRST_ACTUAL A
|
|
|
+ inner join meter_work_railway_actual B
|
|
|
+ on A.check_id = B.actual_no
|
|
|
+ <if test="railwayTypeNo != null and railwayTypeNo != ''">
|
|
|
+ and B.railway_type_no = #{railwayTypeNo}
|
|
|
+ </if>
|
|
|
+ <if test="typeNo != null and typeName != ''">
|
|
|
+ and A.type_No = #{typeNo}
|
|
|
+ </if>
|
|
|
+ and A.value_flag = '1'))
|
|
|
+ where 1 = 1
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
+ and checkStartTime >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ and checkStartTime <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
+ </if>
|
|
|
+ <if test="checkId != null and checkId != ''">
|
|
|
+ and checkId LIKE '%${checkId}%'
|
|
|
+ </if>
|
|
|
+ <if test="typeNo != null and typeNo != ''">
|
|
|
+ and typeNo LIKE '%${typeNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
+ and carNo LIKE '%${carNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="valueFlag != null and valueFlag != ''">
|
|
|
+ and valueFlag = #{valueFlag}
|
|
|
+ </if>
|
|
|
+ <if test="minTime != null and minTime != ''">
|
|
|
+ and checkUsedSeconds >= #{minTime}
|
|
|
+ </if>
|
|
|
+ <if test="maxTime != null and maxTime != ''">
|
|
|
+ and checkUsedSeconds <= #{maxTime}
|
|
|
+ </if>
|
|
|
+ <if test="createManNoStr != null and createManNoStr != ''">
|
|
|
+ and checkManNo in
|
|
|
+ <foreach collection="manNoStr" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="netSpot3NoStr != null and netSpot3NoStr != ''">
|
|
|
+ and baseSpotNo in
|
|
|
+ <foreach collection="spotNoStr" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ order by checkStartTime desc
|
|
|
+ </select>
|
|
|
+</mapper>
|