Ver código fonte

获取井信息接口增加关联设备信息

chenwen 1 ano atrás
pai
commit
e66b39e0bf

+ 2 - 1
src/main/java/com/hb/proj/base/service/WellService.java

@@ -153,7 +153,8 @@ public class WellService {
     public WellVO get(String wellId){
         String sql="""
 				
-				select w.*,g.org_name belong_org_name
+				select w.*,g.org_name belong_org_name,
+				(select device_code from tzl_gather_device d where d.well_id=w.well_id and d.del_if=false limit 1) device_code
 				from tzl_well w
 				left join tsys_org g on w.org_id=g.org_id and g.del_if=false
 				where w.well_id=?