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); } } 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; } 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; } 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】隐患排查任务基础数据无可推数据"); } } } 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("添加隐患附属信息失败"); 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); //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));//查询未执行任务总数量并推送 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"; } 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"; } 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"; } src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java
@@ -459,6 +459,7 @@ * */ @Transient private Byte dangerSrc; // /** // * 隐患描述 // * */ 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; src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/DealDataTask.java
文件名从 src/main/java/com/ruoyi/project/tr/specialCheck/Test/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()); src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/ItemDangerReportSchedule.java
文件名从 src/main/java/com/ruoyi/project/tr/specialCheck/Test/ItemDangerReportScheduleTest.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【检查项与隐患】-无数据上报昌吉州"); } src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/SpecialCheckTaskDownload.java
文件名从 src/main/java/com/ruoyi/project/tr/specialCheck/Test/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.*; src/main/java/com/ruoyi/project/tr/specialCheck/scheduleLogTask/TaskReportSchedule.java
文件名从 src/main/java/com/ruoyi/project/tr/specialCheck/Test/TaskReportScheduleTest.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【任务】-无数据上报昌吉州"); } 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}, 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 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> 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> 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> src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/editDangerExamine.html
@@ -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> @@ -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="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> @@ -408,8 +429,6 @@ $(".showByDangerLevelChange").find(":input").attr("disabled", false); } }); var prefix = ctx + "tr/hiddenDangerCheck/dangerExamine"; @@ -483,6 +502,7 @@ }); }); } /*隐患责任整改人 选择 end*/ $("input[name='rectifyCompleteTime']").datetimepicker({ src/main/resources/templates/tr/hiddenDangerCheck/dangerExamine/editNextConfirm.html
@@ -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> @@ -238,7 +256,9 @@ <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="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> 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> 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> 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> 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> src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotDanger.html
@@ -60,7 +60,19 @@ </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"> src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotJudge.html
@@ -59,7 +59,19 @@ </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"> src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailYesDanger.html
@@ -113,7 +113,21 @@ </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"> 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>