|
|
@@ -4,8 +4,10 @@ import java.util.List;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.validation.ValidationException;
|
|
|
|
|
|
+import cn.hutool.core.util.NumberUtil;
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
import com.ruoyi.common.enums.ExamType;
|
|
|
+import com.ruoyi.common.utils.NumberUtils;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.dz.domain.DzAgent;
|
|
|
import com.ruoyi.dz.service.IDzAgentService;
|
|
|
@@ -153,9 +155,9 @@ public class DzCardsController extends BaseController
|
|
|
if (!sysUser.getDeptId().equals(agent.getDeptId())) {
|
|
|
throw new ValidationException("只能分配给下级代理");
|
|
|
}
|
|
|
- dzCardsService.assignCard(null == agent.getParentId() ? agentId : agent.getParentId(), agentId, begin, end, location, examType, schoolId);
|
|
|
+ dzCardsService.assignCard(!NumberUtils.isPositive(agent.getParentId()) ? agentId : agent.getParentId(), agentId, begin, end, location, examType, schoolId);
|
|
|
} else { // 平台指定, TODO 暂只支持二级代理
|
|
|
- dzCardsService.assignCard(null == agent.getParentId() ? agentId : agent.getParentId(), agentId, begin, end, location, examType, schoolId);
|
|
|
+ dzCardsService.assignCard(!NumberUtils.isPositive(agent.getParentId()) ? agentId : agent.getParentId(), agentId, begin, end, location, examType, schoolId);
|
|
|
}
|
|
|
return AjaxResult.success();
|
|
|
}
|