| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.codec.Charsets; |
| | | import org.springblade.common.excel.RowWriteHandler; |
| | | import org.springblade.common.utils.DesensitizedUtil; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | |
| | | max++; |
| | | result = pre + (decimalFormat.format(max)); |
| | | } |
| | | user1.setSecuritynumber(result); |
| | | |
| | | //生成保安证的同时向保安证管理表中插入一条数据 |
| | | SecurityPaper securityPaper = new SecurityPaper(); |
| | |
| | | securityPaper.setExamId(Long.parseLong(examScore1.getExamId())); |
| | | securityPaper.setApplyId(examScore1.getApplyId()); |
| | | securityPaper.setSource(1); |
| | | |
| | | //脱敏,内网 |
| | | SecurityPaper paper1 = securityPaper; |
| | | //新增保安员证信息 |
| | | securityPaper.setIdCardNo(""); |
| | | securityPaper.setNumber(DesensitizedUtil.desensitizedSecurityNumber(result)); |
| | | securityPaperService.save(securityPaper); |
| | | |
| | | //保安证编号同步内网 |
| | | //设置id |
| | | paper1.setId(securityPaper.getId()); |
| | | //数据同步 |
| | | String s = "insert into sys_security_paper(id,number,create_time,people_name,id_card_no,user_id,apply_id,exam_id,source) " + |
| | | "values(" + "'" + paper1.getId() + "'" + "," + |
| | | "'" + paper1.getNumber() + "'" + "," + |
| | | "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(paper1.getCreateTime()) + "'" + |
| | | "," + "'" + paper1.getPeopleName() + "'" + |
| | | "," + "'" + paper1.getIdCardNo() + "'" + |
| | | "," + "'" + paper1.getUserId() + "'" + |
| | | "," + "'" + paper1.getApplyId() + "'" + |
| | | "," + "'" + paper1.getExamId() + "'" + |
| | | "," + "'" + paper1.getSource() + "'" |
| | | + ")"; |
| | | myAsyncService.FTP(s); |
| | | |
| | | |
| | | //修改为持证保安 |
| | | user1.setHold("1"); |
| | | user1.setSecuritynumber(DesensitizedUtil.desensitizedSecurityNumber(result)); |
| | | //更新保安数据 |
| | | boolean b = userService.updateById(user1); |
| | | if (b) { |
| | | //数据同步 |
| | | String s1 = |
| | | "update blade_user set hold = " + "'" + user1.getHold() + "'" + |
| | | ",securitynumber = " + "'" + user1.getSecuritynumber() + "'" + |
| | | ",securitynumber = " + "'" + result + "'" + |
| | | ",user_type = " + "'" + user1.getUserType() + "'" + |
| | | " " + "where id = " + "'" + user1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | |
| | | ",all_grade = " + "'" + examScore.getAllGrade() + "'" + |
| | | ",qualified = " + "'" + examScore.getQualified() + "'" + |
| | | " " + "where id = " + "'" + examScore.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | |
| | | //本地修改 |