增加工程设备接口

This commit is contained in:
syruan 2024-09-25 15:02:22 +08:00
parent e5332d81ab
commit b14a26fc59
5 changed files with 28 additions and 0 deletions

View File

@ -65,5 +65,8 @@ public interface TbPeopleMapper {
*/
List<PeoplePositionVo> queryPeoplePositionByProId(@Param("proId") Integer proId);
}

View File

@ -26,6 +26,13 @@ public class ProjectDetailsViewController extends BaseController {
@Autowired
private ProjectDetailsViewServiceImpl projectDetailsViewService;
/**
* 根据工程id查询所有设备
*/
@GetMapping("/queryDevInfoByProject")
public AjaxResult queryDevInfoByProject(Integer proId) {
return AjaxResult.success(projectDetailsViewService.queryDevInfoByProject(proId));
}
/**
* 查询工程人员安全帽定位信息

View File

@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* @author : 阮世耀
@ -17,6 +18,8 @@ import java.util.List;
@Mapper
public interface TbDeviceDataRecord {
List<Map<String,String>> queryDevInfoByProject(@Param("proId") Integer proId);
List<DeviceWarnRecordVo> getDeviceWarnRecord(DeviceWarnRecordVo deviceWarnRecordVo);
/**

View File

@ -24,6 +24,10 @@ public class ProjectDetailsViewServiceImpl {
private TbDeviceDataRecord tbDeviceDataRecordMapper;
public AjaxResult queryDevInfoByProject(Integer proId) {
return AjaxResult.success(tbDeviceDataRecordMapper.queryDevInfoByProject(proId));
}
public AjaxResult getDevAttributeLatestInfoById(Integer proId) {
return AjaxResult.success(tbDeviceDataRecordMapper.getDevAttributeLatestInfoById(proId));
}

View File

@ -2,6 +2,17 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.screen.mapper.TbDeviceDataRecord">
<select id="queryDevInfoByProject" resultType="java.util.Map">
SELECT
device.id,device.dev_name,project.id AS proId,project.pro_name AS proName,
device.dev_type
FROM
tb_device device
LEFT JOIN tb_bd_device_record tbdr ON device.bd_id = tbdr.id
LEFT JOIN tb_project project ON project.id = tbdr.pro_id AND project.del_flag = 0
WHERE project.id = #{proId} and device.del_flag = 0
</select>
<select id="getDeviceWarnRecord" resultType="com.bonus.screen.vo.DeviceWarnRecordVo">
SELECT
tddr.id,