增加工程设备接口
This commit is contained in:
parent
e5332d81ab
commit
b14a26fc59
|
|
@ -65,5 +65,8 @@ public interface TbPeopleMapper {
|
||||||
*/
|
*/
|
||||||
List<PeoplePositionVo> queryPeoplePositionByProId(@Param("proId") Integer proId);
|
List<PeoplePositionVo> queryPeoplePositionByProId(@Param("proId") Integer proId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,13 @@ public class ProjectDetailsViewController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProjectDetailsViewServiceImpl projectDetailsViewService;
|
private ProjectDetailsViewServiceImpl projectDetailsViewService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据工程id查询所有设备
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryDevInfoByProject")
|
||||||
|
public AjaxResult queryDevInfoByProject(Integer proId) {
|
||||||
|
return AjaxResult.success(projectDetailsViewService.queryDevInfoByProject(proId));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询工程人员安全帽定位信息
|
* 查询工程人员安全帽定位信息
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : 阮世耀
|
* @author : 阮世耀
|
||||||
|
|
@ -17,6 +18,8 @@ import java.util.List;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface TbDeviceDataRecord {
|
public interface TbDeviceDataRecord {
|
||||||
|
|
||||||
|
List<Map<String,String>> queryDevInfoByProject(@Param("proId") Integer proId);
|
||||||
|
|
||||||
List<DeviceWarnRecordVo> getDeviceWarnRecord(DeviceWarnRecordVo deviceWarnRecordVo);
|
List<DeviceWarnRecordVo> getDeviceWarnRecord(DeviceWarnRecordVo deviceWarnRecordVo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,10 @@ public class ProjectDetailsViewServiceImpl {
|
||||||
private TbDeviceDataRecord tbDeviceDataRecordMapper;
|
private TbDeviceDataRecord tbDeviceDataRecordMapper;
|
||||||
|
|
||||||
|
|
||||||
|
public AjaxResult queryDevInfoByProject(Integer proId) {
|
||||||
|
return AjaxResult.success(tbDeviceDataRecordMapper.queryDevInfoByProject(proId));
|
||||||
|
}
|
||||||
|
|
||||||
public AjaxResult getDevAttributeLatestInfoById(Integer proId) {
|
public AjaxResult getDevAttributeLatestInfoById(Integer proId) {
|
||||||
return AjaxResult.success(tbDeviceDataRecordMapper.getDevAttributeLatestInfoById(proId));
|
return AjaxResult.success(tbDeviceDataRecordMapper.getDevAttributeLatestInfoById(proId));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,17 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!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">
|
<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 id="getDeviceWarnRecord" resultType="com.bonus.screen.vo.DeviceWarnRecordVo">
|
||||||
SELECT
|
SELECT
|
||||||
tddr.id,
|
tddr.id,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue