智慧保安后台管理-外网项目备份
zhongrj
2022-08-24 354ca3e06039fbd59a774b6fa168b283f5f1d392
src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java
@@ -60,6 +60,7 @@
   private final ExamPaperService examPaperService;
   private final SecurityPaperService securityPaperService;
   private final MyAsyncService myAsyncService;
   /**
@@ -100,7 +101,8 @@
            "values(" + "'" + sid + "'" +
            "," + "'" + format + "'" + ")";
         //FtpUtil.sqlFileUpload(s);
         myAsyncService.FTP(s);
         //数据同步
         myAsyncService.dataSync(s);
      }
      //返回
      return R.status(save);
@@ -155,7 +157,7 @@
            "update exam_score set qualified = " + "'" + examScore.getQualified() + "'" +
               " " + "where id = " + "'" + examScore.getId() + "'";
         //FtpUtil.sqlFileUpload(s1);
         myAsyncService.FTP(s1);
         myAsyncService.dataSync(s1);
      }
      return R.status(status);
   }
@@ -208,10 +210,12 @@
               securityPaper.setPeopleName(user1.getRealName());
               securityPaper.setExamId(Long.parseLong(examScore1.getExamId()));
               securityPaper.setApplyId(examScore1.getApplyId());
               securityPaper.setSource(1);
               //新增保安员证信息
               securityPaperService.save(securityPaper);
               //修改为持证保安
               user1.setHold("1");
               user1.setUpdateTime(new Date());
               //更新保安数据
               boolean b = userService.updateById(user1);
               if (b) {
@@ -220,9 +224,9 @@
                     "update blade_user set hold = " + "'" + user1.getHold() + "'" +
                        ",securitynumber = " + "'" + user1.getSecuritynumber() + "'" +
                        ",user_type = " + "'" + user1.getUserType() + "'" +
                        ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user1.getUpdateTime()) + "'" +
                        " " + "where id = " + "'" + user1.getId() + "'";
                  //FtpUtil.sqlFileUpload(s1);
                  myAsyncService.FTP(s1);
                  myAsyncService.dataSync(s1);
               }
            }
         } else {
@@ -253,7 +257,7 @@
            ",qualified = " + "'" + examScore.getQualified() + "'" +
            " " + "where id = " + "'" + examScore.getId() + "'";
      //FtpUtil.sqlFileUpload(s1);
      myAsyncService.FTP(s1);
      myAsyncService.dataSync(s1);
      //本地修改
      return R.status(examScoreService.updateById(examScore));
@@ -281,7 +285,7 @@
         //内网同步
         String s1 = "delete from exam_score where id = " + "'" + id + "'";
         //FtpUtil.sqlFileUpload(s1);
         myAsyncService.FTP(s1);
         myAsyncService.dataSync(s1);
      });
      return R.status(examScoreService.removeByIds(Func.toLongList(ids)));
   }