java110 %!s(int64=5) %!d(string=hai) anos
pai
achega
2868cea5b7

+ 3 - 2
java110-db/src/main/resources/mapper/common/MachineServiceDaoImplMapper.xml

@@ -144,10 +144,10 @@
         machineVersion,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id
         bId,t.machine_name,t.machine_name machineName,t.machine_type_cd,t.machine_type_cd
         machineTypeCd,t.machine_ip,t.machine_ip machineIp,td.name machineTypeCdName,
-        t.state,t.location_type_cd locationTypeCd,t.location_obj_id locationObjId,
+        t.state,c.location_type locationTypeCd, c.location_name locationTypeName, t.location_obj_id locationObjId,
         t.location_type_cd,t.location_obj_id,
         td1.name stateName,t.create_time createTime,t.direction,td3.name directionName
-        from machine t,t_dict td,t_dict td1,t_dict td3
+        from machine t,t_dict td,t_dict td1,t_dict td3, community_location c
         where 1 =1
         and t.machine_type_cd=td.status_cd
         and td.table_name='machine'
@@ -158,6 +158,7 @@
         and t.direction = td3.status_cd
         and td3.table_name='machine'
         and td3.table_columns='direction'
+        and t.location_type_cd = c.location_id
         <if test="machineMac !=null and machineMac != ''">
             and t.machine_mac= #{machineMac}
         </if>