| | |
| | | import org.springblade.modules.exam.service.ExamScoreService; |
| | | import org.springblade.modules.exam.service.ExamSubjectChoicesService; |
| | | import org.springblade.modules.exam.util.SecurityPaperUtil; |
| | | import org.springblade.modules.exam.vo.ExamResultVO; |
| | | import org.springblade.modules.exam.vo.ExamScoreVO; |
| | | import org.springblade.modules.exam.vo.UpdateParamVo; |
| | | import org.springblade.modules.exam.vo.*; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.information.service.IInformationService; |
| | | import org.springblade.modules.information.vo.InformationVO; |
| | | import org.springblade.modules.securitypaper.entity.SecurityPaper; |
| | | import org.springblade.modules.securitypaper.service.SecurityPaperService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IRoleService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | |
| | | private TrainingRegistrationService trainingRegistrationService; |
| | | |
| | | @Autowired |
| | | private IRoleService roleService; |
| | | |
| | | private SecurityPaperService securityPaperService; |
| | | |
| | | @Autowired |
| | | private ExamAnswerRecordService examAnswerRecordService; |
| | | |
| | | @Autowired |
| | | private IInformationService informationService; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 自定义分页数据 |
| | |
| | | //更新保安数据 |
| | | userService.updateById(user); |
| | | |
| | | //生成保安证的同时向保安证管理表中插入一条数据 |
| | | SecurityPaper securityPaper = new SecurityPaper(); |
| | | securityPaper.setUserId(user.getId()); |
| | | securityPaper.setNumber(result); |
| | | securityPaper.setCreateTime(new Date()); |
| | | securityPaper.setIdCardNo(user.getCardid()); |
| | | securityPaper.setPeopleName(user.getRealName()); |
| | | securityPaper.setExamId(Long.parseLong(examScore.getExamId())); |
| | | securityPaper.setApplyId(examScore.getApplyId()); |
| | | //新增保安员证信息 |
| | | securityPaperService.save(securityPaper); |
| | | |
| | | String s1 = |
| | | "update blade_user set hold = " + "'" + user.getHold() + "'" + |
| | | ",securitynumber = " + "'" + user.getSecuritynumber() + "'" + |
| | | ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" + |
| | | ",user_type = " + "'" + user.getUserType() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | |
| | | // String s1 = |
| | | // "insert into sys_security_paper(id,number,create_time,people_name,id_card_no,user_id,apply_id,exam_id) " + |
| | | // "values(" + "'" + securityPaper.getId() + "'" |
| | | // + "," + "'" + securityPaper.getNumber() +"'" |
| | | // + "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(securityPaper.getCreateTime()) +"'" |
| | | // + "," + "'" + securityPaper.getPeopleName() + "'" |
| | | // + "," + "'" + securityPaper.getIdCardNo() + "'" |
| | | // + "," + "'" + securityPaper.getUserId() + "'" |
| | | // + "," + "'" + securityPaper.getApplyId() + "'" |
| | | // + "," +"'" + securityPaper.getExamId() + "'" + ");" + |
| | | // "update blade_user set hold = " + "'" + user.getHold() + "'" + |
| | | // ",securitynumber = " + "'" + user.getSecuritynumber() + "'" + |
| | | // ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" + |
| | | // ",user_type = " + "'" + user.getUserType() + "'" + |
| | | // " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ExamScoreVO> scorePage(IPage page, String deptid, String jurisdiction) { |
| | | return page.setRecords(baseMapper.scorePage(page,deptid,jurisdiction)); |
| | | public IPage<ExamScoreVO> scorePage(IPage page, ExamScoreVO examScore) { |
| | | return page.setRecords(baseMapper.scorePage(page,examScore)); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 考试情况统计,按月统计各个培训学校考试合格人数和不合格人数 |
| | | * @param |
| | | */ |
| | | @Override |
| | | public Object getExamStatisInfo(InformationVO information) { |
| | | //获取培训学校信息 |
| | | Information information2 = new Information(); |
| | | information2.setStats("1"); |
| | | List<Information> informationList = informationService.list(Condition.getQueryWrapper(information2)); |
| | | //创建 objectList 集合 |
| | | List<Object> objectList = new ArrayList<>(); |
| | | for (Information information1 : informationList) { |
| | | //查询各个培训学校本年每月考试情况统计,不是测试学校 |
| | | if(!information1.getId().equals(469)) { |
| | | //合格和不合格 |
| | | ExamSocreStatisVo statisVo = new ExamSocreStatisVo(); |
| | | ExamSocreStatisVo statisVo1 = new ExamSocreStatisVo(); |
| | | |
| | | information.setDepartmentid(information1.getDepartmentid()); |
| | | //统计数据查询 |
| | | List<ExamSocreStatis> examStatisInfo = baseMapper.getExamStatisInfo(information); |
| | | //数据转换 |
| | | List<Integer> list = new ArrayList<>(); |
| | | List<Integer> list1 = new ArrayList<>(); |
| | | for (ExamSocreStatis examSocreStatis : examStatisInfo) { |
| | | //合格人数集合 |
| | | list.add(examSocreStatis.getHgnum()); |
| | | //不合格人数集合 |
| | | list1.add(examSocreStatis.getBhgnum()); |
| | | } |
| | | //合格 |
| | | statisVo.setName(information1.getEnterprisename()); |
| | | statisVo.setType(1); |
| | | statisVo.setExamSocreStatis(list); |
| | | //不合格 |
| | | statisVo1.setName(information1.getEnterprisename()); |
| | | statisVo1.setType(2); |
| | | statisVo1.setExamSocreStatis(list1); |
| | | //数据封装 |
| | | objectList.add(statisVo); |
| | | objectList.add(statisVo1); |
| | | } |
| | | } |
| | | //返回数据 |
| | | return objectList; |
| | | } |
| | | } |