提交 464b5fca 编写于 作者: test_0805_001's avatar test_0805_001

统一代办

上级 c3ae78b1
package cn.ibizlab.core.extensions.service; package cn.ibizlab.core.extensions.service;
import cn.ibizlab.core.workflow.filter.WFTaskSearchContext;
import cn.ibizlab.core.workflow.mapper.WFCoreMapper;
import cn.ibizlab.core.workflow.service.impl.WFTaskServiceImpl; import cn.ibizlab.core.workflow.service.impl.WFTaskServiceImpl;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import cn.ibizlab.core.workflow.domain.WFTask; import cn.ibizlab.core.workflow.domain.WFTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
...@@ -16,6 +21,8 @@ import java.util.*; ...@@ -16,6 +21,8 @@ import java.util.*;
@Service("WFTaskExService") @Service("WFTaskExService")
public class WFTaskExService extends WFTaskServiceImpl { public class WFTaskExService extends WFTaskServiceImpl {
@Autowired
private WFCoreMapper wfCoreMapper;
/** /**
* [UserCustom:用户自定义] 行为扩展 * [UserCustom:用户自定义] 行为扩展
...@@ -27,5 +34,55 @@ public class WFTaskExService extends WFTaskServiceImpl { ...@@ -27,5 +34,55 @@ public class WFTaskExService extends WFTaskServiceImpl {
public WFTask userCustom(WFTask et) { public WFTask userCustom(WFTask et) {
return super.userCustom(et); return super.userCustom(et);
} }
/**
* 查询集合 DEFAULT
*/
@Override
public Page<WFTask> searchDefault(WFTaskSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFTask> pages
= wfCoreMapper.searchMyTask(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFTask>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 已办任务
*/
@Override
public Page<WFTask> searchDoneTask(WFTaskSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFTask> pages
= wfCoreMapper.searchDoneTask(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFTask>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 办结任务
*/
@Override
public Page<WFTask> searchFinishTask(WFTaskSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFTask> pages
= wfCoreMapper.searchFinishTask(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFTask>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 待办任务
*/
@Override
public Page<WFTask> searchTodoTask(WFTaskSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFTask> pages
= wfCoreMapper.searchMyTask(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFTask>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 待阅任务
*/
@Override
public Page<WFTask> searchToreadTask(WFTaskSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFTask> pages
= wfCoreMapper.searchUnReadTask(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFTask>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
} }
package cn.ibizlab.core.workflow.extensions.service;
import cn.ibizlab.core.workflow.domain.WFTask;
import cn.ibizlab.core.workflow.filter.WFTaskSearchContext;
import cn.ibizlab.core.workflow.mapper.WFCoreMapper;
import cn.ibizlab.core.workflow.service.impl.WFTaskServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.stereotype.Service;
/**
* 实体[工作流任务] 无存储服务对象接口实现 自定义
*/
@Slf4j
@Primary
@Service
public class WFTaskExService extends WFTaskServiceImpl {
@Autowired
private WFCoreMapper wfCoreMapper;
/**
* 查询集合 DEFAULT
*/
@Override
public Page<WFTask> searchDefault(WFTaskSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFTask> pages
= wfCoreMapper.searchMyTask(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFTask>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 已办任务
*/
@Override
public Page<WFTask> searchDoneTask(WFTaskSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFTask> pages
= wfCoreMapper.searchDoneTask(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFTask>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 办结任务
*/
@Override
public Page<WFTask> searchFinishTask(WFTaskSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFTask> pages
= wfCoreMapper.searchFinishTask(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFTask>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 待办任务
*/
@Override
public Page<WFTask> searchTodoTask(WFTaskSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFTask> pages
= wfCoreMapper.searchMyTask(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFTask>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 查询集合 待阅任务
*/
@Override
public Page<WFTask> searchToreadTask(WFTaskSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<WFTask> pages
= wfCoreMapper.searchUnReadTask(context.getPages(),context,context.getSelectCond());
return new PageImpl<WFTask>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册