|
|
@@ -6,6 +6,8 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
|
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
|
|
+import cn.iocoder.yudao.module.system.dal.dataobject.oa.IotOaPersonDO;
|
|
|
+import cn.iocoder.yudao.module.system.dal.mysql.oa.IotOaPersonMapper;
|
|
|
import cn.iocoder.yudao.module.system.oa.OaFlow;
|
|
|
import cn.iocoder.yudao.module.system.util.DingtalkUtil;
|
|
|
import cn.iocoder.yudao.server.controller.admin.vo.IotOaPersonRespVO;
|
|
|
@@ -45,19 +47,21 @@ public class TodoController {
|
|
|
private OaFlow oaFlow;
|
|
|
@Autowired
|
|
|
private CrmNoticeMapper crmNoticeMapper;
|
|
|
+ @Autowired
|
|
|
+ private IotOaPersonMapper iotOaPersonMapper;
|
|
|
|
|
|
@GetMapping("/oa")
|
|
|
@PermitAll
|
|
|
public CommonResult<ImmutableMap> oaTodo(String workcode) throws Exception {
|
|
|
- List<IotOaPersonRespVO> iotOaPersonRespVOS = pmsMapper.selectOaPersonByCode(workcode);
|
|
|
- if (CollUtil.isEmpty(iotOaPersonRespVOS)) {
|
|
|
+ List<IotOaPersonDO> workcode1 = iotOaPersonMapper.selectList("workcode", workcode);
|
|
|
+ if (CollUtil.isEmpty(workcode1)) {
|
|
|
oaFlow.getPerson();
|
|
|
- iotOaPersonRespVOS = pmsMapper.selectOaPersonByCode(workcode);
|
|
|
- if (CollUtil.isEmpty(iotOaPersonRespVOS)) {
|
|
|
+ workcode1 = iotOaPersonMapper.selectList("workcode", workcode);
|
|
|
+ if (CollUtil.isEmpty(workcode1)) {
|
|
|
throw new ServiceException(new ErrorCode(1,"不存在OA用户"));
|
|
|
}
|
|
|
}
|
|
|
- ImmutableMap<String, Object> oaTodo = portalOaFlow.getOaTodo(iotOaPersonRespVOS.get(0).getOaId());
|
|
|
+ ImmutableMap<String, Object> oaTodo = portalOaFlow.getOaTodo(workcode1.get(0).getOaId());
|
|
|
return CommonResult.success(oaTodo);
|
|
|
}
|
|
|
|