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

1、修改固有风险台账

parent 0275604a
......@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.convert.Convert;
import com.censoft.censoftrongtong.domain.LedgerBuilding;
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.RiskNotificationExportWordDto;
import com.censoft.censoftrongtong.domain.dto.RiskPlanAppTaskDetailsDto;
......@@ -175,10 +176,10 @@ public class RiskPlanController extends BaseController
/**
* 导出项目风险清单表
*/
@PostMapping("/exportExcel/InherentList/{planId}")
public void export(@PathVariable Long planId, HttpServletResponse response) {
@PostMapping("/exportExcel/InherentList")
public void export(RiskPlanInherentList riskPlanInherentList, HttpServletResponse response) {
try {
List<RiskInherentListExportDto> dtos = riskPlanInherentListService.getPlanInherentListByPlanId(planId);
List<RiskInherentListExportDto> dtos = riskPlanInherentListService.getPlanInherentList(riskPlanInherentList);
for (RiskInherentListExportDto dto : dtos) {
if ("1".equals(dto.getMajorHazardSource())){
dto.setMajorHazardSource("是");
......@@ -193,4 +194,24 @@ public class RiskPlanController extends BaseController
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
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
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
}
@Override
public List<RiskInherentListExportDto> getPlanInherentListByPlanId(Long planId) {
return riskPlanInherentListMapper.getPlanInherentListByPlanId(planId);
public List<RiskInherentListExportDto> getPlanInherentList(RiskPlanInherentList riskPlanInherentList) {
return riskPlanInherentListMapper.getPlanInherentList(riskPlanInherentList);
}
......
......@@ -413,7 +413,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
rpil.id = #{inherentId}
</select>
<select id="getPlanInherentListByPlanId"
<select id="getPlanInherentList"
resultType="com.censoft.censoftrongtong.domain.dto.RiskInherentListExportDto">
SELECT
sd.dept_name AS deptName,
......@@ -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_existing_list rpel ON rpel.inherent_id = rpil.id
WHERE
rp.id = #{planId}
AND 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="planId != null">and rp.id = #{name}</if>
GROUP BY rpil.id
</select>
</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