src/main/java/com/ruoyi/doublePrevention/entity/dto/req/RiskAndPeopleInfoReqBO.java
@@ -12,4 +12,6 @@ private String hazardName; private String hazardRank; private Long id; } src/main/java/com/ruoyi/doublePrevention/repository/RiskAndPeopleInfoRepository.java
@@ -12,4 +12,6 @@ public interface RiskAndPeopleInfoRepository extends BaseMapper<RiskAndPeopleInfo> { List<RiskAndPeopleInfo> listRiskAndPeoplePage(@Param("reqBO") RiskAndPeopleInfoReqBO reqBO); RiskAndPeopleInfo selectRiskAndPeopleInfoById(Long id); } src/main/java/com/ruoyi/doublePrevention/service/baseService/RiskAndPeopleInfoService.java
@@ -9,4 +9,6 @@ public interface RiskAndPeopleInfoService extends IService<RiskAndPeopleInfo> { ResultVO<RiskAndPeopleInfoRespDTO> listRiskAndPeoplePage(RiskAndPeopleInfoReqBO reqBO); RiskAndPeopleInfo selectRiskAndPeopleInfoById(Long id); } src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/RiskAndPeopleInfoServiceImpl.java
@@ -155,4 +155,10 @@ return resultVO; } @Override public RiskAndPeopleInfo selectRiskAndPeopleInfoById(Long id) { return repository.selectRiskAndPeopleInfoById(id); } } src/main/java/com/ruoyi/project/tr/selectRiskAndPeopleInfo/controller/selectRiskAndPeopleInfoController.java
@@ -1,5 +1,6 @@ package com.ruoyi.project.tr.selectRiskAndPeopleInfo.controller; import com.ruoyi.doublePrevention.entity.RiskAndPeopleInfo; import com.ruoyi.doublePrevention.entity.dto.req.RiskAndPeopleInfoReqBO; import com.ruoyi.doublePrevention.entity.dto.req.RiskOldInfoQueryReqDTO; import com.ruoyi.doublePrevention.entity.dto.resp.RiskAndPeopleInfoRespDTO; @@ -9,14 +10,12 @@ import com.ruoyi.doublePrevention.vo.ResultVO; import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.project.tr.hiddenDangerCheck.domain.HiddenDangerCheck; import com.ruoyi.project.tr.hiddenDangerCheckPoint.service.IHiddenDangerCheckPointService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -26,10 +25,10 @@ * @date 2020-05-08 */ @Controller @RequestMapping("/tr/selectRiskAndPeoplePage") @RequestMapping("/tr/riskAndPeopleInfo") public class selectRiskAndPeopleInfoController extends BaseController { private String prefix = "tr/selectRiskAndPeoplePage"; private String prefix = "tr/riskAndPeopleInfo"; @Autowired private RiskAndPeopleInfoService riskAndPeopleInfoService; @@ -51,7 +50,6 @@ @GetMapping("/getCountInfo") public String countInfo(RiskAndPeopleInfoReqBO reqBO, ModelMap mmap) { System.out.println("11111111111111111111111111111111111111111"); // ResultVO resultVO = new ResultVO<>(); // resultVO.setCode("200"); // resultVO.setMsg("查询成功"); @@ -110,6 +108,13 @@ } @GetMapping("/detailRiskAndPeopleInfo/{id}") public String detailDangerPlanFormulate(@PathVariable("id") Long id, ModelMap mmap) { RiskAndPeopleInfo riskAndPeopleInfo = riskAndPeopleInfoService.selectRiskAndPeopleInfoById(id); mmap.put("riskAndPeopleInfo", riskAndPeopleInfo); return prefix + "/detailRiskAndPeopleInfo"; } } src/main/resources/mybatis/doublePrevention/RiskAndPeopleMapper.xml
@@ -50,6 +50,14 @@ <if test="reqBO.hazardRank != null and reqBO.hazardRank != '' "> and hazard_rank = #{reqBO.hazardRank} </if> <if test="reqBO.id != null and reqBO.id != '' "> and id = #{reqBO.id} </if> </select> <select id="selectRiskAndPeopleInfoById" resultMap="Result"> select * from risk_and_people_info where delete_status = 0 and id = #{id} </select> src/main/resources/templates/tr/riskAndPeopleInfo/detailRiskAndPeopleInfo.html
@@ -6,7 +6,7 @@ </head> <body class="white-bg"> <div class="wrapper wrapper-content animated fadeInRight ibox-content"> <form class="form-horizontal m" id="form-riskCheckPoint-edit" th:object="${riskCheckPoint}"> <form class="form-horizontal m" id="form-riskCheckPoint-edit" th:object="${riskAndPeopleInfo}"> <input name="checkPointId" th:field="*{id}" type="hidden"> <!--现有分值--> @@ -61,25 +61,5 @@ </div> <th:block th:include="include :: footer" /> <th:block th:include="include :: datetimepicker-js" /> <script type="text/javascript"> var prefix = ctx + "/detailRiskAndPeopleInfo"; $("#form-riskCheckPoint-edit").validate({ focusCleanup: true }); function submitHandler() { if ($.validate.form()) { $.operate.save(prefix + "/edit", $('#form-riskCheckPoint-edit').serialize()); } } $("input[name='reviewTime']").datetimepicker({ format: "yyyy-mm-dd", minView: "month", autoclose: true }); </script> </body> </html> src/main/resources/templates/tr/riskAndPeopleInfo/riskAndPeopleInfo.html
@@ -73,7 +73,7 @@ </div> <th:block th:include="include :: footer"/> <script th:inline="javascript"> var prefix = ctx + "tr/selectRiskAndPeoplePage"; var prefix = ctx + "tr/riskAndPeopleInfo"; $(function () { $("#count").text([[${count}]]); @@ -99,9 +99,15 @@ // exportUrl: prefix + "/export", detailUrl: prefix + "/detailRiskAndPeopleInfo/{id}", modalName: "包保责任制", detailView: true, detailFormatter: detailFormatter, columns: [ { field: 'id', title: 'id', }, { field: 'areaCode', title: '行政区划', }, { field: 'companyName', title: '企业名称', @@ -126,34 +132,19 @@ field: 'parkName', title: '所在园区' }, // { // title: '操作', // align: 'center', // formatter: function (value, row, index) { // var actions = []; // actions.push('<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-search"></i>查看</a> '); // return actions.join(''); // } // } { title: '操作', align: 'center', formatter: function (value, row, index) { var actions = []; actions.push('<a class="btn btn-default btn-xs " href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-search"></i>查看</a> '); return actions.join(''); } } ] }; $.table.init(options); }); function detailFormatter(index, row) { var html = []; html.push('<p><b>id:</b> ' + row.id + '</p>'); html.push('<p><b>行政区划:</b> ' + row.areaCode + '</p>'); html.push('<p><b>企业名称:</b> ' + row.companyName + '</p>'); html.push('<p><b>企业类型:</b> ' + row.companyNatureName + '</p>'); html.push('<p><b>危险源编码:</b> ' + row.hazardCode + '</p>'); html.push('<p><b>危险源名称:</b> ' + row.hazardName + '</p>'); html.push('<p><b>危险级别:</b> ' + row.hazardRankName + '</p>'); html.push('<p><b>所在园区:</b> ' + row.parkName + '</p>'); // $.each(row, function(key, value) { // html.push('<p><b>' + key + ':</b> ' + value + '</p>'); // }); return html.join(''); } </script> </body> </html>