| | |
| | | in.close(); |
| | | out.close(); |
| | | } |
| | | |
| | | @ApiOperation(value = "待办-任务数量统计") |
| | | @GetMapping("/taskCountBySelf") |
| | | public Result<?> taskCountBySelf() { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | return Result.OK(workTaskServicevo.taskCountBySelf(user.getUsername())); |
| | | } |
| | | } |
| | |
| | | |
| | | IPage<WorkTaskDataVo> taskBySelf(@Param("flowMy") FlowMy flowMy, @Param("page") Page page); |
| | | |
| | | /** |
| | | * 统计我的待办-任务数量 |
| | | * @param username |
| | | * @return |
| | | */ |
| | | Integer taskCountBySelf(String username); |
| | | } |
| | |
| | | ORDER BY |
| | | create_time_ DESC |
| | | </select> |
| | | |
| | | <select id="taskCountBySelf" resultType="java.lang.Integer"> |
| | | SELECT count(atask.id_) |
| | | FROM act_ru_task AS atask |
| | | LEFT JOIN flow_my_business fmb on atask.id_ = fmb.task_id |
| | | LEFT JOIN ACT_RE_PROCDEF pro on atask.PROC_DEF_ID_ = pro.id_ |
| | | WHERE atask.assignee_ = #{username} |
| | | OR (atask.assignee_ IS NULL AND fmb.todo_users LIKE CONCAT('%', #{username}, '%')) |
| | | </select> |
| | | </mapper> |
| | |
| | | public interface IWorkTaskServiceVo extends IService<WorkTaskDataVo> { |
| | | |
| | | IPage<WorkTaskDataVo> toTaskBySelf(FlowMy flowMy, Page page); |
| | | |
| | | /** |
| | | * 统计我的待办-任务数量 |
| | | * @param username |
| | | * @return |
| | | */ |
| | | Integer taskCountBySelf(String username); |
| | | } |
| | |
| | | public class WorkTaskServiceImplVo extends ServiceImpl<IWorkTaskVoMapper, WorkTaskDataVo> implements IWorkTaskServiceVo { |
| | | @Autowired |
| | | FlowMyBusinessServiceImpl flowMyBusinessService; |
| | | |
| | | @Override |
| | | public IPage<WorkTaskDataVo> toTaskBySelf(FlowMy flowMy, Page page) { |
| | | IPage<WorkTaskDataVo> workTaskDataVoIPage=baseMapper.taskBySelf(flowMy,page); |
| | |
| | | }); |
| | | return workTaskDataVoIPage; |
| | | } |
| | | |
| | | @Override |
| | | public Integer taskCountBySelf(String username) { |
| | | Integer count = baseMapper.taskCountBySelf(username); |
| | | if (count == null) { |
| | | return 0; |
| | | } |
| | | return count; |
| | | } |
| | | } |