|
|
@@ -13,7 +13,6 @@ import com.ruoyi.common.core.domain.model.LoginCard;
|
|
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
import com.ruoyi.common.enums.AccessFromType;
|
|
|
-import com.ruoyi.common.enums.AccountType;
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
import com.ruoyi.common.enums.ExamType;
|
|
|
import com.ruoyi.common.utils.NumberUtils;
|
|
|
@@ -283,18 +282,27 @@ public class UserController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 通过代理商查询机构信息
|
|
|
- Long deptId = null;
|
|
|
+ // 通过代理商查询机构信息,默认使用单招一卡通
|
|
|
+ Long deptId = 101L;
|
|
|
if (null != agentId&&0!=agentId) {
|
|
|
DzAgent agent = agentService.selectDzAgentByAgentId(agentId);
|
|
|
if(null != agent && null != agent.getDeptId()) {
|
|
|
deptId = agent.getDeptId();
|
|
|
}
|
|
|
}else{
|
|
|
- //默认使用单招一卡通
|
|
|
- deptId = 101L;
|
|
|
+ if (UserTypeEnum.isTeacher(user.getUserType())){
|
|
|
+ DzTeacher teacher = dzTeacherService.selectDzTeacherByUserId(user.getUserId());
|
|
|
+ if(null != teacher && null != teacher.getDeptId()) {
|
|
|
+ deptId = teacher.getDeptId();
|
|
|
+ }
|
|
|
+ }else if (UserTypeEnum.isAgent(user.getUserType())){
|
|
|
+ DzAgent agent = agentService.selectDzAgentByUserId(user.getUserId());
|
|
|
+ if(null != agent && null != agent.getDeptId()) {
|
|
|
+ deptId = agent.getDeptId();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 构建组织信息对象
|
|
|
// 查询机构信息
|
|
|
SysDept dept = deptService.selectDeptById(deptId);
|