Loading censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/RiskPlanAppController.java +10 −2 Original line number Original line Diff line number Diff line Loading @@ -198,7 +198,7 @@ public class RiskPlanAppController extends BaseController { ,RiskPlanStatusType.PROJECT_REPORT,RiskPlanStatusType.FINISH); ,RiskPlanStatusType.PROJECT_REPORT,RiskPlanStatusType.FINISH); state = "已完成"; state = "已完成"; } } List<RiskPlanAppListDto> list = riskPlanService.getRiskPlanAppListDtoList(statusList, getUserId(),null,null); List<RiskPlanAppListDto> list = riskPlanService.getRiskPlanAppListDtoList(statusList, null,getUserId(),null); String finalState = state; String finalState = state; list.forEach(dto -> { list.forEach(dto -> { Long finishNumber = riskPlanUserBuildingService.countStatusByPlanIdAndStatus(dto.getId(), "finish"); Long finishNumber = riskPlanUserBuildingService.countStatusByPlanIdAndStatus(dto.getId(), "finish"); Loading Loading @@ -476,7 +476,15 @@ public class RiskPlanAppController extends BaseController { */ */ @GetMapping("/approve/list") @GetMapping("/approve/list") public R<List<RiskPlanAppListDto>> getRiskPlanAppListDtoListByApproveUser(String status) { public R<List<RiskPlanAppListDto>> getRiskPlanAppListDtoListByApproveUser(String status) { return R.ok(riskPlanService.getRiskPlanAppListDtoListByApproveUser(getUserId(),status)); String result = null; if ("completed".equals(status)){ status = "completed"; result = "1"; }else if ("return".equals(status)){ status = "completed"; result = "0"; } return R.ok(riskPlanService.getRiskPlanAppListDtoListByApproveUser(getUserId(),status,result)); } } Loading censoft-rongtong/src/main/java/com/censoft/censoftrongtong/mapper/RiskPlanMapper.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -76,7 +76,8 @@ public interface RiskPlanMapper List<RiskPlanAppApproveListDto> getApproveListDtoByPlanId(@Param("planId") Long planId); List<RiskPlanAppApproveListDto> getApproveListDtoByPlanId(@Param("planId") Long planId); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(@Param("userId") Long userId,@Param("status") String status); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(@Param("userId") Long userId ,@Param("status") String status,@Param("result") String result); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByCreateUserDeptId(@Param("deptId") Long deptId); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByCreateUserDeptId(@Param("deptId") Long deptId); } } censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/IRiskPlanService.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -78,7 +78,7 @@ public interface IRiskPlanService int revokeByPlanId(Long planId, Long userId); int revokeByPlanId(Long planId, Long userId); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(Long userId,String status); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(Long userId,String status,String result); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByCreateUserDeptId(Long deptId); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByCreateUserDeptId(Long deptId); } } censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/impl/RiskPlanServiceImpl.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -225,7 +225,8 @@ public class RiskPlanServiceImpl implements IRiskPlanService { if ("0".equals(appApproveDto.getTaskResult())) { if ("0".equals(appApproveDto.getTaskResult())) { //组长退回 //组长退回 if (riskPlan.getStatus().equals(RiskPlanStatusType.WAIT_LEADER_APPROVE.getStatus())){ if (riskPlan.getStatus().equals(RiskPlanStatusType.WAIT_LEADER_APPROVE.getStatus()) ||riskPlan.getStatus().equals(RiskPlanStatusType.WAIT_LEADER_RETURN.getStatus())){ //如果是组长审批 同时退回修改 楼宇单子的状态 //如果是组长审批 同时退回修改 楼宇单子的状态 riskPlanUserBuildingService.updateByRiskPlanAppApproveBuildingDto(appApproveDto.getId(),appApproveDto.getUserId() riskPlanUserBuildingService.updateByRiskPlanAppApproveBuildingDto(appApproveDto.getId(),appApproveDto.getUserId() ,appApproveDto.getBuildingDtos()); ,appApproveDto.getBuildingDtos()); Loading Loading @@ -334,9 +335,9 @@ public class RiskPlanServiceImpl implements IRiskPlanService { } } @Override @Override public List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(Long userId,String status) { public List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(Long userId,String status,String result) { //查询并把状态值转化为状态名称 //查询并把状态值转化为状态名称 return riskPlanMapper.getRiskPlanAppListDtoListByApproveUser(userId,status) return riskPlanMapper.getRiskPlanAppListDtoListByApproveUser(userId,status,result) .stream() .stream() .map(dto -> { .map(dto -> { String statusName = RiskPlanStatusType.getTitleByStatus(dto.getStatus()).getTitle(); String statusName = RiskPlanStatusType.getTitleByStatus(dto.getStatus()).getTitle(); Loading censoft-rongtong/src/main/resources/mapper/system/RiskPlanMapper.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -198,6 +198,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <if test="status != null and status != '' "> <if test="status != null and status != '' "> and rpt.`status` = #{status} and rpt.`status` = #{status} </if> </if> <if test="result != null and result != '' "> and rpt.task_result = #{result} </if> </where> </where> GROUP BY GROUP BY Loading Loading
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/RiskPlanAppController.java +10 −2 Original line number Original line Diff line number Diff line Loading @@ -198,7 +198,7 @@ public class RiskPlanAppController extends BaseController { ,RiskPlanStatusType.PROJECT_REPORT,RiskPlanStatusType.FINISH); ,RiskPlanStatusType.PROJECT_REPORT,RiskPlanStatusType.FINISH); state = "已完成"; state = "已完成"; } } List<RiskPlanAppListDto> list = riskPlanService.getRiskPlanAppListDtoList(statusList, getUserId(),null,null); List<RiskPlanAppListDto> list = riskPlanService.getRiskPlanAppListDtoList(statusList, null,getUserId(),null); String finalState = state; String finalState = state; list.forEach(dto -> { list.forEach(dto -> { Long finishNumber = riskPlanUserBuildingService.countStatusByPlanIdAndStatus(dto.getId(), "finish"); Long finishNumber = riskPlanUserBuildingService.countStatusByPlanIdAndStatus(dto.getId(), "finish"); Loading Loading @@ -476,7 +476,15 @@ public class RiskPlanAppController extends BaseController { */ */ @GetMapping("/approve/list") @GetMapping("/approve/list") public R<List<RiskPlanAppListDto>> getRiskPlanAppListDtoListByApproveUser(String status) { public R<List<RiskPlanAppListDto>> getRiskPlanAppListDtoListByApproveUser(String status) { return R.ok(riskPlanService.getRiskPlanAppListDtoListByApproveUser(getUserId(),status)); String result = null; if ("completed".equals(status)){ status = "completed"; result = "1"; }else if ("return".equals(status)){ status = "completed"; result = "0"; } return R.ok(riskPlanService.getRiskPlanAppListDtoListByApproveUser(getUserId(),status,result)); } } Loading
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/mapper/RiskPlanMapper.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -76,7 +76,8 @@ public interface RiskPlanMapper List<RiskPlanAppApproveListDto> getApproveListDtoByPlanId(@Param("planId") Long planId); List<RiskPlanAppApproveListDto> getApproveListDtoByPlanId(@Param("planId") Long planId); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(@Param("userId") Long userId,@Param("status") String status); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(@Param("userId") Long userId ,@Param("status") String status,@Param("result") String result); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByCreateUserDeptId(@Param("deptId") Long deptId); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByCreateUserDeptId(@Param("deptId") Long deptId); } }
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/IRiskPlanService.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -78,7 +78,7 @@ public interface IRiskPlanService int revokeByPlanId(Long planId, Long userId); int revokeByPlanId(Long planId, Long userId); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(Long userId,String status); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(Long userId,String status,String result); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByCreateUserDeptId(Long deptId); List<RiskPlanAppListDto> getRiskPlanAppListDtoListByCreateUserDeptId(Long deptId); } }
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/impl/RiskPlanServiceImpl.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -225,7 +225,8 @@ public class RiskPlanServiceImpl implements IRiskPlanService { if ("0".equals(appApproveDto.getTaskResult())) { if ("0".equals(appApproveDto.getTaskResult())) { //组长退回 //组长退回 if (riskPlan.getStatus().equals(RiskPlanStatusType.WAIT_LEADER_APPROVE.getStatus())){ if (riskPlan.getStatus().equals(RiskPlanStatusType.WAIT_LEADER_APPROVE.getStatus()) ||riskPlan.getStatus().equals(RiskPlanStatusType.WAIT_LEADER_RETURN.getStatus())){ //如果是组长审批 同时退回修改 楼宇单子的状态 //如果是组长审批 同时退回修改 楼宇单子的状态 riskPlanUserBuildingService.updateByRiskPlanAppApproveBuildingDto(appApproveDto.getId(),appApproveDto.getUserId() riskPlanUserBuildingService.updateByRiskPlanAppApproveBuildingDto(appApproveDto.getId(),appApproveDto.getUserId() ,appApproveDto.getBuildingDtos()); ,appApproveDto.getBuildingDtos()); Loading Loading @@ -334,9 +335,9 @@ public class RiskPlanServiceImpl implements IRiskPlanService { } } @Override @Override public List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(Long userId,String status) { public List<RiskPlanAppListDto> getRiskPlanAppListDtoListByApproveUser(Long userId,String status,String result) { //查询并把状态值转化为状态名称 //查询并把状态值转化为状态名称 return riskPlanMapper.getRiskPlanAppListDtoListByApproveUser(userId,status) return riskPlanMapper.getRiskPlanAppListDtoListByApproveUser(userId,status,result) .stream() .stream() .map(dto -> { .map(dto -> { String statusName = RiskPlanStatusType.getTitleByStatus(dto.getStatus()).getTitle(); String statusName = RiskPlanStatusType.getTitleByStatus(dto.getStatus()).getTitle(); Loading
censoft-rongtong/src/main/resources/mapper/system/RiskPlanMapper.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -198,6 +198,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <if test="status != null and status != '' "> <if test="status != null and status != '' "> and rpt.`status` = #{status} and rpt.`status` = #{status} </if> </if> <if test="result != null and result != '' "> and rpt.task_result = #{result} </if> </where> </where> GROUP BY GROUP BY Loading