|  |  |  | 
|---|
|  |  |  | import com.zy.acs.manager.common.utils.BusinessSortService; | 
|---|
|  |  |  | import com.zy.acs.manager.common.utils.ExcelUtil; | 
|---|
|  |  |  | import com.zy.acs.manager.manager.entity.Task; | 
|---|
|  |  |  | import com.zy.acs.manager.manager.enums.TaskStsType; | 
|---|
|  |  |  | import com.zy.acs.manager.manager.service.TaskService; | 
|---|
|  |  |  | import com.zy.acs.manager.system.controller.BaseController; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | 
|---|
|  |  |  | PageParam<Task, BaseParam> pageParam = new PageParam<>(baseParam, Task.class); | 
|---|
|  |  |  | QueryWrapper<Task> wrapper = pageParam.buildWrapper(true, "io_time"); | 
|---|
|  |  |  | if (hasCreateTimeDesc(pageParam.getOrders())) { | 
|---|
|  |  |  | wrapper.last(businessSortService.getOrderBySql(TaskStsType.class, "task_sts")); | 
|---|
|  |  |  | //            wrapper.last(businessSortService.getOrderBySql(TaskStsType.class, "task_sts")); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok().add(taskService.page(pageParam, wrapper)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | public R cancel(@PathVariable Long id) { | 
|---|
|  |  |  | return taskService.cancel(id, getLoginUserId()) ? R.ok("Cancel Success") : R.error("Cancel Fail"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|