|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
package org.jeecg.modules.task.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
@ -8,8 +9,11 @@ import java.util.stream.Collectors; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
|
import java.net.URLDecoder; |
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
|
import org.jeecg.common.util.oConvertUtils; |
|
|
|
@ -21,6 +25,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
|
|
|
|
import org.jeecg.modules.task.entity.Task; |
|
|
|
|
import org.jeecg.modules.task.mapper.TaskMapper; |
|
|
|
|
import org.jeecg.modules.task.service.ITaskService; |
|
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil; |
|
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
|
|
|
@ -29,6 +34,7 @@ import org.jeecgframework.poi.excel.entity.ImportParams; |
|
|
|
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
|
|
|
|
import org.jeecg.common.system.base.controller.JeecgController; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.util.ObjectUtils; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
import org.springframework.web.multipart.MultipartHttpServletRequest; |
|
|
|
@ -71,6 +77,8 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
QueryWrapper<Task> queryWrapper = QueryGenerator.initQueryWrapper(task, req.getParameterMap()); |
|
|
|
|
Page<Task> page = new Page<Task>(pageNo, pageSize); |
|
|
|
|
IPage<Task> pageList = taskService.page(page, queryWrapper); |
|
|
|
|
//责任人回显
|
|
|
|
|
pageList.getRecords().forEach(task1 -> task1.setManagerUsers_dictText(taskService.getManagerUsers(task1.getManagerUsers()))); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -84,6 +92,10 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
@ApiOperation(value="任务管理-添加", notes="任务管理-添加") |
|
|
|
|
@PostMapping(value = "/add") |
|
|
|
|
public Result<?> add(@RequestBody Task task) { |
|
|
|
|
Task one = taskService.getOne(new LambdaQueryWrapper<Task>().like(Task::getFunctionTemplateName, task.getFunctionTemplateName())); |
|
|
|
|
if (!ObjectUtils.isEmpty(one)){ |
|
|
|
|
return Result.error("名字重复"); |
|
|
|
|
} |
|
|
|
|
taskService.save(task); |
|
|
|
|
return Result.OK("添加成功!"); |
|
|
|
|
} |
|
|
|
@ -170,4 +182,28 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
return super.importExcel(request, response, Task.class); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
@GetMapping(value = "/chehui") |
|
|
|
|
public Result<?> chehui(@RequestParam(name = "id") String id) { |
|
|
|
|
return taskService.chehui(id); |
|
|
|
|
} |
|
|
|
|
@GetMapping(value = "/shenhe") |
|
|
|
|
public Result<?> shenhe(@RequestParam(name = "id") String id) { |
|
|
|
|
return taskService.shenhe(id); |
|
|
|
|
} |
|
|
|
|
@GetMapping(value = "/tijiao") |
|
|
|
|
public Result<?> tijiao(@RequestParam(name = "id") String id) { |
|
|
|
|
return taskService.tijiao(id); |
|
|
|
|
} |
|
|
|
|
@GetMapping(value = "/kaishi") |
|
|
|
|
public Result<?> kaishi(@RequestParam(name = "id") String id) { |
|
|
|
|
return taskService.kaishi(id); |
|
|
|
|
} |
|
|
|
|
@GetMapping(value = "/fabu") |
|
|
|
|
public Result<?> fabu(@RequestParam(name = "id") String id) { |
|
|
|
|
return taskService.fabu(id); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|