From e98eeaaa5766511fdb8e6d5e412eb1c59d1f07ce Mon Sep 17 00:00:00 2001 From: heheng <475597332@qq.com> Date: 星期二, 24 六月 2025 10:24:43 +0800 Subject: [PATCH] 隐患来源功能外加仓吉基础数据定时上报 --- src/main/java/com/ruoyi/common/utils/DateUtils.java | 16 + src/main/java/com/ruoyi/project/mobile/service/ApiHiddenDangerCheckService.java | 42 ++ src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/DealDataTask.java | 6 src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailYesDanger.html | 14 + src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReport.html | 10 src/main/resources/templates/tr/hiddenDangerCheck/dangerAccept/editDangerAccept.html | 14 + src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotJudge.html | 12 src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/editDangerExamine.html | 100 ++++--- src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/editDangerReport.html | 29 + src/main/java/com/ruoyi/doublePrevention/scheduls/ZhunDongTaskLogSchedule.java | 135 ++++++++++ src/main/java/com/ruoyi/doublePrevention/entity/ZDReport/ZDTaskDangerLogDTO.java | 26 ++ src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotDanger.html | 12 src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerReportController.java | 49 ++ src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/ItemDangerReportSchedule.java | 28 - src/main/resources/mybatis/tr/HiddenDangerCheckPointMapper.xml | 8 src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/SpecialCheckTaskDownload.java | 5 src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/TaskReportSchedule.java | 33 +- src/main/java/com/ruoyi/project/mobile/service/ApiDangerScheduleService.java | 22 src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerExamineController.java | 19 + src/main/resources/templates/tr/hiddenDangerCheck/dangerRectify/detailDangerRectify.html | 11 src/main/java/com/ruoyi/doublePrevention/entity/ZDReport/ZDTaskLogDTO.java | 23 + src/main/resources/mybatis/doublePrevention/PreventRiskDangerInfoMapper.xml | 3 src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/detailDangerExamine.html | 15 + src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java | 1 src/main/resources/templates/tr/hiddenDangerCheck/dangerAccept/detailDangerAccept.html | 14 + src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReportWholeProcess.html | 28 + src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerRectifyController.java | 9 src/main/resources/templates/tr/hiddenDangerCheck/dangerRectify/editDangerRectify.html | 11 src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/editNextConfirm.html | 62 +++- src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java | 10 30 files changed, 595 insertions(+), 172 deletions(-) diff --git a/src/main/java/com/ruoyi/common/utils/DateUtils.java b/src/main/java/com/ruoyi/common/utils/DateUtils.java index fbdf8de..9fe0d9f 100644 --- a/src/main/java/com/ruoyi/common/utils/DateUtils.java +++ b/src/main/java/com/ruoyi/common/utils/DateUtils.java @@ -3,6 +3,10 @@ import java.lang.management.ManagementFactory; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.time.Instant; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; import java.util.Date; import org.apache.commons.lang3.time.DateFormatUtils; @@ -152,4 +156,16 @@ // long sec = diff % nd % nh % nm / ns; return day + "天" + hour + "小时" + min + "分钟"; } + + public static String parseDateToStrLocal(String dateFormate, LocalDateTime checkDate) { + // Step 1: 将 LocalDateTime 转换为 ZonedDateTime + ZonedDateTime zonedDateTime = checkDate.atZone(ZoneId.systemDefault()); + + // Step 2: 将 ZonedDateTime 转换为 Instant + Instant instant = zonedDateTime.toInstant(); + + // Step 3: 获取自 Unix 纪元以来的毫秒数 + long epochMilli = instant.toEpochMilli(); + return DateFormatUtils.format(epochMilli, dateFormate); + } } diff --git a/src/main/java/com/ruoyi/doublePrevention/entity/ZDReport/ZDTaskDangerLogDTO.java b/src/main/java/com/ruoyi/doublePrevention/entity/ZDReport/ZDTaskDangerLogDTO.java new file mode 100644 index 0000000..b14277f --- /dev/null +++ b/src/main/java/com/ruoyi/doublePrevention/entity/ZDReport/ZDTaskDangerLogDTO.java @@ -0,0 +1,26 @@ +package com.ruoyi.doublePrevention.entity.ZDReport; + +import lombok.Data; + +@Data +/** + * @date 2023/5/31 10:08 + * @description: 准东专项检查隐患信息 + */ +public class ZDTaskDangerLogDTO { + + private String id; + private String danger_id; + private String task_id; + private String check_type; + private String check_date; + private String check_pay; + private String check_item_id; + private String check_score_id; + private String harm_type; + private String deleted; + private String create_by; + private String create_date; + private String update_date; + private String update_by; +} diff --git a/src/main/java/com/ruoyi/doublePrevention/entity/ZDReport/ZDTaskLogDTO.java b/src/main/java/com/ruoyi/doublePrevention/entity/ZDReport/ZDTaskLogDTO.java new file mode 100644 index 0000000..948f83b --- /dev/null +++ b/src/main/java/com/ruoyi/doublePrevention/entity/ZDReport/ZDTaskLogDTO.java @@ -0,0 +1,23 @@ +package com.ruoyi.doublePrevention.entity.ZDReport; + +import lombok.Data; + +@Data +/** + * @Description: + * @Author: 专项检查情况记录表 + * */ +public class ZDTaskLogDTO { + + private String id; + private String hazard_code; + private String task_id; + private String check_type; + private String check_date; + private String result_status; + private String deleted; + private String create_by; + private String create_date; + private String update_date; + private String update_by; +} diff --git a/src/main/java/com/ruoyi/doublePrevention/scheduls/ZhunDongTaskLogSchedule.java b/src/main/java/com/ruoyi/doublePrevention/scheduls/ZhunDongTaskLogSchedule.java new file mode 100644 index 0000000..bd15c57 --- /dev/null +++ b/src/main/java/com/ruoyi/doublePrevention/scheduls/ZhunDongTaskLogSchedule.java @@ -0,0 +1,135 @@ +package com.ruoyi.doublePrevention.scheduls; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.doublePrevention.entity.ZDReport.HandlerZDReportParam; +import com.ruoyi.doublePrevention.entity.ZDReport.ZDTaskLogDTO; +import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckTaskLog; +import com.ruoyi.project.tr.specialCheck.mapper.TbSpecialCheckTaskLogMapper; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; + +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +@Component +@Slf4j +public class ZhunDongTaskLogSchedule { + + private static final String TOKEN = "030B6744-EECB-4732-B679-280373E7E575"; + private static final String URL = "http://218.31.50.112:8087"; + private static final String TOKEN_PRE = "token"; + @Autowired + private TbSpecialCheckTaskLogMapper taskSpecialLogMapper; + // @Scheduled(cron = "0 0/6 * * * ? ") + public void updateZhunDongTASkLogReportStatus() { + //todo 准东基础数据推送 + } + + + @Transactional + public void ZDTaskLogWork() { + HttpURLConnection con = null; + BufferedReader buffer = null; + int responseCode = 200; + /** + * 1、隐患排查任务基础数据 + * */ + log.info("【Q】隐患排查任务基础数据-处理数据..."); + //todo 更换查询sql + List<TbSpecialCheckTaskLog> taskLogLists = taskSpecialLogMapper.listTestReportTask(); + + if (ObjectUtils.isNotEmpty(taskLogLists)) { + List<ZDTaskLogDTO> zdTaskLogDTOS = new ArrayList<>(); + for (TbSpecialCheckTaskLog specialCheckTaskLog : taskLogLists) { + ZDTaskLogDTO zdTaskLogDTO = new ZDTaskLogDTO(); + zdTaskLogDTO.setId(specialCheckTaskLog.getId()); + zdTaskLogDTO.setHazard_code(specialCheckTaskLog.getHazardCode()); + zdTaskLogDTO.setTask_id(specialCheckTaskLog.getTaskId()); + zdTaskLogDTO.setCheck_type(specialCheckTaskLog.getCheckType()); + zdTaskLogDTO.setCheck_date(DateUtils.parseDateToStrLocal(DateUtils.YYYYMMDDHHMMSS, specialCheckTaskLog.getCheckDate())); + zdTaskLogDTO.setCreate_date(DateUtils.parseDateToStrLocal(DateUtils.YYYYMMDDHHMMSS, specialCheckTaskLog.getCreateDate())); + zdTaskLogDTO.setUpdate_date(DateUtils.parseDateToStr(DateUtils.YYYYMMDDHHMMSS, new Date())); + zdTaskLogDTO.setCreate_by(specialCheckTaskLog.getCreateBy()); + zdTaskLogDTO.setUpdate_by(specialCheckTaskLog.getUpdateBy()); + zdTaskLogDTO.setDeleted(specialCheckTaskLog.getDeleted().toString()); + zdTaskLogDTOS.add(zdTaskLogDTO); + } + + log.info("【【【Q】隐患排查任务基础数据】】" + JSONObject.toJSONString(zdTaskLogDTOS)); + //加密数据 + + StringBuffer eventResultBuffer = null; + //上报数据 + try { + URL url = new URL(URL + "/api/wwyt/tb_base_check_record_List"); + //得到连接对象 + con = (HttpURLConnection) url.openConnection(); + // 设置请求方式和参数 + con.setRequestMethod("POST"); + con.setDoOutput(true); + con.setDoInput(true); + con.setUseCaches(false); + con.setRequestProperty("token", TOKEN); + con.setRequestProperty("Content-Type", "application/json; charset=UTF-8"); + // 发送请求体 + try (OutputStream os = con.getOutputStream()) { + os.write(JSON.toJSONString(zdTaskLogDTOS).getBytes(StandardCharsets.UTF_8)); + } + //得到响应码 + responseCode = con.getResponseCode(); + //确认响应流不为空 + if (responseCode == HttpURLConnection.HTTP_OK) { + //得到响应流 + InputStream inputStream = con.getInputStream(); + //将响应流转换成字符串 + eventResultBuffer = new StringBuffer(); + String line; + buffer = new BufferedReader(new InputStreamReader(inputStream, "UTF-8")); + while ((line = buffer.readLine()) != null) { + eventResultBuffer.append(line); + } + log.info("【Q】隐患排查任务基础数据result:" + eventResultBuffer.toString()); + + JSONObject jsonObject = JSONObject.parseObject(eventResultBuffer.toString()); + if (jsonObject.getInteger("status") == 200) { + String message = jsonObject.getString("message"); + if (message.contains("失效0条")) { + for (TbSpecialCheckTaskLog tbSpecialCheckTaskLog : taskLogLists) { + HandlerZDReportParam handlerZDReportParam = new HandlerZDReportParam(); + //todo 更换查询数据 + //封装数据 +// handlerZDReportParam.setId(CJEvent.getId()); +// handlerZDReportParam.setZhunReportStatus(SyncEnum.SYNC_EXEC_SUCCESS.getCode()); +// handlerZDReportParam.setZhunReportTime(new Date()); +// CJEventService.updateEventReportStatusHuaiDong(handlerZDReportParam); + } + } + + } else { + log.info("【Q】隐患排查任务基础数据推送数据失败..." + eventResultBuffer); + } + + } + + } catch (Exception e) { + e.printStackTrace(); + } + log.info("【Q】隐患排查任务基础数据推送数据结束..."); + }else { + log.info("【Q】隐患排查任务基础数据无可推数据"); + } + } +} diff --git a/src/main/java/com/ruoyi/project/mobile/service/ApiDangerScheduleService.java b/src/main/java/com/ruoyi/project/mobile/service/ApiDangerScheduleService.java index aab7529..9069f25 100644 --- a/src/main/java/com/ruoyi/project/mobile/service/ApiDangerScheduleService.java +++ b/src/main/java/com/ruoyi/project/mobile/service/ApiDangerScheduleService.java @@ -254,12 +254,12 @@ throw new RuntimeException("添加隐患信息失败"); } - //获取Id返回值 -// hdcp.getId(); -// int result = riskService.insertDangerInfo(hdcp.getId(), hdcp); -// if (result< 1){ -// throw new RuntimeException("添加隐患附属信息失败"); -// } + //获取Id返回值 20250623 放开 + hdcp.getId(); + int result = riskService.insertDangerInfo(hdcp.getId(), hdcp); + if (result< 1){ + throw new RuntimeException("添加隐患附属信息失败"); + } // PreventRiskDangerCheckAndMeasure dangerCheckPointInfo = preventRiskDangerCheckAndMeasureService.getByDangerCheckPointId(hdcp.getId()); // riskService.updateCheckLog(dangerCheckPointInfo.getCheckId(), hdcp); @@ -269,11 +269,11 @@ hdcp.setUpdateTime(DateUtils.getNowDate()); i = hdcpService.updateHiddenDangerCheckPoint(hdcp); - // todo-2022 此处修改附属表 -// int result = riskService.updateDangerInfo(hdcp); -// if (result < 1){ -// throw new RuntimeException("修改失败"); -// } + // todo-2022 此处修改附属表 20250623 放开 + int result = riskService.updateDangerInfo(hdcp); + if (result < 1){ + throw new RuntimeException("修改失败"); + } // int result = riskService.insertDangerInfo(hdcp.getId(), hdcp); // if (result< 1){ // throw new RuntimeException("添加隐患附属信息失败"); diff --git a/src/main/java/com/ruoyi/project/mobile/service/ApiHiddenDangerCheckService.java b/src/main/java/com/ruoyi/project/mobile/service/ApiHiddenDangerCheckService.java index dc21e5c..bf3b915 100644 --- a/src/main/java/com/ruoyi/project/mobile/service/ApiHiddenDangerCheckService.java +++ b/src/main/java/com/ruoyi/project/mobile/service/ApiHiddenDangerCheckService.java @@ -127,6 +127,9 @@ for (HiddenDangerCheckPoint dangerCheckPoint : resultList) { PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoByDangerCheckPointId(dangerCheckPoint.getId()); if (ObjectUtils.isNotEmpty(dangerInfo)){ + if (ObjectUtils.isNotEmpty(dangerInfo.getDangerSrc())){ + dangerCheckPoint.setDangerSrc(dangerInfo.getDangerSrc()); + } if (ObjectUtils.isNotEmpty(dangerInfo.getReportTime())){ dangerCheckPoint.setReportTime(dangerInfo.getReportTime()); } @@ -178,7 +181,7 @@ } return ApiResult.success("隐患核查保存成功"); } catch (Exception e) { - return ApiResult.error("异常"); + return ApiResult.error(e.getMessage()); } } /** @@ -210,12 +213,27 @@ } hdcpService.updateHiddenDangerCheckPoint(hdcp); - - //此处插入隐患附属表 - int result = riskService.insertDangerInfo(hdcp.getId(), hdcp); - if (result< 1){ - throw new RuntimeException("添加隐患附属信息失败"); + //20250623 修改此处 + PreventRiskDangerInfo dangerInfoByDangerCheckPointId = riskService.getDangerInfoByDangerCheckPointId(hdcp.getId()); + if (ObjectUtils.isNotEmpty(dangerInfoByDangerCheckPointId)){ + //此处插入隐患附属表 + int result = riskService.updateDangerInfo(hdcp); + if (result < 1){ + throw new RuntimeException("修改失败"); + } + }else { + //此处插入隐患附属表 + int result = riskService.insertDangerInfo(hdcp.getId(), hdcp); + if (result < 1){ + throw new RuntimeException("添加隐患附属信息失败"); + } } +// //此处插入隐患附属表 +// int result = riskService.updateCheckLog(hdcp.getId(), hdcp); +// if (result< 1){ +// throw new RuntimeException("添加隐患附属信息失败"); +// } + HiddenDangerCheckPoint hiddenDangerCheckPoint = hiddenDangerCheckPointService.getHiddenDangerCheckPointById(hdcp.getId()); int confirmResult = confirmLogService.saveConfirmLog(hiddenDangerCheckPoint); @@ -227,7 +245,7 @@ return ApiResult.success("隐患核查保存成功"); } catch (Exception e) { - return ApiResult.error("异常"); + return ApiResult.error(e.getMessage()); } } @@ -460,10 +478,20 @@ hdcp.setCompanyId(user.getCompanyId()); i = hdcpService.insertHiddenDangerCheckPoint(hdcp); + //20250623增加此逻辑 + int result = riskService.insertDangerInfo(hdcp.getId(), hdcp); + if (result< 1){ + throw new RuntimeException("添加隐患附属信息失败"); + } }else{ hdcp.setUpdateBy(user.getLoginName()); hdcp.setUpdateTime(DateUtils.getNowDate()); i = hdcpService.updateHiddenDangerCheckPoint(hdcp); + //20250623增加此逻辑 + int result = riskService.updateDangerInfo(hdcp); + if (result < 1){ + throw new RuntimeException("修改失败"); + } } hdcpService.getTaskCountTotal(Long.valueOf(header.userId));//查询未执行任务总数量并推送 diff --git a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerExamineController.java b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerExamineController.java index 32e637c..40d366b 100644 --- a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerExamineController.java +++ b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerExamineController.java @@ -6,6 +6,7 @@ import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.security.ShiroUtils; import com.ruoyi.doublePrevention.entity.PreventRiskDangerConfirmLog; +import com.ruoyi.doublePrevention.entity.PreventRiskDangerInfo; import com.ruoyi.doublePrevention.service.RiskService; import com.ruoyi.doublePrevention.service.baseService.PreventRiskDangerConfirmLogService; import com.ruoyi.framework.aspectj.lang.annotation.Log; @@ -223,12 +224,12 @@ if(hiddenDangerCheckPoint.getRectifyDeadlineTime()!=null) { rectifyRemindJPush(hiddenDangerCheckPoint); } - //此处插入隐患附属表 + //此处插入隐患附属表 20250623 位置变更注释掉 //HiddenDangerCheckPoint hiddenDangerCheckPointById = hiddenDangerCheckPointService.getHiddenDangerCheckPointById(hiddenDangerCheckPoint.getId()); - int result = riskService.insertDangerInfo(hiddenDangerCheckPoint.getId(), hiddenDangerCheckPoint); - if (result< 1){ - throw new RuntimeException("添加隐患附属信息失败"); - } +// int result = riskService.insertDangerInfo(hiddenDangerCheckPoint.getId(), hiddenDangerCheckPoint); +// if (result< 1){ +// throw new RuntimeException("添加隐患附属信息失败"); +// } HiddenDangerCheckPoint hdcp = hiddenDangerCheckPointService.getHiddenDangerCheckPointById(hiddenDangerCheckPoint.getId()); int confirmResult = confirmLogService.saveConfirmLog(hdcp); @@ -272,6 +273,14 @@ public String detailDangerExamine(@PathVariable("id") Long id, ModelMap mmap) { //隐患排查实体 HiddenDangerCheckPoint hiddenDangerCheckPoint = hiddenDangerCheckPointService.selectHiddenDangerCheckPointById(Long.valueOf(id)); + PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoById(hiddenDangerCheckPoint.getId()); + if (ObjectUtils.isNotEmpty(dangerInfo)){ + hiddenDangerCheckPoint.setHazardCode(dangerInfo.getHazardCode()); + hiddenDangerCheckPoint.setDangerSrc(dangerInfo.getDangerSrc()); + hiddenDangerCheckPoint.setDangerReason(dangerInfo.getDangerReason()); + hiddenDangerCheckPoint.setHazardDangerType(dangerInfo.getHazardDangerType()); + hiddenDangerCheckPoint.setDangerResult(dangerInfo.getDangerResult()); + } mmap.put("hdcp", hiddenDangerCheckPoint); return prefix + "/detailDangerExamine"; } diff --git a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerRectifyController.java b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerRectifyController.java index a021ed0..0eaccea 100644 --- a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerRectifyController.java +++ b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerRectifyController.java @@ -4,6 +4,7 @@ import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.security.ShiroUtils; +import com.ruoyi.doublePrevention.entity.PreventRiskDangerInfo; import com.ruoyi.doublePrevention.service.RiskService; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; @@ -147,6 +148,14 @@ public String detailDangerRectify(@PathVariable("id") Long id, ModelMap mmap) { //隐患排查实体 HiddenDangerCheckPoint hiddenDangerCheckPoint = hiddenDangerCheckPointService.selectHiddenDangerCheckPointById(Long.valueOf(id)); + PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoById(hiddenDangerCheckPoint.getId()); + if (ObjectUtils.isNotEmpty(dangerInfo)){ + hiddenDangerCheckPoint.setHazardCode(dangerInfo.getHazardCode()); + hiddenDangerCheckPoint.setDangerSrc(dangerInfo.getDangerSrc()); + hiddenDangerCheckPoint.setDangerReason(dangerInfo.getDangerReason()); + hiddenDangerCheckPoint.setHazardDangerType(dangerInfo.getHazardDangerType()); + hiddenDangerCheckPoint.setDangerResult(dangerInfo.getDangerResult()); + } mmap.put("hdcp", hiddenDangerCheckPoint); return prefix + "/detailDangerRectify"; } diff --git a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerReportController.java b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerReportController.java index 608337a..011702a 100644 --- a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerReportController.java +++ b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerReportController.java @@ -143,6 +143,7 @@ List<User> userList = userService.selectUserList(userTemp); mmap.put("userList", userList); } + mmap.put("dangerSrc", 0); //隐患类别 HiddenTroubleType hiddenTroubleType = new HiddenTroubleType(); @@ -191,13 +192,13 @@ throw new RuntimeException("添加隐患信息失败"); } -// // 此处插入附属表 --- 此处已弃用,在核查整改后插入 -// //获取Id返回值 -// hdcp.getId(); -// int result = riskService.insertDangerInfo(hdcp.getId(), hdcp); -// if (result< 1){ -// throw new RuntimeException("添加隐患附属信息失败"); -// } + // 此处插入附属表 --- 此处已弃用,在核查整改后插入20250623再次启用 + //获取Id返回值 + hdcp.getId(); + int result = riskService.insertDangerInfo(hdcp.getId(), hdcp); + if (result< 1){ + throw new RuntimeException("添加隐患附属信息失败"); + } hiddenDangerCheckPointService.getTaskCountTotal(getSysUser().getUserId());//查询未执行任务总数量并推送 @@ -407,11 +408,11 @@ hiddenDangerCheckPoint.setUpdateTime(DateUtils.getNowDate());//设置更新时间 hiddenDangerCheckPointService.updateHiddenDangerCheckPoint(hiddenDangerCheckPoint); - // todo-2022 此处修改附属表 -// int result = riskService.updateDangerInfo(hiddenDangerCheckPoint); -// if (result < 1){ -// throw new RuntimeException("修改失败"); -// } + // todo-2022 此处修改附属表 20250623再次启用 + int result = riskService.updateDangerInfo(hiddenDangerCheckPoint); + if (result < 1){ + throw new RuntimeException("修改失败"); + } hiddenDangerCheckPointService.getTaskCountTotal(getSysUser().getUserId());//查询未执行任务总数量并推送 return AjaxResult.success(); @@ -545,6 +546,14 @@ public String detailNotJudge(@PathVariable("id") Long id, ModelMap mmap) { //隐患排查检查点信息实体 HiddenDangerCheckPoint hiddenDangerCheckPoint = hiddenDangerCheckPointService.selectHiddenDangerCheckPointById(Long.valueOf(id)); + PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoById(hiddenDangerCheckPoint.getId()); + if (ObjectUtils.isNotEmpty(dangerInfo)){ + hiddenDangerCheckPoint.setHazardCode(dangerInfo.getHazardCode()); + hiddenDangerCheckPoint.setDangerSrc(dangerInfo.getDangerSrc()); + hiddenDangerCheckPoint.setDangerReason(dangerInfo.getDangerReason()); + hiddenDangerCheckPoint.setHazardDangerType(dangerInfo.getHazardDangerType()); + hiddenDangerCheckPoint.setDangerResult(dangerInfo.getDangerResult()); + } mmap.put("hiddenDangerCheckPoint", hiddenDangerCheckPoint); return prefix + "/detailNotJudge"; } @@ -558,6 +567,14 @@ public String detailNotDanger(@PathVariable("id") Long id, ModelMap mmap) { //隐患排查检查点信息实体 HiddenDangerCheckPoint hiddenDangerCheckPoint = hiddenDangerCheckPointService.selectHiddenDangerCheckPointById(Long.valueOf(id)); + PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoById(hiddenDangerCheckPoint.getId()); + if (ObjectUtils.isNotEmpty(dangerInfo)){ + hiddenDangerCheckPoint.setHazardCode(dangerInfo.getHazardCode()); + hiddenDangerCheckPoint.setDangerSrc(dangerInfo.getDangerSrc()); + hiddenDangerCheckPoint.setDangerReason(dangerInfo.getDangerReason()); + hiddenDangerCheckPoint.setHazardDangerType(dangerInfo.getHazardDangerType()); + hiddenDangerCheckPoint.setDangerResult(dangerInfo.getDangerResult()); + } mmap.put("hiddenDangerCheckPoint", hiddenDangerCheckPoint); return prefix + "/detailNotDanger"; } @@ -570,6 +587,14 @@ public String detailYesDanger(@PathVariable("id") Long id, ModelMap mmap) { //隐患排查检查点信息实体 HiddenDangerCheckPoint hiddenDangerCheckPoint = hiddenDangerCheckPointService.selectHiddenDangerCheckPointById(Long.valueOf(id)); + PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoById(hiddenDangerCheckPoint.getId()); + if (ObjectUtils.isNotEmpty(dangerInfo)){ + hiddenDangerCheckPoint.setHazardCode(dangerInfo.getHazardCode()); + hiddenDangerCheckPoint.setDangerSrc(dangerInfo.getDangerSrc()); + hiddenDangerCheckPoint.setDangerReason(dangerInfo.getDangerReason()); + hiddenDangerCheckPoint.setHazardDangerType(dangerInfo.getHazardDangerType()); + hiddenDangerCheckPoint.setDangerResult(dangerInfo.getDangerResult()); + } mmap.put("hiddenDangerCheckPoint", hiddenDangerCheckPoint); return prefix + "/detailYesDanger"; } diff --git a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java index 869b262..8d2283d 100644 --- a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java +++ b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java @@ -459,6 +459,7 @@ * */ @Transient private Byte dangerSrc; + // /** // * 隐患描述 // * */ diff --git a/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java b/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java index 18cbcb7..a806eaa 100644 --- a/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java +++ b/src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java @@ -1,22 +1,12 @@ package com.ruoyi.project.tr.specialCheck.controller; -import com.ruoyi.common.constant.DualControlConstants; import com.ruoyi.common.utils.BeanCopyUtils; -import com.ruoyi.doublePrevention.entity.PreventRiskControlMeasure; -import com.ruoyi.doublePrevention.entity.dto.req.PreventRiskControlMeasureDeleteReqDTO; import com.ruoyi.doublePrevention.vo.ResultVO; -import com.ruoyi.framework.aspectj.lang.annotation.Log; -import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.web.page.TableDataInfo; -import com.ruoyi.project.dc.accidentInformation.domain.AccidentInformation; -import com.ruoyi.project.enumerate.DcAttachmentTypeEnum; -import com.ruoyi.project.system.attachment.domain.Attachment; -import com.ruoyi.project.tr.report.domain.Danger; import com.ruoyi.project.tr.riskList.domain.RiskList; import com.ruoyi.project.tr.riskList.service.IRiskListService; -import com.ruoyi.project.tr.specialCheck.Test.DealDataTask; import com.ruoyi.project.tr.specialCheck.domin.BO.*; import com.ruoyi.project.tr.specialCheck.domin.DTO.TbSpecialCheckTaskLogDTO; import com.ruoyi.project.tr.specialCheck.domin.DTO.TbSpecialCheckTaskLogDateDTO; diff --git a/src/main/java/com/ruoyi/project/tr/specialCheck/Test/DealDataTask.java b/src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/DealDataTask.java similarity index 93% rename from src/main/java/com/ruoyi/project/tr/specialCheck/Test/DealDataTask.java rename to src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/DealDataTask.java index 497a6d4..267f402 100644 --- a/src/main/java/com/ruoyi/project/tr/specialCheck/Test/DealDataTask.java +++ b/src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/DealDataTask.java @@ -1,8 +1,5 @@ -package com.ruoyi.project.tr.specialCheck.Test; +package com.ruoyi.project.tr.specialCheck.scheduleLogTask; -import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; -import com.ruoyi.project.tr.specialCheck.domin.TbBaseCheckItem; -import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemLog; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckTaskLog; import com.ruoyi.project.tr.specialCheck.mapper.TbBaseCheckItemMapper; import com.ruoyi.project.tr.specialCheck.mapper.TbSpecialCheckItemLogMapper; @@ -43,6 +40,7 @@ tbSpecialCheckTaskLog.setIndexId(null); tbSpecialCheckTaskLog.setId(UUID.randomUUID().toString()); tbSpecialCheckTaskLog.setReportStatus((byte) 1); + //1为企业自查 2是市级及以下 tbSpecialCheckTaskLog.setCheckType("2"); tbSpecialCheckTaskLog.setCreateDate(LocalDateTime.now()); tbSpecialCheckTaskLog.setUpdateDate(LocalDateTime.now()); diff --git a/src/main/java/com/ruoyi/project/tr/specialCheck/Test/ItemDangerReportScheduleTest.java b/src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/ItemDangerReportSchedule.java similarity index 88% rename from src/main/java/com/ruoyi/project/tr/specialCheck/Test/ItemDangerReportScheduleTest.java rename to src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/ItemDangerReportSchedule.java index 25a658b..3a7e854 100644 --- a/src/main/java/com/ruoyi/project/tr/specialCheck/Test/ItemDangerReportScheduleTest.java +++ b/src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/ItemDangerReportSchedule.java @@ -1,4 +1,4 @@ -package com.ruoyi.project.tr.specialCheck.Test; +package com.ruoyi.project.tr.specialCheck.scheduleLogTask; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; @@ -9,13 +9,9 @@ import com.ruoyi.doublePrevention.entity.CJReport.CJdto.ErrorMsgDetails; import com.ruoyi.doublePrevention.enums.CJReportEnum; import com.ruoyi.doublePrevention.enums.SyncEnum; -import com.ruoyi.project.tr.riskList.service.IRiskListService; import com.ruoyi.project.tr.specialCheck.domin.BO.HandlerSpecialCheckReportParam; import com.ruoyi.project.tr.specialCheck.domin.DTO.SpecialCheckItemDangerLogReportDTO; -import com.ruoyi.project.tr.specialCheck.domin.DTO.SpecialCheckTaskLogReportDTO; -import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemDangerLog; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog; -import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckTaskLog; import com.ruoyi.project.tr.specialCheck.mapper.*; import org.apache.commons.lang3.ObjectUtils; import org.bouncycastle.crypto.engines.AESFastEngine; @@ -39,7 +35,7 @@ import java.util.*; @Component -public class ItemDangerReportScheduleTest { +public class ItemDangerReportSchedule { private final Logger logger = LoggerFactory.getLogger(this.getClass()); @@ -80,12 +76,12 @@ @Transactional // @Scheduled(cron = "0 0 23 * * ?") //每天晚上23点执行一次0 0 22,23 * * ? -// @Scheduled(cron = "0 0 22,23 * * ?") //每天晚上22、23点执行一次 + @Scheduled(cron = "15 12 12,23 * * ?") //每天晚上22、23点执行一次 // @Scheduled(cron = "0 0/1 * * * ? ") // 分钟 // @Scheduled(cron = "0 0/35 * * * ? ") // 分钟 // @Scheduled(cron = "0/5 * * * * ?") public void execReportDateSchedule() throws UnsupportedEncodingException { - logger.info("【####】上报数据开始..."); + logger.info("scoreAndDangerLog【####】上报数据开始..."); HttpURLConnection con = null; BufferedReader buffer = null; @@ -101,12 +97,12 @@ SimpleDateFormat tokenDate= new SimpleDateFormat("yyyyMMddHHmmssSSS"); String formatDate = tokenDate.format(date); - logger.info("【token时间】" + formatDate); + logger.info("scoreAndDangerLog【token时间】" + formatDate); /** * 1、检查项与隐患上报 * */ - System.out.println("【2】检查项与隐患上报-处理数据..."); + logger.info("scoreAndDangerLog【2】检查项与隐患上报-处理数据..."); // List<TbSpecialCheckTaskLog> CJRiskAnaUnits = .listReportUnitDate(); List<TbSpecialCheckScoreAndDangerLog> scoreAndDangerLogs = scoreAndDangerLogMapper.listScoreAndDangerLogReportList(); if (ObjectUtils.isNotEmpty(scoreAndDangerLogs)){ @@ -122,7 +118,7 @@ list.add(specialCheckItemDangerLogReportDTO); } // logger.info("【【原始数据】】" + JSONObject.toJSONString(list)); - System.out.println("【【原始数据】】" + JSONObject.toJSONString(list)); + logger.info("scoreAndDangerLog【【原始数据】】" + JSONObject.toJSONString(list)); String AESReportUnitDate = encrypt(JSONObject.toJSONString(list), key.getBytes(), iv.getBytes()); // logger.info("【【AES加密结果】】"+ AESReportUnitDate);{0JRK`$6X.jpg)min/Desktop/所有桌面文件存放/9}AM56M10$6WX){0JRK`$6X.jpg) StringBuffer itemDangerResultBuffer = null; @@ -150,7 +146,7 @@ OutputStream os = con.getOutputStream(); Map paraMap = new HashMap(); paraMap.put("data", AESReportUnitDate); /**封装数据*/ - System.out.println("【【加密请求体】】" + JSONArray.toJSON(paraMap).toString()); + logger.info("scoreAndDangerLog【【加密请求体】】" + JSONArray.toJSON(paraMap).toString()); //组装入参,设置请求体 os.write(JSON.toJSONString(paraMap).getBytes()); @@ -166,7 +162,7 @@ itemDangerResultBuffer.append(line); } // logger.info("result:" + unitResultBuffer.toString()); - System.out.println("result:" + itemDangerResultBuffer.toString()); + logger.info("scoreAndDangerLog【result】:" + itemDangerResultBuffer.toString()); } } catch (Exception e) { @@ -185,7 +181,7 @@ } } LocalDateTime nowDate = LocalDateTime.now(); - logger.info("【检查项与隐患】数据上报结果:" + CJOverhaulLogResult.getCode()); + logger.info("scoreAndDangerLog【检查项与隐患】数据上报结果:" + CJOverhaulLogResult.getCode()); //设置所有数据上报成功 if (CJOverhaulLogResult.getCode().equals(CJReportEnum.SUCCESS.getCode()) || CJOverhaulLogResult.getCode().equals(CJReportEnum.SUCESS_AND_FAIL.getCode())){ for (TbSpecialCheckScoreAndDangerLog itemDangerLo : scoreAndDangerLogs) { @@ -212,10 +208,10 @@ // logger.info("【1】安全风险分析单元-数据处理完成"); - System.out.println("【检查项与隐患】-数据处理完成"); + logger.info("scoreAndDangerLog【检查项与隐患】-数据处理完成"); }else { // logger.info("【1】风险分析单元-无数据上报昌吉州"); - System.out.println("【检查项与隐患】-无数据上报昌吉州"); + logger.info("scoreAndDangerLog【检查项与隐患】-无数据上报昌吉州"); } diff --git a/src/main/java/com/ruoyi/project/tr/specialCheck/Test/SpecialCheckTaskDownload.java b/src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/SpecialCheckTaskDownload.java similarity index 98% rename from src/main/java/com/ruoyi/project/tr/specialCheck/Test/SpecialCheckTaskDownload.java rename to src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/SpecialCheckTaskDownload.java index 587750a..c6aba98 100644 --- a/src/main/java/com/ruoyi/project/tr/specialCheck/Test/SpecialCheckTaskDownload.java +++ b/src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/SpecialCheckTaskDownload.java @@ -1,4 +1,4 @@ -package com.ruoyi.project.tr.specialCheck.Test; +package com.ruoyi.project.tr.specialCheck.scheduleLogTask; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; @@ -18,7 +18,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -29,8 +28,6 @@ import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.LocalDateTime; -import java.time.ZoneId; -import java.time.chrono.ChronoLocalDateTime; import java.time.format.DateTimeFormatter; import java.util.*; diff --git a/src/main/java/com/ruoyi/project/tr/specialCheck/Test/TaskReportScheduleTest.java b/src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/TaskReportSchedule.java similarity index 88% rename from src/main/java/com/ruoyi/project/tr/specialCheck/Test/TaskReportScheduleTest.java rename to src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/TaskReportSchedule.java index d5b2c94..b1e63b3 100644 --- a/src/main/java/com/ruoyi/project/tr/specialCheck/Test/TaskReportScheduleTest.java +++ b/src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/TaskReportSchedule.java @@ -1,4 +1,4 @@ -package com.ruoyi.project.tr.specialCheck.Test; +package com.ruoyi.project.tr.specialCheck.scheduleLogTask; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; @@ -7,14 +7,8 @@ import com.ruoyi.doublePrevention.entity.CJReport.CJdto.CJReportResultData; import com.ruoyi.doublePrevention.entity.CJReport.CJdto.Data; import com.ruoyi.doublePrevention.entity.CJReport.CJdto.ErrorMsgDetails; -import com.ruoyi.doublePrevention.entity.CJReport.CJdto.HandlerDO.*; -import com.ruoyi.doublePrevention.entity.CJReport.*; -import com.ruoyi.doublePrevention.entity.PreventReportConfig; import com.ruoyi.doublePrevention.enums.CJReportEnum; import com.ruoyi.doublePrevention.enums.SyncEnum; -import com.ruoyi.doublePrevention.repository.param.HandlerCJReportParam; -import com.ruoyi.doublePrevention.service.baseService.*; -import com.ruoyi.project.tr.report.service.ReportService; import com.ruoyi.project.tr.riskList.service.IRiskListService; import com.ruoyi.project.tr.specialCheck.domin.BO.HandlerSpecialCheckReportParam; import com.ruoyi.project.tr.specialCheck.domin.DTO.SpecialCheckTaskLogReportDTO; @@ -28,7 +22,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.format.annotation.DateTimeFormat; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -43,7 +36,7 @@ import java.util.*; @Component -public class TaskReportScheduleTest { +public class TaskReportSchedule { private final Logger logger = LoggerFactory.getLogger(this.getClass()); @@ -91,12 +84,12 @@ @Transactional // @Scheduled(cron = "0 0 23 * * ?") //每天晚上23点执行一次0 0 22,23 * * ? -// @Scheduled(cron = "0 0 22,23 * * ?") //每天晚上22、23点执行一次 + @Scheduled(cron = "35 12 12,23 * * ?") //每天晚上22、23点执行一次 // @Scheduled(cron = "0 0/1 * * * ? ") // 分钟 // @Scheduled(cron = "0 0/35 * * * ? ") // 分钟 // @Scheduled(cron = "0/5 * * * * ?") public void execReportDateSchedule() throws UnsupportedEncodingException { - logger.info("【####】上报数据开始..."); + logger.info("【####】TASKLOG上报数据开始..."); HttpURLConnection con = null; BufferedReader buffer = null; @@ -117,7 +110,7 @@ /** * 1、任务上报 * */ - System.out.println("【1】任务上报-处理数据..."); + logger.info("TASKLOG【1】任务上报-处理数据..."); // List<TbSpecialCheckTaskLog> CJRiskAnaUnits = .listReportUnitDate(); List<TbSpecialCheckTaskLog> taskLogLists = taskSpecialLogMapper.listTestReportTask(); if (ObjectUtils.isNotEmpty(taskLogLists)){ @@ -131,8 +124,8 @@ specialTaskLogReportDTO.setCheckDate(dateFormatCheckData.format(taskLog.getCheckDate())); list.add(specialTaskLogReportDTO); } -// logger.info("【【原始数据】】" + JSONObject.toJSONString(list)); - System.out.println("【【原始数据】】" + JSONObject.toJSONString(list)); + logger.info("TASKLOG【【原始数据】】" + JSONObject.toJSONString(list)); + //System.out.println("TASKLOG【【原始数据】】" + JSONObject.toJSONString(list)); String AESReportUnitDate = encrypt(JSONObject.toJSONString(list), key.getBytes(), iv.getBytes()); // logger.info("【【AES加密结果】】"+ AESReportUnitDate);{0JRK`$6X.jpg)min/Desktop/所有桌面文件存放/9}AM56M10$6WX){0JRK`$6X.jpg) StringBuffer checkTaskResultBuffer = null; @@ -160,7 +153,7 @@ OutputStream os = con.getOutputStream(); Map paraMap = new HashMap(); paraMap.put("data", AESReportUnitDate); /**封装数据*/ - System.out.println("【【加密请求体】】" + JSONArray.toJSON(paraMap).toString()); + logger.info("TASKLOG【【加密请求体】】" + JSONArray.toJSON(paraMap).toString()); //组装入参,设置请求体 os.write(JSON.toJSONString(paraMap).getBytes()); @@ -175,8 +168,8 @@ while ((line = buffer.readLine()) != null) { checkTaskResultBuffer.append(line); } -// logger.info("result:" + unitResultBuffer.toString()); - System.out.println("result:" + checkTaskResultBuffer.toString()); + logger.info("TASKLOG[]result:" + checkTaskResultBuffer.toString()); +// System.out.println("result:" + checkTaskResultBuffer.toString()); } } catch (Exception e) { @@ -196,7 +189,7 @@ } } LocalDateTime nowDate = LocalDateTime.now(); - logger.info("【任务】数据上报结果:" + CJOverhaulLogResult.getCode()); + logger.info("TASKLOG【任务】数据上报结果:" + CJOverhaulLogResult.getCode()); //设置所有数据上报成功 if (CJOverhaulLogResult.getCode().equals(CJReportEnum.SUCCESS.getCode()) || CJOverhaulLogResult.getCode().equals(CJReportEnum.SUCESS_AND_FAIL.getCode())){ for (TbSpecialCheckTaskLog taskLog : taskLogLists) { @@ -224,10 +217,10 @@ // logger.info("【1】安全风险分析单元-数据处理完成"); - System.out.println("【任务】-数据处理完成"); + logger.info("TASKLOG【任务】-数据处理完成"); }else { // logger.info("【1】风险分析单元-无数据上报昌吉州"); - System.out.println("【任务】-无数据上报昌吉州"); + logger.info("TASKLOG【任务】-无数据上报昌吉州"); } diff --git a/src/main/resources/mybatis/doublePrevention/PreventRiskDangerInfoMapper.xml b/src/main/resources/mybatis/doublePrevention/PreventRiskDangerInfoMapper.xml index d1bfea4..52d626f 100644 --- a/src/main/resources/mybatis/doublePrevention/PreventRiskDangerInfoMapper.xml +++ b/src/main/resources/mybatis/doublePrevention/PreventRiskDangerInfoMapper.xml @@ -30,9 +30,12 @@ <!-- int updateDangerInfo(PreventRiskDangerInfo dangerInfo);--> <update id="updateDangerInfo"> + update prevent_risk_danger_info set hazard_code = #{hazardCode}, + <if test="dangerSrc != null and dangerSrc != ''"> danger_src = #{dangerSrc}, + </if> danger_desc = #{dangerDesc}, danger_reason = #{dangerReason}, hazard_danger_type = #{hazardDangerType}, diff --git a/src/main/resources/mybatis/tr/HiddenDangerCheckPointMapper.xml b/src/main/resources/mybatis/tr/HiddenDangerCheckPointMapper.xml index cfd455a..818b6eb 100644 --- a/src/main/resources/mybatis/tr/HiddenDangerCheckPointMapper.xml +++ b/src/main/resources/mybatis/tr/HiddenDangerCheckPointMapper.xml @@ -103,6 +103,8 @@ <result property="checkPerson" column="check_person"/> <result property="findTime" column="find_time"/> + <result property="dangerSrc" column="danger_src"/> +<!-- <result property="dangerSrcName" column="danger_src_name"/>--> </resultMap> @@ -132,10 +134,13 @@ c.check_type,a.company_id, b.type_cycle_num,b.type_cycle_type, a.examine_user_id, a.examine_user_name, - a.check_person, a.find_time + a.check_person, a.find_time,e.danger_src +<!-- ,f.dict_label as danger_src_name--> from tr_hidden_danger_check_point a left join tr_hidden_danger_check c on c.check_id = a.check_id left join tr_troubleshoot_type b on c.troubleshoot_type_id = b.type_id + left join prevent_risk_danger_info e on e.danger_check_point_id = a.id +<!-- left join sys_dict_data f on f.dict_value = e.danger_src and f.dict_type = 'danger_source'--> </sql> <select id="selectHiddenDangerCheckPointList" parameterType="HiddenDangerCheckPoint" @@ -148,6 +153,7 @@ <if test="planCreateUserId != null and planCreateUserId != ''">and c.plan_create_user_id = #{planCreateUserId} </if> + <if test="dangerSrc != null"> and e.danger_src = #{dangerSrc}</if> <if test="planName != null and planName != ''">and c.plan_name like concat('%', #{planName}, '%')</if> <if test="troubleshootTypeId != null ">and c.troubleshoot_type_id = #{troubleshootTypeId}</if> <if test="troubleshootTypeName != null and troubleshootTypeName != ''">and c.troubleshoot_type_name like diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerAccept/detailDangerAccept.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerAccept/detailDangerAccept.html index 30eaa12..604c76f 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerAccept/detailDangerAccept.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerAccept/detailDangerAccept.html @@ -72,6 +72,20 @@ </div> </div> </div> + <div class="col-sm-6"> + <div class="form-group"> + <label class="col-sm-3 control-label is-required">隐患来源:</label> + <div class="col-sm-8"> + <select name="dangerSrc" th:field="*{dangerSrc}" class="form-control m-b" + th:with="type=${@dict.getType('danger_source')}" + required readonly="readonly" disabled> + <option value="" disabled>--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" + th:value="${dict.dictValue}" disabled></option> + </select> + </div> + </div> + </div> </div> diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerAccept/editDangerAccept.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerAccept/editDangerAccept.html index 2ab2dcd..3c719ff 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerAccept/editDangerAccept.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerAccept/editDangerAccept.html @@ -77,6 +77,20 @@ </div> </div> </div> + <div class="col-sm-6"> + <div class="form-group"> + <label class="col-sm-3 control-label is-required">隐患来源:</label> + <div class="col-sm-8"> + <select name="dangerSrc" th:field="*{dangerSrc}" class="form-control m-b" + th:with="type=${@dict.getType('danger_source')}" + required readonly="readonly" disabled> + <option value="" disabled>--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" + th:value="${dict.dictValue}" disabled></option> + </select> + </div> + </div> + </div> </div> diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/detailDangerExamine.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/detailDangerExamine.html index 17bdc43..69e5e5b 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/detailDangerExamine.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/detailDangerExamine.html @@ -68,6 +68,21 @@ </div> </div> </div> + <div class="col-sm-6"> + <div class="form-group"> + <label class="col-sm-3 control-label is-required">隐患来源:</label> + <div class="col-sm-8"> + <select name="dangerSrc" th:field="*{dangerSrc}" class="form-control m-b" + th:with="type=${@dict.getType('danger_source')}" + required readonly="readonly" disabled> + <option value="" disabled>--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" + th:value="${dict.dictValue}" disabled></option> + </select> + </div> + </div> + </div> + </div> diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/editDangerExamine.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/editDangerExamine.html index 51a4935..ea59477 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/editDangerExamine.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/editDangerExamine.html @@ -17,8 +17,8 @@ text-align: center; } - label.error{ - position :absolute !important; + label.error { + position: absolute !important; } </style> @@ -69,8 +69,24 @@ <label class="col-sm-4 control-label ">排查方式:</label> <div class="col-sm-8" th:switch="*{checkType}"> <input value="基础清单排查" class="form-control" type="text" readonly="readonly" th:case="1"> - <input value="选择风险单元清单排查" class="form-control" type="text" readonly="readonly" th:case="2"> - <input value="选择风险单元清单排查" class="form-control" type="text" readonly="readonly" th:case="*"> + <input value="选择风险单元清单排查" class="form-control" type="text" readonly="readonly" + th:case="2"> + <input value="选择风险单元清单排查" class="form-control" type="text" readonly="readonly" + th:case="*"> + </div> + </div> + </div> + <div class="col-sm-6"> + <div class="form-group"> + <label class="col-sm-3 control-label is-required">隐患来源:</label> + <div class="col-sm-8"> + <select name="dangerSrc" th:field="*{dangerSrc}" class="form-control m-b" + th:with="type=${@dict.getType('danger_source')}" + required readonly="readonly" disabled> + <option value="" disabled>--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" + th:value="${dict.dictValue}" disabled></option> + </select> </div> </div> </div> @@ -127,7 +143,8 @@ <div class="form-group"> <label class="col-sm-4 control-label ">隐患名称:</label> <div class="col-sm-8"> - <textarea th:field="*{dangerName}" class="form-control" type="text" rows="4" readonly="readonly"></textarea> + <textarea th:field="*{dangerName}" class="form-control" type="text" rows="4" + readonly="readonly"></textarea> </div> </div> </div> @@ -156,7 +173,8 @@ <div class="form-group"> <label class="col-sm-4 control-label ">隐患描述:</label> <div class="col-sm-8"> - <textarea th:field="*{dangerDescription}" class="form-control" type="text" rows="4" readonly="readonly"></textarea> + <textarea th:field="*{dangerDescription}" class="form-control" type="text" rows="4" + readonly="readonly"></textarea> </div> </div> </div> @@ -176,7 +194,7 @@ <div class="form-group"> <label class="col-sm-4 control-label ">隐患责任部门:</label> <div class="col-sm-8"> - <input th:value="*{dangerDeptName}" class="form-control" type="text" readonly="readonly"> + <input th:value="*{dangerDeptName}" class="form-control" type="text" readonly="readonly"> </div> </div> </div> @@ -188,11 +206,11 @@ <div class="form-group"> <label class="col-sm-4 control-label ">隐患视图:</label> <div class="col-sm-8"> -<!-- <img style="width: 100px; height: 100px;cursor:pointer;"--> -<!-- title="查看图片"--> -<!-- th:src="*{preRectifyPhoto}"--> -<!-- onclick="showPicture(this.getAttribute('data-id'),'preRectifyPhoto')"--> -<!-- th:data-id="${hdcp.id}">--> + <!-- <img style="width: 100px; height: 100px;cursor:pointer;"--> + <!-- title="查看图片"--> + <!-- th:src="*{preRectifyPhoto}"--> + <!-- onclick="showPicture(this.getAttribute('data-id'),'preRectifyPhoto')"--> + <!-- th:data-id="${hdcp.id}">--> <img style="width: 100px; height: 100px;cursor:pointer;display: none" title="查看图片" class="allPics" @@ -280,11 +298,11 @@ <div class="form-group showByDangerLevelChange"> <label class="col-sm-3 control-label is-required">隐患责任整改人:</label> <div class="col-sm-8"> - <input id="rectifyUserName" name="rectifyUserName" placeholder="选择隐患责任整改人" class="form-control" type="text" onclick="selectRectifyUser()" maxlength="30" readonly="true" required> - <input id="rectifyUserId" name="rectifyUserId" type="hidden" > + <input id="rectifyUserName" name="rectifyUserName" placeholder="选择隐患责任整改人" class="form-control" + type="text" onclick="selectRectifyUser()" maxlength="30" readonly="true" required> + <input id="rectifyUserId" name="rectifyUserId" type="hidden"> </div> </div> - <div class="form-group showByDangerLevelChange"> @@ -312,25 +330,27 @@ <div class="form-group showByDangerLevelChange"> <label class="col-sm-3 control-label">风险单元:</label> <div class="col-sm-8"> - <input id="checkPointName" placeholder="选择风险单元" class="form-control" type="text" onclick="selectRiskPoint()" maxlength="30" readonly="true"> + <input id="checkPointName" placeholder="选择风险单元" class="form-control" type="text" + onclick="selectRiskPoint()" maxlength="30" readonly="true"> <input id="checkPointNum" name="hazardCode" type="hidden"> </div> </div> - <div class="form-group showByDangerLevelChange"> - <label class="col-sm-3 control-label is-required">隐患来源:</label> - <div class="col-sm-8"> - <select name="dangerSrc" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" required> - <option value="">--请选择隐患来源--</option> - <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> - </select> - </div> - </div> + <!-- <div class="form-group showByDangerLevelChange">--> + <!-- <label class="col-sm-3 control-label is-required">隐患来源:</label>--> + <!-- <div class="col-sm-8">--> + <!-- <select name="dangerSrc" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" required>--> + <!-- <option value="">--请选择隐患来源--</option>--> + <!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>--> + <!-- </select>--> + <!-- </div>--> + <!-- </div>--> <div class="form-group showByDangerLevelChange"> <label class="col-sm-3 control-label is-required">隐患类型:</label> <div class="col-sm-8"> - <select name="hazardDangerType" class="form-control m-b" th:with="type=${@dict.getType('danger_type')}" required> + <select name="hazardDangerType" class="form-control m-b" th:with="type=${@dict.getType('danger_type')}" + required> <option value="">--请选择隐患类型--</option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> </select> @@ -339,7 +359,8 @@ <div class="form-group showByDangerLevelChange"> <label class="col-sm-3 control-label is-required">隐患造成后果:</label> <div class="col-sm-8"> - <select name="dangerResult" class="form-control m-b" th:with="type=${@dict.getType('danger_result')}" required> + <select name="dangerResult" class="form-control m-b" th:with="type=${@dict.getType('danger_result')}" + required> <option value="">--请选择隐患造成后果--</option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> </select> @@ -365,7 +386,7 @@ var ids = imgsUrl.attr('data-id') var imageContainer = document.querySelector('.image-container'); - if(imageUrls && imageUrls !== '') { + if (imageUrls && imageUrls !== '') { // 将逗号分隔的字符串拆分为URL数组 var imageUrlArray = imageUrls.split(','); @@ -390,7 +411,7 @@ } /* 图片--查看 */ - function showPicture(id,type) { + function showPicture(id, type) { var showPictureUrl = "/tr/hiddenDangerCheck/dangerBase/showPicture/{type}/{id}"; var urlLast = showPictureUrl.replace("{type}", type).replace("{id}", id); $.operate.openDetailInfo("查看图片", urlLast); @@ -399,17 +420,15 @@ //切换隐患核查结果(隐患级别) $("#dangerLevel").on("change", function () { - var dangerLevel = $("#dangerLevel").val(); - if(dangerLevel=="2"){//不是隐患 + var dangerLevel = $("#dangerLevel").val(); + if (dangerLevel == "2") {//不是隐患 $(".showByDangerLevelChange").hide(); $(".showByDangerLevelChange").find(":input").attr("disabled", true); - }else{//一般隐患或重大隐患 + } else {//一般隐患或重大隐患 $(".showByDangerLevelChange").show(); $(".showByDangerLevelChange").find(":input").attr("disabled", false); } }); - - var prefix = ctx + "tr/hiddenDangerCheck/dangerExamine"; @@ -421,8 +440,8 @@ function submitHandler() { if ($.validate.form()) { var data = $('#form-hdcp-edit').serializeArray(); - var dangerLevel = $("#dangerLevel").val(); - if(dangerLevel=="0"||dangerLevel=="1") {//一般隐患或重大隐患 + var dangerLevel = $("#dangerLevel").val(); + if (dangerLevel == "0" || dangerLevel == "1") {//一般隐患或重大隐患 // var rectifyUserName = $("select[name='rectifyUserId']").find("option:selected").text();//整改人名称 // data.push({"name": "rectifyUserName", "value": rectifyUserName}); } @@ -449,10 +468,10 @@ function doSubmitBeCheckedDept(index, layero) { var tree = layero.find("iframe")[0].contentWindow.$._tree; // if ($.tree.notAllowParents(tree)) { - var body = layer.getChildFrame('body', index); - $("#rectifyDeptId").val(body.find('#treeId').val()); - $("#rectifyDeptName").val(body.find('#treeName').val()); - layer.close(index); + var body = layer.getChildFrame('body', index); + $("#rectifyDeptId").val(body.find('#treeId').val()); + $("#rectifyDeptName").val(body.find('#treeName').val()); + layer.close(index); // } } @@ -483,6 +502,7 @@ }); }); } + /*隐患责任整改人 选择 end*/ $("input[name='rectifyCompleteTime']").datetimepicker({ diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/editNextConfirm.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/editNextConfirm.html index 330ae71..6311f5f 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/editNextConfirm.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/editNextConfirm.html @@ -17,8 +17,8 @@ text-align: center; } - label.error{ - position :absolute !important; + label.error { + position: absolute !important; } </style> @@ -69,8 +69,24 @@ <label class="col-sm-4 control-label ">排查方式:</label> <div class="col-sm-8" th:switch="*{checkType}"> <input value="基础清单排查" class="form-control" type="text" readonly="readonly" th:case="1"> - <input value="选择风险单元清单排查" class="form-control" type="text" readonly="readonly" th:case="2"> - <input value="选择风险单元清单排查" class="form-control" type="text" readonly="readonly" th:case="*"> + <input value="选择风险单元清单排查" class="form-control" type="text" readonly="readonly" + th:case="2"> + <input value="选择风险单元清单排查" class="form-control" type="text" readonly="readonly" + th:case="*"> + </div> + </div> + </div> + <div class="col-sm-6"> + <div class="form-group"> + <label class="col-sm-3 control-label is-required">隐患来源:</label> + <div class="col-sm-8"> + <select name="dangerSrc" th:field="*{dangerSrc}" class="form-control m-b" + th:with="type=${@dict.getType('danger_source')}" + required readonly="readonly" disabled> + <option value="" disabled>--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" + th:value="${dict.dictValue}" disabled></option> + </select> </div> </div> </div> @@ -127,7 +143,8 @@ <div class="form-group"> <label class="col-sm-4 control-label ">隐患名称:</label> <div class="col-sm-8"> - <textarea th:field="*{dangerName}" class="form-control" type="text" rows="4" readonly="readonly"></textarea> + <textarea th:field="*{dangerName}" class="form-control" type="text" rows="4" + readonly="readonly"></textarea> </div> </div> </div> @@ -147,7 +164,8 @@ <div class="form-group"> <label class="col-sm-4 control-label ">隐患描述:</label> <div class="col-sm-8"> - <textarea th:field="*{dangerDescription}" class="form-control" type="text" rows="4" readonly="readonly"></textarea> + <textarea th:field="*{dangerDescription}" class="form-control" type="text" rows="4" + readonly="readonly"></textarea> </div> </div> </div> @@ -176,7 +194,7 @@ <div class="form-group"> <label class="col-sm-4 control-label ">隐患责任部门:</label> <div class="col-sm-8"> - <input th:value="*{dangerDeptName}" class="form-control" type="text" readonly="readonly"> + <input th:value="*{dangerDeptName}" class="form-control" type="text" readonly="readonly"> </div> </div> </div> @@ -188,11 +206,11 @@ <div class="form-group"> <label class="col-sm-4 control-label ">隐患视图:</label> <div class="col-sm-8"> -<!-- <img style="width: 100px; height: 100px;cursor:pointer;"--> -<!-- title="查看图片"--> -<!-- th:src="*{preRectifyPhoto}"--> -<!-- onclick="showPicture(this.getAttribute('data-id'),'preRectifyPhoto')"--> -<!-- th:data-id="${hdcp.id}">--> + <!-- <img style="width: 100px; height: 100px;cursor:pointer;"--> + <!-- title="查看图片"--> + <!-- th:src="*{preRectifyPhoto}"--> + <!-- onclick="showPicture(this.getAttribute('data-id'),'preRectifyPhoto')"--> + <!-- th:data-id="${hdcp.id}">--> <img style="width: 100px; height: 100px;cursor:pointer;display: none" title="查看图片" class="allPics" @@ -238,8 +256,10 @@ <div class="form-group showByDangerLevelChange"> <label class="col-sm-3 control-label is-required">选择核查人:</label> <div class="col-sm-8"> - <input id="examineUserName" name="examineUserName" placeholder="选择下一步隐患核查人" class="form-control" type="text" onclick="selectConfirmUser()" maxlength="30" readonly="true" required> - <input id="examineUserId" name="examineUserId" type="hidden" > + <input id="examineUserName" name="examineUserName" placeholder="选择下一步隐患核查人" + class="form-control" type="text" onclick="selectConfirmUser()" maxlength="30" readonly="true" + required> + <input id="examineUserId" name="examineUserId" type="hidden"> </div> </div> @@ -255,7 +275,7 @@ var ids = imgsUrl.attr('data-id') var imageContainer = document.querySelector('.image-container'); - if(imageUrls && imageUrls !== '') { + if (imageUrls && imageUrls !== '') { // 将逗号分隔的字符串拆分为URL数组 var imageUrlArray = imageUrls.split(','); @@ -280,7 +300,7 @@ } /* 图片--查看 */ - function showPicture(id,type) { + function showPicture(id, type) { var showPictureUrl = "/tr/hiddenDangerCheck/dangerBase/showPicture/{type}/{id}"; var urlLast = showPictureUrl.replace("{type}", type).replace("{id}", id); $.operate.openDetailInfo("查看图片", urlLast); @@ -288,11 +308,11 @@ //切换隐患核查结果(隐患级别) $("#dangerLevel").on("change", function () { - var dangerLevel = $("#dangerLevel").val(); - if(dangerLevel=="2"){//不是隐患 + var dangerLevel = $("#dangerLevel").val(); + if (dangerLevel == "2") {//不是隐患 $(".showByDangerLevelChange").hide(); $(".showByDangerLevelChange").find(":input").attr("disabled", true); - }else{//一般隐患或重大隐患 + } else {//一般隐患或重大隐患 $(".showByDangerLevelChange").show(); $(".showByDangerLevelChange").find(":input").attr("disabled", false); } @@ -308,8 +328,8 @@ function submitHandler() { if ($.validate.form()) { var data = $('#form-hdcp-edit').serializeArray(); - var dangerLevel = $("#dangerLevel").val(); - if(dangerLevel=="0"||dangerLevel=="1") {//一般隐患或重大隐患 + var dangerLevel = $("#dangerLevel").val(); + if (dangerLevel == "0" || dangerLevel == "1") {//一般隐患或重大隐患 // var examineUserName = $("select[name='examineUserId']").find("option:selected").text();//整改人名称 // data.push({"name": "examineUserName", "value": examineUserName}); } diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerRectify/detailDangerRectify.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerRectify/detailDangerRectify.html index aeade24..84de8e8 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerRectify/detailDangerRectify.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerRectify/detailDangerRectify.html @@ -68,6 +68,17 @@ </div> </div> </div> + <div class="col-sm-6"> + <div class="form-group"> + <label class="col-sm-4 control-label">隐患来源:</label> + <div class="col-sm-8"> + <select th:field="*{dangerSrc}" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" readonly="readonly"> + <option value="" disabled>--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" disabled></option> + </select> + </div> + </div> + </div> </div> diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerRectify/editDangerRectify.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerRectify/editDangerRectify.html index 0eddc74..5a80e2a 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerRectify/editDangerRectify.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerRectify/editDangerRectify.html @@ -118,6 +118,17 @@ </div> </div> </div> + <div class="col-sm-6"> + <div class="form-group"> + <label class="col-sm-4 control-label">隐患来源:</label> + <div class="col-sm-8"> + <select th:field="*{dangerSrc}" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" readonly="readonly"> + <option value="" disabled>--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" disabled></option> + </select> + </div> + </div> + </div> </div> diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReport.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReport.html index 0323501..61264a2 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReport.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReport.html @@ -65,7 +65,15 @@ <textarea name="dangerDescription" maxlength="500" class="form-control" rows="3" required></textarea> </div> </div> - + <div class="form-group"> + <label class="col-sm-3 control-label is-required">隐患来源:</label> + <div class="col-sm-8"> + <select name="dangerSrc" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" required> + <option value="">--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </div> + </div> <div class="form-group"> <label class="col-sm-3 control-label is-required">隐患责任部门:</label> diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReportWholeProcess.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReportWholeProcess.html index 47522e9..5ee5df8 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReportWholeProcess.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/addDangerReportWholeProcess.html @@ -97,7 +97,15 @@ </div> </div> </div> - + <div class="form-group"> + <label class="col-sm-3 control-label is-required">隐患来源:</label> + <div class="col-sm-8"> + <select name="dangerSrc" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" required> + <option value="">--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </div> + </div> <div class="form-group"> <label class="col-sm-3 control-label is-required">隐患名称:</label> @@ -320,15 +328,15 @@ </div> </div> - <div class="form-group showByDangerLevelChange"> - <label class="col-sm-3 control-label is-required">隐患来源:</label> - <div class="col-sm-8"> - <select name="dangerSrc" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" required> - <option value="">--请选择隐患来源--</option> - <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> - </select> - </div> - </div> +<!-- <div class="form-group showByDangerLevelChange">--> +<!-- <label class="col-sm-3 control-label is-required">隐患来源:</label>--> +<!-- <div class="col-sm-8">--> +<!-- <select name="dangerSrc" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" required>--> +<!-- <option value="">--请选择隐患来源--</option>--> +<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>--> +<!-- </select>--> +<!-- </div>--> +<!-- </div>--> <div class="form-group showByDangerLevelChange"> <label class="col-sm-3 control-label is-required">隐患类型:</label> diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotDanger.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotDanger.html index ccd6183..9c7d6b2 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotDanger.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotDanger.html @@ -60,8 +60,20 @@ </div> </div> </div> + <div class="col-sm-6"> + <div class="form-group"> + <label class="col-sm-4 control-label">隐患来源:</label> + <div class="col-sm-8"> + <select th:field="*{dangerSrc}" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" readonly="readonly"> + <option value="" disabled>--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" disabled></option> + </select> + </div> + </div> + </div> </div> + <div class="row"> <div class="col-sm-6"> <div class="form-group"> diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotJudge.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotJudge.html index db33369..f569ef9 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotJudge.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotJudge.html @@ -59,8 +59,20 @@ </div> </div> </div> + <div class="col-sm-6"> + <div class="form-group"> + <label class="col-sm-4 control-label">隐患来源:</label> + <div class="col-sm-8"> + <select th:field="*{dangerSrc}" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" readonly="readonly"> + <option value="" disabled>--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" disabled></option> + </select> + </div> + </div> + </div> </div> + <div class="row"> <div class="col-sm-6"> <div class="form-group"> diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailYesDanger.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailYesDanger.html index 6675c15..dc3f7af 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailYesDanger.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailYesDanger.html @@ -113,8 +113,22 @@ </div> </div> </div> + + <div class="col-sm-6"> + <div class="form-group"> + <label class="col-sm-4 control-label">隐患来源:</label> + <div class="col-sm-8"> + <select th:field="*{dangerSrc}" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" readonly="readonly"> + <option value="" disabled>--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" disabled></option> + </select> + </div> + </div> + </div> </div> + + <div class="row"> <div class="col-sm-6"> <div class="form-group"> diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/editDangerReport.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/editDangerReport.html index 1582ee4..687a51b 100644 --- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/editDangerReport.html +++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/editDangerReport.html @@ -54,7 +54,16 @@ rows="3" required></textarea> </div> </div> - + <div class="form-group"> + <label class="col-sm-3 control-label is-required">隐患来源:</label> + <div class="col-sm-8"> + <select name="dangerSrc" th:field="*{dangerSrc}" class="form-control m-b" + th:with="type=${@dict.getType('danger_source')}" required> + <option value="">--请选择隐患来源--</option> + <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> + </select> + </div> + </div> <div class="form-group"> <label class="col-sm-3 control-label is-required">隐患责任部门:</label> @@ -138,15 +147,15 @@ <textarea name="hazardCode" th:field="*{hazardCode}" maxlength="500" class="form-control" rows="3" required></textarea> </div> </div> - <div class="form-group"> - <label class="col-sm-3 control-label is-required">隐患来源:</label> - <div class="col-sm-8"> - <select name="dangerSrc" th:field="*{dangerSrc}" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" required> - <option value="">--请选择隐患来源--</option> - <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> - </select> - </div> - </div> +<!-- <div class="form-group">--> +<!-- <label class="col-sm-3 control-label is-required">隐患来源:</label>--> +<!-- <div class="col-sm-8">--> +<!-- <select name="dangerSrc" th:field="*{dangerSrc}" class="form-control m-b" th:with="type=${@dict.getType('danger_source')}" required>--> +<!-- <option value="">--请选择隐患来源--</option>--> +<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>--> +<!-- </select>--> +<!-- </div>--> +<!-- </div>--> <div class="form-group"> <label class="col-sm-3 control-label is-required">隐患类型:</label> -- Gitblit v1.9.2