|
|
@@ -3,13 +3,19 @@ package com.ruoyi.web.controller.agentcenter; |
|
|
|
import com.ruoyi.agentcenter.domain.TAgentTask; |
|
|
|
import com.ruoyi.agentcenter.service.ITAgentTaskService; |
|
|
|
import com.ruoyi.agentcenter.dto.AgentTaskVillageGroup; |
|
|
|
import com.ruoyi.agentcenter.vo.TaskDistrib; |
|
|
|
import com.ruoyi.agentcenter.vo.TaskFinish; |
|
|
|
import com.ruoyi.common.core.controller.BaseController; |
|
|
|
import com.ruoyi.common.core.domain.AjaxResult; |
|
|
|
import com.ruoyi.common.core.page.TableDataInfo; |
|
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
|
import com.ruoyi.common.utils.PageUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
@@ -36,6 +42,7 @@ public class AccountingAgentTaskController extends BaseController |
|
|
|
public TableDataInfo todoTaskList(TAgentTask task) |
|
|
|
{ |
|
|
|
startPage(); |
|
|
|
task.setHandleUser(getUsername()); |
|
|
|
PageUtils.orderBy("org_code"); |
|
|
|
List<TAgentTask> tAgentTasks = tAgentTaskService.getTodoTaskList(task); |
|
|
|
return getDataTable(tAgentTasks); |
|
|
@@ -49,7 +56,20 @@ public class AccountingAgentTaskController extends BaseController |
|
|
|
public AjaxResult processedTaskList(TAgentTask task) |
|
|
|
{ |
|
|
|
startPage(); |
|
|
|
task.setHandleUser(getUsername()); |
|
|
|
List<AgentTaskVillageGroup> tAgentTasks = tAgentTaskService.getProcessedTaskList(task); |
|
|
|
return getDataTable(tAgentTasks).toAjaxResult().put("overdue", tAgentTaskService.getAgentTaskOverdueFinishVillageCount(task)); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 完成 |
|
|
|
*/ |
|
|
|
@PreAuthorize("@ss.hasPermi('accounting:task:finish')") |
|
|
|
@PostMapping(value = "/finish") |
|
|
|
public AjaxResult finish(@Validated @RequestBody TaskFinish taskFinish) |
|
|
|
{ |
|
|
|
taskFinish.setHandleUser(getUsername()); |
|
|
|
taskFinish.setHandleDate(DateUtils.getNowDate()); |
|
|
|
return toAjax(tAgentTaskService.finish(taskFinish)); |
|
|
|
} |
|
|
|
} |