| | |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; |
| | | import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.modules.apply.entity.Apply; |
| | | import org.springblade.modules.apply.excel.ApplyExcel; |
| | | import org.springblade.modules.apply.excel.ApplyInfoExcel; |
| | |
| | | import org.springblade.modules.apply.vo.ApplyVO; |
| | | import org.springblade.modules.exam.entity.ExamPaper; |
| | | import org.springblade.modules.exam.service.ExamPaperService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | |
| | | |
| | | private final ExamPaperService examPaperService; |
| | | |
| | | private final IUserService userService; |
| | | |
| | | /** |
| | | * 自定义分页数据 |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importApply(List<ApplyExcel> data, Boolean isCovered) { |
| | | data.forEach(applyExcel -> { |
| | | public void importApply(List<ApplyInfoExcel> data, Boolean isCovered) { |
| | | data.forEach(applyInfoExcel -> { |
| | | //通过准考证号 |
| | | if (null!=applyInfoExcel.getCandidateNo() && applyInfoExcel.getIdCardNo()!=""){ |
| | | Apply apply = new Apply(); |
| | | //设置数据 |
| | | apply.setExamId(applyExcel.getExamId()); |
| | | apply.setUserId(applyExcel.getUserId()); |
| | | apply.setApplyTime(new Date()); |
| | | apply.setApplyStatus(2); |
| | | //去生成准考证号码 |
| | | apply.setCandidateNo(getCandidateNo(apply)); |
| | | //去生成考试编号 |
| | | apply.setApplyCode(getApplyCode(apply)); |
| | | //插入数据 |
| | | this.save(apply); |
| | | apply.setCandidateNo(applyInfoExcel.getCandidateNo()); |
| | | //查询报名信息 |
| | | Apply apply1 = baseMapper.selectOne(Condition.getQueryWrapper(apply)); |
| | | apply1.setIsExam(2); |
| | | baseMapper.updateById(apply1); |
| | | //内网新增 |
| | | try { |
| | | arg.test01(arg.url+"/apply/save",apply); |
| | | // arg.test01(arg.url+"/apply/update",apply1); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |