Commit 705f4d35 authored by zhangyingbin's avatar zhangyingbin

修改已办待办接口

parent 45392c42
......@@ -16,6 +16,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -146,12 +147,21 @@ public class TaskController {
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@RequestMapping(value = "/getTaskList", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取当前登录人的所有任务列表", notes = "获取当前登录人的所有任务列表")
public ResponseModel<Page<TaskDto>> getTaskList(@RequestParam("status") String type,Long current,Long size){
public ResponseModel<Page<TaskDto>> getTaskList(@RequestParam(value = "status",required = false) String type,Long current,Long size){
Page page = new Page(current,size);
List<TaskDto> taskDtoList = new ArrayList<>();
boolean status= false;
if(ValidationUtil.isEmpty(type)){
type = TaskTypeEnum.待办.getKey();
status = true;
}
if(TaskTypeEnum.待办.getKey().equals(type)){
taskDtoList.addAll(iTzUgpTaskService.unDoneTask());
} else {
if(status){
type = TaskTypeEnum.已办.getKey();
}
}
if(TaskTypeEnum.已办.getKey().equals(type)){
taskDtoList.addAll(iTzUgpTaskService.doneTask());
}
page.setRecords(taskDtoList);
......
......@@ -222,25 +222,25 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
LambdaQueryWrapper<ProjectInitiation> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ProjectInitiation::getInstanceId, project.getInstanceId());
List<ProjectInitiation> projectInitiationList = projectInitiationService.list(wrapper);
if (OrgEnum.安装单位.getName().equals(companyType)) {
if (OrgEnum.安装单位.getKey().equals(companyType)) {
for (ProjectInitiation projectInitiation : projectInitiationList) {
if (ProjectInitiationEnum.提交资料.getName().equals(projectInitiation.getTaskName())) {
taskDtoList.add(setTask(projectInitiation.getTaskName(), true, TaskTypeEnum.填报.getKey(), projectInitiation.getRecDate(), project.getSequenceNbr()));
}
}
} else if (OrgEnum.设计单位.getName().equals(companyType)) {
} else if (OrgEnum.设计单位.getKey().equals(companyType)) {
for (ProjectInitiation projectInitiation : projectInitiationList) {
if (ProjectInitiationEnum.提交资料.getName().equals(projectInitiation.getTaskName())) {
taskDtoList.add(setTask(projectInitiation.getTaskName(), true, TaskTypeEnum.填报.getKey(), projectInitiation.getRecDate(), project.getSequenceNbr()));
}
}
} else if (OrgEnum.监察部门.getName().equals(companyType)) {
} else if (OrgEnum.监察部门.getKey().equals(companyType)) {
for (ProjectInitiation projectInitiation : projectInitiationList) {
if (ProjectInitiationEnum.接受告知.getName().equals(projectInitiation.getTaskName())) {
taskDtoList.add(setTask(projectInitiation.getTaskName(), true, TaskTypeEnum.流程.getKey(), projectInitiation.getRecDate(), project.getSequenceNbr()));
}
}
} else if (OrgEnum.监检机构.getName().equals(companyType)) {
} else if (OrgEnum.监检机构.getKey().equals(companyType)) {
for (ProjectInitiation projectInitiation : projectInitiationList) {
if (ProjectInitiationEnum.审查项目.getName().equals(projectInitiation.getTaskName()) || ProjectInitiationEnum.监检科室分配.getName().equals(projectInitiation.getTaskName()) || ProjectInitiationEnum.监检员分配.getName().equals(projectInitiation.getTaskName()) || ProjectInitiationEnum.监检员审核.getName().equals(projectInitiation.getTaskName())) {
taskDtoList.add(setTask(projectInitiation.getTaskName(), true, TaskTypeEnum.流程.getKey(), projectInitiation.getRecDate(), project.getSequenceNbr()));
......
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