Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
fb70901cc8
|
|
@ -25,4 +25,5 @@ public class ProjectQualityVo {
|
|||
// 不合格率
|
||||
private String noPassRate;
|
||||
private String unqualifiedItems;
|
||||
private String checkItems;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class EngineeringSafetyAnalysisController extends BaseController {
|
|||
@ApiOperation(value = "查询安全隐患列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EngineeringSafetyAnalysis environmentalReadings) {
|
||||
startPage();
|
||||
startLayPage();
|
||||
List<EngineeringSafetyAnalysis> list = environmentalReadingsService.selectEnvironmentalReadingsList(environmentalReadings);
|
||||
return getDataTableLayui(list);
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ public class EngineeringSafetyAnalysisController extends BaseController {
|
|||
@ApiOperation(value = "查询环境监测趋势列表")
|
||||
@GetMapping("/getEnvironmentalList")
|
||||
public TableDataInfo getEnvironmentalList(EngineeringSafetyAnalysis environmentalReadings) {
|
||||
startPage();
|
||||
startLayPage();
|
||||
List<EngineeringSafetyAnalysis> list = environmentalReadingsService.getEnvironmentalList(environmentalReadings);
|
||||
return getDataTableLayui(list);
|
||||
}
|
||||
|
|
@ -78,7 +78,7 @@ public class EngineeringSafetyAnalysisController extends BaseController {
|
|||
@ApiOperation(value = "查询安全隐患分布列表")
|
||||
@GetMapping("/getHazardsList")
|
||||
public TableDataInfo getHazardsList(EngineeringSafetyAnalysis environmentalReadings) {
|
||||
startPage();
|
||||
startLayPage();
|
||||
List<EngineeringSafetyAnalysis> list = environmentalReadingsService.getHazardsList(environmentalReadings);
|
||||
return getDataTableLayui(list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,8 @@ public class ProjectProgressNew extends BaseEntity {
|
|||
|
||||
private String delayPolicy;
|
||||
|
||||
private String analyzeResult;
|
||||
|
||||
private String month;
|
||||
|
||||
private String monthValue;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
</select>
|
||||
<select id="getEngqualityAnalysis" resultType="com.securitycontrol.entity.screen.vo.ProjectQualityVo">
|
||||
select tpq.project_name as projectName,
|
||||
tpq.check_items as checkItems,
|
||||
tpq.project_manager as projectManager,
|
||||
tpq.team,
|
||||
tpq.start_time as startTime,
|
||||
|
|
|
|||
|
|
@ -26,6 +26,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<!--查询安全隐患集合列表-->
|
||||
<select id="selectEnvironmentalReadingsList" parameterType="com.securitycontrol.screen.domain.EngineeringSafetyAnalysis" resultMap="EngineeringSafetyAnalysisResult">
|
||||
-- SELECT
|
||||
-- h.id AS id,
|
||||
-- h.type AS type,
|
||||
-- h.level AS level,
|
||||
-- h.timestamp AS timestamp,
|
||||
-- h.bid_code,
|
||||
-- mp.id AS monitoring_point_id ,
|
||||
-- mp.name AS name,
|
||||
-- COALESCE(ale.avg_temperature, '-') AS temperature,
|
||||
-- COALESCE(ale.avg_humidity, '-') AS humidity,
|
||||
-- COALESCE(ale.avg_wind_speed, '-') AS wind_speed,
|
||||
-- COALESCE(ale.avg_gas_value, '-') AS gas_value,
|
||||
-- pro.pro_name ,
|
||||
-- h.work_location,
|
||||
-- h.analysis_reason
|
||||
-- FROM
|
||||
-- hazards h
|
||||
-- LEFT JOIN tb_project_new pro on h.bid_code = pro.bid_code
|
||||
-- LEFT JOIN
|
||||
-- monitoring_points mp ON h.monitoring_point_id = mp.id
|
||||
-- LEFT JOIN
|
||||
-- (
|
||||
-- -- 子查询:获取每个 bid_code 最新日期的环境数据平均值
|
||||
-- SELECT
|
||||
-- er.bid_code,
|
||||
-- AVG(er.temperature) AS avg_temperature,
|
||||
-- AVG(er.humidity) AS avg_humidity,
|
||||
-- AVG(er.wind_speed) AS avg_wind_speed,
|
||||
-- AVG(er.gas_value) AS avg_gas_value
|
||||
-- FROM
|
||||
-- environmental_readings er
|
||||
-- JOIN (
|
||||
-- -- 找到每个 bid_code 的最新日期
|
||||
-- SELECT
|
||||
-- bid_code,
|
||||
-- MAX(date) AS max_date
|
||||
-- FROM
|
||||
-- environmental_readings
|
||||
-- GROUP BY
|
||||
-- bid_code
|
||||
-- ) AS latest_dates ON er.bid_code = latest_dates.bid_code AND er.date = latest_dates.max_date
|
||||
-- GROUP BY
|
||||
-- er.bid_code
|
||||
-- ) ale ON h.bid_code = ale.bid_code
|
||||
SELECT
|
||||
h.id AS id,
|
||||
h.type AS type,
|
||||
|
|
@ -34,10 +78,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
h.bid_code,
|
||||
mp.id AS monitoring_point_id ,
|
||||
mp.name AS name,
|
||||
COALESCE(ale.avg_temperature, '-') AS temperature,
|
||||
COALESCE(ale.avg_humidity, '-') AS humidity,
|
||||
COALESCE(ale.avg_wind_speed, '-') AS wind_speed,
|
||||
COALESCE(ale.avg_gas_value, '-') AS gas_value,
|
||||
er.gas_value,
|
||||
er.wind_speed,
|
||||
er.humidity,
|
||||
er.temperature,
|
||||
pro.pro_name ,
|
||||
h.work_location,
|
||||
h.analysis_reason
|
||||
|
|
@ -46,30 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN tb_project_new pro on h.bid_code = pro.bid_code
|
||||
LEFT JOIN
|
||||
monitoring_points mp ON h.monitoring_point_id = mp.id
|
||||
LEFT JOIN
|
||||
(
|
||||
-- 子查询:获取每个 bid_code 最新日期的环境数据平均值
|
||||
SELECT
|
||||
er.bid_code,
|
||||
AVG(er.temperature) AS avg_temperature,
|
||||
AVG(er.humidity) AS avg_humidity,
|
||||
AVG(er.wind_speed) AS avg_wind_speed,
|
||||
AVG(er.gas_value) AS avg_gas_value
|
||||
FROM
|
||||
environmental_readings er
|
||||
JOIN (
|
||||
-- 找到每个 bid_code 的最新日期
|
||||
SELECT
|
||||
bid_code,
|
||||
MAX(date) AS max_date
|
||||
FROM
|
||||
environmental_readings
|
||||
GROUP BY
|
||||
bid_code
|
||||
) AS latest_dates ON er.bid_code = latest_dates.bid_code AND er.date = latest_dates.max_date
|
||||
GROUP BY
|
||||
er.bid_code
|
||||
) ale ON h.bid_code = ale.bid_code
|
||||
LEFT JOIN environmental_readings er on er.bid_id = h.environmental_readings_id
|
||||
WHERE
|
||||
(#{bidCode} IS NULL OR #{bidCode} = '' OR h.bid_code = #{bidCode})
|
||||
<if test="name != null and name != ''">
|
||||
|
|
@ -82,16 +103,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="environmentalList" parameterType="com.securitycontrol.screen.domain.EngineeringSafetyAnalysis" resultMap="EngineeringSafetyAnalysisResult">
|
||||
SELECT
|
||||
date,
|
||||
AVG(temperature) AS temperature,
|
||||
AVG(humidity) AS humidity,
|
||||
AVG(wind_speed) AS wind_speed,
|
||||
AVG(gas_value) AS gas_value
|
||||
temperature ,
|
||||
humidity ,
|
||||
wind_speed ,
|
||||
gas_value
|
||||
FROM
|
||||
environmental_readings
|
||||
WHERE
|
||||
bid_code = #{bidCode}
|
||||
GROUP BY
|
||||
date
|
||||
ORDER BY
|
||||
date ASC
|
||||
</select>
|
||||
|
|
@ -109,7 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
|
||||
<select id="getEnvironmentalList" resultType="com.securitycontrol.screen.domain.EngineeringSafetyAnalysis">
|
||||
<select id="getEnvironmentalList" parameterType="com.securitycontrol.screen.domain.EngineeringSafetyAnalysis" resultMap="EngineeringSafetyAnalysisResult">
|
||||
SELECT id,date,temperature,humidity,wind_speed,gas_value
|
||||
FROM environmental_readings
|
||||
WHERE bid_code = #{bidCode}
|
||||
|
|
@ -119,7 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ORDER BY date ASC
|
||||
</select>
|
||||
|
||||
<select id="getHazardsList" resultType="com.securitycontrol.screen.domain.EngineeringSafetyAnalysis">
|
||||
<select id="getHazardsList" parameterType="com.securitycontrol.screen.domain.EngineeringSafetyAnalysis" resultMap="EngineeringSafetyAnalysisResult">
|
||||
SELECT id,type,level,timestamp
|
||||
FROM hazards
|
||||
WHERE bid_code = #{bidCode}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="keyPathFlag" column="key_path_flag" />
|
||||
<result property="delayStatus" column="delay_status" />
|
||||
<result property="delayPolicy" column="delay_policy" />
|
||||
<result property="analyzeResult" column="analyze_result" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
|
|
@ -31,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select id, project_id, project_name, task_code, task_name, plan_start_time,
|
||||
plan_end_time, actual_start_time, actual_end_time, process_diff, total_effort,
|
||||
complete_effort, delay_actor, resource_match_status, key_path_flag,
|
||||
create_by, create_time, update_by, update_time, delay_status, delay_policy
|
||||
create_by, create_time, update_by, update_time, delay_status, delay_policy, analyze_result
|
||||
from tb_project_progress_new
|
||||
</sql>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue