| | |
| | | return R.data(201,"已报名,不能重复报名"); |
| | | } |
| | | //去生成准考证号码 |
| | | apply.setCandidateNo(getCandidateNo(apply)); |
| | | // apply.setCandidateNo(getCandidateNo(apply)); |
| | | //去生成考试编号 |
| | | apply.setApplyCode(getApplyCode(apply)); |
| | | // apply.setApplyCode(getApplyCode(apply)); |
| | | //默认通过 |
| | | apply.setApplyStatus(2); |
| | | //默认为未考试状态 |
| | |
| | | // arg.test01(arg.url+"/apply/save",apply); |
| | | return R.data(200,"报名成功"); |
| | | } |
| | | //内网修改 |
| | | if(null!=apply.getId()){ |
| | | //修改 |
| | | arg.test01(arg.url+"/apply/update",apply); |
| | | } |
| | | // //内网修改 |
| | | // if(null!=apply.getId()){ |
| | | // //修改 |
| | | // arg.test01(arg.url+"/apply/update",apply); |
| | | // } |
| | | return R.data(202,"报名失败"); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | arg.sendPostRemoveByIds(arg.url+"/apply/remove",ids); |
| | | //arg.sendPostRemoveByIds(arg.url+"/apply/remove",ids); |
| | | return R.status(applyService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | | * 取消报名 |
| | | * @param apply 考试报名信息对象 |
| | | */ |
| | | @PostMapping("/cancelApply") |
| | | public R cancelApply(@RequestBody Apply apply){ |
| | | //查询人员是否已报名 |
| | | List<Apply> applyList = applyService.getSecurityApplyInfo(apply); |
| | | if (applyList.size()>0){ |
| | | Apply apply1 = applyList.get(0); |
| | | apply1.setApplyStatus(4); |
| | | boolean status = applyService.updateById(apply1); |
| | | if (status){ |
| | | return R.data(200,"取消报名成功"); |
| | | } |
| | | }else { |
| | | return R.data(201,"尚未报名"); |
| | | } |
| | | return R.data(202,"取消报名失败"); |
| | | } |
| | | |
| | | } |