Commit 285566cb authored by 周昊's avatar 周昊

1、修改审批列表显示逻辑

2、修改审批退回流程问题
parent 3bdfe6b7
......@@ -198,7 +198,7 @@ public class RiskPlanAppController extends BaseController {
,RiskPlanStatusType.PROJECT_REPORT,RiskPlanStatusType.FINISH);
state = "已完成";
}
List<RiskPlanAppListDto> list = riskPlanService.getRiskPlanAppListDtoList(statusList, getUserId(),null,null);
List<RiskPlanAppListDto> list = riskPlanService.getRiskPlanAppListDtoList(statusList, null,getUserId(),null);
String finalState = state;
list.forEach(dto -> {
Long finishNumber = riskPlanUserBuildingService.countStatusByPlanIdAndStatus(dto.getId(), "finish");
......@@ -476,7 +476,15 @@ public class RiskPlanAppController extends BaseController {
*/
@GetMapping("/approve/list")
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));
}
......
......@@ -76,7 +76,8 @@ public interface RiskPlanMapper
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);
}
......@@ -78,7 +78,7 @@ public interface IRiskPlanService
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);
}
......@@ -225,7 +225,8 @@ public class RiskPlanServiceImpl implements IRiskPlanService {
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()
,appApproveDto.getBuildingDtos());
......@@ -334,9 +335,9 @@ public class RiskPlanServiceImpl implements IRiskPlanService {
}
@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()
.map(dto -> {
String statusName = RiskPlanStatusType.getTitleByStatus(dto.getStatus()).getTitle();
......
......@@ -198,6 +198,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != '' ">
and rpt.`status` = #{status}
</if>
<if test="result != null and result != '' ">
and rpt.task_result = #{result}
</if>
</where>
GROUP BY
......
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