Browse Source

修改换表BUG

lin 4 years ago
parent
commit
0bc44430ec

+ 6 - 5
smart-city-platform/src/main/resources/mapper/InstallListMapper.xml

@@ -428,13 +428,13 @@
 			c.customer_name  as customer_name,
 			n.door_no as door_no,
 			n.device_id as device_id,
-			n.device_type_id as device_type_id,
+			sd.device_type as device_type_id,
 			dt.model as model,
 			dt.equipment_type as equipment_type,
 			dm.id as factory_id,
-			dm.`name` as facory_name, 
-			n.device_no as device_no,
-			n.electronic_no as electronic_no,
+			dm.`name` as facory_name,
+            sd.device_no as device_no,
+            sd.water_meter_no as electronic_no,
 			n.file_no as file_no,
 			n.new_meter_start as new_meter_start,
 			n.old_meter_end as old_meter_end,
@@ -458,9 +458,10 @@
             n.account_id as accountId
 		FROM
 			sc_install_list n 
+			left join sc_device sd on (sd.id = n.device_id)
 			left join sc_building b on (b.id = n.building_id)
 			left join sc_customer c on (c.id = n.customer_id)
-			left join sc_device_type dt on (dt.id = n.device_type_id)
+			left join sc_device_type dt on (dt.id = sd.device_type)
 			left join sc_device_manufacturer dm on (dm.id = dt.manufacturer_id)
             left join sc_community com on (com.id = b.community)
             left join sc_water_meter_error_days swmed on ( swmed.device_id = n.device_id)