修改 数据接口

This commit is contained in:
haozq 2024-06-17 10:03:14 +08:00
parent 8450be4c03
commit 92b54c0e03
2 changed files with 33 additions and 36 deletions

View File

@ -44,7 +44,7 @@
LEFT JOIN tb_area ta ON tbd.area_id = ta.area_id
LEFT JOIN tb_device_value thdv ON tdd.id = thdv.attribute_id
LEFT JOIN tb_pro_bd tpb ON tbd.bd_id = tpb.id
WHERE tbd.devic_type = 1908 and tpb.bid_code = #{bidCode}
WHERE tbd.devic_type = 1908 and tpb.bid_code = #{bidCode} and tbd.del_flag=0
<if test="deviceId!=null and deviceId!=''">
and tbd.device_id=#{deviceId}
</if>
@ -57,12 +57,9 @@
tbd.device_id AS id,
tbd.device_name AS deviceName,
tbd.status AS status
FROM
tb_bd_device tbd
LEFT JOIN
tb_pro_bd tpb ON tpb.id = tbd.bd_id
WHERE
tbd.devic_type = 1910 and tpb.bid_code = #{bidCode}
FROM tb_bd_device tbd
LEFT JOIN tb_pro_bd tpb ON tpb.id = tbd.bd_id
WHERE tbd.devic_type = 1910 and tpb.bid_code = #{bidCode}
</select>
@ -110,10 +107,10 @@
thdv.unit
FROM tb_bd_device tbd
LEFT JOIN tb_device_detail tdd ON tbd.device_id = tdd.device_id
LEFT JOIN tb_area ta ON tbd.area_id = ta.area_id
LEFT JOIN tb_area ta ON tbd.area_id = ta.area_id AND ta.del_flag=0
LEFT JOIN tb_device_value thdv ON tdd.id = thdv.attribute_id
LEFT JOIN tb_pro_bd tpb ON tbd.bd_id = tpb.id
WHERE tpb.bid_code = #{bidCode} and tbd.devic_type = 1908
LEFT JOIN tb_pro_bd tpb ON tbd.bd_id = tpb.id and tpb.del_flag=0
WHERE tpb.bid_code = #{bidCode} and tbd.devic_type = 1908 and tbd.del_flag=0
<if test="deviceId != null and deviceId != ''">
AND tbd.device_id LIKE CONCAT('%', #{deviceId}, '%')
</if>

View File

@ -1,26 +1,26 @@
package com.securitycontrol.system.service;
import com.securitycontrol.common.core.domain.Result;
import com.securitycontrol.entity.system.vo.OrgVo;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import javax.xml.ws.soap.Addressing;
import java.util.List;
@SpringBootTest
public class OrgServiceImplTest {
@Autowired
OrgService service;
@Test
public void getOrgList() {
Result<List<OrgVo>> list = service.getOrgList(null);
System.err.println("测试");
}
}
//package com.securitycontrol.system.service;
//
//
//import com.securitycontrol.common.core.domain.Result;
//import com.securitycontrol.entity.system.vo.OrgVo;
//import org.junit.jupiter.api.Test;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//
//import javax.xml.ws.soap.Addressing;
//import java.util.List;
//
//@SpringBootTest
//public class OrgServiceImplTest {
//
//
// @Autowired
// OrgService service;
//
//
// @Test
// public void getOrgList() {
// Result<List<OrgVo>> list = service.getOrgList(null);
// System.err.println("测试");
// }
//}