src/main/java/org/springblade/modules/accreditation/mapper/AccreditationRecordsMapper.xml
@@ -34,6 +34,14 @@ blade_dept bt1 ON bu1.dept_id = bt1.id left join sys_information si on bt.id = si.departmentid left join sys_jurisdiction sj on sj.id = si.jurisdiction WHERE 1=1 and bu.status = 1 @@ -53,9 +61,18 @@ <if test="accreditationRecords.securityNumber!=null and accreditationRecords.securityNumber!=''"> and bu.securitynumber like concat('%', #{accreditationRecords.securityNumber},'%') </if> <if test="accreditationRecords.jurisdiction!=null and accreditationRecords.jurisdiction!='' and accreditationRecords.jurisdiction!='1372091709474910209'"> and (sj.id = #{accreditationRecords.jurisdiction} or sj.parent_id = #{accreditationRecords.jurisdiction}) </if> <if test="accreditationRecords.status!=null"> and sar.status = #{accreditationRecords.status} </if> <if test="accreditationRecords.createUser!=null"> and sar.create_user = #{accreditationRecords.createUser} </if> <if test="accreditationRecords.deptId!=null"> and bt.id = #{accreditationRecords.deptId} </if> <if test="accreditationRecords.type!=null"> and sar.type = #{accreditationRecords.type} </if> src/main/java/org/springblade/modules/accreditation/vo/AccreditationRecordsVo.java
@@ -96,4 +96,8 @@ * 是否制证 6:是 7:否 */ private Integer userType; private Long deptId; private String jurisdiction; } src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java
@@ -156,6 +156,8 @@ if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) { //合格 examScore.setQualified(0); //设置为未制证的状态 user1.setUserType(7); //正式考试通过生成保安证编号 ExamPaper paper = examPaperService.getById(examScore.getExamId()); // if (paper.getExamType() == 1) { @@ -176,7 +178,7 @@ } user1.setSecuritynumber(result); //发证日期 user1.setPaperTime(new Date()); // user1.setPaperTime(new Date()); //修改为持证保安 user1.setHold("1"); //分配保安角色 @@ -190,7 +192,7 @@ String s1 = "update blade_user set hold = " + "'" + user1.getHold() + "'" + ",securitynumber = " + "'" + user1.getSecuritynumber() + "'" + ",paper_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(user1.getPaperTime()) + "'" + ",user_type = " + "'" + user1.getUserType() + "'" + " " + "where id = " + "'" + user1.getId() + "'"; FtpUtil.sqlFileUpload(s1); } src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java
@@ -274,6 +274,8 @@ if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) { //合格 examScore.setQualified(0); //修改制证状态为未制证 user.setUserType(7); //正式考试通过生成保安证编号 // if (examPaper.getExamType()==1) { //如果已有保安证编号,不更新用户信息 @@ -293,7 +295,7 @@ } user.setSecuritynumber(result); //发证日期 user.setPaperTime(new Date()); // user.setPaperTime(new Date()); //修改为持证保安 user.setHold("1"); //更新保安数据 @@ -302,7 +304,7 @@ String s1 = "update blade_user set hold = " + "'" + user.getHold() + "'" + ",securitynumber = " + "'" + user.getSecuritynumber() + "'" + ",paper_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(user.getPaperTime()) + "'" + ",user_type = " + "'" + user.getUserType() + "'" + " " + "where id = " + "'" + user.getId() + "'"; FtpUtil.sqlFileUpload(s1); } src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java
@@ -135,9 +135,12 @@ " " + "where id = " + "'" + user.getId() + "'"; FtpUtil.sqlFileUpload(s1); } else { //实操成绩不为空 if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) { //合格 examScore.setQualified(0); //设置为未制证的状态 user.setUserType(7); //如果已有保安证编号,不更保安证编号信息 if (null == user.getSecuritynumber() || user.getSecuritynumber() == "") { //去生成保安证编号 @@ -202,6 +205,7 @@ " " + "where id = " + "'" + trainingRegistration.getId() + "';"+ "update blade_user set hold = " + "'" + user.getHold() + "'" + ",securitynumber = " + "'" + user.getSecuritynumber() + "'" + ",user_type = " + "'" + user.getUserType() + "'" + ",is_train = " + "'" + user.getIsTrain() + "'" + " " + "where id = " + "'" + user.getId() + "'"; FtpUtil.sqlFileUpload(s1); src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -715,13 +715,13 @@ treeNode.setParentId(Long.parseLong(user.getDeptId())); tree.get(0).getChildren().add(treeNode); } //获取子节点 List<TreeNode> children = tree.get(0).getChildren(); //排序 List<TreeNode> nodes = children.stream().sorted(Comparator.comparing(TreeNode::getId)).collect(Collectors.toList()); //设置排序后的集合 tree.get(0).setChildren(nodes); } //获取子节点 List<TreeNode> children = tree.get(0).getChildren(); //排序 List<TreeNode> nodes = children.stream().sorted(Comparator.comparing(TreeNode::getId)).collect(Collectors.toList()); //设置排序后的集合 tree.get(0).setChildren(nodes); //返回 return tree; } @@ -854,26 +854,60 @@ //新增 this.save(user); //内网同步 // String s = "insert into blade_user(" + // "id,tenant_id,account,password,real_name,phone,sex,role_id,dept_id," + // "cardid,nation,registered,securitynumber,hold,status,is_deleted) " + // "values(" + "'" + user.getId() + "'" + "," + // "'" + user.getTenantId() + "'" + "," + // "'" + user.getAccount() + "'" + "," + // "'" + user.getPassword() + "'" + "," + // "'" + user.getRealName() + "'" + "," + // "'" + user.getPhone() + "'" + "," + // "'" + user.getSex() + "'" + "," + // "'" + user.getRoleId() + "'" + // "," + "'" + user.getDeptId() + "'" + // "," + "'" + user.getCardid() + "'" + // "," + "'" + user.getNation() + "'" + // "," + "'" + user.getRegistered() + "'" + // "," + "'" + user.getSecuritynumber() + "'" + // "," + "'" + user.getHold() + "'" + // "," + "'" + user.getStatus() + "'" + // "," + "'" + user.getIsDeleted() + "'" // + ")"; String s = "insert into blade_user(" + "id,tenant_id,account,password,real_name,phone,sex,role_id,dept_id," + "cardid,nation,registered,securitynumber,hold,status,is_deleted) " + "values(" + "'" + user.getId() + "'" + "," + "'" + user.getTenantId() + "'" + "," + "'" + user.getAccount() + "'" + "," + "'" + user.getPassword() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" + "id,tenant_id,account,password,name,real_name,avatar,email,phone,sex," + "role_id,dept_id,cardid,nativePlace,nation,fingerprint,education," + "politicaloutlook,healstats,height,address,registered," + "securitynumber,hold,jurisdiction,examination_type,status,is_deleted,dispatch) " + "values(" + "'" + user.getId() + "'" + "," + "'" + user.getTenantId() + "'" + "," + "'" + user.getAccount() + "'" + "," + "'" + user.getPassword() + "'" + "," + "'" + user.getName() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getAvatar() + "'" + "," + "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" + "," + "'" + user.getDeptId() + "'" + "," + "'" + user.getCardid() + "'" + "," + "'" + user.getNativeplace() + "'" + "," + "'" + user.getNation() + "'" + "," + "'" + user.getFingerprint() + "'" + "," + "'" + user.getEducation() + "'" + "," + "'" + user.getPoliticaloutlook() + "'" + "," + "'" + user.getHealstats() + "'"+ "," + "'" + user.getHeight() + "'" + "," + "'" + user.getAddress() + "'" + "," + "'" + user.getRegistered() + "'" + "," + "'" + user.getSecuritynumber() + "'" + "," + "'" + user.getHold() + "'" + "," + "'" + user.getJurisdiction() + "'" + "," + "'" + user.getExaminationType() + "'" + "," + "'" + user.getStatus() + "'" + "," + "'" + user.getIsDeleted() + "'" + ")"; "," + "'" + user.getIsDeleted() + "'" + "," + "'" + user.getDispatch() + "'" + ")"; FtpUtil.sqlFileUpload(s); }else { //匹配组织机构是否一致,如果不一致