Administrator
2021-08-31 08363052cecb30230a2c8b3eba791ca8d1be00a5
src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java
@@ -198,7 +198,7 @@
            examScore.setAllGrade(Math.round(theoryGrade / 2));
         }
         if (age>50) {
            examScore.setAllGrade(Integer.parseInt(String.valueOf(Math.round(theoryGrade*0.3))));
            examScore.setAllGrade(Integer.parseInt(String.valueOf(Math.round(theoryGrade*0.5))));
         }
         //设置状态
         if (theoryGrade>=60){
@@ -260,7 +260,9 @@
                        } else {
                           //格式化
                           DecimalFormat decimalFormat = new DecimalFormat("00000");
                           result = pre + (decimalFormat.format(count++));
                           count++;
                           System.out.println("count = " + count);
                           result = pre + (decimalFormat.format(count));
                        }
                        user.setSecuritynumber(result);
                        //发证日期
@@ -268,16 +270,15 @@
                        //修改为持证保安
                        user.setHold("1");
                        //分配保安角色
                        Role role = new Role();
                        role.setRoleAlias("保安");
                        Role oneRole = roleService.getOne(Condition.getQueryWrapper(role));
                        user.setRoleId(oneRole.getId().toString());
//                        Role role = new Role();
//                        role.setRoleAlias("保安");
//                        Role oneRole = roleService.getOne(Condition.getQueryWrapper(role));
//                        user.setRoleId(oneRole.getId().toString());
                        //更新保安数据
                        userService.updateById(user);
                        String s1 =
                           "update blade_user set role_id = " + "'" +  user.getRoleId() + "'" +
                              ",hold = " + "'" + user.getHold() + "'" +
                           "update blade_user set hold = " + "'" +  user.getHold() + "'" +
                              ",securitynumber = " + "'" + user.getSecuritynumber() + "'" +
                              ",paper_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(user.getPaperTime()) + "'" +
                              " " +"where id = " + "'" + user.getId() + "'";
@@ -292,8 +293,8 @@
                     examScore.setAllGrade(Math.round((examScore.getTheoryGrade()+examScoreExcel.getLearnGrade())/2));
                  }
                  if (user.getAge()>50) {
                     examScore.setAllGrade(Integer.parseInt(String.valueOf(Math.round(examScore.getTheoryGrade()*0.3)))
                        + Integer.parseInt(String.valueOf(Math.round(examScoreExcel.getLearnGrade()*0.7))));
                     examScore.setAllGrade(Integer.parseInt(String.valueOf(Math.round(examScore.getTheoryGrade()*0.5)))
                        + Integer.parseInt(String.valueOf(Math.round(examScoreExcel.getLearnGrade()*0.5))));
                  }
                  //内网同步
@@ -315,4 +316,8 @@
   public List<Map<String, Object>> scoreStatistics(String deptid,String jurisdiction) {
      return baseMapper.scoreStatistics(deptid,jurisdiction);
   }
   @Override
   public List<Map<String, Object>> scoreStatisticssc(String deptid,String jurisdiction) {
      return baseMapper.scoreStatisticssc(deptid,jurisdiction);
   }
}