| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springblade.common.utils.DesensitizedUtil; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.modules.FTP.FtpUtil; |
| | |
| | | count++; |
| | | result = pre + (decimalFormat.format(count)); |
| | | } |
| | | user.setSecuritynumber(result); |
| | | //脱敏处理 |
| | | user.setSecuritynumber(DesensitizedUtil.desensitizedSecurityNumber(result)); |
| | | //修改为持证保安 |
| | | user.setHold("1"); |
| | | user.setUpdateTime(new Date()); |
| | |
| | | securityPaper.setExamId(Long.parseLong(examScore.getExamId())); |
| | | securityPaper.setApplyId(examScore.getApplyId()); |
| | | securityPaper.setSource(1); |
| | | //内网对象 |
| | | SecurityPaper paper = securityPaper; |
| | | //新增保安员证信息 |
| | | securityPaper.setNumber(DesensitizedUtil.desensitizedSecurityNumber(result)); |
| | | securityPaper.setIdCardNo(""); |
| | | securityPaperService.save(securityPaper); |
| | | |
| | | //设置id |
| | | paper.setId(securityPaper.getId()); |
| | | //内网同步 |
| | | String s1 = |
| | | "insert into sys_security_paper(id,number,create_time,people_name,id_card_no,user_id,apply_id,exam_id,source) " + |
| | | "values(" + "'" + paper.getId() + "'" |
| | | + "," + "'" + paper.getNumber() +"'" |
| | | + "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(paper.getCreateTime()) +"'" |
| | | + "," + "'" + paper.getPeopleName() + "'" |
| | | + "," + "'" + paper.getIdCardNo() + "'" |
| | | + "," + "'" + paper.getUserId() + "'" |
| | | + "," + "'" + paper.getApplyId() + "'" |
| | | + "," + "'" + paper.getExamId() + "'" |
| | | + "," +"'" + paper.getSource() + "'" + ");" + |
| | | "update blade_user set hold = " + "'" + user.getHold() + "'" + |
| | | ",securitynumber = " + "'" + user.getSecuritynumber() + "'" + |
| | | ",securitynumber = " + "'" + result + "'" + |
| | | ",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); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | |
| | | //更新成绩数据 |
| | | baseMapper.updateById(examScore); |
| | | } else { |
| | | errorList.add(examScoreExcel.getIdCardNo()); |
| | | errorList.add(examScoreExcel.getName()); |
| | | status.set(false); |
| | | } |
| | | }); |