|
@@ -22,6 +22,8 @@
|
|
<result property="logSourceValue" column="log_source_value"/>
|
|
<result property="logSourceValue" column="log_source_value"/>
|
|
<result property="isRiskValue" column="is_risk_value"/>
|
|
<result property="isRiskValue" column="is_risk_value"/>
|
|
<result property="riskStatusValue" column="risk_status_value"/>
|
|
<result property="riskStatusValue" column="risk_status_value"/>
|
|
|
|
+ <result property="isCheckStatus" column="is_check_status"/>
|
|
|
|
+ <result property="checkDetail" column="check_detail"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="ExportVo" id="TBusLogInResult">
|
|
<resultMap type="ExportVo" id="TBusLogInResult">
|
|
@@ -62,6 +64,8 @@
|
|
<sql id="selectTBusLogVo">
|
|
<sql id="selectTBusLogVo">
|
|
select bus_log_id,
|
|
select bus_log_id,
|
|
bus_log_type,
|
|
bus_log_type,
|
|
|
|
+ is_check_status,
|
|
|
|
+ check_detail,
|
|
(select dict_label from ${database_system}.sys_dict_data where dict_value=bus_log_type) bus_log_type_value,
|
|
(select dict_label from ${database_system}.sys_dict_data where dict_value=bus_log_type) bus_log_type_value,
|
|
log_source,
|
|
log_source,
|
|
(select dict_label from ${database_system}.sys_dict_data where dict_value=log_source) log_source_value,
|
|
(select dict_label from ${database_system}.sys_dict_data where dict_value=log_source) log_source_value,
|
|
@@ -77,6 +81,8 @@
|
|
<select id="selectTBusLogList" parameterType="TBusLog" resultMap="TBusLogResult">
|
|
<select id="selectTBusLogList" parameterType="TBusLog" resultMap="TBusLogResult">
|
|
select g.bus_log_id,
|
|
select g.bus_log_id,
|
|
g.bus_log_type,
|
|
g.bus_log_type,
|
|
|
|
+ g.is_check_status,
|
|
|
|
+ g.check_detail,
|
|
(select dict_label from ${database_system}.sys_dict_data where dict_value=g.bus_log_type) bus_log_type_value,
|
|
(select dict_label from ${database_system}.sys_dict_data where dict_value=g.bus_log_type) bus_log_type_value,
|
|
log_source,
|
|
log_source,
|
|
(select dict_label from ${database_system}.sys_dict_data where dict_value=g.log_source) log_source_value,
|
|
(select dict_label from ${database_system}.sys_dict_data where dict_value=g.log_source) log_source_value,
|
|
@@ -115,6 +121,7 @@
|
|
</if>
|
|
</if>
|
|
<!-- 数据范围过滤 -->
|
|
<!-- 数据范围过滤 -->
|
|
${params.dataScope}
|
|
${params.dataScope}
|
|
|
|
+ group by g.bus_log_id
|
|
order by g.create_time desc
|
|
order by g.create_time desc
|
|
</where>
|
|
</where>
|
|
|
|
|
|
@@ -123,16 +130,17 @@
|
|
<select id="selectTBusLogInspectionList" parameterType="TBusLog" resultMap="TBusLogInResult">
|
|
<select id="selectTBusLogInspectionList" parameterType="TBusLog" resultMap="TBusLogInResult">
|
|
SELECT
|
|
SELECT
|
|
g.bus_log_type,
|
|
g.bus_log_type,
|
|
- ( SELECT dict_label FROM sys_dict_data WHERE dict_value = g.bus_log_type ) bus_log_type_value,
|
|
|
|
- (select dept_name from sys_dept where dept_id=d.parent_id) jd_name,
|
|
|
|
- d.dept_name sq_name,
|
|
|
|
|
|
+ ( SELECT dict_label FROM ${database_system}.sys_dict_data WHERE dict_value = g.bus_log_type ) bus_log_type_value,
|
|
|
|
+ (select dept_name from ${database_system}.sys_dept where dept_id=d.parent_id) jd_name,
|
|
|
|
+ g.is_check_status,
|
|
|
|
+ g.check_detail,d.dept_name sq_name,
|
|
u.nick_name user_name,
|
|
u.nick_name user_name,
|
|
g.is_risk,
|
|
g.is_risk,
|
|
( CASE g.is_risk WHEN 1 THEN '有' ELSE '无' END ) is_risk_value,
|
|
( CASE g.is_risk WHEN 1 THEN '有' ELSE '无' END ) is_risk_value,
|
|
g.log_source,
|
|
g.log_source,
|
|
- ( SELECT dict_label FROM sys_dict_data WHERE dict_value = g.log_source ) log_source_value,
|
|
|
|
|
|
+ ( SELECT dict_label FROM ${database_system}.sys_dict_data WHERE dict_value = g.log_source ) log_source_value,
|
|
g.risk_status,
|
|
g.risk_status,
|
|
- ( SELECT dict_label FROM sys_dict_data WHERE dict_value = g.risk_status ) risk_status_value,
|
|
|
|
|
|
+ ( SELECT dict_label FROM ${database_system}.sys_dict_data WHERE dict_value = g.risk_status ) risk_status_value,
|
|
b.time_limit,
|
|
b.time_limit,
|
|
b.lat_time,
|
|
b.lat_time,
|
|
b.is_pass,
|
|
b.is_pass,
|
|
@@ -147,8 +155,8 @@
|
|
t_bus_log g
|
|
t_bus_log g
|
|
LEFT JOIN t_bus_inspection b ON g.bus_log_id = b.bus_log_id
|
|
LEFT JOIN t_bus_inspection b ON g.bus_log_id = b.bus_log_id
|
|
LEFT JOIN t_bus_enterprise c ON g.bus_enterprise_id = c.bus_enterprise_id
|
|
LEFT JOIN t_bus_enterprise c ON g.bus_enterprise_id = c.bus_enterprise_id
|
|
- LEFT JOIN sys_dept d ON d.dept_id = c.dept_id
|
|
|
|
- LEFT JOIN sys_user u ON u.user_id = g.create_by
|
|
|
|
|
|
+ LEFT JOIN ${database_system}.sys_dept d ON d.dept_id = c.dept_id
|
|
|
|
+ LEFT JOIN ${database_system}.sys_user u ON u.user_id = g.create_by
|
|
<where>
|
|
<where>
|
|
<if test="busEnterpriseName != null and busEnterpriseName != ''">and g.bus_enterprise_name like concat('%',
|
|
<if test="busEnterpriseName != null and busEnterpriseName != ''">and g.bus_enterprise_name like concat('%',
|
|
#{busEnterpriseName}, '%')
|
|
#{busEnterpriseName}, '%')
|
|
@@ -185,6 +193,8 @@
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="busPatrolstationId != null">bus_patrolstation_id,</if>
|
|
<if test="busPatrolstationId != null">bus_patrolstation_id,</if>
|
|
<if test="busPatrolstationName != null">bus_patrolstation_name,</if>
|
|
<if test="busPatrolstationName != null">bus_patrolstation_name,</if>
|
|
|
|
+ <if test="isCheckStatus != null">is_check_status,</if>
|
|
|
|
+ <if test="checkDetail != null">check_detail,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="busLogId != null">#{busLogId},</if>
|
|
<if test="busLogId != null">#{busLogId},</if>
|
|
@@ -200,6 +210,8 @@
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="busPatrolstationId != null">#{busPatrolstationId},</if>
|
|
<if test="busPatrolstationId != null">#{busPatrolstationId},</if>
|
|
<if test="busPatrolstationName != null">#{busPatrolstationName},</if>
|
|
<if test="busPatrolstationName != null">#{busPatrolstationName},</if>
|
|
|
|
+ <if test="isCheckStatus != null">#{isCheckStatus},</if>
|
|
|
|
+ <if test="checkDetail != null">#{checkDetail},</if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -217,6 +229,8 @@
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="busPatrolstationId != null">bus_patrolstationId = #{busPatrolstationId},</if>
|
|
<if test="busPatrolstationId != null">bus_patrolstationId = #{busPatrolstationId},</if>
|
|
<if test="busPatrolstationName != null">bus_patrolstation_name = #{busPatrolstationName},</if>
|
|
<if test="busPatrolstationName != null">bus_patrolstation_name = #{busPatrolstationName},</if>
|
|
|
|
+ <if test="isCheckStatus != null">is_check_status = #{isCheckStatus},</if>
|
|
|
|
+ <if test="checkDetail != null">check_detail = #{checkDetail},</if>
|
|
</trim>
|
|
</trim>
|
|
where bus_log_id = #{busLogId}
|
|
where bus_log_id = #{busLogId}
|
|
</update>
|
|
</update>
|
|
@@ -231,4 +245,11 @@
|
|
#{busLogId}
|
|
#{busLogId}
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
|
|
+
|
|
|
|
+ <update id="checkTBusLogByBusLogIds" parameterType="String">
|
|
|
|
+ update t_bus_log set is_check_status = '1' where bus_log_id in
|
|
|
|
+ <foreach item="busLogId" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{busLogId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </update>
|
|
</mapper>
|
|
</mapper>
|