|
|
@@ -125,7 +125,7 @@ public class DzCardsController extends BaseController
|
|
|
@Log(title = "分配卡", businessType = BusinessType.INSERT)
|
|
|
@PostMapping("/assignCard")
|
|
|
@ApiOperation("分配卡")
|
|
|
- public AjaxResult assignCard(@ApiParam("代理商") Long agentId, @ApiParam("开始号") String begin, @ApiParam("结束号") String end,
|
|
|
+ public AjaxResult assignCard(@ApiParam("代理商") @RequestParam Long agentId, @ApiParam("开始号") @RequestParam String begin, @ApiParam("结束号") @RequestParam String end,
|
|
|
@ApiParam("省份") @RequestParam(required = false) String location,
|
|
|
@ApiParam("考生类型") @RequestParam(required = false) ExamType examType,
|
|
|
@ApiParam("学校") @RequestParam(required = false) Long schoolId)
|
|
|
@@ -141,16 +141,16 @@ public class DzCardsController extends BaseController
|
|
|
if (!sysUser.getDeptId().equals(agent.getDeptId())) {
|
|
|
throw new ValidationException("只能分配给下级代理");
|
|
|
}
|
|
|
- dzCardsService.assignCard(agentId, agentId, begin, end, location, examType, schoolId);
|
|
|
- } else { // 平台指定, TODO 暂只支持二级代理
|
|
|
- dzCardsService.assignCard(agent.getParentId(), agentId, begin, end, location, examType, schoolId);
|
|
|
+ dzCardsService.assignCard(null == agent.getParentId() ? agentId : agent.getParentId(), agentId, begin, end, location, examType, schoolId);
|
|
|
+ } else if(null == agent.getParentId()) { // 平台指定, TODO 暂只支持二级代理
|
|
|
+ dzCardsService.assignCard(null == agent.getParentId() ? agentId : agent.getParentId(), agentId, begin, end, location, examType, schoolId);
|
|
|
}
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
|
|
|
@Log(title = "直接开卡", businessType = BusinessType.INSERT)
|
|
|
@PostMapping("/openCard")
|
|
|
- @ApiOperation("分配卡")
|
|
|
+ @ApiOperation("直接开卡")
|
|
|
public AjaxResult openCard(@ApiParam("学校") Long schoolId, @ApiParam("开始号") String begin, @ApiParam("结束号") String end)
|
|
|
{
|
|
|
Long agentId = 0L;
|