|
@@ -445,7 +445,7 @@
|
|
|
select
|
|
select
|
|
|
A.base_spot_name baseSpotName,
|
|
A.base_spot_name baseSpotName,
|
|
|
A.car_no carNo,
|
|
A.car_no carNo,
|
|
|
- case when abs(round((A.meter_weight - B.avg_weight)/1000, 2)) >= 0.5 then '皮重超过偏差'
|
|
|
|
|
|
|
+ case when abs(round((A.meter_weight - B.avg_weight)/1000, 2)) >= (select to_number(BASE_NAME)/1000 from com_base_info where BASE_CODE = '001067001' ) then '皮重超过偏差'
|
|
|
else '正常皮重' end alarmType,
|
|
else '正常皮重' end alarmType,
|
|
|
round(A.meter_weight/1000, 2) meterWeight,
|
|
round(A.meter_weight/1000, 2) meterWeight,
|
|
|
round(B.avg_weight/1000, 2) avgWeight,
|
|
round(B.avg_weight/1000, 2) avgWeight,
|
|
@@ -471,7 +471,13 @@
|
|
|
else null end meterTypeName,
|
|
else null end meterTypeName,
|
|
|
A.note
|
|
A.note
|
|
|
from meter_work_car_actual_first A
|
|
from meter_work_car_actual_first A
|
|
|
- left join meter_base_his_tare_data B
|
|
|
|
|
|
|
+ left join (SELECT *
|
|
|
|
|
+ FROM (
|
|
|
|
|
+ SELECT t.*,
|
|
|
|
|
+ ROW_NUMBER() OVER (PARTITION BY t.car_no ORDER BY t.create_time DESC) AS rn
|
|
|
|
|
+ FROM meter_base_his_tare_data t
|
|
|
|
|
+ )
|
|
|
|
|
+ WHERE rn = 1) B
|
|
|
on A.car_no = B.Car_No
|
|
on A.car_no = B.Car_No
|
|
|
where A.weight_type = '1'
|
|
where A.weight_type = '1'
|
|
|
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
@@ -551,8 +557,33 @@
|
|
|
from meter_base_operation_log A
|
|
from meter_base_operation_log A
|
|
|
left join meter_work_car_actual_first B
|
|
left join meter_work_car_actual_first B
|
|
|
on A.operation_id = B.actual_first_no
|
|
on A.operation_id = B.actual_first_no
|
|
|
- where 1 = 1
|
|
|
|
|
- and A.operation_page like '%汽车衡一次数据维护%'
|
|
|
|
|
|
|
+ where A.operation_page like '%汽车衡一次数据维护%'
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and a.create_Time
|
|
|
|
|
+ between TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ and TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
|
|
+ and A.operation_carn_no like '%${carNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationFunction != null and operationFunction != ''">
|
|
|
|
|
+ and a.operation_function in
|
|
|
|
|
+ <foreach collection="operationFunctionList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationPage != null and operationPage != ''">
|
|
|
|
|
+ and a.operation_page in
|
|
|
|
|
+ <foreach collection="operationPageList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ and a.create_man_name in
|
|
|
|
|
+ <foreach collection="createManNameList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
)
|
|
)
|
|
|
union
|
|
union
|
|
|
(
|
|
(
|
|
@@ -579,6 +610,32 @@
|
|
|
left join meter_work_car_actual B
|
|
left join meter_work_car_actual B
|
|
|
on A.operation_id = B.actual_no
|
|
on A.operation_id = B.actual_no
|
|
|
where A.operation_page like '%汽车衡净重数据维护%'
|
|
where A.operation_page like '%汽车衡净重数据维护%'
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and a.create_Time
|
|
|
|
|
+ between TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ and TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
|
|
+ and A.operation_carn_no like '%${carNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationFunction != null and operationFunction != ''">
|
|
|
|
|
+ and a.operation_function in
|
|
|
|
|
+ <foreach collection="operationFunctionList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationPage != null and operationPage != ''">
|
|
|
|
|
+ and a.operation_page in
|
|
|
|
|
+ <foreach collection="operationPageList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ and a.create_man_name in
|
|
|
|
|
+ <foreach collection="createManNameList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
)
|
|
)
|
|
|
union
|
|
union
|
|
|
(
|
|
(
|
|
@@ -604,8 +661,33 @@
|
|
|
from meter_base_operation_log A
|
|
from meter_base_operation_log A
|
|
|
left join meter_work_railway_act_first B
|
|
left join meter_work_railway_act_first B
|
|
|
on A.operation_id = B.actual_first_no
|
|
on A.operation_id = B.actual_first_no
|
|
|
- where 1 = 1
|
|
|
|
|
- and A.operation_page like '%轨道衡一次数据维护%'
|
|
|
|
|
|
|
+ where A.operation_page like '%轨道衡一次数据维护%'
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and a.create_Time
|
|
|
|
|
+ between TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ and TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
|
|
+ and A.operation_carn_no like '%${carNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationFunction != null and operationFunction != ''">
|
|
|
|
|
+ and a.operation_function in
|
|
|
|
|
+ <foreach collection="operationFunctionList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationPage != null and operationPage != ''">
|
|
|
|
|
+ and a.operation_page in
|
|
|
|
|
+ <foreach collection="operationPageList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ and a.create_man_name in
|
|
|
|
|
+ <foreach collection="createManNameList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
)
|
|
)
|
|
|
union
|
|
union
|
|
|
(
|
|
(
|
|
@@ -633,6 +715,32 @@
|
|
|
on A.operation_id = B.actual_first_no
|
|
on A.operation_id = B.actual_first_no
|
|
|
where 1 = 1
|
|
where 1 = 1
|
|
|
and A.operation_page like '%吊钩秤一次数据维护%'
|
|
and A.operation_page like '%吊钩秤一次数据维护%'
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and a.create_Time
|
|
|
|
|
+ between TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ and TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
|
|
+ and A.operation_carn_no like '%${carNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationFunction != null and operationFunction != ''">
|
|
|
|
|
+ and a.operation_function in
|
|
|
|
|
+ <foreach collection="operationFunctionList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationPage != null and operationPage != ''">
|
|
|
|
|
+ and a.operation_page in
|
|
|
|
|
+ <foreach collection="operationPageList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ and a.create_man_name in
|
|
|
|
|
+ <foreach collection="createManNameList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
)
|
|
)
|
|
|
union
|
|
union
|
|
|
(
|
|
(
|
|
@@ -659,6 +767,32 @@
|
|
|
left join meter_work_railway_actual B
|
|
left join meter_work_railway_actual B
|
|
|
on A.operation_id = B.actual_no
|
|
on A.operation_id = B.actual_no
|
|
|
where A.operation_page like '%轨道衡净重数据维护%'
|
|
where A.operation_page like '%轨道衡净重数据维护%'
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and a.create_Time
|
|
|
|
|
+ between TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ and TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
|
|
+ and A.operation_carn_no like '%${carNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationFunction != null and operationFunction != ''">
|
|
|
|
|
+ and a.operation_function in
|
|
|
|
|
+ <foreach collection="operationFunctionList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationPage != null and operationPage != ''">
|
|
|
|
|
+ and a.operation_page in
|
|
|
|
|
+ <foreach collection="operationPageList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ and a.create_man_name in
|
|
|
|
|
+ <foreach collection="createManNameList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
)
|
|
)
|
|
|
union
|
|
union
|
|
|
(
|
|
(
|
|
@@ -685,6 +819,32 @@
|
|
|
left join meter_work_railway_actual B
|
|
left join meter_work_railway_actual B
|
|
|
on A.operation_id = B.actual_no
|
|
on A.operation_id = B.actual_no
|
|
|
where A.operation_page like '%吊钩秤净重数据维护%'
|
|
where A.operation_page like '%吊钩秤净重数据维护%'
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and a.create_Time
|
|
|
|
|
+ between TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ and TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
|
|
+ and A.operation_carn_no like '%${carNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationFunction != null and operationFunction != ''">
|
|
|
|
|
+ and a.operation_function in
|
|
|
|
|
+ <foreach collection="operationFunctionList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationPage != null and operationPage != ''">
|
|
|
|
|
+ and a.operation_page in
|
|
|
|
|
+ <foreach collection="operationPageList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ and a.create_man_name in
|
|
|
|
|
+ <foreach collection="createManNameList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
)
|
|
)
|
|
|
union
|
|
union
|
|
|
(
|
|
(
|
|
@@ -711,6 +871,32 @@
|
|
|
left join meter_work_railway_actual B
|
|
left join meter_work_railway_actual B
|
|
|
on A.operation_id = B.actual_no
|
|
on A.operation_id = B.actual_no
|
|
|
where A.operation_page like '%动轨净重数据维护%'
|
|
where A.operation_page like '%动轨净重数据维护%'
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and a.create_Time
|
|
|
|
|
+ between TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ and TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
|
|
+ and A.operation_carn_no like '%${carNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationFunction != null and operationFunction != ''">
|
|
|
|
|
+ and a.operation_function in
|
|
|
|
|
+ <foreach collection="operationFunctionList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationPage != null and operationPage != ''">
|
|
|
|
|
+ and a.operation_page in
|
|
|
|
|
+ <foreach collection="operationPageList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ and a.create_man_name in
|
|
|
|
|
+ <foreach collection="createManNameList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
)
|
|
)
|
|
|
union
|
|
union
|
|
|
(
|
|
(
|
|
@@ -737,6 +923,32 @@
|
|
|
left join Meter_Work_Railway_Received B
|
|
left join Meter_Work_Railway_Received B
|
|
|
on A.operation_id = B.actual_first_no
|
|
on A.operation_id = B.actual_first_no
|
|
|
where A.operation_page like '%轨道衡从表数据维护%'
|
|
where A.operation_page like '%轨道衡从表数据维护%'
|
|
|
|
|
+ <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
|
|
+ and a.create_Time
|
|
|
|
|
+ between TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ and TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="carNo != null and carNo != ''">
|
|
|
|
|
+ and A.operation_carn_no like '%${carNo}%'
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationFunction != null and operationFunction != ''">
|
|
|
|
|
+ and a.operation_function in
|
|
|
|
|
+ <foreach collection="operationFunctionList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="operationPage != null and operationPage != ''">
|
|
|
|
|
+ and a.operation_page in
|
|
|
|
|
+ <foreach collection="operationPageList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createManName != null and createManName != ''">
|
|
|
|
|
+ and a.create_man_name in
|
|
|
|
|
+ <foreach collection="createManNameList" item="item" open="(" close=")" separator=",">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
)
|
|
)
|
|
|
union
|
|
union
|
|
|
(
|
|
(
|
|
@@ -763,34 +975,34 @@
|
|
|
left join Meter_Work_Railway_Received B
|
|
left join Meter_Work_Railway_Received B
|
|
|
on A.operation_id = B.actual_first_no
|
|
on A.operation_id = B.actual_first_no
|
|
|
where A.operation_page like '%动轨数据维护%'
|
|
where A.operation_page like '%动轨数据维护%'
|
|
|
- )
|
|
|
|
|
- )
|
|
|
|
|
- where 1 = 1
|
|
|
|
|
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
|
|
|
- and createTime >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
- and createTime <= TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
|
|
+ and a.create_Time
|
|
|
|
|
+ between TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
|
|
+ and TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
|
|
|
</if>
|
|
</if>
|
|
|
<if test="carNo != null and carNo != ''">
|
|
<if test="carNo != null and carNo != ''">
|
|
|
- and carNo like '%${carNo}%'
|
|
|
|
|
|
|
+ and a.operation_carn_no like '%${carNo}%'
|
|
|
</if>
|
|
</if>
|
|
|
<if test="operationFunction != null and operationFunction != ''">
|
|
<if test="operationFunction != null and operationFunction != ''">
|
|
|
- and operationFunction in
|
|
|
|
|
|
|
+ and a.operation_function in
|
|
|
<foreach collection="operationFunctionList" item="item" open="(" close=")" separator=",">
|
|
<foreach collection="operationFunctionList" item="item" open="(" close=")" separator=",">
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
<if test="operationPage != null and operationPage != ''">
|
|
<if test="operationPage != null and operationPage != ''">
|
|
|
- and operationPage in
|
|
|
|
|
|
|
+ and a.operation_page in
|
|
|
<foreach collection="operationPageList" item="item" open="(" close=")" separator=",">
|
|
<foreach collection="operationPageList" item="item" open="(" close=")" separator=",">
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
<if test="createManName != null and createManName != ''">
|
|
<if test="createManName != null and createManName != ''">
|
|
|
- and createManName in
|
|
|
|
|
|
|
+ and a.create_man_name in
|
|
|
<foreach collection="createManNameList" item="item" open="(" close=")" separator=",">
|
|
<foreach collection="createManNameList" item="item" open="(" close=")" separator=",">
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ )
|
|
|
|
|
+ )
|
|
|
order by createTime desc
|
|
order by createTime desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|