智慧保安后台管理-外网项目备份
tangzy
2021-09-16 0af331c7df1f4e3365b3cb5abd60eaaa09807513
src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java
@@ -115,6 +115,25 @@
      return R.status(examScoreService.updateById(examScore));
   }
   /**
    * 缺考标记修改
    *
    * @param examScore 考试成绩信息对象
    */
   @PostMapping("/updateAbsent")
   public R updateAbsent(@RequestBody ExamScore examScore) {
      examScore.setQualified(3);
      boolean status = examScoreService.updateByIdAndQualifiee(examScore);
      //内网数据推送
      String s1 =
         "update exam_score set qualified = " + "'" + examScore.getQualified() + "'" +
            " " + "where id = " + "'" + examScore.getId() + "'";
      FtpUtil.sqlFileUpload(s1);
      return R.status(status);
   }
   /**
    * 修改总成绩
    *
@@ -135,14 +154,15 @@
               //去生成保安证编号
               String pre = SecurityPaperUtil.getSecurityPaper();
               //查询当前年份已有的保安证编号
               int count = userService.getSecurityPaperCount(pre);
               int max = userService.getSecurityPaperCount(pre);
               String result = null;
               if (count == 0) {
               if (max == 0) {
                  result = pre + "00000";
               } else {
                  //格式化
                  DecimalFormat decimalFormat = new DecimalFormat("00000");
                  result = pre + (decimalFormat.format(count++));
                  max++;
                  result = pre + (decimalFormat.format(max));
               }
               user.setSecuritynumber(result);
               //发证日期