Commit 438ce87f authored by 廖旭伟's avatar 廖旭伟

修改bug

parent ec8f173b
......@@ -86,17 +86,18 @@ public class ApproverServiceImpl extends AbstractCRUDServiceImpl<ApproverDao, Ap
@Override
public String getDeptCodeByUser(Long userId) throws AppException {
UserEntity userEntity = userService.get(userId);
if(userEntity==null){
throw new AppException("用户id不正确,找不到对应的用户信息");
}
ApproverEntity approverEntity = this.selectOne(new ApproverQuery().loginName(userEntity.getLoginName()));
if(approverEntity==null){
throw new AppException("该用户不是预审工作人员");
}
if(StringUtils.isEmpty(approverEntity.getDeptCode())){
throw new AppException("该工作人员没有配置管辖部门");
}
return approverEntity.getDeptCode();
// UserEntity userEntity = userService.get(userId);
// if(userEntity==null){
// throw new AppException("用户id不正确,找不到对应的用户信息");
// }
// ApproverEntity approverEntity = this.selectOne(new ApproverQuery().loginName(userEntity.getLoginName()));
// if(approverEntity==null){
// throw new AppException("该用户不是预审工作人员");
// }
// if(StringUtils.isEmpty(approverEntity.getDeptCode())){
// throw new AppException("该工作人员没有配置管辖部门");
// }
// return approverEntity.getDeptCode();
return null;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment