工程违章统计
This commit is contained in:
parent
d13036f8f3
commit
ac59841c2b
|
|
@ -1,12 +1,8 @@
|
|||
package com.sercurityControl.proteam.supplement.controller;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.securityControl.common.log.annotation.Log;
|
||||
import com.securityControl.common.log.enums.BusinessType;
|
||||
import com.sercurityControl.proteam.dutyTask.domain.DutyPersonEntity;
|
||||
import com.sercurityControl.proteam.supplement.domain.dto.ParamsDto;
|
||||
import com.sercurityControl.proteam.supplement.domain.vo.ProVioVo;
|
||||
import com.sercurityControl.proteam.supplement.service.ProVioService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -15,7 +11,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -34,9 +29,9 @@ public class ProVioController {
|
|||
private ProVioService service;
|
||||
|
||||
@ApiOperation(value = "工程违章统计-列表")
|
||||
@PostMapping(value = "getDutyPersonList")
|
||||
@PostMapping(value = "getProVioList")
|
||||
@Log(title = "工程违章统计", menu = "值班任务->工程违章统计", businessType = BusinessType.QUERY, details = "工程违章统计")
|
||||
public Map<String, Object> getDutyPersonList(ParamsDto dto) {
|
||||
public Map<String, Object> getProVioList(ParamsDto dto) {
|
||||
return service.getProVioList(dto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
package com.sercurityControl.proteam.supplement.controller;
|
||||
|
||||
import com.securityControl.common.core.web.domain.AjaxResult;
|
||||
import com.securityControl.common.log.annotation.Log;
|
||||
import com.securityControl.common.log.enums.BusinessType;
|
||||
import com.sercurityControl.proteam.supplement.domain.dto.ParamsDto;
|
||||
import com.sercurityControl.proteam.supplement.service.ProVioService;
|
||||
import com.sercurityControl.proteam.supplement.service.RiskRectService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @className:RiskRectController
|
||||
* @author:cwchen
|
||||
* @date:2024-12-09-14:53
|
||||
* @version:1.0
|
||||
* @description:风险整改分析-controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pot/riskRect/")
|
||||
@Slf4j
|
||||
public class RiskRectController {
|
||||
|
||||
@Resource(name = "RiskRectService")
|
||||
private RiskRectService service;
|
||||
|
||||
@ApiOperation(value = "风险整改分析-列表")
|
||||
@PostMapping(value = "getRiskRectList")
|
||||
@Log(title = "风险整改分析", menu = "值班任务->风险整改分析", businessType = BusinessType.QUERY, details = "风险整改分析")
|
||||
public Map<String, Object> getRiskRectList(ParamsDto dto) {
|
||||
return service.getRiskRectList(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "风险整改分析-整改详情")
|
||||
@PostMapping(value = "getRiskRectDetail")
|
||||
@Log(title = "风险整改分析整改详情", menu = "值班任务->风险整改分析", businessType = BusinessType.QUERY, details = "整改详情")
|
||||
public AjaxResult getRiskRectDetail(ParamsDto dto) {
|
||||
return service.getRiskRectDetail(dto);
|
||||
}
|
||||
}
|
||||
|
|
@ -16,6 +16,10 @@ public class ParamsDto {
|
|||
|
||||
/**工程名称*/
|
||||
private String proName;
|
||||
/**风险等级*/
|
||||
private String riskLevel;
|
||||
/**是否整改 0.未整改 1.已整改*/
|
||||
private String isRect;
|
||||
|
||||
private int page;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
package com.sercurityControl.proteam.supplement.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @className:ProVioVo
|
||||
* @author:cwchen
|
||||
* @date:2024-12-09-15:12
|
||||
* @version:1.0
|
||||
* @description:工程违章统计-vo
|
||||
*/
|
||||
@Data
|
||||
public class RiskRectDetailVo {
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**作业票编号*/
|
||||
private String ticketNo;
|
||||
/**作业票名称*/
|
||||
private String ticketName;
|
||||
/**工程名称*/
|
||||
private String proName;
|
||||
/**班组名称*/
|
||||
private String teamName;
|
||||
/**班组长*/
|
||||
private String workManager;
|
||||
/**班组长手机号*/
|
||||
private String workManagerPhone;
|
||||
/**违章等级*/
|
||||
private String levelId;
|
||||
/**风险等级*/
|
||||
private String riskLevel;
|
||||
/**作业部位*/
|
||||
private String workSite;
|
||||
/**工序*/
|
||||
private String gx;
|
||||
/**告警时间*/
|
||||
private String time;
|
||||
/**整改内容*/
|
||||
private String rectContent;
|
||||
/**整改期限*/
|
||||
private String rectTime;
|
||||
/**整改照片*/
|
||||
private List<String> rectImgPath;
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.sercurityControl.proteam.supplement.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @className:ProVioVo
|
||||
* @author:cwchen
|
||||
* @date:2024-12-09-15:12
|
||||
* @version:1.0
|
||||
* @description:工程违章统计-vo
|
||||
*/
|
||||
@Data
|
||||
public class RiskRectVo {
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**作业票编号*/
|
||||
private String ticketNo;
|
||||
/**作业票名称*/
|
||||
private String ticketName;
|
||||
/**工程名称*/
|
||||
private String proName;
|
||||
/**班组长*/
|
||||
private String workManager;
|
||||
/**班组长手机号*/
|
||||
private String workManagerPhone;
|
||||
/**违章等级*/
|
||||
private String levelId;
|
||||
/**风险等级*/
|
||||
private String riskLevel;
|
||||
/**作业部位*/
|
||||
private String workSite;
|
||||
/**工序*/
|
||||
private String gx;
|
||||
/**时间*/
|
||||
private String time;
|
||||
/**风险整改状态*/
|
||||
private String isRect;
|
||||
/**告警提示*/
|
||||
private String warnTips;
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.sercurityControl.proteam.supplement.mapper;
|
||||
|
||||
import com.sercurityControl.proteam.supplement.domain.dto.ParamsDto;
|
||||
import com.sercurityControl.proteam.supplement.domain.vo.RiskRectDetailVo;
|
||||
import com.sercurityControl.proteam.supplement.domain.vo.RiskRectVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @className:RiskRectMapper
|
||||
* @author:cwchen
|
||||
* @date:2024-12-09-16:58
|
||||
* @version:1.0
|
||||
* @description:风险整改分析-mapper
|
||||
*/
|
||||
@Repository(value = "RiskRectMapper")
|
||||
public interface RiskRectMapper {
|
||||
/**
|
||||
* 风险整改分析
|
||||
*
|
||||
* @param dto
|
||||
* @return List<RiskRectVo>
|
||||
* @author cwchen
|
||||
* @date 2024/12/9 17:03
|
||||
*/
|
||||
List<RiskRectVo> getRiskRectList(ParamsDto dto);
|
||||
|
||||
/**
|
||||
* 获取整改时间
|
||||
*
|
||||
* @param item
|
||||
* @return List<String>
|
||||
* @author cwchen
|
||||
* @date 2024/12/9 17:15
|
||||
*/
|
||||
List<String> getRectTime(RiskRectVo item);
|
||||
|
||||
/**
|
||||
* 风险整改分析-整改详情
|
||||
*
|
||||
* @param dto
|
||||
* @return RiskRectDetailVo
|
||||
* @author cwchen
|
||||
* @date 2024/12/9 18:12
|
||||
*/
|
||||
RiskRectDetailVo getRiskRectDetail(ParamsDto dto);
|
||||
|
||||
/**
|
||||
* 查询1.整改内容、2.整改照片
|
||||
* @param id
|
||||
* @param type
|
||||
* @return List<String>
|
||||
* @author cwchen
|
||||
* @date 2024/12/9 18:26
|
||||
*/
|
||||
List<String> getRectImgPath(@Param("id") String id, @Param("type") int type);
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
package com.sercurityControl.proteam.supplement.service;
|
||||
|
||||
import com.sercurityControl.proteam.supplement.domain.dto.ParamsDto;
|
||||
import com.sercurityControl.proteam.supplement.domain.vo.ProVioVo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
package com.sercurityControl.proteam.supplement.service;
|
||||
|
||||
import com.securityControl.common.core.web.domain.AjaxResult;
|
||||
import com.sercurityControl.proteam.supplement.domain.dto.ParamsDto;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @className:RiskRectService
|
||||
* @author:cwchen
|
||||
* @date:2024-12-09-16:57
|
||||
* @version:1.0
|
||||
* @description:风险整改分析-service
|
||||
*/
|
||||
public interface RiskRectService {
|
||||
/**
|
||||
* 风险整改分析
|
||||
* @param dto
|
||||
* @return Map<String,Object>
|
||||
* @author cwchen
|
||||
* @date 2024/12/9 17:01
|
||||
*/
|
||||
Map<String, Object> getRiskRectList(ParamsDto dto);
|
||||
|
||||
/**
|
||||
* 风险整改分析-整改详情
|
||||
* @param dto
|
||||
* @return AjaxResult
|
||||
* @author cwchen
|
||||
* @date 2024/12/9 18:11
|
||||
*/
|
||||
AjaxResult getRiskRectDetail(ParamsDto dto);
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.sercurityControl.proteam.supplement.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.securityControl.common.core.constant.HttpStatus;
|
||||
import com.securityControl.common.core.web.domain.AjaxResult;
|
||||
import com.sercurityControl.proteam.supplement.domain.dto.ParamsDto;
|
||||
import com.sercurityControl.proteam.supplement.domain.vo.ProVioVo;
|
||||
import com.sercurityControl.proteam.supplement.domain.vo.RiskRectDetailVo;
|
||||
import com.sercurityControl.proteam.supplement.domain.vo.RiskRectVo;
|
||||
import com.sercurityControl.proteam.supplement.mapper.RiskRectMapper;
|
||||
import com.sercurityControl.proteam.supplement.service.RiskRectService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @className:RiskRectServiceImpl
|
||||
* @author:cwchen
|
||||
* @date:2024-12-09-16:57
|
||||
* @version:1.0
|
||||
* @description:风险整改分析-impl
|
||||
*/
|
||||
@Slf4j
|
||||
@Service(value = "RiskRectService")
|
||||
public class RiskRectServiceImpl implements RiskRectService {
|
||||
|
||||
@Resource(name = "RiskRectMapper")
|
||||
private RiskRectMapper mapper;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getRiskRectList(ParamsDto dto) {
|
||||
PageHelper.startPage(dto.getPage(), dto.getLimit());
|
||||
Map<String, Object> map = new HashMap<>(16);
|
||||
List<RiskRectVo> list = null;
|
||||
try {
|
||||
list = mapper.getRiskRectList(dto);
|
||||
/*list.forEach(item->{
|
||||
List<String> rectTimeList = mapper.getRectTime(item);
|
||||
item.setTime(rectTimeList.get(0));
|
||||
});*/
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
PageInfo<RiskRectVo> pageInfo = new PageInfo<>(list);
|
||||
map.put("code", HttpStatus.SUCCESS);
|
||||
map.put("msg", "获取数据成功");
|
||||
map.put("count", pageInfo.getTotal());
|
||||
map.put("curr", dto.getPage());
|
||||
map.put("limit", dto.getLimit());
|
||||
map.put("data", pageInfo.getList());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getRiskRectDetail(ParamsDto dto) {
|
||||
RiskRectDetailVo vo = null;
|
||||
try {
|
||||
vo = mapper.getRiskRectDetail(dto);
|
||||
// 查询整改内容、整改照片
|
||||
List<String> rectContentList = mapper.getRectImgPath(vo.getId(),1);
|
||||
List<String> rectImgPathList = mapper.getRectImgPath(vo.getId(),2);
|
||||
if(CollectionUtils.isNotEmpty(rectContentList)){
|
||||
vo.setRectContent(rectContentList.get(0));
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(rectImgPathList)){
|
||||
vo.setRectImgPath(rectImgPathList);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
}
|
||||
|
|
@ -22,5 +22,6 @@
|
|||
<if test="proName!=null and proName!=''">
|
||||
AND INSTR(tnv.pro_name,#{proName}) > 0
|
||||
</if>
|
||||
ORDER BY tnv.iss_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.sercurityControl.proteam.supplement.mapper.RiskRectMapper">
|
||||
|
||||
<!--风险整改分析-->
|
||||
<select id="getRiskRectList" resultType="com.sercurityControl.proteam.supplement.domain.vo.RiskRectVo">
|
||||
SELECT tnv.id,
|
||||
tnv.ticket_no AS ticketNo,
|
||||
jjt.ticket_name AS ticketName,
|
||||
tnv.pro_name AS proName,
|
||||
tnv.risk_level AS riskLevel,
|
||||
jjcmi.work_manage AS workManager,
|
||||
jjcmi.work_manage_phone AS workManagerPhone,
|
||||
jjcmi.work_gx AS gx,
|
||||
jjcmi.work_site AS workSite,
|
||||
CASE WHEN tnv.`status` = '1' THEN '未整改'
|
||||
WHEN tnv.`status` = '2' OR tnv.`status` = '3' OR tnv.`status` = '4' OR tnv.`status` = '5' OR tnv.`status` = '6' THEN '已整改'
|
||||
ELSE '未整改' END AS isRect,
|
||||
'正常' AS warnTips,
|
||||
tnv.create_time AS time
|
||||
FROM t_notice_voi tnv
|
||||
LEFT JOIN jj_class_metting_info jjcmi ON tnv.class_id = jjcmi.class_id
|
||||
LEFT JOIN jj_ticket jjt ON tnv.ticket_no = jjt.ticket_no
|
||||
WHERE tnv.sup_type = '1' AND tnv.`status` NOT IN ('7','8') AND tnv.is_flag = '0'
|
||||
<if test="proName!=null and proName!=''">
|
||||
AND INSTR(tnv.pro_name,#{proName}) > 0
|
||||
</if>
|
||||
<if test="riskLevel!=null and riskLevel!=''">
|
||||
AND INSTR(tnv.risk_level,#{proName}) > 0
|
||||
</if>
|
||||
<if test="isRect == 0">
|
||||
AND tnv.`status` = '1'
|
||||
</if>
|
||||
<if test="isRect == 1">
|
||||
AND tnv.`status` IN ('2','3','4','5','6')
|
||||
</if>
|
||||
ORDER BY tnv.iss_time DESC
|
||||
</select>
|
||||
|
||||
<!--风险整改分析-整改详情-->
|
||||
<select id="getRiskRectDetail"
|
||||
resultType="com.sercurityControl.proteam.supplement.domain.vo.RiskRectDetailVo">
|
||||
SELECT tnv.id,
|
||||
tnv.ticket_no AS ticketNo,
|
||||
jjt.ticket_name AS ticketName,
|
||||
tnv.pro_name AS proName,
|
||||
tnv.risk_level AS riskLevel,
|
||||
tnv.child_type AS childType,
|
||||
jjcmi.work_manage AS workManager,
|
||||
jjcmi.work_manage_phone AS workManagerPhone,
|
||||
jjcmi.work_gx AS gx,
|
||||
jjcmi.work_site AS workSite,
|
||||
tnv.create_time AS time,
|
||||
tnv.level_id AS levelId
|
||||
FROM t_notice_voi tnv
|
||||
LEFT JOIN jj_class_metting_info jjcmi ON tnv.class_id = jjcmi.class_id
|
||||
LEFT JOIN jj_ticket jjt ON tnv.ticket_no = jjt.ticket_no
|
||||
WHERE tnv.id = #{id}
|
||||
</select>
|
||||
<!--查询整改内容、整改照片-->
|
||||
<select id="getRectImgPath" resultType="java.lang.String">
|
||||
<if test="type == 1">
|
||||
SELECT rect_explain FROM t_notice_voi_rect WHERE noti_id = #{id} ORDER BY create_time DESC LIMIT 1
|
||||
</if>
|
||||
<if test="type == 2">
|
||||
SELECT image_path
|
||||
FROM t_notice_voi_photo
|
||||
WHERE rect_id = (SELECT id FROM t_notice_voi_rect WHERE noti_id = #{id} ORDER BY create_time DESC LIMIT 1)
|
||||
AND noti_id = #{id} AND image_type IN ('2','3')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue