Commit a15e64ba authored by zhangyingbin's avatar zhangyingbin

修改已办待办接口

parent 9b846924
...@@ -15,6 +15,8 @@ import jdk.nashorn.internal.runtime.regexp.joni.EncodingHelper; ...@@ -15,6 +15,8 @@ import jdk.nashorn.internal.runtime.regexp.joni.EncodingHelper;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
...@@ -41,6 +43,7 @@ public class TaskController { ...@@ -41,6 +43,7 @@ public class TaskController {
* 新增监检任务表 * 新增监检任务表
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@RequestMapping(value = "/save", method = RequestMethod.POST) @RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增监检任务表", notes = "新增监检任务表") @ApiOperation(httpMethod = "POST", value = "新增监检任务表", notes = "新增监检任务表")
public boolean saveTzUgpTask(HttpServletRequest request, @RequestBody Task task){ public boolean saveTzUgpTask(HttpServletRequest request, @RequestBody Task task){
...@@ -52,6 +55,7 @@ public class TaskController { ...@@ -52,6 +55,7 @@ public class TaskController {
* @param id * @param id
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除") @ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除")
public boolean deleteById(HttpServletRequest request, @PathVariable Long id){ public boolean deleteById(HttpServletRequest request, @PathVariable Long id){
...@@ -65,6 +69,7 @@ public class TaskController { ...@@ -65,6 +69,7 @@ public class TaskController {
* 修改监检任务表 * 修改监检任务表
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@RequestMapping(value = "/updateById", method = RequestMethod.PUT) @RequestMapping(value = "/updateById", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "修改监检任务表", notes = "修改监检任务表") @ApiOperation(httpMethod = "PUT", value = "修改监检任务表", notes = "修改监检任务表")
public boolean updateByIdTzUgpTask(HttpServletRequest request, @RequestBody Task task){ public boolean updateByIdTzUgpTask(HttpServletRequest request, @RequestBody Task task){
...@@ -78,6 +83,7 @@ public class TaskController { ...@@ -78,6 +83,7 @@ public class TaskController {
* @param id * @param id
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@RequestMapping(value = "/{id}", method = RequestMethod.GET) @RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询") @ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public Task selectById(HttpServletRequest request, @PathVariable Long id){ public Task selectById(HttpServletRequest request, @PathVariable Long id){
...@@ -90,6 +96,7 @@ public class TaskController { ...@@ -90,6 +96,7 @@ public class TaskController {
* 列表分页查询 * 列表分页查询
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@RequestMapping(value = "/list", method = RequestMethod.GET) @RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询") @ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public IPage<Task> listPage(String pageNum, String pageSize, public IPage<Task> listPage(String pageNum, String pageSize,
...@@ -136,9 +143,10 @@ public class TaskController { ...@@ -136,9 +143,10 @@ public class TaskController {
* 获取当前登录人的所有任务列表 * 获取当前登录人的所有任务列表
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@RequestMapping(value = "/getTaskList", method = RequestMethod.GET) @RequestMapping(value = "/getTaskList", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取当前登录人的所有任务列表", notes = "获取当前登录人的所有任务列表") @ApiOperation(httpMethod = "GET", value = "获取当前登录人的所有任务列表", notes = "获取当前登录人的所有任务列表")
public ResponseModel<Page<TaskDto>> getTaskList(String type,Long current,Long size){ public ResponseModel<Page<TaskDto>> getTaskList(@RequestParam("status") String type,Long current,Long size){
Page page = new Page(current,size); Page page = new Page(current,size);
List<TaskDto> taskDtoList = new ArrayList<>(); List<TaskDto> taskDtoList = new ArrayList<>();
if(TaskTypeEnum.待办.getKey().equals(type)){ if(TaskTypeEnum.待办.getKey().equals(type)){
...@@ -155,6 +163,7 @@ public class TaskController { ...@@ -155,6 +163,7 @@ public class TaskController {
* 获取当前登录人的所有任务统计 * 获取当前登录人的所有任务统计
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@RequestMapping(value = "/getTaskCount", method = RequestMethod.GET) @RequestMapping(value = "/getTaskCount", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取当前登录人的所有任务统计", notes = "获取当前登录人的所有任务统计") @ApiOperation(httpMethod = "GET", value = "获取当前登录人的所有任务统计", notes = "获取当前登录人的所有任务统计")
public ResponseModel<Map> getCount(){ public ResponseModel<Map> getCount(){
......
...@@ -157,7 +157,7 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl ...@@ -157,7 +157,7 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
TaskDto task = new TaskDto(); TaskDto task = new TaskDto();
String title = "", taskStatus = ""; String title = "", taskStatus = "";
task.setTaskType(taskType); task.setTaskType(taskType);
if(ValidationUtil.isEmpty(InitiationStatus)){ if(!ValidationUtil.isEmpty(InitiationStatus)){
title = ProjectInitiationEnum.getTaskNameMap.get(InitiationStatus); title = ProjectInitiationEnum.getTaskNameMap.get(InitiationStatus);
taskStatus = ProjectInitiationEnum.getTaskStatusMap.get(InitiationStatus); taskStatus = ProjectInitiationEnum.getTaskStatusMap.get(InitiationStatus);
if(ValidationUtil.isEmpty(title)){ if(ValidationUtil.isEmpty(title)){
...@@ -192,10 +192,14 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl ...@@ -192,10 +192,14 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
task.setContent(title+", "+taskStatus); task.setContent(title+", "+taskStatus);
task.setSequenceNbr(sequenceNbr); task.setSequenceNbr(sequenceNbr);
if(TaskTypeEnum.填报.getKey().equals(taskType)){ if(TaskTypeEnum.填报.getKey().equals(taskType)){
task.setTaskTypeLabel(TaskTypeEnum.填报.getName()); task.setTaskTypeLabel(TaskTypeEnum.填报.getName());
} else { } else if(TaskTypeEnum.流程.getKey().equals(taskType)){
task.setTaskTypeLabel(TaskTypeEnum.填报.getName()); task.setTaskTypeLabel(TaskTypeEnum.流程.getName());
} else{
task.setTaskTypeLabel(TaskTypeEnum.企业审核.getName());
} }
......
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