大屏代码提交
This commit is contained in:
parent
196c25159c
commit
c30b99a5ec
|
|
@ -33,6 +33,9 @@ public class SjNewConstructionProgress extends BaseEntity {
|
||||||
/** 当前进度 */
|
/** 当前进度 */
|
||||||
private String progress;
|
private String progress;
|
||||||
|
|
||||||
|
/** 实际进度 */
|
||||||
|
private String sjprogress;
|
||||||
|
|
||||||
/** 实际结束时间 */
|
/** 实际结束时间 */
|
||||||
private String endTime;
|
private String endTime;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,4 +82,5 @@ public class SjNewProjectSafety extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private String startTime;
|
private String startTime;
|
||||||
private String endTime;
|
private String endTime;
|
||||||
|
private String projectId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,40 +6,52 @@
|
||||||
parameterType="com.securitycontrol.screen.domain.SjNewConstructionProgress"
|
parameterType="com.securitycontrol.screen.domain.SjNewConstructionProgress"
|
||||||
resultType="com.securitycontrol.screen.domain.SjNewConstructionProgress">
|
resultType="com.securitycontrol.screen.domain.SjNewConstructionProgress">
|
||||||
SELECT
|
SELECT
|
||||||
id,
|
p.id,
|
||||||
gx_type AS gxType,
|
p.gx_type AS gxType,
|
||||||
gx,
|
p.gx,
|
||||||
plan_start_time AS planStartTime,
|
p.plan_start_time AS planStartTime,
|
||||||
plan_end_time AS planEndTime,
|
p.plan_end_time AS planEndTime,
|
||||||
in_user AS inUser,
|
p.in_user AS inUser,
|
||||||
in_device AS inDevice,
|
p.in_device AS inDevice,
|
||||||
progress,
|
p.progress,
|
||||||
end_time AS endTime,
|
p.end_time AS endTime,
|
||||||
status,
|
p.status,
|
||||||
project_id AS projectId,
|
p.project_id AS projectId,
|
||||||
create_time,
|
p.create_time,
|
||||||
update_time,
|
p.update_time,
|
||||||
remark
|
p.remark,
|
||||||
FROM sj_new_construction_progress
|
r.plan_progress AS sjprogress <!-- 最新计划进度 -->
|
||||||
|
FROM sj_new_construction_progress p
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT r1.progress_id, r1.plan_progress
|
||||||
|
FROM sj_new_construction_progress_real r1
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT progress_id, MAX(create_time) AS max_create_time
|
||||||
|
FROM sj_new_construction_progress_real
|
||||||
|
GROUP BY progress_id
|
||||||
|
) r2
|
||||||
|
ON r1.progress_id = r2.progress_id
|
||||||
|
AND r1.create_time = r2.max_create_time
|
||||||
|
) r ON p.id = r.progress_id
|
||||||
<where>
|
<where>
|
||||||
<if test="projectId != null and projectId != ''">
|
<if test="projectId != null and projectId != ''">
|
||||||
AND project_id = #{projectId}
|
AND p.project_id = #{projectId}
|
||||||
</if>
|
</if>
|
||||||
<if test="gxType != null and gxType != ''">
|
<if test="gxType != null and gxType != ''">
|
||||||
AND gx_type = #{gxType}
|
AND p.gx_type = #{gxType}
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
AND status = #{status}
|
AND p.status = #{status}
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null and startTime != ''">
|
||||||
AND plan_start_time >= #{startTime}
|
AND p.plan_start_time >= #{startTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime != null and endTime != ''">
|
<if test="endTime != null and endTime != ''">
|
||||||
AND plan_end_time <= #{endTime}
|
AND p.plan_end_time <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY plan_start_time DESC
|
ORDER BY p.plan_start_time DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="selectProgressSummary"
|
<select id="selectProgressSummary"
|
||||||
resultType="com.securitycontrol.screen.domain.SjNewConstructionProgress">
|
resultType="com.securitycontrol.screen.domain.SjNewConstructionProgress">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,9 @@
|
||||||
<if test="endTime != null and endTime != ''">
|
<if test="endTime != null and endTime != ''">
|
||||||
AND detection_time <= #{endTime}
|
AND detection_time <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectId != null and projectId != ''">
|
||||||
|
AND project_id = #{projectId}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY detection_time DESC
|
ORDER BY detection_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -6,33 +6,35 @@
|
||||||
<select id="selectProjectQualityList"
|
<select id="selectProjectQualityList"
|
||||||
parameterType="com.securitycontrol.screen.domain.SjNewProjectQuality"
|
parameterType="com.securitycontrol.screen.domain.SjNewProjectQuality"
|
||||||
resultType="com.securitycontrol.screen.domain.SjNewProjectQuality">
|
resultType="com.securitycontrol.screen.domain.SjNewProjectQuality">
|
||||||
SELECT
|
SELECT
|
||||||
id,
|
q.id,
|
||||||
team_name AS teamName,
|
t.team_name AS teamName,
|
||||||
content,
|
q.content,
|
||||||
test_day AS testDay,
|
q.test_day AS testDay,
|
||||||
test_result AS testResult,
|
q.test_result AS testResult,
|
||||||
test_report AS testReport,
|
q.test_report AS testReport,
|
||||||
del_flag AS delFlag,
|
q.del_flag AS delFlag,
|
||||||
create_time
|
q.create_time
|
||||||
FROM sj_new_project_quality
|
FROM sj_new_project_quality q
|
||||||
WHERE del_flag = '0'
|
LEFT JOIN sj_work_team t
|
||||||
<if test="projectId != null and projectId != ''">
|
ON q.team_name = t.id
|
||||||
and project_id = #{projectId}
|
WHERE
|
||||||
|
q.del_flag = '0'
|
||||||
|
<if test="projectId != null and projectId != ''">
|
||||||
|
AND q.project_id = #{projectId}
|
||||||
</if>
|
</if>
|
||||||
<if test="teamName != null and teamName != ''">
|
<if test="teamName != null and teamName != ''">
|
||||||
AND team_name LIKE CONCAT('%', #{teamName}, '%')
|
AND t.team_name LIKE CONCAT('%', #{teamName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="testResult != null and testResult != ''">
|
<if test="testResult != null and testResult != ''">
|
||||||
AND test_result = #{testResult}
|
AND q.test_result = #{testResult}
|
||||||
</if>
|
</if>
|
||||||
<if test="startTestDay != null and startTestDay != ''">
|
<if test="startTestDay != null and startTestDay != ''">
|
||||||
AND test_day >= #{startTestDay}
|
AND q.test_day >= #{startTestDay}
|
||||||
</if>
|
</if>
|
||||||
<if test="endTestDay != null and endTestDay != ''">
|
<if test="endTestDay != null and endTestDay != ''">
|
||||||
AND test_day <= #{endTestDay}
|
AND q.test_day <= #{endTestDay}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY create_time DESC
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 质量预警列表 -->
|
<!-- 质量预警列表 -->
|
||||||
|
|
@ -70,28 +72,31 @@
|
||||||
</select>
|
</select>
|
||||||
<select id="selectTeamPassRate" resultType="com.securitycontrol.screen.domain.SjNewProjectQuality">
|
<select id="selectTeamPassRate" resultType="com.securitycontrol.screen.domain.SjNewProjectQuality">
|
||||||
SELECT
|
SELECT
|
||||||
team_name AS teamName,
|
tp.team_name AS teamName,
|
||||||
COUNT(*) AS totalCount,
|
COUNT(q.id) AS totalCount,
|
||||||
SUM(CASE WHEN test_report = '0' THEN 1 ELSE 0 END) AS passCount,
|
SUM(CASE WHEN q.test_result = '0' THEN 1 ELSE 0 END) AS passCount,
|
||||||
ROUND(
|
ROUND(
|
||||||
SUM(CASE WHEN test_report = '0' THEN 1 ELSE 0 END)
|
SUM(CASE WHEN q.test_result = '0' THEN 1 ELSE 0 END) / COUNT(q.id) * 100,
|
||||||
/ COUNT(*) * 100, 2
|
2
|
||||||
) AS passRate
|
) AS passRate
|
||||||
FROM sj_new_project_quality
|
FROM
|
||||||
WHERE del_flag = '0'
|
sj_new_project_quality q
|
||||||
AND project_id = #{projectId}
|
LEFT JOIN sj_work_team tp
|
||||||
|
ON q.team_name = tp.id
|
||||||
|
WHERE q.del_flag = '0'
|
||||||
|
AND q.project_id = #{projectId}
|
||||||
<if test="startTestDay != null and startTestDay != ''">
|
<if test="startTestDay != null and startTestDay != ''">
|
||||||
AND test_day >= #{startTestDay}
|
AND q.test_day >= #{startTestDay}
|
||||||
</if>
|
</if>
|
||||||
<if test="endTestDay != null and endTestDay != ''">
|
<if test="endTestDay != null and endTestDay != ''">
|
||||||
AND test_day <= #{endTestDay}
|
AND q.test_day <= #{endTestDay}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY team_name
|
GROUP BY tp.team_name
|
||||||
</select>
|
</select>
|
||||||
<select id="selectResultCount" resultType="com.securitycontrol.screen.domain.SjNewProjectQuality">
|
<select id="selectResultCount" resultType="com.securitycontrol.screen.domain.SjNewProjectQuality">
|
||||||
SELECT
|
SELECT
|
||||||
SUM(CASE WHEN test_report = '0' THEN 1 ELSE 0 END) AS passCount,
|
SUM(CASE WHEN test_result = '0' THEN 1 ELSE 0 END) AS passCount,
|
||||||
SUM(CASE WHEN test_report = '1' THEN 1 ELSE 0 END) AS failCount
|
SUM(CASE WHEN test_result = '1' THEN 1 ELSE 0 END) AS failCount
|
||||||
FROM sj_new_project_quality
|
FROM sj_new_project_quality
|
||||||
WHERE del_flag = '0'
|
WHERE del_flag = '0'
|
||||||
<if test="startTestDay != null and startTestDay != ''">
|
<if test="startTestDay != null and startTestDay != ''">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue