bug修复

This commit is contained in:
guoshengxiong 2024-05-08 17:43:19 +08:00
parent 430e2a6e48
commit e2628bb94a
18 changed files with 294 additions and 36 deletions

View File

@ -22,6 +22,7 @@ import com.zhgd.xmgl.modules.car.mapper.CarCameraMapper;
import com.zhgd.xmgl.modules.car.mapper.CarInfoMapper;
import com.zhgd.xmgl.modules.car.mapper.CarPassRecordMapper;
import com.zhgd.xmgl.modules.car.mapper.CarTypeMapper;
import com.zhgd.xmgl.modules.car.service.impl.CarPassRecordServiceImpl;
import com.zhgd.xmgl.modules.project.entity.Project;
import com.zhgd.xmgl.modules.project.entity.ProjectVideoConfig;
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
@ -63,6 +64,9 @@ public class HikvisionCall {
private static final String FIXED_CAR_GROUP_NAME = "业主车辆";
@Autowired
XzHikvisionSyncServiceImpl xzHikvisionSyncService;
@Lazy
@Autowired
CarPassRecordServiceImpl carPassRecordService;
@Value("${upload.image.url.prefix:}")
private String imageUrlPrefix;
@Value("${basePath:}")
@ -288,6 +292,11 @@ public class HikvisionCall {
} else {
carPassRecordMapper.insert(entity);
}
//车进场后意味着绑定的司机走过了人脸机统计为在场人员车辆出场后在场人员随之减少
if (carInfos.size() != 0 && carInfos.get(0) != null && StringUtils.isNotEmpty(carInfos.get(0).getDriverWorkerId())) {
log.info("保存车辆绑定的司机的通行数据,车牌号:{}", carInfos.get(0).getCarNumber());
carPassRecordService.saveDriverPassData(entity, carInfos.get(0));
}
}
}
}

View File

@ -725,4 +725,40 @@ public class ParamEnum {
this.desc = desc;
}
}
/**
* 1重大隐患2一般隐患
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QualityInspectionRecordLevel implements BaseEnum {
ZDYH(1, "重大隐患"),
YBYH(2, "一般隐患"),
;
QualityInspectionRecordLevel(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
private Integer value;
private String desc;
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
}

View File

@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.car.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhgd.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.car.entity.CarInfo;
import com.zhgd.xmgl.modules.car.entity.CarPassRecord;
import com.zhgd.xmgl.modules.car.entity.vo.EntryAndExitRecordsTodayVo;
import com.zhgd.xmgl.modules.car.entity.vo.TodayOutInNumber;
@ -22,6 +23,8 @@ public interface ICarPassRecordService extends IService<CarPassRecord> {
Map<String, Object> saveCameraCarPassRecord(String plate_num, String car_logo, String car_color, String park_id, String cam_id, String vdc_type, String picture, String closeup_pic);
void saveDriverPassData(CarPassRecord carPassRecord, CarInfo carInfo);
List<CarPassRecord> getCarPassRecordList(Map<String, Object> map);
List<TodayOutInNumber> selectCarPassRecordInOutCount(Map<String, Object> map);

View File

@ -246,7 +246,14 @@ public class CarPassRecordServiceImpl extends ServiceImpl<CarPassRecordMapper, C
}
}
private void saveDriverPassData(CarPassRecord carPassRecord, CarInfo carInfo) {
/**
* 保存车辆绑定的人员的通行数据
*
* @param carPassRecord
* @param carInfo
*/
@Override
public void saveDriverPassData(CarPassRecord carPassRecord, CarInfo carInfo) {
List<WorkerInfo> list = workerInfoMapper.selectCarDriverNameList(carInfo.getDriverWorkerId());
if (list != null) {
int redNum = 0;

View File

@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gexin.fastjson.JSON;
import com.gexin.fastjson.JSONObject;
import com.zhgd.jeecg.common.execption.OpenAlertException;
import com.zhgd.jeecg.common.execption.OpenPromptException;
import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
import com.zhgd.xmgl.modules.checking.entity.CheckingPoint;
@ -56,11 +57,17 @@ public class CheckingPointServiceImpl extends ServiceImpl<CheckingPointMapper, C
@Override
public Boolean checkLocation(Long id, Long userId, Double longitude, Double latitude) {
CheckingPoint checkingPoint = checkingPointMapper.selectById(id);
if (checkingPoint == null) {
throw new OpenAlertException("该巡检点不存在");
}
// 判断用户是否存在于检查人员id列表
boolean userFlag = CharSequenceUtil.split(checkingPoint.getInspectUserIds(), ",").contains(String.valueOf(userId));
if (!userFlag) {
throw new OpenPromptException("当前用户不具备巡检权限!", false);
}
if (checkingPoint.getStandArea() == null || checkingPoint.getLongitude() == null || checkingPoint.getLatitude() == null) {
return true;
}
// 范围判定
boolean inCircle = RegionUtil.isInCircle(checkingPoint.getLongitude(), checkingPoint.getLatitude(), longitude, latitude, checkingPoint.getStandArea());
if (!inCircle) {

View File

@ -39,4 +39,6 @@ public class ProjectInspectRecordCountVo {
private Integer monthInspectNum;
@ApiModelProperty(value = "其他数量,就是除了月、周的检查数量")
private Integer otherInspectNum;
@ApiModelProperty(value = "重大隐患数量")
private Integer greatFaultLevelNum;
}

View File

@ -29,14 +29,17 @@
</select>
<select id="getDangerousEngineeringById" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
SELECT a.*,IFNULL(tp.hidden_danger_num,0) hidden_danger_num,
(case when a.build_end_time is not null and a.build_end_time!='' and a.build_end_time &lt;DATE_FORMAT(now(),"%Y-%m-%d") then 3
when a.build_end_time is not null and a.build_end_time!='' and a.build_start_time is not null and a.build_start_time!=''
and a.build_end_time >=DATE_FORMAT(now(),"%Y-%m-%d") and a.build_start_time &lt;=DATE_FORMAT(now(),"%Y-%m-%d") then 2
else 1 END) engineering_state
(case when a.build_end_time is not null and a.build_end_time!='' and a.build_end_time &lt;DATE_FORMAT(now(),"%Y-%m-%d")
then 3
when a.build_end_time is not null and a.build_end_time!='' and a.build_start_time is not null and
a.build_start_time!=''
and a.build_end_time >=DATE_FORMAT(now(),"%Y-%m-%d") and a.build_start_time &lt;=DATE_FORMAT(now(),"%Y-%m-%d")
then 2
else 1 END) engineering_state
from dangerous_engineering_record a
LEFT JOIN (SELECT engineering_id,COUNT(1) hidden_danger_num
from hidden_danger_inspection_record
WHERE engineering_id=#{id} AND `status` in (2,3) ) tp ON a.id=tp.engineering_id
LEFT JOIN (SELECT engineering_id,COUNT(1) hidden_danger_num
from xz_security_quality_inspection_record
WHERE engineering_id=#{id} AND `status` in (2,3,4) ) tp ON a.id=tp.engineering_id
WHERE a.id=#{id}
</select>
</mapper>

View File

@ -179,7 +179,8 @@
IFNULL(SUM((CASE WHEN a.status != 1 THEN 1 ELSE 0 END)), 0) dangerNum,
IFNULL(SUM((CASE WHEN a.status = 3 THEN 1 ELSE 0 END)), 0) reviewNum,
IFNULL(SUM((CASE WHEN tr.frequency_type = 3 THEN 1 ELSE 0 END)), 0) weekInspectNum, <!--周检查数量-->
IFNULL(SUM((CASE WHEN tr.frequency_type = 4 THEN 1 ELSE 0 END)), 0) monthInspectNum <!--月检查数量-->
IFNULL(SUM((CASE WHEN tr.frequency_type = 4 THEN 1 ELSE 0 END)), 0) monthInspectNum, <!--月检查数量-->
IFNULL(SUM((CASE WHEN a.fault_level = 2 THEN 1 ELSE 0 END)), 0) greatFaultLevelNum
from hidden_danger_inspection_record a
left join inspect_task_record tr on tr.id = a.task_id
WHERE a.project_sn = #{projectSn}

View File

@ -237,7 +237,6 @@ public class XzSecurityQualityInspectionRecordController {
return result;
}
@ApiOperation(value = "安全问题统计", notes = "安全问题统计", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
@ -247,6 +246,17 @@ public class XzSecurityQualityInspectionRecordController {
return Result.success(qualityInspectionRecordService.selectQualityStatistics(map));
}
@ApiOperation(value = "安全问题统计数量", notes = "安全问题统计数量", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "inspectStartTime", value = "检查开始时间", paramType = "body", required = false, dataType = "String"),
@ApiImplicitParam(name = "inspectEndTime", value = "检查结束时间", paramType = "body", required = false, dataType = "String"),
})
@PostMapping(value = "/selectQualityStatisticsNum")
public Result<XzSecurityQualityInspectionRecordTotalVo> selectQualityStatisticsNum(@RequestBody Map<String, Object> map) {
return Result.success(qualityInspectionRecordService.selectQualityStatisticsNum(map));
}
@ApiOperation(value = "安全问题类型或频发问题统计", notes = "安全问题类型或频发问题统计", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
@ -312,5 +322,34 @@ public class XzSecurityQualityInspectionRecordController {
return Result.success(qualityInspectionRecordService.statsByChangeId(paramMap));
}
@ApiOperation(value = "统计隐患等级", notes = "统计隐患等级", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
@ApiImplicitParam(name = "isNotQualified", value = "是否未销项", paramType = "body", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "isOverdueRectification", value = "是否超期未整改", paramType = "body", required = false, dataType = "Integer"),
})
@PostMapping(value = "/countDangerLevel")
public Result<SectorVo> countDangerLevel(@ApiIgnore @RequestBody Map<String, Object> paramMap) {
return Result.success(qualityInspectionRecordService.countDangerLevel(paramMap));
}
@ApiOperation(value = "检查人统计", notes = "检查人统计", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
})
@PostMapping(value = "/statsByInspectMan")
public Result<List<StatsByInspectManVo>> statsByInspectMan(@ApiIgnore @RequestBody Map<String, Object> paramMap) {
return Result.success(qualityInspectionRecordService.statsByInspectMan(paramMap));
}
@ApiOperation(value = "按分包单位统计", notes = "按分包单位统计", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
})
@PostMapping(value = "/statsByEnterprise")
public Result<List<StatsByEnterpriseVo>> statsByEnterprise(@ApiIgnore @RequestBody Map<String, Object> paramMap) {
return Result.success(qualityInspectionRecordService.statsByEnterprise(paramMap));
}
}

View File

@ -243,6 +243,8 @@ public class XzSecurityQualityInspectionRecord implements Serializable {
private String addedDescription;
@ApiModelProperty(value = "合作单位id")
private Long enterpriseId;
@ApiModelProperty(value = "危大工程记录ID")
private Long engineeringId;
/**
* 分部工程名称

View File

@ -7,11 +7,15 @@ import lombok.Data;
public class StatsByChangeIdVo {
@ApiModelProperty("姓名")
private String workerName;
@ApiModelProperty("整改数量")
private Integer changeNum;
@ApiModelProperty("整改率")
private Double changeRate;
@ApiModelProperty("及时整改率")
private Double changeRateTimely;
@ApiModelProperty("已整改数量")
private Integer rectifiedNum;
@ApiModelProperty("超期已整改数量")
private Integer overTimeRectifiedNum;
@ApiModelProperty("超期未整改数量")
private Integer overTimeNotRectifiedNum;
@ApiModelProperty("已整改率")
private Double rectifiedNumRatio;
@ApiModelProperty("已及时整改率")
private Double rectifiedNumRatioTimely;
}

View File

@ -0,0 +1,17 @@
package com.zhgd.xmgl.modules.xz.security.entity.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class StatsByEnterpriseVo {
@ApiModelProperty("分班队伍")
private String enterpriseName;
@ApiModelProperty("已整改数量")
private Integer rectifiedNum;
@ApiModelProperty("已整改率")
private Double rectifiedNumRatio;
@ApiModelProperty("已及时整改率")
private Double rectifiedNumRatioTimely;
}

View File

@ -0,0 +1,17 @@
package com.zhgd.xmgl.modules.xz.security.entity.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class StatsByInspectManVo {
@ApiModelProperty("姓名")
private String workerName;
@ApiModelProperty("发起隐患数量")
private Integer createDangerNum;
@ApiModelProperty("已整改率")
private Double rectifiedNumRatio;
@ApiModelProperty("已及时整改率")
private Double rectifiedNumRatioTimely;
}

View File

@ -24,7 +24,10 @@ public class XzSecurityQualityInspectionRecordTotalVo {
@ApiModelProperty("已整改数")
private Integer alreadyRectificationNum;
private Integer jyUrgentLevelNum;
@ApiModelProperty("超期未整改数量")
private Integer overdueRectificationNum;
@ApiModelProperty("超期未整改数量占比")
private Double overdueRectificationNumRatio;
@ApiModelProperty("未闭合")
private Integer notCloseNum;
@ApiModelProperty("今日较昨日总数")
@ -35,6 +38,9 @@ public class XzSecurityQualityInspectionRecordTotalVo {
private Integer closeNumDifferYesterday;
@ApiModelProperty("今日较昨日未闭合")
private Integer notCloseNumDifferYesterday;
@ApiModelProperty(value = "重大隐患数量")
private Integer greatFaultLevelNum;
@ApiModelProperty(value = "隐患总数")
private Integer dangerNum;
}

View File

@ -12,6 +12,7 @@ import com.zhgd.xmgl.modules.xz.security.entity.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -63,4 +64,10 @@ public interface XzSecurityQualityInspectionRecordMapper extends BaseMapper<XzSe
List<TrendOneVo> countQualityInspectionRecordRegion(HashMap<String, Object> paramMap);
List<StatsByChangeIdVo> statsByChangeId(Map<String, Object> paramMap);
ArrayList<SectorOneVo> countDangerLevel(Map<String, Object> paramMap);
List<StatsByInspectManVo> StatsByInspectManVo(Map<String, Object> paramMap);
List<StatsByEnterpriseVo> statsByEnterprise(Map<String, Object> paramMap);
}

View File

@ -155,7 +155,9 @@
round(IFNULL(TRUNCATE(IFNULL(closeNum, 0) / IFNULL(totalNum, 0), 4), 0) * 100,
2) completeRatio,<!--闭合率-->
round(IFNULL(TRUNCATE(IFNULL(totalNum - rectificationNum, 0) / IFNULL(totalNum, 0), 4), 0) * 100, 2)
rectificationRatio <!--整改率-->
rectificationRatio, <!--整改率-->
round(IFNULL(TRUNCATE(IFNULL(overdueRectificationNum, 0) / IFNULL(totalNum, 0), 4), 0) * 100, 2)
overdueRectificationNumRatio
from (
SELECT count(1) totalNum,
IFNULL(SUM((CASE WHEN a.record_type = 2 THEN 1 ELSE 0 END)), 0) investigateNum,
@ -175,9 +177,12 @@
IFNULL(SUM((CASE WHEN a.status = 4 THEN 1 ELSE 0 END)), 0) verificationNum,
IFNULL(SUM((CASE WHEN a.urgent_level = 1 THEN 1 ELSE 0 END)), 0) ybUrgentLevelNum,
IFNULL(SUM((CASE WHEN a.urgent_level = 2 THEN 1 ELSE 0 END)), 0) yzUrgentLevelNum,
IFNULL(SUM((CASE WHEN a.urgent_level = 3 THEN 1 ELSE 0 END)), 0) jyUrgentLevelNum
IFNULL(SUM((CASE WHEN a.urgent_level = 3 THEN 1 ELSE 0 END)), 0) jyUrgentLevelNum,
IFNULL(SUM((CASE WHEN a.record_type = 1 THEN 1 ELSE 0 END)), 0) dangerNum,
IFNULL(SUM((CASE WHEN a.level = 1 THEN 1 ELSE 0 END)), 0) greatFaultLevelNum
from xz_security_quality_inspection_record a
WHERE a.project_sn = #{projectSn}
and a.status != 6
<if test="regionId != null and regionId != ''">
and a.region_id = #{regionId}
</if>
@ -221,7 +226,8 @@
and a.inspect_time >= #{inspectStartTime}
</if>
<if test="inspectEndTime != null and inspectEndTime != ''">
and a.inspect_time &lt;= #{inspectEndTime}
and a.inspect_time &lt;= if(LENGTH(#{inspectEndTime}) = 10, CONCAT(DATE_FORMAT(#{inspectEndTime},
'%Y-%m-%d'), ' 23:59:59'), #{inspectEndTime})
</if>
<if test="regionId != null and regionId != ''">
and a.region_id = #{regionId}
@ -500,18 +506,78 @@
</select>
<select id="statsByChangeId" resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.StatsByChangeIdVo">
SELECT
count(*) changeNum,
IFNULL(SUM((CASE WHEN status = 1 or status = 4 THEN 0 ELSE 1 END)), 0) notCloseNum,
IFNULL(SUM((case
when change_limit_time &lt; now() and (status = 2 or status = 3)
then 1
else 0 end)), 0) overdueNotCloseNum,su.real_name as workerName
from hidden_danger_inspection_record hdir
left join system_user su on su.user_id=hdir.change_user
WHERE record_type = 1
select t.*,
round(IFNULL(TRUNCATE(IFNULL(t.rectifiedNum, 0) / IFNULL(totalNum, 0), 4), 0) * 100, 2) rectifiedNumRatio,
round(IFNULL(TRUNCATE(IFNULL(t.rectifiedNumTimely, 0) / IFNULL(totalNum, 0), 4), 0) * 100, 2)
rectifiedNumRatioTimely
from (SELECT
count(*) totalNum,
IFNULL(SUM((CASE WHEN hdir.status != 2 THEN 1 ELSE 0 END)), 0) rectifiedNum,
IFNULL(SUM((CASE WHEN hdir.status != 2 and change_limit_time &lt; now() THEN 1 ELSE 0 END)), 0)
rectifiedNumTimely,
IFNULL(SUM((CASE WHEN hdir.status != 2 and change_limit_time > now() THEN 1 ELSE 0 END)), 0)
overTimeRectifiedNum,
IFNULL(SUM((CASE WHEN hdir.status = 2 and change_limit_time > now() THEN 1 ELSE 0 END)), 0)
overTimeNotRectifiedNum,
su.real_name as workerName
from xz_security_quality_inspection_record hdir
left join system_user su on su.user_id=hdir.change_id
WHERE record_type = 1 and hdir.status!=6
and project_sn=#{projectSn}
group by hdir.change_user
order by changeNum desc
group by hdir.change_id
order by rectifiedNum desc) t
</select>
<select id="countDangerLevel" resultType="com.zhgd.xmgl.base.entity.vo.SectorOneVo">
select count(*) count,if(a.level=1,1,2) enumType
from xz_security_quality_inspection_record a
where project_sn=#{projectSn}
and a.record_type = 1 and a.status!=6
<if test="isOverdueRectification == '1'.toString()">
and (a.status = 2 AND now() > a.change_limit_time)
</if>
<if test="isNotQualified == '1'.toString()">
and a.status !=5
</if>
group by enumType
</select>
<select id="StatsByInspectManVo" resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.StatsByInspectManVo">
select t.*,
round(IFNULL(TRUNCATE(IFNULL(t.rectifiedNum, 0) / IFNULL(totalNum, 0), 4), 0) * 100, 2) rectifiedNumRatio,
round(IFNULL(TRUNCATE(IFNULL(t.rectifiedNumTimely, 0) / IFNULL(totalNum, 0), 4), 0) * 100, 2)
rectifiedNumRatioTimely
from (SELECT
count(*) totalNum,
count(*) createDangerNum,
IFNULL(SUM((CASE WHEN hdir.status != 2 THEN 1 ELSE 0 END)), 0) rectifiedNum,
IFNULL(SUM((CASE WHEN hdir.status != 2 and change_limit_time &lt; now() THEN 1 ELSE 0 END)), 0)
rectifiedNumTimely,
su.real_name as workerName
from xz_security_quality_inspection_record hdir
left join system_user su on su.user_id=hdir.change_id
WHERE record_type = 1 and hdir.status!=6
and project_sn=#{projectSn}
group by hdir.inspect_man_id
order by rectifiedNum desc) t
</select>
<select id="statsByEnterprise" resultType="com.zhgd.xmgl.modules.xz.security.entity.vo.StatsByEnterpriseVo">
select t.*,
round(IFNULL(TRUNCATE(IFNULL(t.rectifiedNum, 0) / IFNULL(totalNum, 0), 4), 0) * 100, 2) rectifiedNumRatio,
round(IFNULL(TRUNCATE(IFNULL(t.rectifiedNumTimely, 0) / IFNULL(totalNum, 0), 4), 0) * 100, 2)
rectifiedNumRatioTimely
from (SELECT
count(*) totalNum,
IFNULL(SUM((CASE WHEN hdir.status != 2 THEN 1 ELSE 0 END)), 0) rectifiedNum,
IFNULL(SUM((CASE WHEN hdir.status != 2 and change_limit_time &lt; now() THEN 1 ELSE 0 END)), 0)
rectifiedNumTimely,
ei.enterprise_name
from xz_security_quality_inspection_record hdir
left join enterprise_info ei on ei.id=hdir.enterprise_id
WHERE record_type = 1 and hdir.status!=6
and project_sn=#{projectSn}
group by hdir.enterprise_id
order by rectifiedNum desc) t
</select>
</mapper>

View File

@ -68,4 +68,11 @@ public interface IXzSecurityQualityInspectionRecordService extends IService<XzSe
void edit(XzSecurityQualityInspectionRecord xzSecurityQualityInspectionRecord);
XzSecurityQualityInspectionRecordTotalVo selectQualityStatisticsNum(Map<String, Object> map);
SectorVo countDangerLevel(Map<String, Object> paramMap);
List<StatsByInspectManVo> statsByInspectMan(Map<String, Object> paramMap);
List<StatsByEnterpriseVo> statsByEnterprise(Map<String, Object> paramMap);
}

View File

@ -150,13 +150,18 @@ public class XzSecurityXzSecurityQualityInspectionRecordServiceImpl extends Serv
setProblemDescription(vo);
}
page.setRecords(list);
XzSecurityQualityInspectionRecordTotalVo total = xzSecurityQualityInspectionRecordMapper.selectQualityInspectionRecordPageTotal(map);
setDifferYesterday(map, total);
XzSecurityQualityInspectionRecordTotalVo total = getXzSecurityQualityInspectionRecordTotalVo(map);
data.setPage(page);
data.setTotal(total);
return data;
}
private XzSecurityQualityInspectionRecordTotalVo getXzSecurityQualityInspectionRecordTotalVo(Map<String, Object> map) {
XzSecurityQualityInspectionRecordTotalVo total = xzSecurityQualityInspectionRecordMapper.selectQualityInspectionRecordPageTotal(map);
setDifferYesterday(map, total);
return total;
}
private void setProblemDescription(XzSecurityQualityInspectionRecordVo vo) {
String problemDescription = StringUtils.substringAfterLast(vo.getDangerItemContent(), "/");
vo.setProblemDescription(StringUtils.isNotBlank(problemDescription) ? problemDescription : vo.getDangerItemContent());
@ -175,8 +180,7 @@ public class XzSecurityXzSecurityQualityInspectionRecordServiceImpl extends Serv
Map<String, Object> data = new HashMap<>();
map.put("recordType", "1");
XzSecurityQualityInspectionRecordTotalVo total = xzSecurityQualityInspectionRecordMapper.selectQualityInspectionRecordPageTotal(map);
setDifferYesterday(map, total);
XzSecurityQualityInspectionRecordTotalVo total = getXzSecurityQualityInspectionRecordTotalVo(map);
List<Map<String, Object>> monthList = xzSecurityQualityInspectionRecordMapper.selectQualityInspectionRecordCountByDay(map);
List<String> dayList = getDayList();
List<Map<String, Object>> list = new ArrayList<>();
@ -483,6 +487,27 @@ public class XzSecurityXzSecurityQualityInspectionRecordServiceImpl extends Serv
deductScoreIf(xzSecurityQualityInspectionRecord);
}
@Override
public XzSecurityQualityInspectionRecordTotalVo selectQualityStatisticsNum(Map<String, Object> map) {
return getXzSecurityQualityInspectionRecordTotalVo(map);
}
@Override
public SectorVo countDangerLevel(Map<String, Object> paramMap) {
ArrayList<SectorOneVo> list = baseMapper.countDangerLevel(paramMap);
return SectorVo.getSectorVoByEnum(list, ParamEnum.QualityInspectionRecordLevel.values(), false);
}
@Override
public List<StatsByInspectManVo> statsByInspectMan(Map<String, Object> paramMap) {
return baseMapper.StatsByInspectManVo(paramMap);
}
@Override
public List<StatsByEnterpriseVo> statsByEnterprise(Map<String, Object> paramMap) {
return baseMapper.statsByEnterprise(paramMap);
}
private void recoverScore(XzSecurityQualityInspectionRecord hiddenDangerInspectRecord) {
if (hiddenDangerInspectRecord.getRecordType() == null || hiddenDangerInspectRecord.getRecordType() == 2) {
return;