智慧保安后台管理-外网项目备份
tangzy
2022-02-24 d4b00c05321d9373a33bfb26618735e2a5868a81
src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java
@@ -27,6 +27,7 @@
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.service.IRoleService;
import org.springblade.modules.system.service.IUserService;
import org.springblade.modules.system.service.MyAsyncService;
import org.springblade.modules.system.vo.UserVO;
import org.springblade.modules.training.entity.TrainingRegistration;
import org.springblade.modules.training.service.TrainingRegistrationService;
@@ -43,6 +44,7 @@
/**
 * 考试成绩服务实现类
 *
 * @author zhongrj
 */
@Service
@@ -71,11 +73,13 @@
   @Autowired
   private IInformationService informationService;
   @Autowired
   private MyAsyncService myAsyncService;
   /**
    * 自定义分页数据
    *
    * @param page 分页条件
    * @param examScore 考试成绩对象
    * @return
@@ -95,6 +99,7 @@
   /**
    * 详情
    *
    * @param examScore 考试成绩信息对象
    */
   @Override
@@ -104,6 +109,7 @@
   /**
    * 保存考试成绩
    *
    * @param examScore 考试成绩信息对象
    * @return
    */
@@ -177,7 +183,8 @@
            String s =
               "update sys_apply set is_exam = " + apply1.getIsExam() + " " +"where id = " + "'" + apply1.getId() + "';" +
                  "update blade_user set is_apply = " + user.getIsApply() + " " +"where id = " + "'" + user.getId() + "'";
            FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
         }
         //模拟考试
@@ -200,7 +207,8 @@
            String s =
               "update sys_training_registration set is_exam = " + trainingRegistration1.getIsExam() + " " +"where id = " + "'" + trainingRegistration1.getId() + "';" +
                  "update blade_user set is_train = " + user.getIsTrain() + " " +"where id = " + "'" + user.getId() + "'";
            FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
         }
         //设置考试ID
@@ -230,7 +238,8 @@
               ",exam_end_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:dd").format(examScore.getExamEndTime()) + "'" +
               ",qualified = " + "'" + examScore.getQualified() + "'" +
               " " +"where id = " + "'" + examScore.getId() + "'";
         FtpUtil.sqlFileUpload(s1);
         //FtpUtil.sqlFileUpload(s1);
         myAsyncService.FTP(s1);
         if (i>0){
            //返回结果
@@ -243,6 +252,7 @@
   /**
    * 导入实操成绩
    *
    * @param examScoreExcelList
    * @param isCovered 是否覆盖
    */
@@ -344,7 +354,8 @@
//                                       ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" +
//                                       ",user_type = " + "'" + user.getUserType() + "'" +
//                                       " " + "where id = " + "'" + user.getId() + "'";
                                 FtpUtil.sqlFileUpload(s1);
                                 //FtpUtil.sqlFileUpload(s1);
                                 myAsyncService.FTP(s1);
                              }
                           }
                        } else {
@@ -374,7 +385,8 @@
                              ",all_grade = " + "'" + examScore.getAllGrade() + "'" +
                              ",qualified = " + "'" + examScore.getQualified() + "'" +
                              " " + "where id = " + "'" + examScore.getId() + "'";
                        FtpUtil.sqlFileUpload(s1);
                        //FtpUtil.sqlFileUpload(s1);
                        myAsyncService.FTP(s1);
                        //更新成绩数据
                        baseMapper.updateById(examScore);
                     }else {
@@ -469,6 +481,7 @@
   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);
@@ -476,6 +489,7 @@
   /**
    * 修改成绩信息
    *
    * @param examScore
    * @return
    */
@@ -495,6 +509,7 @@
   /**
    * 考试成绩及状态修改
    *
    * @param updateParamVo
    */
   @Override
@@ -601,6 +616,7 @@
   /**
    * 考试重置
    *
    * @param updateParamVo
    * @return
    */
@@ -638,7 +654,8 @@
                     "update blade_user set is_train = " + "'" + user.getIsTrain() + "'" +
                     " " + "where id = " + "'" + user.getId() + "';"+
                     "delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'";
               FtpUtil.sqlFileUpload(s1);
               //FtpUtil.sqlFileUpload(s1);
               myAsyncService.FTP(s1);
               return true;
            }
@@ -668,7 +685,8 @@
                  "update blade_user set is_train = " + "'" + user.getIsTrain() + "'" +
                     " " + "where id = " + "'" + user.getId() + "';"+
                  "delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'";
               FtpUtil.sqlFileUpload(s1);
               //FtpUtil.sqlFileUpload(s1);
               myAsyncService.FTP(s1);
               return true;
            }
@@ -679,6 +697,7 @@
   /**
    * 按条件查询成绩数据
    *
    * @param examScoreVO
    * @return
    */
@@ -690,6 +709,7 @@
   /**
    * 考试状态修改,考试成绩恢复
    *
    * @param
    * @return
    */
@@ -753,6 +773,7 @@
   /**
    * 点击了开始考试后超过60分钟后再考试的,计算之前的考试成绩
    *
    * @param examScore
    * @return
    */
@@ -796,7 +817,8 @@
      String s =
         "update sys_training_registration set is_exam = " + trainingRegistration1.getIsExam() + " " +"where id = " + "'" + trainingRegistration1.getId() + "';" +
            "update blade_user set is_train = " + user.getIsTrain() + " " +"where id = " + "'" + user.getId() + "'";
      FtpUtil.sqlFileUpload(s);
      //FtpUtil.sqlFileUpload(s);
      myAsyncService.FTP(s);
      //设置理论得分
      score.setTheoryGrade(count);
@@ -823,7 +845,8 @@
            ",exam_end_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:dd").format(new Date()) + "'" +
            ",qualified = " + "'" + score.getQualified() + "'" +
            " " +"where id = " + "'" + score.getId() + "'";
      FtpUtil.sqlFileUpload(s1);
      //FtpUtil.sqlFileUpload(s1);
      myAsyncService.FTP(s1);
      if (i>0){
         //返回结果
@@ -834,6 +857,7 @@
   /**
    * 考试情况统计,按月统计各个培训学校考试合格人数和不合格人数
    *
    * @param
    */
   @Override