|
|
@@ -52,7 +52,7 @@ public class TodoController {
|
|
|
|
|
|
@GetMapping("/oa")
|
|
|
@PermitAll
|
|
|
- public CommonResult<ImmutableMap> oaTodo(String workcode) throws Exception {
|
|
|
+ public CommonResult<ImmutableMap> oaTodo(String workcode, Integer pageNo, Integer pageSize) throws Exception {
|
|
|
List<IotOaPersonDO> workcode1 = iotOaPersonMapper.selectList("workcode", workcode);
|
|
|
if (CollUtil.isEmpty(workcode1)) {
|
|
|
oaFlow.getPerson();
|
|
|
@@ -61,7 +61,29 @@ public class TodoController {
|
|
|
throw new ServiceException(new ErrorCode(1,"不存在OA用户"));
|
|
|
}
|
|
|
}
|
|
|
- ImmutableMap<String, Object> oaTodo = portalOaFlow.getOaTodo(workcode1.get(0).getOaId());
|
|
|
+ ImmutableMap<String, Object> oaTodo = portalOaFlow.getOaTodo(workcode1.get(0).getOaId(), pageNo, pageSize);
|
|
|
+ return CommonResult.success(oaTodo);
|
|
|
+
|
|
|
+// List<IotOaPersonRespVO> iotOaPersonRespVOS = pmsMapper.selectOaPersonByCode(workcode);
|
|
|
+// if (CollUtil.isEmpty(iotOaPersonRespVOS)) {
|
|
|
+// throw new ServiceException(new ErrorCode(1,"不存在OA用户"));
|
|
|
+// }
|
|
|
+// ImmutableMap<String, Object> oaTodo = portalOaFlow.getOaTodo(iotOaPersonRespVOS.get(0).getOaId());
|
|
|
+// return CommonResult.success(oaTodo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/oa/done")
|
|
|
+ @PermitAll
|
|
|
+ public CommonResult<ImmutableMap> oaDone(String workcode, Integer pageNo, Integer pageSize) throws Exception {
|
|
|
+ List<IotOaPersonDO> workcode1 = iotOaPersonMapper.selectList("workcode", workcode);
|
|
|
+ if (CollUtil.isEmpty(workcode1)) {
|
|
|
+ oaFlow.getPerson();
|
|
|
+ workcode1 = iotOaPersonMapper.selectList("workcode", workcode);
|
|
|
+ if (CollUtil.isEmpty(workcode1)) {
|
|
|
+ throw new ServiceException(new ErrorCode(1,"不存在OA用户"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ImmutableMap<String, Object> oaTodo = portalOaFlow.getOaTodo(workcode1.get(0).getOaId(), pageNo, pageSize);
|
|
|
return CommonResult.success(oaTodo);
|
|
|
|
|
|
// List<IotOaPersonRespVO> iotOaPersonRespVOS = pmsMapper.selectOaPersonByCode(workcode);
|
|
|
@@ -74,7 +96,7 @@ public class TodoController {
|
|
|
|
|
|
@GetMapping("/crm")
|
|
|
@PermitAll
|
|
|
- public CommonResult<ImmutableMap<String, Object>> crmTodo(String workcode) throws Exception {
|
|
|
+ public CommonResult<ImmutableMap<String, Object>> crmTodo(String workcode, String type, Integer pageNo, Integer pageSize) throws Exception {
|
|
|
ImmutableMap<String, String> stringStringImmutableMap = crmRest.refreshToken("ec301168-d9d7-4f0c-a73c-03f50e952a3a");
|
|
|
AdminUserRespDTO userByUsername = adminUserApi.getUserByUsername(workcode);
|
|
|
if (userByUsername == null) {throw new ServiceException(new ErrorCode(1,"门户系统中不存在该用户"));}
|
|
|
@@ -84,7 +106,7 @@ public class TodoController {
|
|
|
if (StringUtils.isBlank(crmUserId)) {
|
|
|
return CommonResult.success(ImmutableMap.of("todoCount",0,"todoList", new ArrayList<>()));
|
|
|
}
|
|
|
- ImmutableMap<String, Object> access = crmRest.getCrmTodoList(String.valueOf(stringStringImmutableMap.get("access")), crmUserId);
|
|
|
+ ImmutableMap<String, Object> access = crmRest.getCrmTodoList(String.valueOf(stringStringImmutableMap.get("access")), crmUserId, type, pageNo, pageSize);
|
|
|
return CommonResult.success(access);
|
|
|
}
|
|
|
|