Commit 69383c71 authored by 周昊's avatar 周昊

1、修改固有风险台账

parent 0275604a
...@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import com.censoft.censoftrongtong.domain.LedgerBuilding; import com.censoft.censoftrongtong.domain.LedgerBuilding;
import com.censoft.censoftrongtong.domain.RiskPlan; import com.censoft.censoftrongtong.domain.RiskPlan;
import com.censoft.censoftrongtong.domain.RiskPlanInherentList;
import com.censoft.censoftrongtong.domain.dto.RiskInherentListExportDto; import com.censoft.censoftrongtong.domain.dto.RiskInherentListExportDto;
import com.censoft.censoftrongtong.domain.dto.RiskNotificationExportWordDto; import com.censoft.censoftrongtong.domain.dto.RiskNotificationExportWordDto;
import com.censoft.censoftrongtong.domain.dto.RiskPlanAppTaskDetailsDto; import com.censoft.censoftrongtong.domain.dto.RiskPlanAppTaskDetailsDto;
...@@ -175,10 +176,10 @@ public class RiskPlanController extends BaseController ...@@ -175,10 +176,10 @@ public class RiskPlanController extends BaseController
/** /**
* 导出项目风险清单表 * 导出项目风险清单表
*/ */
@PostMapping("/exportExcel/InherentList/{planId}") @PostMapping("/exportExcel/InherentList")
public void export(@PathVariable Long planId, HttpServletResponse response) { public void export(RiskPlanInherentList riskPlanInherentList, HttpServletResponse response) {
try { try {
List<RiskInherentListExportDto> dtos = riskPlanInherentListService.getPlanInherentListByPlanId(planId); List<RiskInherentListExportDto> dtos = riskPlanInherentListService.getPlanInherentList(riskPlanInherentList);
for (RiskInherentListExportDto dto : dtos) { for (RiskInherentListExportDto dto : dtos) {
if ("1".equals(dto.getMajorHazardSource())){ if ("1".equals(dto.getMajorHazardSource())){
dto.setMajorHazardSource("是"); dto.setMajorHazardSource("是");
...@@ -193,4 +194,24 @@ public class RiskPlanController extends BaseController ...@@ -193,4 +194,24 @@ public class RiskPlanController extends BaseController
e.printStackTrace(); e.printStackTrace();
} }
} }
/**
* 查询固有风险信息列表
*/
@GetMapping("/inherentList")
public TableDataInfo list(RiskPlanInherentList riskPlanInherentList)
{
startPage();
List<RiskInherentListExportDto> dtos = riskPlanInherentListService.getPlanInherentList(riskPlanInherentList);
for (RiskInherentListExportDto dto : dtos) {
if ("1".equals(dto.getMajorHazardSource())){
dto.setMajorHazardSource("是");
}else {
dto.setMajorHazardSource("否");
dto.setHazardSourceName("/");
dto.setMajorHazardDescription("/");
}
}
return getDataTable(dtos);
}
} }
...@@ -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> getPlanInherentListByPlanId(@Param("planId") Long planId); List<RiskInherentListExportDto> getPlanInherentList(RiskPlanInherentList riskPlanInherentList);
} }
...@@ -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> getPlanInherentListByPlanId(Long planId); List<RiskInherentListExportDto> getPlanInherentList(RiskPlanInherentList riskPlanInherentList);
} }
...@@ -400,8 +400,8 @@ public class RiskPlanInherentListServiceImpl ...@@ -400,8 +400,8 @@ public class RiskPlanInherentListServiceImpl
} }
@Override @Override
public List<RiskInherentListExportDto> getPlanInherentListByPlanId(Long planId) { public List<RiskInherentListExportDto> getPlanInherentList(RiskPlanInherentList riskPlanInherentList) {
return riskPlanInherentListMapper.getPlanInherentListByPlanId(planId); return riskPlanInherentListMapper.getPlanInherentList(riskPlanInherentList);
} }
......
...@@ -413,7 +413,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -413,7 +413,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE WHERE
rpil.id = #{inherentId} rpil.id = #{inherentId}
</select> </select>
<select id="getPlanInherentListByPlanId" <select id="getPlanInherentList"
resultType="com.censoft.censoftrongtong.domain.dto.RiskInherentListExportDto"> resultType="com.censoft.censoftrongtong.domain.dto.RiskInherentListExportDto">
SELECT SELECT
sd.dept_name AS deptName, sd.dept_name AS deptName,
...@@ -448,8 +448,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -448,8 +448,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN risk_plan_inherent_list rpil ON rpil.room_id = lr.id LEFT JOIN risk_plan_inherent_list rpil ON rpil.room_id = lr.id
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
rp.id = #{planId} rpil.id IS NOT NULL
AND rpil.id IS NOT NULL <if test="name != null">and risk_plan_inherent_list.name like concat('%',#{name},'%')</if>
<if test="planId != null">and rp.id = #{name}</if>
GROUP BY rpil.id GROUP BY rpil.id
</select> </select>
</mapper> </mapper>
\ No newline at end of file
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