|
|
@@ -197,14 +197,14 @@ public class DzCardsController extends BaseController
|
|
|
if (!sysUser.getUserTypeId().equals(agent.getParentId())) {
|
|
|
throw new ValidationException("只能分配给下级代理");
|
|
|
}
|
|
|
- dzCardsService.assignCard(sysUser.getUserTypeId(), agentId, ct, begin, end, location, examType, schoolId, days);
|
|
|
+ dzCardsService.assignCard(agent.getDeptId(), sysUser.getUserTypeId(), agentId, ct, begin, end, location, examType, schoolId, days);
|
|
|
} else if(UserTypeEnum.Institution.getVal().equals(sysUser.getUserType())) { // 机构分配卡给自己的下级
|
|
|
if (!sysUser.getDeptId().equals(agent.getDeptId())) {
|
|
|
throw new ValidationException("只能分配给下级代理");
|
|
|
}
|
|
|
- dzCardsService.assignCard(NumberUtils.isPositive(agent.getParentId()) ? agent.getParentId() : agentId, agentId, ct, begin, end, location, examType, schoolId, days);
|
|
|
+ dzCardsService.assignCard(agent.getDeptId(), NumberUtils.isPositive(agent.getParentId()) ? agent.getParentId() : agentId, agentId, ct, begin, end, location, examType, schoolId, days);
|
|
|
} else { // 平台指定, TODO 暂只支持二级代理
|
|
|
- dzCardsService.assignCard(NumberUtils.isPositive(agent.getParentId()) ? agent.getParentId() : agentId, agentId, ct, begin, end, location, examType, schoolId, days);
|
|
|
+ dzCardsService.assignCard(agent.getDeptId(), NumberUtils.isPositive(agent.getParentId()) ? agent.getParentId() : agentId, agentId, ct, begin, end, location, examType, schoolId, days);
|
|
|
}
|
|
|
return AjaxResult.success();
|
|
|
}
|