| @@ -56,6 +56,17 @@ public class WxFlowAbleController extends BaseController { | |||||
| return wxFlowService.list(flowType,pageNum,pageSize,getUserId(),getTenantId()); | return wxFlowService.list(flowType,pageNum,pageSize,getUserId(),getTenantId()); | ||||
| } | } | ||||
| /** | |||||
| * 待办总数 | |||||
| */ | |||||
| @ApiOperation("待办总数") | |||||
| @GetMapping(value = "/getTotal") | |||||
| @SystemControllerLog(description = "工作流-待办总数") | |||||
| public ResultData getTotal() { | |||||
| logger.debug("[" + getIpAddr() + "] FlowAbleController::getTotal"); | |||||
| return wxFlowService.getTotal(getUserId(), getTenantId()); | |||||
| } | |||||
| /** | /** | ||||
| * 我的申请列表 | * 我的申请列表 | ||||
| */ | */ | ||||
| @@ -6,7 +6,7 @@ import com.iformall.domain.po.WxFlowConfig; | |||||
| import com.iformall.domain.po.WxFlowModel; | import com.iformall.domain.po.WxFlowModel; | ||||
| import com.iformall.domain.po.WxFlowRecord; | import com.iformall.domain.po.WxFlowRecord; | ||||
| import org.springframework.web.bind.annotation.RequestBody; | import org.springframework.web.bind.annotation.RequestBody; | ||||
| import javax.servlet.http.HttpServletResponse; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -125,4 +125,7 @@ public interface WxFlowService { | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| List<WxFlowModel> getModelBybusiness(WxFlowModel wxFlowModel); | List<WxFlowModel> getModelBybusiness(WxFlowModel wxFlowModel); | ||||
| ResultData getTotal(Long userId, String tenantId); | |||||
| } | } | ||||
| @@ -1542,6 +1542,13 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| return wxFlowModelMapper.getModelBybusiness(wxFlowModel); | return wxFlowModelMapper.getModelBybusiness(wxFlowModel); | ||||
| } | } | ||||
| @Override | |||||
| public ResultData getTotal(Long userId, String tenantId) { | |||||
| TaskQuery taskQuery = taskService.createTaskQuery(); | |||||
| int total = taskQuery.taskCandidateOrAssigned(userId.toString()).list().size(); | |||||
| return new ResultData(total); | |||||
| } | |||||
| public static void main(String[] args) { | public static void main(String[] args) { | ||||
| new Thread(() -> System.out.println(1 + "hello world")).start(); | new Thread(() -> System.out.println(1 + "hello world")).start(); | ||||