Commit 8c814508 authored by zhangyingbin's avatar zhangyingbin

修改ugp任务查询接口

parent ae17ed84
......@@ -14,6 +14,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TaskMapper extends BaseMapper<Task> {
IPage getTask(IPage page,String type,Long unitId);
IPage getTask(IPage page,int type,Long unitId);
}
......@@ -13,8 +13,8 @@
where tk.title =tp.`name` and
tk.`status` =tp.`status`
and tk.unit_id =#{unitId}
<if test="type !=null and !=''">
and tk.task_type =#{type}
<if test="type != null ">
and tk.status =#{type}
</if>
......
......@@ -161,13 +161,22 @@ public class TaskController {
public ResponseModel<IPage<Task>> getTaskList(@RequestParam(value = "status",required = false) String type,Long current,Long size){
Long unitId = orgService.getReginParams().getBusinessInfo().getCompanySequenceNbr();
IPage<Task> page = new Page(current,size);
/* LambdaQueryWrapper<Task> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(Task::getUnitId,unitId);
if(!ValidationUtil.isEmpty(type)){
wrapper.eq(Task::getTaskType,type);
// LambdaQueryWrapper<Task> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(Task::getUnitId,unitId);
// if(!ValidationUtil.isEmpty(type)){
// wrapper.eq(Task::getStatus,type);
// }
// iTzUgpTaskService.page(page, wrapper);
Integer status = null;
if(!ValidationUtil.isEmpty(type)) {
if("true".equals(type)){
status = 1;
}else {
status = 0;
}
}
iTzUgpTaskService.page(page, wrapper);*/
IPage task = taskMapper.getTask(page, type, unitId);
IPage task = taskMapper.getTask(page, status, unitId);
return ResponseHelper.buildResponse(task);
}
......
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