Просмотр исходного кода

优化巡检点设备名称 和编码显示问题

java110 лет назад: 6
Родитель
Сommit
574f3559f7

+ 10 - 3
java110-db/src/main/resources/mapper/community/InspectionRoutePointRelServiceDaoImplMapper.xml

@@ -75,11 +75,15 @@
         inspectionRouteId,t.irp_rel_id,t.irp_rel_id irpRelId,t.status_cd,t.status_cd
         statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,
         ip.inspection_id inspectionId,ip.machine_id machineId,ip.remark,
-        ip.inspection_name inspectionName,m.location_type_cd locationTypeCd,m.location_obj_id locationObjId
-        from inspection_route_point_rel t,inspection_point ip,machine m
+        ip.inspection_name inspectionName,m.location_type_cd locationTypeCd,m.location_obj_id locationObjId,
+        m.machine_code machineCode,m.machine_name machineName,d.name locationTypeName
+        from inspection_route_point_rel t,inspection_point ip,machine m,t_dict d
         where 1 =1
         and t.inspection_id = ip.inspection_id
         and ip.machine_id = m.machine_id
+        and d.status_cd = m.location_type_cd
+        and d.table_name = 'machine'
+        and d.table_columns = 'location_type_cd'
         and m.status_cd = '0'
         and ip.status_cd = '0'
         <if test="inspectionId !=null and inspectionId != ''">
@@ -137,10 +141,13 @@
     <!-- 查询巡检路线巡检点关系数量 add by wuxw 2018-07-03 -->
     <select id="queryInspectionRoutePointRelsCount" parameterType="Map" resultType="Map">
         select count(1) count
-        from inspection_route_point_rel t,inspection_point ip,machine m
+        from inspection_route_point_rel t,inspection_point ip,machine m,t_dict d
         where 1 =1
         and t.inspection_id = ip.inspection_id
         and ip.machine_id = m.machine_id
+        and d.status_cd = m.location_type_cd
+        and d.table_name = 'machine'
+        and d.table_columns = 'location_type_cd'
         and m.status_cd = '0'
         and ip.status_cd = '0'
         <if test="inspectionId !=null and inspectionId != ''">