|
@@ -10,32 +10,25 @@
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<select id="getXunjianimgList" parameterMap="pm_AppXunjianimgVO" resultMap="rm_AppXunjianimgYinhuanBO">
|
|
<select id="getXunjianimgList" parameterMap="pm_AppXunjianimgVO" resultMap="rm_AppXunjianimgYinhuanBO">
|
|
- select i.bus_inspection_id as busInspectionId,
|
|
|
|
|
|
+ select
|
|
|
|
+ i.bus_inspection_id as busInspectionId,
|
|
i.bus_log_id as busLogId,
|
|
i.bus_log_id as busLogId,
|
|
i.bus_items_id as busItemId,
|
|
i.bus_items_id as busItemId,
|
|
i.bus_items_name as busItemName,
|
|
i.bus_items_name as busItemName,
|
|
- i.risk_status as riskStatus,
|
|
|
|
- (select parent_id from t_bus_items where bus_items_id= (select parent_id from t_bus_items where
|
|
|
|
- bus_items_id=i.bus_items_id)) yjId,
|
|
|
|
- (select bus_items_name from t_bus_items where bus_items_id = (select parent_id from t_bus_items where
|
|
|
|
- bus_items_id= (select parent_id from t_bus_items where bus_items_id=i.bus_items_id))) as yjName,
|
|
|
|
|
|
+ (select parent_id from t_bus_items where bus_items_id= (select parent_id from t_bus_items where bus_items_id=i.bus_items_id)) yjId,
|
|
|
|
+ (select bus_items_name from t_bus_items where bus_items_id = (select parent_id from t_bus_items where bus_items_id= (select parent_id from t_bus_items where bus_items_id=i.bus_items_id))) as yjName,
|
|
(select parent_id from t_bus_items where bus_items_id=i.bus_items_id) ejId,
|
|
(select parent_id from t_bus_items where bus_items_id=i.bus_items_id) ejId,
|
|
- (select bus_items_name from t_bus_items where bus_items_id = (select parent_id from t_bus_items where
|
|
|
|
- bus_items_id=i.bus_items_id)) ejName,
|
|
|
|
|
|
+ (select bus_items_name from t_bus_items where bus_items_id = (select parent_id from t_bus_items where bus_items_id=i.bus_items_id)) ejName,
|
|
(select dict_label from onest_system.sys_dict_data where dict_value= i.items_type) itemsTypeValue,
|
|
(select dict_label from onest_system.sys_dict_data where dict_value= i.items_type) itemsTypeValue,
|
|
(select dict_label from onest_system.sys_dict_data where dict_value=i.risk_status) riskStatusValue,
|
|
(select dict_label from onest_system.sys_dict_data where dict_value=i.risk_status) riskStatusValue,
|
|
- (select g.bus_enterprise_name from t_bus_log g where g.bus_log_id=i.bus_log_id) busEnterpriseName,
|
|
|
|
-
|
|
|
|
- (select attach_url from t_attach
|
|
|
|
- where bus_id=
|
|
|
|
- (select bus_track_id from t_bus_track where
|
|
|
|
- bus_inspection_id= i.bus_inspection_id
|
|
|
|
- order by create_time asc limit 1)
|
|
|
|
- limit 1) attachUrl
|
|
|
|
-
|
|
|
|
- from t_bus_inspection i,t_bus_log g ,t_bus_enterprise e
|
|
|
|
|
|
+ g.bus_enterprise_name busEnterpriseName,
|
|
|
|
+ attach.attach_url attachUrl
|
|
|
|
+ from t_bus_inspection i
|
|
|
|
+ left join t_bus_log g on i.bus_log_id = g.bus_log_id
|
|
|
|
+ left join t_bus_enterprise e on e.bus_enterprise_id = g.bus_enterprise_id
|
|
|
|
+ left join t_bus_track track on track.bus_inspection_id = i.bus_inspection_id
|
|
|
|
+ left join t_attach attach on attach.bus_id = track.bus_track_id
|
|
<where>
|
|
<where>
|
|
- i.bus_log_id=g.bus_log_id and e.bus_enterprise_id=g.bus_enterprise_id
|
|
|
|
<if test="isPass != null and isPass != ''">
|
|
<if test="isPass != null and isPass != ''">
|
|
and i.is_pass=#{isPass}
|
|
and i.is_pass=#{isPass}
|
|
</if>
|
|
</if>
|
|
@@ -45,6 +38,7 @@
|
|
</where>
|
|
</where>
|
|
<!-- 数据范围过滤 -->
|
|
<!-- 数据范围过滤 -->
|
|
${params.dataScope}
|
|
${params.dataScope}
|
|
|
|
+ group by busInspectionId, attach_url
|
|
order by i.bus_items_id asc
|
|
order by i.bus_items_id asc
|
|
</select>
|
|
</select>
|
|
|
|
|