diff --git a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/SJSafetyThresholdVo.java b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/SJSafetyThresholdVo.java new file mode 100644 index 0000000..0caa784 --- /dev/null +++ b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/SJSafetyThresholdVo.java @@ -0,0 +1,56 @@ +package com.securitycontrol.entity.background.vo; + +import lombok.Data; + +/** + * @author 马三炮 + * @date 2026/1/16 + */ +@Data +public class SJSafetyThresholdVo { + + /** + * 主键 + */ + private Integer id; + + /** + * 温度最小值 + */ + private String wdMin; + + /** + * 温度最大值 + */ + private String wdMax; + + /** + * 湿度最小值 + */ + private String sdMin; + + /** + * 湿度最大值 + */ + private String sdMax; + + /** + * 风速最小值 + */ + private String speedMin; + + /** + * 风速最大值 + */ + private String speedMax; + + /** + * 空气质量最小值 + */ + private String kqzlMin; + + /** + * 空气质量最大值 + */ + private String kqzlMax; +} diff --git a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/SjNewProjectSafetyVo.java b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/SjNewProjectSafetyVo.java new file mode 100644 index 0000000..c4de988 --- /dev/null +++ b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/SjNewProjectSafetyVo.java @@ -0,0 +1,84 @@ +package com.securitycontrol.entity.background.vo; + +import lombok.Data; + +/** + * @author 马三炮 + * @date 2026/1/16 + */ +@Data +public class SjNewProjectSafetyVo { + + /** + * 主键 + */ + private Integer id; + + /** + * 工程名称 + */ + private String proName; + + /** + * 作业计划编号 + */ + private String planNum; + + /** + * 工作地点 + */ + private String workLocation; + /** + * 监测点编号 + */ + private String monitorCode; + /** + * 监测点名称 + */ + private String monitorName; + + /** + * 温度 + */ + private String wd; + + /** + * 湿度 + */ + private String sd; + + /** + * 风速 + */ + private String speed; + + /** + * 空气质量 + */ + private String airQuality; + + /** + * 是否存在隐患 + */ + private String isSafety; + + /** + * 分析与改进 + */ + private String analysis; + + /** + * 球机编码 + */ + private String puid; + + /** + * 检测时间 + */ + private String detectionTime; + + /** + * 创建时间 + */ + private String createTime; +} diff --git a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/SjProjectMassVo.java b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/SjProjectMassVo.java index a646312..119d12d 100644 --- a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/SjProjectMassVo.java +++ b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/SjProjectMassVo.java @@ -22,22 +22,22 @@ public class SjProjectMassVo { /** *检测内容 */ - private String contentInspection; + private String content; /** *检测日期 */ - private String inspectionDate; + private String testDay; /** *检测结果 */ - private String inspectionResults; + private String testResult; /** *质量检测报告 */ - private String inspectionUrl; + private String testReport; /** *关键字 @@ -53,4 +53,9 @@ public class SjProjectMassVo { *结束时间 */ private String endDate; + /** + *创建时间 + */ + private String createTime; + } diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/SjProjectSafetyController.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/SjProjectSafetyController.java index 81634fa..7194d7f 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/SjProjectSafetyController.java +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/SjProjectSafetyController.java @@ -6,6 +6,8 @@ import com.securitycontrol.common.core.web.domain.AjaxResult; import com.securitycontrol.common.core.web.page.TableDataInfo; import com.securitycontrol.common.log.annotation.Log; import com.securitycontrol.common.log.enums.OperationType; +import com.securitycontrol.entity.background.vo.SJSafetyThresholdVo; +import com.securitycontrol.entity.background.vo.SjNewProjectSafetyVo; import com.securitycontrol.entity.background.vo.SjProjectSafetyVo; import com.securitycontrol.entity.background.vo.SjVideoSafetyVo; @@ -135,7 +137,62 @@ public class SjProjectSafetyController extends BaseController { } + @GetMapping("getSafetyThresholdList") + @Log(title = "安全阈值", menu = "安全阈值->列表", grade = OperationType.QUERY_BUSINESS, details = "列表", type = "业务日志") + public TableDataInfo getSafetyThresholdList(SJSafetyThresholdVo dto) { + startPage(); + List list = service.getSafetyThresholdList(dto); + return getDataTable(list); + } + @ApiOperation(value = "安全阈值") + @PostMapping("addSafetyThreshold") + @Log(title = "安全阈值", menu = "安全阈值->新增", grade = OperationType.ADD_BUSINESS, details = "新增数据", type = "业务日志") + public AjaxResult addSafetyThreshold(@RequestBody SJSafetyThresholdVo vo) { + return service.addSafetyThreshold(vo); + } + @ApiOperation(value = "安全阈值") + @PostMapping("updateSafetyThreshold") + @Log(title = "安全阈值", menu = "安全阈值->修改", grade = OperationType.ADD_BUSINESS, details = "修改数据", type = "业务日志") + public AjaxResult updateSafetyThreshold(@RequestBody SJSafetyThresholdVo vo) { + return service.updateSafetyThreshold(vo); + } + @ApiOperation(value = "安全阈值") + @PostMapping(value="deleteSafetyThreshold") + @Log(title = "安全阈值", menu = "安全阈值->删除", grade = OperationType.DELETE_BUSINESS, details = "删除数据", type = "业务日志") + public AjaxResult deleteSafetyThreshold(@RequestBody SJSafetyThresholdVo dto){ + return service.deleteSafetyThreshold(dto); + } + + @ApiOperation(value = "工程安全分析") + @GetMapping("getNewProjectSafetyList") + @Log(title = "工程安全分析", menu = "工程安全分析->列表", grade = OperationType.QUERY_BUSINESS, details = "列表", type = "业务日志") + public TableDataInfo getNewProjectSafetyList(SjNewProjectSafetyVo dto) { + startPage(); + List list = service.getNewProjectSafetyList(dto); + return getDataTable(list); + } + + @ApiOperation(value = "工程安全分析") + @PostMapping("addNewProjectSafety") + @Log(title = "工程安全分析", menu = "工程安全分析->新增", grade = OperationType.ADD_BUSINESS, details = "新增数据", type = "业务日志") + public AjaxResult addNewProjectSafety(@RequestBody SjNewProjectSafetyVo vo) { + return service.addNewProjectSafety(vo); + } + + @ApiOperation(value = "工程安全分析") + @PostMapping("updateNewProjectSafety") + @Log(title = "工程安全分析", menu = "工程安全分析->修改", grade = OperationType.ADD_BUSINESS, details = "修改数据", type = "业务日志") + public AjaxResult updateNewProjectSafety(@RequestBody SjNewProjectSafetyVo vo) { + return service.updateNewProjectSafety(vo); + } + + @ApiOperation(value = "工程安全分析") + @PostMapping(value="delNewProjectSafety") + @Log(title = "工程安全分析", menu = "工程安全分析->删除", grade = OperationType.DELETE_BUSINESS, details = "删除数据", type = "业务日志") + public AjaxResult delNewProjectSafety(@RequestBody SjNewProjectSafetyVo dto){ + return service.delNewProjectSafety(dto); + } } diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/SjProjectSafetyMapper.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/SjProjectSafetyMapper.java index 253fc60..2c922e5 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/SjProjectSafetyMapper.java +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/SjProjectSafetyMapper.java @@ -1,8 +1,6 @@ package com.securitycontrol.background.mapper; -import com.securitycontrol.entity.background.vo.SjProjectQualityVo; -import com.securitycontrol.entity.background.vo.SjProjectSafetyVo; -import com.securitycontrol.entity.background.vo.SjVideoSafetyVo; +import com.securitycontrol.entity.background.vo.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -84,4 +82,60 @@ public interface SjProjectSafetyMapper { * @param list */ void addDataList(@Param("list") List list); + + /** + * 安全阈值列表 + * @param dto + * @return + */ + List getSafetyThresholdList(SJSafetyThresholdVo dto); + + /** + * 安全阈值新增 + * @param vo + * @return + */ + Integer addSafetyThreshold(SJSafetyThresholdVo vo); + + /** + * 修改安全阈值 + * @param vo + * @return + */ + Integer updateSafetyThreshold(SJSafetyThresholdVo vo); + + /** + * 删除安全阈值 + * @param dto + * @return + */ + Integer deleteSafetyThreshold(SJSafetyThresholdVo dto); + + /** + *工程安全分析列表 + * @param dto + * @return + */ + List getNewProjectSafetyList(SjNewProjectSafetyVo dto); + + /** + *新增工程安全分析 + * @param vo + * @return + */ + Integer addNewProjectSafety(SjNewProjectSafetyVo vo); + + /** + * 修改工程安全分析 + * @param vo + * @return + */ + Integer updateNewProjectSafety(SjNewProjectSafetyVo vo); + + /** + * 删除工程安全分析 + * @param dto + * @return + */ + Integer delNewProjectSafety(SjNewProjectSafetyVo dto); } diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/SjProjectSafetyService.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/SjProjectSafetyService.java index f84de05..f3bb575 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/SjProjectSafetyService.java +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/SjProjectSafetyService.java @@ -1,9 +1,7 @@ package com.securitycontrol.background.service; import com.securitycontrol.common.core.web.domain.AjaxResult; -import com.securitycontrol.entity.background.vo.SjProjectQualityVo; -import com.securitycontrol.entity.background.vo.SjProjectSafetyVo; -import com.securitycontrol.entity.background.vo.SjVideoSafetyVo; +import com.securitycontrol.entity.background.vo.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; @@ -90,4 +88,60 @@ public interface SjProjectSafetyService { * @return */ AjaxResult importData(MultipartFile file, HttpServletRequest request, HttpServletResponse response); + + /** + * 安全阈值列表 + * @param dto + * @return + */ + List getSafetyThresholdList(SJSafetyThresholdVo dto); + + /** + * 安全阈值新增 + * @param vo + * @return + */ + AjaxResult addSafetyThreshold(SJSafetyThresholdVo vo); + + /** + * 修改安全阈值 + * @param vo + * @return + */ + AjaxResult updateSafetyThreshold(SJSafetyThresholdVo vo); + + /** + * 删除安全阈值 + * @param dto + * @return + */ + AjaxResult deleteSafetyThreshold(SJSafetyThresholdVo dto); + + /** + *工程安全分析列表 + * @param dto + * @return + */ + List getNewProjectSafetyList(SjNewProjectSafetyVo dto); + + /** + *新增工程安全分析 + * @param vo + * @return + */ + AjaxResult addNewProjectSafety(SjNewProjectSafetyVo vo); + + /** + * 修改工程安全分析 + * @param vo + * @return + */ + AjaxResult updateNewProjectSafety(SjNewProjectSafetyVo vo); + + /** + * 删除工程安全分析 + * @param dto + * @return + */ + AjaxResult delNewProjectSafety(SjNewProjectSafetyVo dto); } diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/impl/SjProjectSafetyServiceImpl.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/impl/SjProjectSafetyServiceImpl.java index 0ba497f..7fdf4ee 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/impl/SjProjectSafetyServiceImpl.java +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/impl/SjProjectSafetyServiceImpl.java @@ -11,9 +11,7 @@ import com.securitycontrol.common.core.constant.SecurityConstants; import com.securitycontrol.common.core.domain.Result; import com.securitycontrol.common.core.utils.ImportExcelUtils; import com.securitycontrol.common.core.web.domain.AjaxResult; -import com.securitycontrol.entity.background.vo.SjProjectQualityVo; -import com.securitycontrol.entity.background.vo.SjProjectSafetyVo; -import com.securitycontrol.entity.background.vo.SjVideoSafetyVo; +import com.securitycontrol.entity.background.vo.*; import com.securitycontrol.entity.system.base.vo.ProImportVo; import com.securitycontrol.entity.system.vo.ResourceFileVo; import com.securitycontrol.system.api.RemoteFileService; @@ -256,4 +254,142 @@ public class SjProjectSafetyServiceImpl implements SjProjectSafetyService { } return AjaxResult.error("导入失败"); } + + /** + * 安全阈值列表 + * @param dto + * @return + */ + @Override + public List getSafetyThresholdList(SJSafetyThresholdVo dto) { + try{ + return mapper.getSafetyThresholdList(dto); + }catch (Exception e){ + log.error(e.getMessage(),e); + } + return Collections.emptyList(); + } + + /** + * 安全阈值新增 + * @param vo + * @return + */ + @Override + public AjaxResult addSafetyThreshold(SJSafetyThresholdVo vo) { + try{ + Integer num=mapper.addSafetyThreshold(vo); + if(num!=null && num>0){ + return AjaxResult.success("添加成功"); + } + }catch (Exception e){ + log.error(e.getMessage(),e); + } + return AjaxResult.error("新增失败,数据长度过长"); + } + + /** + * 修改安全阈值 + * @param vo + * @return + */ + @Override + public AjaxResult updateSafetyThreshold(SJSafetyThresholdVo vo) { + try{ + Integer num=mapper.updateSafetyThreshold(vo); + if(num!=null && num>0){ + return AjaxResult.success("修改成功"); + } + }catch (Exception e){ + log.error(e.getMessage(),e); + } + return AjaxResult.error("修改失败,数据长度过长"); + } + + /** + * 删除安全阈值 + * @param dto + * @return + */ + @Override + public AjaxResult deleteSafetyThreshold(SJSafetyThresholdVo dto) { + try{ + Integer num=mapper.deleteSafetyThreshold(dto); + if(num!=null && num>0){ + return AjaxResult.success("删除成功"); + } + }catch (Exception e){ + log.error(e.getMessage(),e); + } + return AjaxResult.error("删除失败"); + } + + /** + *工程安全分析列表 + * @param dto + * @return + */ + @Override + public List getNewProjectSafetyList(SjNewProjectSafetyVo dto) { + try{ + return mapper.getNewProjectSafetyList(dto); + }catch (Exception e){ + log.error(e.getMessage(),e); + } + return Collections.emptyList(); + } + + /** + *新增工程安全分析 + * @param vo + * @return + */ + @Override + public AjaxResult addNewProjectSafety(SjNewProjectSafetyVo vo) { + try{ + Integer num=mapper.addNewProjectSafety(vo); + if(num!=null && num>0){ + return AjaxResult.success("添加成功"); + } + }catch (Exception e){ + log.error(e.getMessage(),e); + } + return AjaxResult.error("新增失败,数据长度过长"); + } + + /** + * 修改工程安全分析 + * @param vo + * @return + */ + @Override + public AjaxResult updateNewProjectSafety(SjNewProjectSafetyVo vo) { + try{ + Integer num=mapper.updateNewProjectSafety(vo); + if(num!=null && num>0){ + return AjaxResult.success("修改成功"); + } + }catch (Exception e){ + log.error(e.getMessage(),e); + } + return AjaxResult.error("修改失败,数据长度过长"); + } + + /** + * 删除工程安全分析 + * @param dto + * @return + */ + @Override + public AjaxResult delNewProjectSafety(SjNewProjectSafetyVo dto) { + try{ + Integer num=mapper.delNewProjectSafety(dto); + if(num!=null && num>0){ + return AjaxResult.success("删除成功"); + } + }catch (Exception e){ + log.error(e.getMessage(),e); + } + return AjaxResult.error("删除失败"); + } } diff --git a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SjProjectQualityMapper.xml b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SjProjectQualityMapper.xml index 8426421..cd77025 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SjProjectQualityMapper.xml +++ b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SjProjectQualityMapper.xml @@ -15,15 +15,15 @@ ) - insert into sj_project_mass( - team_name,content_inspection,inspection_date, - inspection_results,inspection_url - )values (#{teamName},#{contentInspection},#{inspectionDate},#{inspectionResults},#{inspectionUrl}) + insert into sj_new_project_quality( + team_name,content,test_day, + test_result,test_report,create_time + )values (#{teamName},#{content},#{testDay},#{testResult},#{testReport},now()) - update sj_project_mass set team_name=#{teamName},content_inspection=#{contentInspection}, - inspection_date=#{inspectionDate},inspection_results=#{inspectionResults}, - inspection_url=#{inspectionUrl} + update sj_new_project_quality set team_name=#{teamName},content=#{content}, + test_day=#{testDay},test_result=#{testResult}, + test_report=#{testReport} where id=#{id} @@ -88,29 +88,29 @@ diff --git a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SjProjectSafetyMapper.xml b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SjProjectSafetyMapper.xml index d8e368e..c627142 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SjProjectSafetyMapper.xml +++ b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SjProjectSafetyMapper.xml @@ -19,6 +19,19 @@ (#{item.riskCode},#{item.riskSite},#{item.riskLevel},#{item.controller},#{item.riskController},#{item.startTime},#{item.isXh}) + + + insert into tb_threshold_info( + wd_min, wd_max, sd_min,sd_max,speed_min,speed_max,kqzl_min,kqzl_max + )values (#{wdMin},#{wdMax},#{sdMin},#{sdMax},#{speedMin},#{speedMax},#{kqzlMin},#{kqzlMax}) + + + insert into sj_new_project_safety( + pro_name, plan_num, work_location,monitor_code,monitor_name,wd,sd,speed,air_quality, + is_safety,analysis,puid,detection_time + )values (#{proName},#{planNum},#{workLocation},#{monitorCode},#{monitorName},#{wd},#{sd}, + #{speed},#{airQuality},#{isSafety}, #{analysis},#{puid},#{detectionTime}) + update sj_project_safety set @@ -35,12 +48,31 @@ ,name=#{name} where id=#{id} + + update tb_threshold_info set + wd_min=#{wdMin}, wd_max=#{wdMax}, sd_min=#{sdMin}, sd_max=#{sdMax}, + speed_min=#{speedMin}, speed_max=#{speedMax}, kqzl_min=#{kqzlMin}, kqzl_max=#{kqzlMax} + where id=#{id} + + + update sj_new_project_safety set + pro_name=#{proName}, plan_num=#{planNum}, work_location=#{workLocation}, monitor_code=#{monitorCode}, + monitor_name=#{monitorName}, wd=#{wd}, sd=#{sd}, speed=#{speed}, air_quality=#{airQuality}, + is_safety=#{isSafety}, analysis=#{analysis},puid=#{puid}, detection_time=#{detectionTime} + where id=#{id} + delete from sj_project_safety where id=#{id} delete from sj_video_safety where id=#{id} + + delete from tb_threshold_info where id=#{id} + + + delete from sj_new_project_safety where id=#{id} + - \ No newline at end of file + + +