派生自 projectDept/qhighschool

EricsHu
2022-12-05 068fc7f2e81178e55fa191a13709af64b1a163f6
src/main/java/com/qxueyou/scc/exercise/service/impl/ExerciseCorrectionService.java
@@ -25,7 +25,7 @@
/**
 * 练习  实现service
 * 练习  实现service
 * @author 
 *
 */
@@ -39,7 +39,7 @@
//   IScoreChangeService  scoreChangeService;
   /**
    * app接口调用插入数据
    * app接口调用插入数据
    * @param groupId
    * @param groupName
    * @param exerciseNum
@@ -49,14 +49,14 @@
    * @return
    */
   public Result insertExerciseCorrection(String groupId,String groupName,String exerciseNum,String exerciseId,String correctids,String content){
      //赋值
      //赋值
      ExerciseCorrection exerCorrection=new ExerciseCorrection();
      exerCorrection.setDeleteFlag(false);
      TraceUtils.setCreateTrace(exerCorrection);
      exerCorrection.setExerciseGroupId(groupId);
      exerCorrection.setExerciseGroupName(groupName);
      
      // 修改为从数据库取,如果数据库中有值
      // 修改为从数据库取,如果数据库中有值
      String hql = " from ExerciseGroupItemRe r where r.exerciseGroupId = ? and r.exerciseItemId = ? and r.deleteFlag is false  ";
      ExerciseGroupItemRe re = this.findUnique(hql, CollectionUtils.newList(groupId,exerciseId), ExerciseGroupItemRe.class);
      if(null != re && re.getItemOrder() != null ){
@@ -67,10 +67,10 @@
      
      exerCorrection.setExerciseItemId(exerciseId);
      exerCorrection.setRemark(content);
      //字典字段的赋值
      //字典字段的赋值
      initDicForExerciseCorrection(correctids,exerCorrection);
      
      //提交人,提交人id 以及其他信息赋值通过查找ClientUtils
      //提交人,提交人id 以及其他信息赋值通过查找ClientUtils
      String classId = ClientUtils.getClassId();
      exerCorrection.setClassId(classId);
      exerCorrection.setSubmitUserId(ClientUtils.getUserId());
@@ -80,14 +80,14 @@
      
      this.save(exerCorrection);
      
      //纠错增加积分
      //纠错增加积分
//      scoreChangeService.doExerCor(ClientUtils.getUserId(), exerciseId);
      
      return new Result(true);
   }
   
   /**
    * 字典字段赋值
    * 字典字段赋值
    * @param correctids
    * @param exerCorrection
    */
@@ -102,7 +102,7 @@
         errorTypeId = errorTypeId.concat(sysDic.getDictionaryId()).concat(",");
         errorTypeName = errorTypeName.concat(sysDic.getValue()).concat(",");
      }
      //去掉多余","
      //去掉多余","
      if(StringUtils.isNotBlank(errorTypeId) && errorTypeId.indexOf(',') != -1){
         errorTypeId = errorTypeId.substring(0, errorTypeId.length()-1);
         errorTypeName = errorTypeName.substring(0, errorTypeName.length()-1);
@@ -113,7 +113,7 @@
   }
   
   /**
    * 更新练习
    * 更新练习
    * @param item
    * @param lstOptions
    * @param analysis
@@ -124,17 +124,17 @@
      
      if(correctionType==ExerciseCorrection.DEAL_STATUS_DONE){
         
         //待推送用户id列表
         //待推送用户id列表
         List<String> submitorIdsLst = querySubmitorIdsByExerItemId(item.getExerciseId());
         
         String hql = "update ExerciseCorrection set dealStatus = " + ExerciseCorrection.DEAL_STATUS_DONE + " where exerciseItemId = ? "  ;
         
         bulkUpdateInLoop(hql, new String[]{item.getExerciseId()});
         
         //推送消息给习题纠错学员
         //推送消息给习题纠错学员
         pushNotification(item,submitorIdsLst);
         
         //纠错被处理增加积分
         //纠错被处理增加积分
//         scoreChangeService.doExerCorDeal(null, item.getExerciseId());
         
      }
@@ -142,7 +142,7 @@
   }
   /**
    * 推送通知给用户
    * 推送通知给用户
    * @param item
    */
   private void pushNotification(ExerciseItem item,List<String> submitorIdsLst) {
@@ -151,8 +151,8 @@
      extras.put("senderId", "sys_msg");
      extras.put("type", "SYS_MSG");
      
      //jpushService.doJpushByUserIds(submitorIdsLst, extras, "习题纠错", "纠错已处理:"+item.getTitle(), "纠错已处理:"+item.getTitle());
      //pushService.pushToAccountList("exerciseCorrect", "习题纠错", "纠错已处理:"+item.getTitle(), submitorIdsLst,"sys_msg","SYS_MSG");
      //jpushService.doJpushByUserIds(submitorIdsLst, extras, "习题纠错", "纠错已处理:"+item.getTitle(), "纠错已处理:"+item.getTitle());
      //pushService.pushToAccountList("exerciseCorrect", "习题纠错", "纠错已处理:"+item.getTitle(), submitorIdsLst,"sys_msg","SYS_MSG");
   }
   /*