指挥部大屏评分修改
This commit is contained in:
parent
dbe6fbb122
commit
ae2ab1023c
@ -114,7 +114,8 @@ public class SafetyInspectionStandardBigScreenController {
|
|||||||
List<XzSecurityDangerTypeRecord> allTopTypes = xzSecurityDangerTypeRecordService.getTopTypes(topCodes);
|
List<XzSecurityDangerTypeRecord> allTopTypes = xzSecurityDangerTypeRecordService.getTopTypes(topCodes);
|
||||||
List<XzSecurityDangerTypeRecord> allTypeRecords = xzSecurityDangerTypeRecordService.list();
|
List<XzSecurityDangerTypeRecord> allTypeRecords = xzSecurityDangerTypeRecordService.list();
|
||||||
List<XzSecurityDangerItemRecord> allItemRecords = xzSecurityDangerItemRecordService.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));
|
Map<Integer, List<XzSecurityDangerTypeRecord>> tenTopTypes = allTopTypes.stream().collect(Collectors.groupingBy(XzSecurityDangerTypeRecord::getTenType));
|
||||||
for (Map.Entry<Integer, List<XzSecurityDangerTypeRecord>> tenEntry : tenTopTypes.entrySet()) {
|
for (Map.Entry<Integer, List<XzSecurityDangerTypeRecord>> tenEntry : tenTopTypes.entrySet()) {
|
||||||
Integer tenType = tenEntry.getKey();
|
Integer tenType = tenEntry.getKey();
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class XzSecurityQualityInspectionRecordVo extends XzSecurityQualityInspectionRecord {
|
public class XzSecurityQualityInspectionRecordVo extends XzSecurityQualityInspectionRecord {
|
||||||
@ -39,4 +40,10 @@ public class XzSecurityQualityInspectionRecordVo extends XzSecurityQualityInspec
|
|||||||
@ApiModelProperty(value = "总企业名称")
|
@ApiModelProperty(value = "总企业名称")
|
||||||
private String mainEnterpriseName;
|
private String mainEnterpriseName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "整改时间")
|
||||||
|
private Date rectifyTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "整改类型")
|
||||||
|
private Integer rectifyType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -250,6 +250,8 @@
|
|||||||
<select id="selectQualityInspectionRecordPage"
|
<select id="selectQualityInspectionRecordPage"
|
||||||
resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordVo">
|
resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.XzSecurityQualityInspectionRecordVo">
|
||||||
SELECT t.*,
|
SELECT t.*,
|
||||||
|
r.rectifyTime,
|
||||||
|
r.rectifyType,
|
||||||
b.enterprise_name,
|
b.enterprise_name,
|
||||||
c.full_name,
|
c.full_name,
|
||||||
d.real_name change_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 subsection on subsection.id = t.subsection_id
|
||||||
LEFT join subdivision_project subentry on subentry.id = t.subentry_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 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
|
quality_id) r ON r.quality_id = t.id
|
||||||
WHERE t.project_sn = #{param.projectSn}
|
WHERE t.project_sn = #{param.projectSn}
|
||||||
<if test="param.dangerInfoLevel == '1'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
<if test="param.dangerInfoLevel == '1'.toString() and param.dangerInfoId != null and param.dangerInfoId != ''">
|
||||||
@ -301,7 +303,7 @@
|
|||||||
and t.danger_item_id = #{param.dangerInfoId}
|
and t.danger_item_id = #{param.dangerInfoId}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.endMonth != null and param.endMonth != '' ">
|
<if test="param.endMonth != null and param.endMonth != '' ">
|
||||||
and t.inspect_time <= concat(#{param.endMonth},'-31 23:59:59')
|
and DATE_FORMAT(t.inspect_time, '%Y-%m') = #{param.endMonth}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.recordStatus == '8'.toString() ">
|
<if test="param.recordStatus == '8'.toString() ">
|
||||||
and t.status != 6
|
and t.status != 6
|
||||||
@ -419,7 +421,7 @@
|
|||||||
order by t.inspect_time desc, t.id desc
|
order by t.inspect_time desc, t.id desc
|
||||||
</if>
|
</if>
|
||||||
<if test="param.orderBy == '2'.toString()">
|
<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>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectQualityInspectionRecordPageTotal"
|
<select id="selectQualityInspectionRecordPageTotal"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user