智慧保安后台管理-外网项目备份
src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java
@@ -28,6 +28,7 @@
import org.springblade.modules.exam.service.ExamScoreService;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.service.IUserService;
import org.springblade.modules.system.service.MyAsyncService;
import org.springblade.modules.training.entity.TrainingRegistration;
import org.springblade.modules.training.service.TrainingRegistrationService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -56,6 +57,8 @@
   @Autowired
   private TrainingRegistrationService trainingRegistrationService;
   @Autowired
   private  MyAsyncService myAsyncService;
   /**
    * 自定义分页数据
@@ -142,7 +145,8 @@
                  + "'" + examId + "'" + ","
                  +"'" + apply1.getIsExam() + "'" + ");" +
                  "update blade_user set is_apply = " + "'" + user1.getIsApply() + "'" +"where id = " + "'" + user1.getId() + "'";
               FtpUtil.sqlFileUpload(s);
               //FtpUtil.sqlFileUpload(s);
               myAsyncService.dataSync(s);
            }else {
               if (user1.getIsApply()!=1) {
                  Apply apply1 = new Apply();
@@ -173,7 +177,8 @@
                     + "'" + examId + "'" + ","
                     +"'" + apply1.getIsExam() + "'" + ");" +
                     "update blade_user set is_apply = " + "'" + user1.getIsApply() + "'" +"where id = " + "'" + user1.getId() + "'";
                  FtpUtil.sqlFileUpload(s);
                  //FtpUtil.sqlFileUpload(s);
                  myAsyncService.dataSync(s);
               }
            }
         }
@@ -465,7 +470,8 @@
         String s1 =
            "update sys_apply set is_exam = " + apply1.getIsExam() + " " +"where id = " + "'" + apply1.getId() + "'";
         FtpUtil.sqlFileUpload(s1);
         //FtpUtil.sqlFileUpload(s1);
         myAsyncService.dataSync(s1);
      }
      //模拟考
      if (apply.getExamType()==2){
@@ -478,7 +484,8 @@
         String s1 =
            "update sys_training_registration set is_exam = " + trainingRegistration.getIsExam() + " " +"where id = " + "'" + trainingRegistration.getId() + "'";
         FtpUtil.sqlFileUpload(s1);
         //FtpUtil.sqlFileUpload(s1);
         myAsyncService.dataSync(s1);
      }
   }