指挥部大屏评分修改

This commit is contained in:
pengjie 2025-01-20 10:51:04 +08:00
parent dbe6fbb122
commit ae2ab1023c
3 changed files with 14 additions and 4 deletions

View File

@ -114,7 +114,8 @@ public class SafetyInspectionStandardBigScreenController {
List<XzSecurityDangerTypeRecord> allTopTypes = xzSecurityDangerTypeRecordService.getTopTypes(topCodes);
List<XzSecurityDangerTypeRecord> allTypeRecords = xzSecurityDangerTypeRecordService.list();
List<XzSecurityDangerItemRecord> allItemRecords = xzSecurityDangerItemRecordService.list();
List<XzSecurityQualityInspectionRecordVo> inspectionRecords = xzSecurityQualityInspectionRecordService.selectQualityInspectionRecordPage(new MapBuilder<String, Object>().put("endMonth", month).put("status", 60).put("projectSn", projectSn).put("pageSize", -1).build()).getPage().getRecords();
List<XzSecurityQualityInspectionRecordVo> inspectionRecords = xzSecurityQualityInspectionRecordService.selectQualityInspectionRecordPage(new MapBuilder<String, Object>().put("endMonth", month).put("projectSn", projectSn).put("pageSize", -1).build()).getPage().getRecords();
inspectionRecords = inspectionRecords.stream().filter(i -> i.getRecordType() == null || i.getRecordType() != 3 || (i.getRecordType() == 3 && !DateUtil.format(i.getRectifyTime(), "yyyy-MM").equals(month))).collect(Collectors.toList());
Map<Integer, List<XzSecurityDangerTypeRecord>> tenTopTypes = allTopTypes.stream().collect(Collectors.groupingBy(XzSecurityDangerTypeRecord::getTenType));
for (Map.Entry<Integer, List<XzSecurityDangerTypeRecord>> tenEntry : tenTopTypes.entrySet()) {
Integer tenType = tenEntry.getKey();

View File

@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class XzSecurityQualityInspectionRecordVo extends XzSecurityQualityInspectionRecord {
@ -39,4 +40,10 @@ public class XzSecurityQualityInspectionRecordVo extends XzSecurityQualityInspec
@ApiModelProperty(value = "总企业名称")
private String mainEnterpriseName;
@ApiModelProperty(value = "整改时间")
private Date rectifyTime;
@ApiModelProperty(value = "整改类型")
private Integer rectifyType;
}

View File

@ -250,6 +250,8 @@
<select id="selectQualityInspectionRecordPage"
resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordVo">
SELECT t.*,
r.rectifyTime,
r.rectifyType,
b.enterprise_name,
c.full_name,
d.real_name change_name,
@ -288,7 +290,7 @@
LEFT join subdivision_project subsection on subsection.id = t.subsection_id
LEFT join subdivision_project subentry on subentry.id = t.subentry_id
LEFT join dangerous_engineering_record der on der.id = t.engineering_id
LEFT JOIN (SELECT quality_id,MAX(rectify_time) as rectify_time FROM xz_security_quality_rectify_record GROUP BY
LEFT JOIN (SELECT quality_id,MAX(rectify_time) as rectifyTime,MAX(rectify_time) as rectifyType FROM xz_security_quality_rectify_record GROUP BY
quality_id) r ON r.quality_id = t.id
WHERE t.project_sn = #{param.projectSn}
<if test="param.dangerInfoLevel == '1'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
@ -301,7 +303,7 @@
and t.danger_item_id = #{param.dangerInfoId}
</if>
<if test="param.endMonth != null and param.endMonth != '' ">
and t.inspect_time &lt;= concat(#{param.endMonth},'-31 23:59:59')
and DATE_FORMAT(t.inspect_time, '%Y-%m') = #{param.endMonth}
</if>
<if test="param.recordStatus == '8'.toString() ">
and t.status != 6
@ -419,7 +421,7 @@
order by t.inspect_time desc, t.id desc
</if>
<if test="param.orderBy == '2'.toString()">
ORDER BY IFNULL(r.rectify_time,t.create_time) desc
ORDER BY IFNULL(r.rectifyTime,t.create_time) desc
</if>
</select>
<select id="selectQualityInspectionRecordPageTotal"