src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckScoreAndDangerLogController.java
@@ -113,6 +113,19 @@ return prefix + "/edit"; } @GetMapping("/detail/{id}") public String detail(@PathVariable("id") Long indexId, ModelMap mmap) { TbSpecialCheckScoreAndDangerLog specialCheckItem = scoreAndDangerDangerLogService.getSpecialCheckScoreAndDangerLogByIndexId(indexId); mmap.put("specialCheckItem",specialCheckItem); // TbBaseCheckTaskBO tbBaseCheckTaskBO = new TbBaseCheckTaskBO(); // ResultVO<List<TbBaseCheckTask>> listResultVO = tbBaseCheckService.selectTbBaseCheckTaskPage(tbBaseCheckTaskBO); // Object data = listResultVO.getData(); // mmap.put("tbBaseCheckTask", data); return prefix + "/edit"; } /** * 修改保存 */ src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckTaskLogController.java
@@ -1,5 +1,6 @@ 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; @@ -9,6 +10,9 @@ 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; @@ -124,6 +128,25 @@ } /** * 事故信息详情 */ @GetMapping("/detail/{indexId}") public String detail(@PathVariable("indexId") Long indexId, ModelMap mmap) { TbSpecialCheckTaskLog specialCheckTaskLog = specialCheckTaskService.getSpecialCheckTaskLogByIndexId(indexId); TbSpecialCheckTaskLogDateDTO tbSpecialCheckTaskLogDateDTO = BeanCopyUtils.copyBean(specialCheckTaskLog, TbSpecialCheckTaskLogDateDTO.class); Instant instant = specialCheckTaskLog.getCheckDate().atZone(ZoneId.systemDefault()).toInstant(); tbSpecialCheckTaskLogDateDTO.setCheckDate(Date.from(instant)); mmap.put("specialCheckTaskLog",tbSpecialCheckTaskLogDateDTO); List<RiskList> riskList = riskListService.listHazardSource(); mmap.put("hazardList", riskList); List<TbBaseCheckTask> listResult = tbBaseCheckService.listTbBaseCheckTask(); mmap.put("tbBaseCheckTask", listResult); return prefix + "/edit"; } /** * 修改保存 */ @PostMapping("/edit") src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/detail.html
@@ -6,17 +6,17 @@ </head> <body class="white-bg"> <div class="wrapper wrapper-content animated fadeInRight ibox-content"> <form class="form-horizontal m" id="form-job-edit" th:object="${specialCheckTaskLog}"> <form class="form-horizontal m" id="form-job-edit" th:object="${specialCheckItem}"> <input id="indexId" name="indexId" type="hidden" th:field="*{indexId}"/> <!-- <input id="createUserId" name="createUserId" type="hidden" th:field="*{createUserId}"/>--> <!-- <input id="createBy" name="createBy" type="hidden" th:field="*{createBy}"/>--> <div class="form-group"> <label class="col-sm-3 control-label is-required">风险分析对象:</label> <label class="col-sm-3 control-label is-required">关联隐患:</label> <div class="col-sm-8"> <select id="hazardCode" name="hazardCode" th:field="*{hazardCode}" class="form-control" required readonly="readonly"> <option th:each="hazard : ${hazardList}" th:text="${hazard.riskListName}" th:value="${hazard.riskListNum}"></option> <select id="dangerId" name="dangerId" th:field="*{dangerId}" class="form-control" required readonly="readonly"> <option th:each="danger : ${dangerList}" th:text="${danger.dangerName}" th:value="${danger.id}"></option> </select> </div> </div> @@ -37,29 +37,35 @@ <div class="col-sm-8"> <div class="input-group date"> <span class="input-group-addon"><i class="fa fa-calendar"></i></span> <input name="checkDate" th:value="${#dates.format(specialCheckTaskLog.checkDate, 'yyyy-MM-dd')}" class="form-control" type="text" required readonly="readonly"> <input name="checkDate" th:value="${#dates.format(specialCheckItem.checkDate, 'yyyy-MM-dd')}" class="form-control" type="text" required readonly="readonly"> </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label is-required">是否停产整顿:</label> <label class="col-sm-3 control-label is-required">危害类型:</label> <div class="col-sm-8"> <select name="resultStatus" th:field="*{resultStatus}" class="form-control m-b" required id="resultStatus" readonly="readonly"> <select name="harmType" th:field="*{harmType}" class="form-control m-b" required id="harmType" readonly="readonly"> <option value="">请选择</option> <option value="0">否</option> <option value="1">是</option> <option value="1">事故隐患</option> <option value="2">火灾隐患</option> </select> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label is-required">罚款金额(元):</label> <div class="col-sm-8"> <input class="form-control" th:field="*{checkPay}" type="number" name="checkPay" id="checkPay" required readonly="readonly"> </div> </div> <!-- <input id="jobGroup" name="jobGroup" type="hidden" value="specialCheckTaskLog"/>--> <!-- <input id="jobGroup" name="jobGroup" type="hidden" value="specialCheckItem"/>--> </form> </div> <th:block th:include="include :: footer"/> <th:block th:include="include :: datetimepicker-js"/> <script th:inline="javascript"> var prefix = ctx + "tr/specialCheckTaskLog"; var prefix = ctx + "tr/TBSpecialCheckScoreAndDangerLog"; $("input[name='checkDate']").datetimepicker({ format: "yyyy-mm-dd", src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/edit.html
@@ -6,8 +6,8 @@ </head> <body class="white-bg"> <div class="wrapper wrapper-content animated fadeInRight ibox-content"> <form class="form-horizontal m" id="form-job-edit" th:object="${specialCheckTaskLog}"> <input id="id" name="id" type="hidden" th:field="*{id}"/> <form class="form-horizontal m" id="form-job-edit" th:object="${specialCheckItem}"> <input id="indexId" name="indexId" type="hidden" th:field="*{indexId}"/> <!-- <input id="createUserId" name="createUserId" type="hidden" th:field="*{createUserId}"/>--> @@ -15,8 +15,8 @@ <div class="form-group"> <label class="col-sm-3 control-label is-required">关联隐患:</label> <div class="col-sm-8"> <select id="hazardCode" name="hazardCode" th:field="*{hazardCode}" class="form-control" required> <option th:each="hazard : ${hazardList}" th:text="${hazard.riskListName}" th:value="${hazard.riskListNum}"></option> <select id="dangerId" name="dangerId" th:field="*{dangerId}" class="form-control" required> <option th:each="danger : ${dangerList}" th:text="${danger.dangerName}" th:value="${danger.id}"></option> </select> </div> </div> @@ -37,14 +37,14 @@ <div class="col-sm-8"> <div class="input-group date"> <span class="input-group-addon"><i class="fa fa-calendar"></i></span> <input name="checkDate" th:value="${#dates.format(specialCheckTaskLog.checkDate, 'yyyy-MM-dd')}" class="form-control" type="text" required> <input name="checkDate" th:value="${#dates.format(specialCheckItem.checkDate, 'yyyy-MM-dd')}" class="form-control" type="text" required> </div> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label is-required">危害类型:</label> <div class="col-sm-8"> <select name="checkType" th:field="*{checkType}" class="form-control m-b" required id="checkType"> <select name="harmType" th:field="*{harmType}" class="form-control m-b" required id="harmType"> <option value="">请选择</option> <option value="1">事故隐患</option> <option value="2">火灾隐患</option> @@ -54,17 +54,17 @@ <div class="form-group"> <label class="col-sm-3 control-label is-required">罚款金额(元):</label> <div class="col-sm-8"> <input class="form-control" th:field="*{jobName}" type="number" name="jobName" id="jobName" required> <input class="form-control" th:field="*{checkPay}" type="number" name="checkPay" id="checkPay" required> </div> </div> <!-- <input id="jobGroup" name="jobGroup" type="hidden" value="specialCheckTaskLog"/>--> <!-- <input id="jobGroup" name="jobGroup" type="hidden" value="specialCheckItem"/>--> </form> </div> <th:block th:include="include :: footer"/> <th:block th:include="include :: datetimepicker-js"/> <script th:inline="javascript"> var prefix = ctx + "tr/tbBaseCheckScore"; var prefix = ctx + "tr/TBSpecialCheckScoreAndDangerLog"; $("input[name='checkDate']").datetimepicker({ format: "yyyy-mm-dd", src/main/resources/templates/tr/TBSpecialCheckScoreAndDangerLog/specialCheckScoreAndDangerLog.html
@@ -45,7 +45,7 @@ </div> <div class="btn-group-sm" id="toolbar" role="group"> <a class="btn btn-success" onclick="$.operate.add()"> <i class="fa fa-plus"></i> 新增 <i class="fa fa-plus"></i> 新增评分 </a> </div> <div class="col-sm-12 select-table table-striped"> @@ -137,8 +137,8 @@ align: 'center', formatter: function (value, row, index) { var actions = []; actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-search"></i>详情</a> '); actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.indexId + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.indexId + '\')"><i class="fa fa-search"></i>详情</a> '); return actions.join(''); } }