Commit 1a9b5633 authored by 周昊's avatar 周昊

1、修改固有风险台账筛选、导出

parent 69383c71
...@@ -177,9 +177,9 @@ public class RiskPlanController extends BaseController ...@@ -177,9 +177,9 @@ public class RiskPlanController extends BaseController
* 导出项目风险清单表 * 导出项目风险清单表
*/ */
@PostMapping("/exportExcel/InherentList") @PostMapping("/exportExcel/InherentList")
public void export(RiskPlanInherentList riskPlanInherentList, HttpServletResponse response) { public void export(RiskInherentListExportDto riskInherentListExportDto, HttpServletResponse response) {
try { try {
List<RiskInherentListExportDto> dtos = riskPlanInherentListService.getPlanInherentList(riskPlanInherentList); List<RiskInherentListExportDto> dtos = riskPlanInherentListService.getPlanInherentList(riskInherentListExportDto);
for (RiskInherentListExportDto dto : dtos) { for (RiskInherentListExportDto dto : dtos) {
if ("1".equals(dto.getMajorHazardSource())){ if ("1".equals(dto.getMajorHazardSource())){
dto.setMajorHazardSource("是"); dto.setMajorHazardSource("是");
...@@ -199,10 +199,10 @@ public class RiskPlanController extends BaseController ...@@ -199,10 +199,10 @@ public class RiskPlanController extends BaseController
* 查询固有风险信息列表 * 查询固有风险信息列表
*/ */
@GetMapping("/inherentList") @GetMapping("/inherentList")
public TableDataInfo list(RiskPlanInherentList riskPlanInherentList) public TableDataInfo list(RiskInherentListExportDto riskInherentListExportDto)
{ {
startPage(); startPage();
List<RiskInherentListExportDto> dtos = riskPlanInherentListService.getPlanInherentList(riskPlanInherentList); List<RiskInherentListExportDto> dtos = riskPlanInherentListService.getPlanInherentList(riskInherentListExportDto);
for (RiskInherentListExportDto dto : dtos) { for (RiskInherentListExportDto dto : dtos) {
if ("1".equals(dto.getMajorHazardSource())){ if ("1".equals(dto.getMajorHazardSource())){
dto.setMajorHazardSource("是"); dto.setMajorHazardSource("是");
......
...@@ -120,4 +120,9 @@ public class RiskInherentListExportDto { ...@@ -120,4 +120,9 @@ public class RiskInherentListExportDto {
* 判定依据 * 判定依据
*/ */
private String referenceBasis; private String referenceBasis;
/**
* 任务id
*/
private Long planId;
} }
...@@ -73,5 +73,5 @@ public interface RiskPlanInherentListMapper extends MPJBaseMapper<RiskPlanInher ...@@ -73,5 +73,5 @@ public interface RiskPlanInherentListMapper extends MPJBaseMapper<RiskPlanInher
RiskNotificationExportWordDto getRiskNotificationExportWordDto(@Param("inherentId") Long inherentId); RiskNotificationExportWordDto getRiskNotificationExportWordDto(@Param("inherentId") Long inherentId);
List<RiskInherentListExportDto> getPlanInherentList(RiskPlanInherentList riskPlanInherentList); List<RiskInherentListExportDto> getPlanInherentList(RiskInherentListExportDto riskInherentListExportDto);
} }
...@@ -77,5 +77,5 @@ public interface IRiskPlanInherentListService extends MPJBaseService<RiskPlanInh ...@@ -77,5 +77,5 @@ public interface IRiskPlanInherentListService extends MPJBaseService<RiskPlanInh
void exportPlanInherentList(HttpServletResponse response,List<RiskInherentListExportDto> dtos) throws IOException; void exportPlanInherentList(HttpServletResponse response,List<RiskInherentListExportDto> dtos) throws IOException;
List<RiskInherentListExportDto> getPlanInherentList(RiskPlanInherentList riskPlanInherentList); List<RiskInherentListExportDto> getPlanInherentList(RiskInherentListExportDto riskInherentListExportDto);
} }
...@@ -400,8 +400,8 @@ public class RiskPlanInherentListServiceImpl ...@@ -400,8 +400,8 @@ public class RiskPlanInherentListServiceImpl
} }
@Override @Override
public List<RiskInherentListExportDto> getPlanInherentList(RiskPlanInherentList riskPlanInherentList) { public List<RiskInherentListExportDto> getPlanInherentList(RiskInherentListExportDto riskInherentListExportDto) {
return riskPlanInherentListMapper.getPlanInherentList(riskPlanInherentList); return riskPlanInherentListMapper.getPlanInherentList(riskInherentListExportDto);
} }
......
...@@ -449,7 +449,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -449,7 +449,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN risk_plan_existing_list rpel ON rpel.inherent_id = rpil.id LEFT JOIN risk_plan_existing_list rpel ON rpel.inherent_id = rpil.id
WHERE WHERE
rpil.id IS NOT NULL rpil.id IS NOT NULL
<if test="name != null">and risk_plan_inherent_list.name like concat('%',#{name},'%')</if> <if test="deptName != null and deptName != ''">and sd.dept_name like concat('%',#{deptName},'%')</if>
<if test="projectName != null and projectName != ''">and lp.name like concat('%',#{projectName},'%')</if>
<if test="city != null and city != ''">and lp.city like concat('%',#{city},'%')</if>
<if test="businessFormat != null and businessFormat != ''">and lp.business like concat('%',#{businessFormat},'%')</if>
<if test="inherentName != null and inherentName != ''">and rpil.`name` like concat('%',#{inherentName},'%')</if>
<if test="inherentLevel != null and inherentLevel != ''">and rpil.`level` like concat('%',#{inherentLevel},'%')</if>
<if test="existingName != null and existingName != ''">and rpel.`name` like concat('%',#{existingName},'%')</if>
<if test="existingLevel != null and existingLevel != ''">and rpel.`level` like concat('%',#{existingLevel},'%')</if>
<if test="presenceLocation != null and presenceLocation != ''">and rpil.presence_location like concat('%',#{presenceLocation},'%')</if>
<if test="listType != null and listType != ''">and rpil.type like concat('%',#{listType},'%')</if>
<if test="planId != null">and rp.id = #{name}</if> <if test="planId != null">and rp.id = #{name}</if>
GROUP BY rpil.id GROUP BY rpil.id
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment