Commit e193fcb0 authored by 周昊's avatar 周昊

1、修改详情接口 添加单个楼宇情况

parent 12aec5aa
...@@ -211,8 +211,8 @@ public class RiskPlanAppController extends BaseController { ...@@ -211,8 +211,8 @@ public class RiskPlanAppController extends BaseController {
* @real_return {@link R<RiskPlanAppDetailsDto>} * @real_return {@link R<RiskPlanAppDetailsDto>}
*/ */
@GetMapping("/details/{planId}") @GetMapping("/details/{planId}")
public R<RiskPlanAppDetailsDto> getRiskPlanAppDetailsDtoByPlanId(@PathVariable("planId") Long planId) { public R<RiskPlanAppDetailsDto> getRiskPlanAppDetailsDtoByPlanId(@PathVariable("planId") Long planId,Long buildingId) {
return R.ok(riskPlanService.getRiskPlanAppDetailsDtoByPlanId(planId)); return R.ok(riskPlanService.getRiskPlanAppDetailsDtoByPlanId(planId,buildingId));
} }
/** /**
......
...@@ -69,7 +69,8 @@ public interface RiskPlanMapper ...@@ -69,7 +69,8 @@ public interface RiskPlanMapper
RiskPlanAppTaskDetailsDto getRiskPlanAppTaskDetailsDtoByPlanId(@Param("planId") Long planId); RiskPlanAppTaskDetailsDto getRiskPlanAppTaskDetailsDtoByPlanId(@Param("planId") Long planId);
List<RiskPlanAppRiskBuildingListDto> getRiskBuildingListDtoByPlanId(@Param("planId") Long planId); List<RiskPlanAppRiskBuildingListDto> getRiskBuildingListDtoByPlanId(@Param("planId") Long planId
,@Param("buildingId") Long buildingId);
List<RiskPlanAppApproveListDto> getApproveListDtoByPlanId(@Param("planId") Long planId); List<RiskPlanAppApproveListDto> getApproveListDtoByPlanId(@Param("planId") Long planId);
} }
...@@ -69,7 +69,7 @@ public interface IRiskPlanService ...@@ -69,7 +69,7 @@ public interface IRiskPlanService
List<RiskPlanAppListDto> getRiskPlanAppListDtoList(List<RiskPlanStatusType> statusList, Long createUserId, Long leaderUserId); List<RiskPlanAppListDto> getRiskPlanAppListDtoList(List<RiskPlanStatusType> statusList, Long createUserId, Long leaderUserId);
RiskPlanAppDetailsDto getRiskPlanAppDetailsDtoByPlanId(Long planId); RiskPlanAppDetailsDto getRiskPlanAppDetailsDtoByPlanId(Long planId,Long buildingId);
List<LedgerBuilding> getBuildingListByPlanId(Long planId); List<LedgerBuilding> getBuildingListByPlanId(Long planId);
......
...@@ -172,16 +172,20 @@ public class RiskPlanServiceImpl implements IRiskPlanService { ...@@ -172,16 +172,20 @@ public class RiskPlanServiceImpl implements IRiskPlanService {
} }
@Override @Override
public RiskPlanAppDetailsDto getRiskPlanAppDetailsDtoByPlanId(Long planId) { public RiskPlanAppDetailsDto getRiskPlanAppDetailsDtoByPlanId(Long planId,Long buildingId) {
//获取任务单基础信息 //获取任务单基础信息
RiskPlanAppDetailsDto dto = riskPlanMapper.getRiskPlanAppDetailsDtoByPlanId(planId); RiskPlanAppDetailsDto dto = riskPlanMapper.getRiskPlanAppDetailsDtoByPlanId(planId);
dto.setStatus(RiskPlanStatusType.getTitleByStatus(dto.getStatusKey()).getTitle()); dto.setStatus(RiskPlanStatusType.getTitleByStatus(dto.getStatusKey()).getTitle());
//获取任务详情 //获取任务详情
dto.setDetailsDto(riskPlanMapper.getRiskPlanAppTaskDetailsDtoByPlanId(planId)); dto.setDetailsDto(riskPlanMapper.getRiskPlanAppTaskDetailsDtoByPlanId(planId));
if (buildingId != null) {
LedgerBuilding ledgerBuilding = ledgerBuildingService.selectLedgerBuildingById(buildingId);
dto.getDetailsDto().setBuildingNames(ledgerBuilding.getName());
}
//风险清单 //风险清单
dto.setRiskBuildingListDtos(riskPlanMapper.getRiskBuildingListDtoByPlanId(planId)); dto.setRiskBuildingListDtos(riskPlanMapper.getRiskBuildingListDtoByPlanId(planId,buildingId));
//审批记录 //审批记录
dto.setApproveListDtos(riskPlanMapper.getApproveListDtoByPlanId(planId)); dto.setApproveListDtos(riskPlanMapper.getApproveListDtoByPlanId(planId));
......
...@@ -151,6 +151,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -151,6 +151,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND lf.del_flag = '0' AND lf.del_flag = '0'
AND lr.`status` = '0' AND lr.`status` = '0'
AND lr.del_flag = '0' AND lr.del_flag = '0'
<if test="buildingId != null">
AND lb.id = #{buildingId}
</if>
GROUP BY GROUP BY
lb.id lb.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