he2802 2 年之前
父節點
當前提交
f2a4029bac

+ 57 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/common/CommonController.java

@@ -41,7 +41,9 @@ import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.goods.vo.UserGoodsListVo;
 import com.zhongzheng.modules.goods.vo.UserGoodsListVo;
 import com.zhongzheng.modules.grade.bo.*;
 import com.zhongzheng.modules.grade.bo.*;
 import com.zhongzheng.modules.grade.service.IClassGradeService;
 import com.zhongzheng.modules.grade.service.IClassGradeService;
+import com.zhongzheng.modules.grade.service.IClassGradeUserService;
 import com.zhongzheng.modules.grade.service.IUserPeriodService;
 import com.zhongzheng.modules.grade.service.IUserPeriodService;
+import com.zhongzheng.modules.grade.vo.ClassPeriodStudentVo;
 import com.zhongzheng.modules.grade.vo.SyncGoodsExport;
 import com.zhongzheng.modules.grade.vo.SyncGoodsExport;
 import com.zhongzheng.modules.order.bo.TopOldOrderRefundBo;
 import com.zhongzheng.modules.order.bo.TopOldOrderRefundBo;
 import com.zhongzheng.modules.order.domain.Order;
 import com.zhongzheng.modules.order.domain.Order;
@@ -130,6 +132,8 @@ public class CommonController extends BaseController {
     private IDistributionActivityGoodsService iDistributionActivityGoodsService;
     private IDistributionActivityGoodsService iDistributionActivityGoodsService;
     @Autowired
     @Autowired
     private IOrderGoodsRefundService iOrderGoodsRefundService;
     private IOrderGoodsRefundService iOrderGoodsRefundService;
+    @Autowired
+    private IClassGradeUserService iClassGradeUserService;
 
 
     /**
     /**
      * 通用下载请求
      * 通用下载请求
@@ -539,4 +543,57 @@ public class CommonController extends BaseController {
         List<ActivityGoodsPriceVo> list = iDistributionActivityGoodsService.getGoodsList(bo);
         List<ActivityGoodsPriceVo> list = iDistributionActivityGoodsService.getGoodsList(bo);
         return getDataTable(list);
         return getDataTable(list);
     }
     }
+
+    @ApiOperation("学时抽查")
+    @PreAuthorize("@ss.hasPermi('system:withdrawal:add')")
+    @Log(title = "学时抽查", businessType = BusinessType.INSERT)
+    @PostMapping("/common/free/decryptOfficialInfo")
+    public AjaxResult<ClassPeriodStudentVo> decryptOfficialInfo(@RequestBody ClassGradeDecryptQueryBo bo) {
+        return AjaxResult.success(iClassGradeUserService.DecryptOfficialInfo(bo));
+    }
+
+    @ApiOperation("学时抽查加密")
+    @PreAuthorize("@ss.hasPermi('system:withdrawal:add')")
+    @PostMapping("/common/free/encryptDes")
+    public AjaxResult encryptDes(@RequestBody ClassGradeDecryptQueryBo bo) {
+        try{
+            byte[] Keys = new byte[]{0x22, 0x34, 0x76, 0x58, (byte) 0x90, (byte) 0xAB, (byte) 0xAD, (byte) 0xBF};
+            byte[] rgbKey = "0ca175b9c0f726a831d895e26933246".substring(0, 8).getBytes("UTF-8");
+            String source = "bh="+bo.getBh()+"&idnum="+bo.getIdnum()+"&datetime=20230627";
+            System.out.println(source);
+            return AjaxResult.success(ToolsUtils.encryptDesNew(source,"0ca175b9c0f726a831d895e26933246".substring(0, 8)));
+        }catch (Exception e){
+            System.out.println(e.getMessage());
+            return null;
+        }
+    }
+
+    @ApiOperation("学时抽查解密")
+    @PreAuthorize("@ss.hasPermi('system:withdrawal:add')")
+    @PostMapping("/common/free/dncryptDes")
+    public AjaxResult dncryptDes(@RequestBody ClassGradeDecryptQueryBo bo) {
+        try{
+            byte[] Keys = new byte[]{0x22, 0x34, 0x76, 0x58, (byte) 0x90, (byte) 0xAB, (byte) 0xAD, (byte) 0xBF};
+            byte[] rgbKey = "01b5d9833987efdff54483cdc9720da6".substring(0, 8).getBytes("UTF-8");
+            System.out.println(ToolsUtils.decryptDesNew(bo.getData(), "01b5d9833987efdff54483cdc9720da6".substring(0, 8)));
+            return AjaxResult.success();
+        }catch (Exception e){
+            System.out.println(e.getMessage());
+            return null;
+        }
+    }
+
+
+    @ApiOperation("商品列表")
+    @PreAuthorize("@ss.hasPermi('system:withdrawal:add')")
+    @Log(title = "商品列表", businessType = BusinessType.INSERT)
+    @GetMapping("/common/free/goods/list")
+    public TableDataInfo<GoodsVo> goodsList(GoodsQueryBo bo) {
+      /*  bo.setStatus(new ArrayList<Integer>(){{
+            add(1);
+        }});*/
+        startPage();
+        List<GoodsVo> list = iGoodsService.selectList(bo);
+        return getDataTable(list);
+    }
 }
 }

+ 2 - 0
zhongzheng-common/src/main/java/com/zhongzheng/common/utils/DateUtils.java

@@ -27,6 +27,8 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
 
 
     public static String YYYY_MM_DD = "yyyy-MM-dd";
     public static String YYYY_MM_DD = "yyyy-MM-dd";
 
 
+    public static String YYYYMMDD = "yyyyMMdd";
+
     public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
     public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
 
 
     public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
     public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";

+ 125 - 0
zhongzheng-common/src/main/java/com/zhongzheng/common/utils/ToolsUtils.java

@@ -1,6 +1,7 @@
 package com.zhongzheng.common.utils;
 package com.zhongzheng.common.utils;
 
 
 
 
+import cn.hutool.core.convert.Convert;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.core.util.StrUtil;
 import com.aliyun.dysmsapi20170525.models.SendSmsRequest;
 import com.aliyun.dysmsapi20170525.models.SendSmsRequest;
@@ -12,6 +13,13 @@ import com.zhongzheng.common.exception.CustomException;
 import io.micrometer.core.lang.NonNull;
 import io.micrometer.core.lang.NonNull;
 import net.sf.jsqlparser.expression.LongValue;
 import net.sf.jsqlparser.expression.LongValue;
 
 
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.DESKeySpec;
+import javax.crypto.spec.DESedeKeySpec;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
 import java.awt.image.BufferedImage;
 import java.awt.image.BufferedImage;
 import java.io.*;
 import java.io.*;
 import java.nio.charset.StandardCharsets;
 import java.nio.charset.StandardCharsets;
@@ -489,4 +497,121 @@ public class ToolsUtils {
         return buffer.toString();
         return buffer.toString();
     }
     }
 
 
+    public static String dataSign(String sourceMsg, String pKey) throws NoSuchAlgorithmException {
+        String tempPKey = MD5PubHasher(pKey.getBytes(StandardCharsets.UTF_8));
+        tempPKey = sourceMsg + tempPKey;
+        tempPKey = MD5PubHasher(tempPKey.getBytes(StandardCharsets.UTF_8));
+        return tempPKey;
+    }
+
+    private static String MD5PubHasher(byte[] hashText) throws NoSuchAlgorithmException {
+        MessageDigest md5 = MessageDigest.getInstance("MD5");
+        byte[] b = md5.digest(hashText);
+        StringBuilder ret = new StringBuilder();
+        for (int i = 0; i < b.length; i++) {
+            ret.append(String.format("%02x", b[i]));
+        }
+        return ret.toString();
+    }
+
+    public static String encryptDes(String source, byte[] key, byte[] iv) throws Exception {
+        SecretKey secretKey = new SecretKeySpec(key, "DES");
+        IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);
+        Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
+        cipher.init(Cipher.ENCRYPT_MODE, secretKey, ivParameterSpec);
+        byte[] inputByteArray = source.getBytes(StandardCharsets.UTF_8);
+        byte[] encryptedByteArray = cipher.doFinal(inputByteArray);
+        return new String(java.util.Base64.getEncoder().encode(encryptedByteArray));
+    }
+
+    public static String decryptDes(String source, byte[] key, byte[] iv) throws Exception {
+        SecretKey secretKey = new SecretKeySpec(key, "DES");
+        IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);
+        Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
+        cipher.init(Cipher.DECRYPT_MODE, secretKey, ivParameterSpec);
+        byte[] inputByteArray = java.util.Base64.getDecoder().decode(source.getBytes(StandardCharsets.UTF_8));
+        byte[] decryptedByteArray = cipher.doFinal(inputByteArray);
+        return new String(decryptedByteArray, StandardCharsets.UTF_8);
+    }
+
+    /*public static String encryptDesNew(String source, String pass) throws Exception {
+        byte[] rgbKey = pass.getBytes("UTF-8");
+        byte[] rgbIV = pass.getBytes("UTF-8");
+                DESedeKeySpec desKeySpec = new DESedeKeySpec(rgbKey);
+             SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
+             SecretKey secretKey = keyFactory.generateSecret(desKeySpec);
+             Cipher cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding");
+            byte[] inputByteArray = source.getBytes("UTF-8");
+            IvParameterSpec ivParameterSpec = new IvParameterSpec(rgbIV);
+            cipher.init(Cipher.ENCRYPT_MODE, secretKey, ivParameterSpec);
+            byte[] encrypted = cipher.doFinal(inputByteArray);
+            return Base64.getEncoder().encodeToString(encrypted);}
+    }*/
+
+    /**
+
+     Des解密
+     @param source 源字符串
+     @param pass 密钥,长度必须8位
+     @return 解密后的字符串 */
+    /*public static String decryptDesNew(String source, String pass) throws Exception {
+        byte[] rgbKey = pass.getBytes("UTF-8");
+        byte[] rgbIV = pass.getBytes("UTF-8");
+        DESedeKeySpec desKeySpec = new DESedeKeySpec(rgbKey);
+        SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
+        SecretKey secretKey = keyFactory.generateSecret(desKeySpec);
+        Cipher cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding")) {
+        byte[] inputByteArray = Base64.getDecoder().decode(source);
+        IvParameterSpec ivParameterSpec = new IvParameterSpec(rgbIV);
+        cipher.init(Cipher.DECRYPT_MODE, secretKey, ivParameterSpec);
+        byte[] decrypted = cipher.doFinal(inputByteArray);
+        return new String(decrypted, "UTF-8");
+        }
+    }*/
+
+
+ public static String encryptDesNew(String source, String pass) throws Exception {
+        byte[] rgbKey = pass.getBytes(StandardCharsets.UTF_8);
+        byte[] rgbIV = pass.getBytes(StandardCharsets.UTF_8);
+        DESKeySpec desKeySpec = new DESKeySpec(rgbKey);
+        SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
+        SecretKey secretKey = keyFactory.generateSecret(desKeySpec);
+        Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
+        byte[] inputByteArray = source.getBytes(StandardCharsets.UTF_8);
+        IvParameterSpec ivParameterSpec = new IvParameterSpec(rgbIV);
+        cipher.init(Cipher.ENCRYPT_MODE, secretKey, ivParameterSpec);
+        byte[] encryptedByteArray = cipher.doFinal(inputByteArray);
+        return Base64.getEncoder().encodeToString(encryptedByteArray);
+    }
+
+   public static String decryptDesNew(String source, String pass) throws Exception {
+        byte[] rgbKey = pass.getBytes(StandardCharsets.UTF_8);
+        byte[] rgbIV = pass.getBytes(StandardCharsets.UTF_8);
+        DESKeySpec desKeySpec = new DESKeySpec(rgbKey);
+        SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
+        SecretKey secretKey = keyFactory.generateSecret(desKeySpec);
+        Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
+        byte[] inputByteArray = Base64.getDecoder().decode(source);
+        IvParameterSpec ivParameterSpec = new IvParameterSpec(rgbIV);
+        cipher.init(Cipher.DECRYPT_MODE, secretKey, ivParameterSpec);
+        byte[] decryptedByteArray = cipher.doFinal(inputByteArray);
+        return new String(decryptedByteArray, StandardCharsets.UTF_8);
+    }
+
+    private static String base64Encode(byte[] bytes) throws IOException {
+        ByteArrayOutputStream output = new ByteArrayOutputStream();
+        Base64.getEncoder().wrap(output).write(bytes);
+        return output.toString(StandardCharsets.UTF_8.name());
+    }
+
+    /*private static byte[] base64Decode(String str) throws IOException {
+        ByteArrayOutputStream output = new ByteArrayOutputStream();
+        Base64.getDecoder().wrap(output).write(str.getBytes(StandardCharsets.UTF_8));
+        return output.toByteArray();
+    }*/
+    private static byte[] base64Decode(String str) throws IOException {
+        byte[] decodedString = Base64.getDecoder().decode(new String(str).getBytes("UTF-8"));
+        return decodedString;
+    }
+
 }
 }

+ 5 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/config/SecurityConfig.java

@@ -148,6 +148,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .antMatchers("/common/free/**").anonymous()
                 .antMatchers("/common/free/**").anonymous()
                 .antMatchers("/common/download**").anonymous()
                 .antMatchers("/common/download**").anonymous()
                 .antMatchers("/common/download/resource**").anonymous()
                 .antMatchers("/common/download/resource**").anonymous()
+                .antMatchers("/grade/grade/listPeriod").anonymous()
+                .antMatchers("/course/business/queryFullId").anonymous()
+                .antMatchers("/grade/grade/listUserPeriod").anonymous()
+                .antMatchers("/grade/grade/listPeriodAudit").anonymous()
+                .antMatchers("/grade/grade/listUserVideoRecord").anonymous()
                 .antMatchers("/swagger-ui.html").anonymous()
                 .antMatchers("/swagger-ui.html").anonymous()
                 .antMatchers("/swagger-resources/**").anonymous()
                 .antMatchers("/swagger-resources/**").anonymous()
                 .antMatchers("/webjars/**").anonymous()
                 .antMatchers("/webjars/**").anonymous()

+ 29 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/bo/ClassGradeDecryptQueryBo.java

@@ -0,0 +1,29 @@
+package com.zhongzheng.modules.grade.bo;
+
+import com.zhongzheng.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+/**
+ * 班级分页查询对象 class_grade
+ *
+ * @author ruoyi
+ * @date 2021-11-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel("班级分页查询对象")
+public class ClassGradeDecryptQueryBo extends BaseEntity {
+
+	private String data;
+
+	private String tenantId;
+
+	private String bh;
+
+	private String idnum;
+}

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/IClassGradeUserService.java

@@ -54,6 +54,8 @@ public interface IClassGradeUserService extends IService<ClassGradeUser> {
 
 
 	String pushOfficialInfo(ClassGradeUserQueryBo bo);
 	String pushOfficialInfo(ClassGradeUserQueryBo bo);
 
 
+	ClassPeriodStudentVo DecryptOfficialInfo(ClassGradeDecryptQueryBo bo);
+
 	String pushOfficialInfoMore(List<ClassGradeUserQueryBo> list);
 	String pushOfficialInfoMore(List<ClassGradeUserQueryBo> list);
 
 
 	String pushOfficialPeriod(ClassGradeUserQueryBo bo);
 	String pushOfficialPeriod(ClassGradeUserQueryBo bo);

+ 184 - 112
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -11,11 +11,13 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
 import com.github.pagehelper.Page;
+import com.google.common.base.Splitter;
 import com.zhongzheng.common.annotation.DataScope;
 import com.zhongzheng.common.annotation.DataScope;
 import com.zhongzheng.common.core.domain.AjaxResult;
 import com.zhongzheng.common.core.domain.AjaxResult;
 import com.zhongzheng.common.core.redis.RedisCache;
 import com.zhongzheng.common.core.redis.RedisCache;
 import com.zhongzheng.common.core.redis.RedisLockEntity;
 import com.zhongzheng.common.core.redis.RedisLockEntity;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.exception.CustomException;
+import com.zhongzheng.common.type.EncryptHandler;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.common.utils.ToolsUtils;
 import com.zhongzheng.common.utils.ToolsUtils;
@@ -35,6 +37,7 @@ import com.zhongzheng.modules.goods.domain.Goods;
 import com.zhongzheng.modules.goods.service.IGoodsService;
 import com.zhongzheng.modules.goods.service.IGoodsService;
 import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.grade.bo.*;
 import com.zhongzheng.modules.grade.bo.*;
+import com.zhongzheng.modules.grade.domain.ClassGrade;
 import com.zhongzheng.modules.grade.domain.ClassGradeInterface;
 import com.zhongzheng.modules.grade.domain.ClassGradeInterface;
 import com.zhongzheng.modules.grade.domain.ClassGradeUser;
 import com.zhongzheng.modules.grade.domain.ClassGradeUser;
 import com.zhongzheng.modules.grade.domain.StudyCountLog;
 import com.zhongzheng.modules.grade.domain.StudyCountLog;
@@ -144,6 +147,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
     @Autowired
     @Autowired
     private IUserService iUserService;
     private IUserService iUserService;
 
 
+
     @Value("${aliyun.oss.endpoint}")
     @Value("${aliyun.oss.endpoint}")
     private String ALIYUN_OSS_ENDPOINT;
     private String ALIYUN_OSS_ENDPOINT;
 
 
@@ -160,7 +164,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
     private String OFFICIALPUSH_TOKEN;
     private String OFFICIALPUSH_TOKEN;
 
 
     @Autowired
     @Autowired
-    private  IUserPeriodService iUserPeriodService;
+    private IUserPeriodService iUserPeriodService;
 
 
     @Autowired
     @Autowired
     private ISysOldOrgService sysOldOrgService;
     private ISysOldOrgService sysOldOrgService;
@@ -265,22 +269,22 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
 
 
     @Override
     @Override
     public Boolean changeGradeFree(ClassGradeUserChangeBo bo) {
     public Boolean changeGradeFree(ClassGradeUserChangeBo bo) {
-        if(Validator.isEmpty(bo.getUserId())||Validator.isEmpty(bo.getGradeId())||Validator.isEmpty(bo.getOrderGoodsId())||Validator.isEmpty(bo.getGoodsId())){
+        if (Validator.isEmpty(bo.getUserId()) || Validator.isEmpty(bo.getGradeId()) || Validator.isEmpty(bo.getOrderGoodsId()) || Validator.isEmpty(bo.getGoodsId())) {
             throw new CustomException("参数缺失");
             throw new CustomException("参数缺失");
         }
         }
         OrderGoodsVo orderGoodsVo = iOrderGoodsService.queryById(bo.getOrderGoodsId());
         OrderGoodsVo orderGoodsVo = iOrderGoodsService.queryById(bo.getOrderGoodsId());
         Long oldGradeId = orderGoodsVo.getGradeId();
         Long oldGradeId = orderGoodsVo.getGradeId();
-        if(Validator.isEmpty(oldGradeId)){
+        if (Validator.isEmpty(oldGradeId)) {
             throw new CustomException("参数错误");
             throw new CustomException("参数错误");
         }
         }
         UserPeriodQueryBo queryBo = new UserPeriodQueryBo();
         UserPeriodQueryBo queryBo = new UserPeriodQueryBo();
         queryBo.setGradeId(oldGradeId);
         queryBo.setGradeId(oldGradeId);
         queryBo.setUserId(bo.getUserId());
         queryBo.setUserId(bo.getUserId());
         Long logNum = iUserPeriodService.checkGoodsStudy(queryBo);
         Long logNum = iUserPeriodService.checkGoodsStudy(queryBo);
-        if(logNum.longValue()>0L){
+        if (logNum.longValue() > 0L) {
             throw new CustomException("已有学习数据,无法换班");
             throw new CustomException("已有学习数据,无法换班");
         }
         }
-        if(bo.getGradeId().longValue()==oldGradeId){
+        if (bo.getGradeId().longValue() == oldGradeId) {
             throw new CustomException("更换班级和老班级一样");
             throw new CustomException("更换班级和老班级一样");
         }
         }
         String requestId = IdUtil.simpleUUID();
         String requestId = IdUtil.simpleUUID();
@@ -296,13 +300,13 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                         .eq(ClassGradeUser::getStatus, 1)
                         .eq(ClassGradeUser::getStatus, 1)
                         .eq(ClassGradeUser::getGradeId, oldGradeId)
                         .eq(ClassGradeUser::getGradeId, oldGradeId)
                         .last("limit 1"));
                         .last("limit 1"));
-                if(Validator.isEmpty(classGradeUser)){
+                if (Validator.isEmpty(classGradeUser)) {
                     throw new CustomException("数据错误");
                     throw new CustomException("数据错误");
                 }
                 }
                 removeById(classGradeUser.getId());
                 removeById(classGradeUser.getId());
                 //通知旧系统
                 //通知旧系统
                 Goods goods = iGoodsService.getById(bo.getGoodsId());
                 Goods goods = iGoodsService.getById(bo.getGoodsId());
-                iClassGradeService.gradeChangeEjjjPeople(goods.getBusinessId(),oldGradeId);
+                iClassGradeService.gradeChangeEjjjPeople(goods.getBusinessId(), oldGradeId);
 
 
                 OrderGoods orderGoods = new OrderGoods();
                 OrderGoods orderGoods = new OrderGoods();
                 orderGoods.setOrderGoodsId(bo.getOrderGoodsId());
                 orderGoods.setOrderGoodsId(bo.getOrderGoodsId());
@@ -369,7 +373,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                     updateById(classGradeUser);
                     updateById(classGradeUser);
                     //通知旧系统
                     //通知旧系统
                     Goods goods = iGoodsService.getById(item.getGoodsId());
                     Goods goods = iGoodsService.getById(item.getGoodsId());
-                    iClassGradeService.gradeChangeEjjjPeople(goods.getBusinessId(),item.getOldGradeId());
+                    iClassGradeService.gradeChangeEjjjPeople(goods.getBusinessId(), item.getOldGradeId());
                     //消耗学习次数
                     //消耗学习次数
                     OrderGoods orderGoods = new OrderGoods();
                     OrderGoods orderGoods = new OrderGoods();
                     orderGoods.setOrderGoodsId(item.getOrderGoodsId());
                     orderGoods.setOrderGoodsId(item.getOrderGoodsId());
@@ -526,7 +530,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
      */
      */
     @Override
     @Override
     public String pushOfficialInfo(ClassGradeUserQueryBo bo) {
     public String pushOfficialInfo(ClassGradeUserQueryBo bo) {
-        log.info("报名信息推送"+JSON.toJSONString(bo));
+        log.info("报名信息推送" + JSON.toJSONString(bo));
         //暂时先关闭信息推送入口
         //暂时先关闭信息推送入口
 //        if (true){
 //        if (true){
 //            return "";
 //            return "";
@@ -537,9 +541,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         }
         }
         if (Validator.isEmpty(userVo.getInterfacePushId())) {
         if (Validator.isEmpty(userVo.getInterfacePushId())) {
             return "没开通信息推送";
             return "没开通信息推送";
-        }else {
+        } else {
             ClassGradeInterface gradeInterface = iClassGradeInterfaceService.getById(userVo.getInterfacePushId());
             ClassGradeInterface gradeInterface = iClassGradeInterfaceService.getById(userVo.getInterfacePushId());
-            if (gradeInterface.getType() != 1){
+            if (gradeInterface.getType() != 1) {
                 return "没开通信息推送";
                 return "没开通信息推送";
             }
             }
         }
         }
@@ -569,12 +573,12 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         if (Validator.isEmpty(userVo.getClassStartTime())) {
         if (Validator.isEmpty(userVo.getClassStartTime())) {
             return "班级开始时间缺失";
             return "班级开始时间缺失";
         }
         }
-        if(userVo.getClassStartTime().longValue()<orderGoods.getCreateTime().longValue()){
+        if (userVo.getClassStartTime().longValue() < orderGoods.getCreateTime().longValue()) {
             bmrq = orderGoods.getCreateTime();
             bmrq = orderGoods.getCreateTime();
-        }else{
+        } else {
             bmrq = userVo.getClassStartTime();
             bmrq = userVo.getClassStartTime();
         }
         }
-        if(Validator.isEmpty(userVo.getRealName())||Validator.isEmpty(userVo.getIdCard())||Validator.isEmpty(userVo.getTelPhone())){
+        if (Validator.isEmpty(userVo.getRealName()) || Validator.isEmpty(userVo.getIdCard()) || Validator.isEmpty(userVo.getTelPhone())) {
             return "用户信息缺失";
             return "用户信息缺失";
         }
         }
         Map<String, String> params = new HashMap<>();
         Map<String, String> params = new HashMap<>();
@@ -590,9 +594,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         String respone = "";
         String respone = "";
         try {
         try {
             respone = HttpUtils.postFormBody(OFFICIALPUSH_INFOPATH, params);
             respone = HttpUtils.postFormBody(OFFICIALPUSH_INFOPATH, params);
-           if(Validator.isEmpty(respone)){
-               return "响应信息空";
-           }
+            if (Validator.isEmpty(respone)) {
+                return "响应信息空";
+            }
             String[] split = respone.split("\\|");
             String[] split = respone.split("\\|");
             if (split.length < 2) {
             if (split.length < 2) {
                 return "推送接口返回数据错误";
                 return "推送接口返回数据错误";
@@ -622,11 +626,81 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                 return respone;
                 return respone;
             }
             }
         } catch (IOException e) {
         } catch (IOException e) {
-        //    throw new CustomException("请求错误");
+            //    throw new CustomException("请求错误");
             return null;
             return null;
         }
         }
     }
     }
 
 
+    @Override
+    public ClassPeriodStudentVo DecryptOfficialInfo(ClassGradeDecryptQueryBo bo) {
+        String pars;
+        try {
+            ServletUtils.getRequestAttributes().getResponse().setHeader("TenantId", bo.getTenantId());
+            //     data = "DjqbGTiWrtqJvLSKObhAB1F+s1vPmc1XWNagrHjwlK1JiCO1CuicJEcP+MzZoUyiSfDLeV2GZio=";
+            //     data ="Z4lUlc48qtBmZcg4tbNmt767KDeYhu6h+Xz8ySE5MqYSy3tF1/m2cTLtAQRlHV9X4JtXoCwapll/IiMVNyrOwsZD9Ujjf682";
+            byte[] Keys = new byte[]{0x22, 0x34, 0x76, 0x58, (byte) 0x90, (byte) 0xAB, (byte) 0xAD, (byte) 0xBF};
+            byte[] rgbKey = OFFICIALPUSH_TOKEN.substring(0, 8).getBytes("UTF-8");
+            pars = ToolsUtils.decryptDesNew(bo.getData(), OFFICIALPUSH_TOKEN.substring(0, 8));
+        } catch (Exception e) {
+            throw new CustomException("解析错误");
+        }
+        Map<String, String> split = Splitter.on("&").withKeyValueSeparator("=").split(pars);
+        String idCard = split.get("idnum");
+        String datetime = split.get("datetime");
+        if (Validator.isEmpty(datetime)) {
+            throw new CustomException("数据错误");
+        }
+        String datetimeStr = datetime.substring(0, 8);
+        if (!DateUtils.dateTimeNow(DateUtils.YYYYMMDD).equals(datetimeStr)) {
+            throw new CustomException("数据错误");
+        }
+        User user = iUserService.getOne(new LambdaQueryWrapper<User>().eq(User::getIdCard, EncryptHandler.encrypt(idCard)).last("limit 1"));
+        if (Validator.isEmpty(user)) {
+            throw new CustomException("身份证查无用户");
+        }
+        String bh = split.get("bh");
+        List<ClassGrade> classGradeList = iClassGradeService.list(new LambdaQueryWrapper<ClassGrade>().eq(ClassGrade::getOfficialName, bh));
+        if (Validator.isEmpty(classGradeList) || classGradeList.size() == 0) {
+            throw new CustomException("班级不存在");
+        }
+        ClassGradeUser classGradeUser = null;
+        ClassGrade grade = null;
+        for (ClassGrade classGrade : classGradeList) {
+            classGradeUser = iClassGradeUserService.getOne(new LambdaQueryWrapper<ClassGradeUser>().eq(ClassGradeUser::getGradeId, classGrade.getGradeId()).eq(ClassGradeUser::getUserId, user.getUserId()).last("limit 1"));
+            if (Validator.isNotEmpty(classGradeUser)) {
+                grade = classGrade;
+                break;
+            }
+        }
+        if (Validator.isEmpty(classGradeUser)) {
+            throw new CustomException("班级用户不存在");
+        }
+        OrderGoods orderGoods = iOrderGoodsService.getOne(new LambdaQueryWrapper<OrderGoods>().eq(OrderGoods::getOrderGoodsId, classGradeUser.getOrderGoodsId()));
+        if (Validator.isEmpty(orderGoods)) {
+            throw new CustomException("订单商品不存在");
+        }
+        Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, orderGoods.getGoodsId()));
+        CourseBusinessQueryBo queryBo = new CourseBusinessQueryBo();
+        queryBo.setId(goods.getBusinessId());
+        String fullName = iCourseBusinessService.queryFullName(queryBo);
+        ClassPeriodStudentVo studentVo = new ClassPeriodStudentVo();
+        studentVo.setGradeId(grade.getGradeId());
+        studentVo.setClassName(grade.getClassName());
+        studentVo.setRealName(user.getRealname());
+        studentVo.setUserId(user.getUserId());
+        studentVo.setIdCard(idCard);
+        studentVo.setGoodsId(orderGoods.getGoodsId());
+        studentVo.setGoodsName(goods.getGoodsName());
+        studentVo.setFullName(fullName);
+        if(fullName.equals("继续教育二级建造师")){
+            studentVo.setGradeType(1);
+        }
+        if(fullName.equals("继续教育二级造价师")){
+            studentVo.setGradeType(2);
+        }
+        return studentVo;
+    }
+
     /**
     /**
      * 批量信息推送
      * 批量信息推送
      *
      *
@@ -661,7 +735,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                 .eq(SysOldOrg::getTenantId, tenant)
                 .eq(SysOldOrg::getTenantId, tenant)
                 .last("limit 1")).stream().findFirst().orElse(null);
                 .last("limit 1")).stream().findFirst().orElse(null);
         //共享班级关闭学时推送入口
         //共享班级关闭学时推送入口
-        if (org.getShareClass() == 1){
+        if (org.getShareClass() == 1) {
             return "";
             return "";
         }
         }
 //        if (true){
 //        if (true){
@@ -782,8 +856,6 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
     }
     }
 
 
 
 
-
-
     public String dataSign(String SourceMsg, String PKey) {
     public String dataSign(String SourceMsg, String PKey) {
         String TempPKey;
         String TempPKey;
         TempPKey = ToolsUtils.EncoderByMd5(PKey);
         TempPKey = ToolsUtils.EncoderByMd5(PKey);
@@ -841,15 +913,15 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                     }
                     }
                 }
                 }
             }*/
             }*/
-            if(Validator.isNotEmpty(user.getOneInchPhotos())){
+            if (Validator.isNotEmpty(user.getOneInchPhotos())) {
                 classPeriodStudentVo.setOneInchPhotos(ALIYUN_OSS_ENDPOINT + "/" + user.getOneInchPhotos());
                 classPeriodStudentVo.setOneInchPhotos(ALIYUN_OSS_ENDPOINT + "/" + user.getOneInchPhotos());
                 classPeriodStudentVo.setOneInchPhotosOss(user.getOneInchPhotos());
                 classPeriodStudentVo.setOneInchPhotosOss(user.getOneInchPhotos());
             }
             }
-            if(Validator.isNotEmpty(user.getIdCardImg1())){
+            if (Validator.isNotEmpty(user.getIdCardImg1())) {
                 classPeriodStudentVo.setIdCardImg1(ALIYUN_OSS_ENDPOINT + "/" + user.getIdCardImg1());
                 classPeriodStudentVo.setIdCardImg1(ALIYUN_OSS_ENDPOINT + "/" + user.getIdCardImg1());
                 classPeriodStudentVo.setIdCardImg1Oss(user.getIdCardImg1());
                 classPeriodStudentVo.setIdCardImg1Oss(user.getIdCardImg1());
             }
             }
-            if(Validator.isNotEmpty(user.getIdCardImg2())){
+            if (Validator.isNotEmpty(user.getIdCardImg2())) {
                 classPeriodStudentVo.setIdCardImg2(ALIYUN_OSS_ENDPOINT + "/" + user.getIdCardImg2());
                 classPeriodStudentVo.setIdCardImg2(ALIYUN_OSS_ENDPOINT + "/" + user.getIdCardImg2());
                 classPeriodStudentVo.setIdCardImg2Oss(user.getIdCardImg2());
                 classPeriodStudentVo.setIdCardImg2Oss(user.getIdCardImg2());
             }
             }
@@ -873,7 +945,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         Map<String, Object> totalRs = new HashMap<>();
         Map<String, Object> totalRs = new HashMap<>();
         List<ClassPeriodStudentExportWeekAllVo> totalList = new ArrayList<>();
         List<ClassPeriodStudentExportWeekAllVo> totalList = new ArrayList<>();
         Map<String, List<ClassPeriodStudentExportVo>> weekRs = new HashMap<>();
         Map<String, List<ClassPeriodStudentExportVo>> weekRs = new HashMap<>();
-        for(WeekDataVo weekDataVo : bo.getWeekList() ){
+        for (WeekDataVo weekDataVo : bo.getWeekList()) {
             bo.setSearchWeekStartTime(weekDataVo.getSearchWeekStartTime());
             bo.setSearchWeekStartTime(weekDataVo.getSearchWeekStartTime());
             bo.setSearchWeekEndTime(weekDataVo.getSearchWeekEndTime());
             bo.setSearchWeekEndTime(weekDataVo.getSearchWeekEndTime());
             //查询班级学员信息
             //查询班级学员信息
@@ -889,15 +961,15 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                 subjectStudyRecordQueryBo.setUserId(classPeriodStudentVo.getUserId());
                 subjectStudyRecordQueryBo.setUserId(classPeriodStudentVo.getUserId());
                 subjectStudyRecordQueryBo.setGradeId(bo.getGradeId());
                 subjectStudyRecordQueryBo.setGradeId(bo.getGradeId());
                 User user = iUserService.getOne(new LambdaQueryWrapper<User>().eq(User::getUserId, classPeriodStudentVo.getUserId()));
                 User user = iUserService.getOne(new LambdaQueryWrapper<User>().eq(User::getUserId, classPeriodStudentVo.getUserId()));
-                if(Validator.isNotEmpty(user.getOneInchPhotos())){
+                if (Validator.isNotEmpty(user.getOneInchPhotos())) {
                     classPeriodStudentVo.setOneInchPhotos(ALIYUN_OSS_ENDPOINT + "/" + user.getOneInchPhotos());
                     classPeriodStudentVo.setOneInchPhotos(ALIYUN_OSS_ENDPOINT + "/" + user.getOneInchPhotos());
                     classPeriodStudentVo.setOneInchPhotosOss(user.getOneInchPhotos());
                     classPeriodStudentVo.setOneInchPhotosOss(user.getOneInchPhotos());
                 }
                 }
-                if(Validator.isNotEmpty(user.getIdCardImg1())){
+                if (Validator.isNotEmpty(user.getIdCardImg1())) {
                     classPeriodStudentVo.setIdCardImg1(ALIYUN_OSS_ENDPOINT + "/" + user.getIdCardImg1());
                     classPeriodStudentVo.setIdCardImg1(ALIYUN_OSS_ENDPOINT + "/" + user.getIdCardImg1());
                     classPeriodStudentVo.setIdCardImg1Oss(user.getIdCardImg1());
                     classPeriodStudentVo.setIdCardImg1Oss(user.getIdCardImg1());
                 }
                 }
-                if(Validator.isNotEmpty(user.getIdCardImg2())){
+                if (Validator.isNotEmpty(user.getIdCardImg2())) {
                     classPeriodStudentVo.setIdCardImg2(ALIYUN_OSS_ENDPOINT + "/" + user.getIdCardImg2());
                     classPeriodStudentVo.setIdCardImg2(ALIYUN_OSS_ENDPOINT + "/" + user.getIdCardImg2());
                     classPeriodStudentVo.setIdCardImg2Oss(user.getIdCardImg2());
                     classPeriodStudentVo.setIdCardImg2Oss(user.getIdCardImg2());
                 }
                 }
@@ -915,9 +987,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                 addItem.setPeriodVoList(listUserStudyRecordWeek(classGradeUserQueryBo1));
                 addItem.setPeriodVoList(listUserStudyRecordWeek(classGradeUserQueryBo1));
                 exportList.add(addItem);
                 exportList.add(addItem);
             }
             }
-            weekRs.put(weekDataVo.getWeekCxt(),exportList);
-            Map<String, Object> rs =  fillListWeek(exportList);
-            List<ClassPeriodStudentExportWeekAllVo> list = (List<ClassPeriodStudentExportWeekAllVo>)rs.get("list");
+            weekRs.put(weekDataVo.getWeekCxt(), exportList);
+            Map<String, Object> rs = fillListWeek(exportList);
+            List<ClassPeriodStudentExportWeekAllVo> list = (List<ClassPeriodStudentExportWeekAllVo>) rs.get("list");
             ClassPeriodStudentExportWeekAllVo titleVo = new ClassPeriodStudentExportWeekAllVo();
             ClassPeriodStudentExportWeekAllVo titleVo = new ClassPeriodStudentExportWeekAllVo();
             titleVo.setWeekTime(weekDataVo.getWeekCxt());
             titleVo.setWeekTime(weekDataVo.getWeekCxt());
             totalList.add(titleVo);
             totalList.add(titleVo);
@@ -929,17 +1001,17 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         try {
         try {
             ZipOutputStream outStream = new ZipOutputStream(new FileOutputStream(zipFile));
             ZipOutputStream outStream = new ZipOutputStream(new FileOutputStream(zipFile));
             //生成ZIP
             //生成ZIP
-            for(WeekDataVo weekDataVo : bo.getWeekList() ){
+            for (WeekDataVo weekDataVo : bo.getWeekList()) {
                 List<ClassPeriodStudentExportVo> exportList = weekRs.get(weekDataVo.getWeekCxt());
                 List<ClassPeriodStudentExportVo> exportList = weekRs.get(weekDataVo.getWeekCxt());
                 for (ClassPeriodStudentExportVo vo : exportList) {
                 for (ClassPeriodStudentExportVo vo : exportList) {
-                    ossService.zipPeopleWeekDownload(vo, outStream,weekDataVo);
+                    ossService.zipPeopleWeekDownload(vo, outStream, weekDataVo);
                 }
                 }
             }
             }
             outStream.close();
             outStream.close();
         } catch (IOException e) {
         } catch (IOException e) {
             System.out.println(e.getMessage() + "压缩");
             System.out.println(e.getMessage() + "压缩");
         }
         }
-        totalRs.put("list",totalList);
+        totalRs.put("list", totalList);
         totalRs.put("zip", AjaxResult.success(filename));
         totalRs.put("zip", AjaxResult.success(filename));
         return totalRs;
         return totalRs;
     }
     }
@@ -948,21 +1020,21 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
     private Map<String, Object> fillListWeek(List<ClassPeriodStudentExportVo> list) {
     private Map<String, Object> fillListWeek(List<ClassPeriodStudentExportVo> list) {
         List<ClassPeriodStudentExportWeekAllVo> newList = new ArrayList<>();
         List<ClassPeriodStudentExportWeekAllVo> newList = new ArrayList<>();
         Map<String, Object> rs = new HashMap<>();
         Map<String, Object> rs = new HashMap<>();
-            for (ClassPeriodStudentExportVo vo : list) {
-                for (UserPeriodExportVo cVo : vo.getPeriodVoList()) {
-                    ClassPeriodStudentExportWeekAllVo item = BeanUtil.toBean(vo, ClassPeriodStudentExportWeekAllVo.class);
-                    item.setId(cVo.getId());
-                    item.setModuleName(cVo.getModuleName());
-                    item.setChapterName(cVo.getChapterName());
-                    item.setSectionName(cVo.getSectionName());
-                    item.setDurationTime(Validator.isEmpty(cVo.getDurationTime())?new BigDecimal(0):((new BigDecimal(cVo.getDurationTime()).divide(new BigDecimal(3600),2,BigDecimal.ROUND_DOWN))));
-                    item.setStudyTimeTxt(cVo.getStudyTimeTxt());
-                    item.setStudyTimeLongTxt(cVo.getStudyTimeLongTxt());
-                    item.setStudyStatusTxt(cVo.getStudyStatusTxt());
-                    item.setScore(cVo.getScore());
-                    newList.add(item);
-                }
+        for (ClassPeriodStudentExportVo vo : list) {
+            for (UserPeriodExportVo cVo : vo.getPeriodVoList()) {
+                ClassPeriodStudentExportWeekAllVo item = BeanUtil.toBean(vo, ClassPeriodStudentExportWeekAllVo.class);
+                item.setId(cVo.getId());
+                item.setModuleName(cVo.getModuleName());
+                item.setChapterName(cVo.getChapterName());
+                item.setSectionName(cVo.getSectionName());
+                item.setDurationTime(Validator.isEmpty(cVo.getDurationTime()) ? new BigDecimal(0) : ((new BigDecimal(cVo.getDurationTime()).divide(new BigDecimal(3600), 2, BigDecimal.ROUND_DOWN))));
+                item.setStudyTimeTxt(cVo.getStudyTimeTxt());
+                item.setStudyTimeLongTxt(cVo.getStudyTimeLongTxt());
+                item.setStudyStatusTxt(cVo.getStudyStatusTxt());
+                item.setScore(cVo.getScore());
+                newList.add(item);
             }
             }
+        }
         rs.put("list", newList);
         rs.put("list", newList);
         return rs;
         return rs;
     }
     }
@@ -982,7 +1054,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                     item.setModuleName(cVo.getModuleName());
                     item.setModuleName(cVo.getModuleName());
                     item.setChapterName(cVo.getChapterName());
                     item.setChapterName(cVo.getChapterName());
                     item.setSectionName(cVo.getSectionName());
                     item.setSectionName(cVo.getSectionName());
-                    item.setDurationTime(Validator.isEmpty(cVo.getDurationTime())?new BigDecimal(0):((new BigDecimal(cVo.getDurationTime()).divide(new BigDecimal(3600),2,BigDecimal.ROUND_DOWN))));
+                    item.setDurationTime(Validator.isEmpty(cVo.getDurationTime()) ? new BigDecimal(0) : ((new BigDecimal(cVo.getDurationTime()).divide(new BigDecimal(3600), 2, BigDecimal.ROUND_DOWN))));
                     item.setStudyTimeTxt(cVo.getStudyTimeTxt());
                     item.setStudyTimeTxt(cVo.getStudyTimeTxt());
                     item.setStudyTimeLongTxt(cVo.getStudyTimeLongTxt());
                     item.setStudyTimeLongTxt(cVo.getStudyTimeLongTxt());
                     item.setStudyStatusTxt(cVo.getStudyStatusTxt());
                     item.setStudyStatusTxt(cVo.getStudyStatusTxt());
@@ -1000,7 +1072,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         return rs;
         return rs;
     }
     }
 
 
-    private UserPeriodExportV2Vo mergeEamDataV2(Long index, String moduleName, String chapterName, String sectionName,ClassPeriodSectionVo classPeriodSectionVo) {
+    private UserPeriodExportV2Vo mergeEamDataV2(Long index, String moduleName, String chapterName, String sectionName, ClassPeriodSectionVo classPeriodSectionVo) {
         //试卷学习记录
         //试卷学习记录
         UserBankRecordQueryBo recordQueryBo = BeanUtil.toBean(classPeriodSectionVo, UserBankRecordQueryBo.class);
         UserBankRecordQueryBo recordQueryBo = BeanUtil.toBean(classPeriodSectionVo, UserBankRecordQueryBo.class);
         List<UserBankRecordVo> recordList = iUserBankRecordService.queryList(recordQueryBo);
         List<UserBankRecordVo> recordList = iUserBankRecordService.queryList(recordQueryBo);
@@ -1009,7 +1081,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         userPeriodExportVo.setId(index);
         userPeriodExportVo.setId(index);
         userPeriodExportVo.setSectionName(sectionName);
         userPeriodExportVo.setSectionName(sectionName);
         List<UserPeriodItemExportVo> studyList = new ArrayList<>();
         List<UserPeriodItemExportVo> studyList = new ArrayList<>();
-        for(UserBankRecordVo vo : recordList){
+        for (UserBankRecordVo vo : recordList) {
             UserPeriodItemExportVo exportVo = new UserPeriodItemExportVo();
             UserPeriodItemExportVo exportVo = new UserPeriodItemExportVo();
             exportVo.setStudyStartTime(vo.getCreateTime());
             exportVo.setStudyStartTime(vo.getCreateTime());
             exportVo.setStudyEndTime(vo.getUpdateTime());
             exportVo.setStudyEndTime(vo.getUpdateTime());
@@ -1023,7 +1095,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         return userPeriodExportVo;
         return userPeriodExportVo;
     }
     }
 
 
-    private UserPeriodExportV2Vo mergeDataV2(Long index, String moduleName, String chapterName, String sectionName,ClassPeriodSectionVo classPeriodSectionVo, UserStudyRecordQueryBo recordQueryBo) {
+    private UserPeriodExportV2Vo mergeDataV2(Long index, String moduleName, String chapterName, String sectionName, ClassPeriodSectionVo classPeriodSectionVo, UserStudyRecordQueryBo recordQueryBo) {
         //节学习记录
         //节学习记录
         List<SectionStudyRecordVo> recordList = iUserStudyRecordService.selectSectionRecord(recordQueryBo);
         List<SectionStudyRecordVo> recordList = iUserStudyRecordService.selectSectionRecord(recordQueryBo);
         //录入学时记录
         //录入学时记录
@@ -1034,12 +1106,12 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         userPeriodExportVo.setSectionName(sectionName);
         userPeriodExportVo.setSectionName(sectionName);
         List<UserPeriodItemExportVo> studyList = new ArrayList<>();
         List<UserPeriodItemExportVo> studyList = new ArrayList<>();
         //录播
         //录播
-        if(classPeriodSectionVo.getSectionType()==1){
+        if (classPeriodSectionVo.getSectionType() == 1) {
             Long startTime = null;
             Long startTime = null;
             Long endTime = null;
             Long endTime = null;
             int studyIndex = -1;
             int studyIndex = -1;
-            for(SectionStudyRecordVo vo : recordList){
-                if(Validator.isEmpty(startTime)){
+            for (SectionStudyRecordVo vo : recordList) {
+                if (Validator.isEmpty(startTime)) {
                     startTime = vo.getStartTime();
                     startTime = vo.getStartTime();
                     UserPeriodItemExportVo exportVo = new UserPeriodItemExportVo();
                     UserPeriodItemExportVo exportVo = new UserPeriodItemExportVo();
                     studyIndex++;
                     studyIndex++;
@@ -1051,14 +1123,14 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                 }
                 }
                 endTime = vo.getEndTime();
                 endTime = vo.getEndTime();
                 studyList.get(studyIndex).setStudyEndTime(endTime);
                 studyList.get(studyIndex).setStudyEndTime(endTime);
-                if(Validator.isNotEmpty(vo.getStatus())&&vo.getStatus()==1){
+                if (Validator.isNotEmpty(vo.getStatus()) && vo.getStatus() == 1) {
                     studyList.get(studyIndex).setStatus(1);
                     studyList.get(studyIndex).setStatus(1);
                     startTime = null;
                     startTime = null;
                 }
                 }
             }
             }
         }
         }
         //回放或者直播
         //回放或者直播
-        if(classPeriodSectionVo.getSectionType()==2||classPeriodSectionVo.getSectionType()==3){
+        if (classPeriodSectionVo.getSectionType() == 2 || classPeriodSectionVo.getSectionType() == 3) {
             //默认加上直播
             //默认加上直播
             UserPeriodItemExportVo exportVo = new UserPeriodItemExportVo();
             UserPeriodItemExportVo exportVo = new UserPeriodItemExportVo();
             exportVo.setSectionType(2);
             exportVo.setSectionType(2);
@@ -1069,15 +1141,15 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
             Long endTime = null;
             Long endTime = null;
             int studyIndex = 0;
             int studyIndex = 0;
             boolean isReplay = false;
             boolean isReplay = false;
-            if(Validator.isNotEmpty(classPeriodSectionVo.getRealLiveEndTime())){ //直播结束时间
-                for(SectionStudyRecordVo vo : recordList){
-                    if(vo.getStartTime().longValue()>classPeriodSectionVo.getRealLiveEndTime().longValue()){  //回放
-                        if(!isReplay){
+            if (Validator.isNotEmpty(classPeriodSectionVo.getRealLiveEndTime())) { //直播结束时间
+                for (SectionStudyRecordVo vo : recordList) {
+                    if (vo.getStartTime().longValue() > classPeriodSectionVo.getRealLiveEndTime().longValue()) {  //回放
+                        if (!isReplay) {
                             //结束直播第一次进回放
                             //结束直播第一次进回放
                             isReplay = true;
                             isReplay = true;
                             startTime = null;
                             startTime = null;
                         }
                         }
-                        if(Validator.isEmpty(startTime)){
+                        if (Validator.isEmpty(startTime)) {
                             startTime = vo.getStartTime();
                             startTime = vo.getStartTime();
                             UserPeriodItemExportVo exportItemVo = new UserPeriodItemExportVo();
                             UserPeriodItemExportVo exportItemVo = new UserPeriodItemExportVo();
                             studyIndex++; //跳过第一条直播
                             studyIndex++; //跳过第一条直播
@@ -1089,13 +1161,13 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                         }
                         }
                         endTime = vo.getEndTime();
                         endTime = vo.getEndTime();
                         studyList.get(studyIndex).setStudyEndTime(endTime);
                         studyList.get(studyIndex).setStudyEndTime(endTime);
-                        if(Validator.isNotEmpty(vo.getStatus())&&vo.getStatus()==1){
+                        if (Validator.isNotEmpty(vo.getStatus()) && vo.getStatus() == 1) {
                             studyList.get(studyIndex).setStatus(1);
                             studyList.get(studyIndex).setStatus(1);
                             startTime = null;
                             startTime = null;
                         }
                         }
-                    }else{ //直播
+                    } else { //直播
                         studyList.get(0).setStatus(1); //直播参与
                         studyList.get(0).setStatus(1); //直播参与
-                        if(Validator.isEmpty(startTime)){
+                        if (Validator.isEmpty(startTime)) {
                             startTime = vo.getStartTime();
                             startTime = vo.getStartTime();
                             studyList.get(0).setStudyStartTime(startTime);
                             studyList.get(0).setStudyStartTime(startTime);
                         }
                         }
@@ -1363,7 +1435,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
             classGradeUserQueryBo.setGradeId(classPeriodStudentVo.getGradeId());
             classGradeUserQueryBo.setGradeId(classPeriodStudentVo.getGradeId());
             classGradeUserQueryBo.setUserId(classPeriodStudentVo.getUserId());
             classGradeUserQueryBo.setUserId(classPeriodStudentVo.getUserId());
             classGradeUserQueryBo.setGoodsId(classPeriodStudentVo.getGoodsId());
             classGradeUserQueryBo.setGoodsId(classPeriodStudentVo.getGoodsId());
-            Long studyTime =  baseMapper.listUserWeekStudyTime(classGradeUserQueryBo);
+            Long studyTime = baseMapper.listUserWeekStudyTime(classGradeUserQueryBo);
             classPeriodStudentVo.setStudyTime(studyTime);
             classPeriodStudentVo.setStudyTime(studyTime);
             //    List<ClassPeriodUserVo> classPeriodUserVos1 = baseMapper.listPeriod(classGradeUserQueryBo);
             //    List<ClassPeriodUserVo> classPeriodUserVos1 = baseMapper.listPeriod(classGradeUserQueryBo);
             //    ClassPeriodUserVo classPeriodUserVos = classPeriodUserVos1.get(0);
             //    ClassPeriodUserVo classPeriodUserVos = classPeriodUserVos1.get(0);
@@ -1406,8 +1478,8 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         //查找学员学习记录
         //查找学员学习记录
         for (ClassPeriodStudentVo classPeriodStudentVo : classPeriodStudentVos) {
         for (ClassPeriodStudentVo classPeriodStudentVo : classPeriodStudentVos) {
             //取学时所有拍照最新的一张
             //取学时所有拍照最新的一张
-             String recentPhoto = userStudyRecordPhotoMapper.selectGradeRecentOnePhoto(classPeriodStudentVo.getUserId(), classPeriodStudentVo.getGradeId());
-           if (Validator.isNotEmpty(recentPhoto)) {
+            String recentPhoto = userStudyRecordPhotoMapper.selectGradeRecentOnePhoto(classPeriodStudentVo.getUserId(), classPeriodStudentVo.getGradeId());
+            if (Validator.isNotEmpty(recentPhoto)) {
                 classPeriodStudentVo.setIdCardImg1(recentPhoto);
                 classPeriodStudentVo.setIdCardImg1(recentPhoto);
             }
             }
         }
         }
@@ -1875,6 +1947,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
 
 
     /**
     /**
      * 学习记录第二版
      * 学习记录第二版
+     *
      * @param bo
      * @param bo
      * @return
      * @return
      */
      */
@@ -1916,7 +1989,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                                 recordQueryBo.setChapterId(classPeriodChapterVo.getId());
                                 recordQueryBo.setChapterId(classPeriodChapterVo.getId());
                                 recordQueryBo.setModuleId(classPeriodVo.getId());
                                 recordQueryBo.setModuleId(classPeriodVo.getId());
                                 recordQueryBo.setGradeId(gradeId);
                                 recordQueryBo.setGradeId(gradeId);
-                                studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName,classPeriodSectionVo, recordQueryBo));
+                                studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName, classPeriodSectionVo, recordQueryBo));
                             } else {
                             } else {
                                 //章卷
                                 //章卷
                                 sectionName = classPeriodSectionVo.getTypeName();
                                 sectionName = classPeriodSectionVo.getTypeName();
@@ -1947,7 +2020,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                     recordQueryBo.setChapterId(classPeriodVo.getId());
                     recordQueryBo.setChapterId(classPeriodVo.getId());
                     recordQueryBo.setModuleId(classPeriodVo.getId());
                     recordQueryBo.setModuleId(classPeriodVo.getId());
                     recordQueryBo.setGradeId(gradeId);
                     recordQueryBo.setGradeId(gradeId);
-                    studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName,classPeriodSectionVo, recordQueryBo));
+                    studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName, classPeriodSectionVo, recordQueryBo));
                 }
                 }
                 List<ClassPeriodSectionVo> classPeriodSectionVos1 = baseMapper.listPeriodSectionExam(classPeriodVo.getId(), goodsId, classPeriodVo.getCourseId(), userId);
                 List<ClassPeriodSectionVo> classPeriodSectionVos1 = baseMapper.listPeriodSectionExam(classPeriodVo.getId(), goodsId, classPeriodVo.getCourseId(), userId);
                 for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos1) {
                 for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos1) {
@@ -1987,7 +2060,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                 classPeriodSectionVo.setRealLiveEndTime(classPeriodVo.getRealLiveEndTime());
                 classPeriodSectionVo.setRealLiveEndTime(classPeriodVo.getRealLiveEndTime());
                 System.out.println("EER");
                 System.out.println("EER");
                 System.out.println(classPeriodSectionVo);
                 System.out.println(classPeriodSectionVo);
-                studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName,classPeriodSectionVo, recordQueryBo));
+                studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName, classPeriodSectionVo, recordQueryBo));
             }
             }
         }
         }
         return studyList;
         return studyList;
@@ -2018,7 +2091,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                         chapterName = classPeriodChapterVo.getTypeName();
                         chapterName = classPeriodChapterVo.getTypeName();
                         List<ClassPeriodSectionVo> classPeriodSectionVos = baseMapper.listPeriodSection(classPeriodChapterVo.getId(), goodsId, classPeriodVo.getCourseId(), userId);
                         List<ClassPeriodSectionVo> classPeriodSectionVos = baseMapper.listPeriodSection(classPeriodChapterVo.getId(), goodsId, classPeriodVo.getCourseId(), userId);
                         List<ClassPeriodSectionVo> examList = baseMapper.listperiodExam(classPeriodChapterVo.getId(), goodsId, classPeriodVo.getCourseId(), userId, classPeriodVo.getId());
                         List<ClassPeriodSectionVo> examList = baseMapper.listperiodExam(classPeriodChapterVo.getId(), goodsId, classPeriodVo.getCourseId(), userId, classPeriodVo.getId());
-                        if(examList.size()>0){
+                        if (examList.size() > 0) {
                             classPeriodSectionVos.addAll(examList);
                             classPeriodSectionVos.addAll(examList);
                         }
                         }
                         for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos) {
                         for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos) {
@@ -2036,7 +2109,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                                 recordQueryBo.setGradeId(gradeId);
                                 recordQueryBo.setGradeId(gradeId);
                                 recordQueryBo.setSearchWeekStartTime(bo.getSearchWeekStartTime());
                                 recordQueryBo.setSearchWeekStartTime(bo.getSearchWeekStartTime());
                                 recordQueryBo.setSearchWeekEndTime(bo.getSearchWeekEndTime());
                                 recordQueryBo.setSearchWeekEndTime(bo.getSearchWeekEndTime());
-                                studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName,classPeriodSectionVo, recordQueryBo));
+                                studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName, classPeriodSectionVo, recordQueryBo));
                             } else {
                             } else {
                                 //章卷
                                 //章卷
                                 sectionName = classPeriodSectionVo.getTypeName();
                                 sectionName = classPeriodSectionVo.getTypeName();
@@ -2071,7 +2144,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                     recordQueryBo.setGradeId(gradeId);
                     recordQueryBo.setGradeId(gradeId);
                     recordQueryBo.setSearchWeekStartTime(bo.getSearchWeekStartTime());
                     recordQueryBo.setSearchWeekStartTime(bo.getSearchWeekStartTime());
                     recordQueryBo.setSearchWeekEndTime(bo.getSearchWeekEndTime());
                     recordQueryBo.setSearchWeekEndTime(bo.getSearchWeekEndTime());
-                    studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName,classPeriodSectionVo, recordQueryBo));
+                    studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName, classPeriodSectionVo, recordQueryBo));
                 }
                 }
                 List<ClassPeriodSectionVo> classPeriodSectionVos1 = baseMapper.listPeriodSectionExam(classPeriodVo.getId(), goodsId, classPeriodVo.getCourseId(), userId);
                 List<ClassPeriodSectionVo> classPeriodSectionVos1 = baseMapper.listPeriodSectionExam(classPeriodVo.getId(), goodsId, classPeriodVo.getCourseId(), userId);
                 for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos1) {
                 for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos1) {
@@ -2115,7 +2188,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                 classPeriodSectionVo.setRealLiveEndTime(classPeriodVo.getRealLiveEndTime());
                 classPeriodSectionVo.setRealLiveEndTime(classPeriodVo.getRealLiveEndTime());
                 System.out.println("EER");
                 System.out.println("EER");
                 System.out.println(classPeriodSectionVo);
                 System.out.println(classPeriodSectionVo);
-                studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName,classPeriodSectionVo, recordQueryBo));
+                studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName, classPeriodSectionVo, recordQueryBo));
             }
             }
         }
         }
         return studyList;
         return studyList;
@@ -2183,7 +2256,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
             if (classPeriodVo.getType() == 1) {
             if (classPeriodVo.getType() == 1) {
                 List<ClassPeriodChapterVo> classPeriodChapterVos = baseMapper.listperiodChapter(classPeriodVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), bo.getGradeId());
                 List<ClassPeriodChapterVo> classPeriodChapterVos = baseMapper.listperiodChapter(classPeriodVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), bo.getGradeId());
                 Collections.sort(classPeriodChapterVos);
                 Collections.sort(classPeriodChapterVos);
-                classPeriodChapterVos.addAll(baseMapper.listperiodModuleExam( bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), classPeriodVo.getId()));
+                classPeriodChapterVos.addAll(baseMapper.listperiodModuleExam(bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), classPeriodVo.getId()));
                 for (ClassPeriodChapterVo classPeriodChapterVo : classPeriodChapterVos) {
                 for (ClassPeriodChapterVo classPeriodChapterVo : classPeriodChapterVos) {
                     if (classPeriodChapterVo.getType() == 2) {
                     if (classPeriodChapterVo.getType() == 2) {
                         Long ChapterEndTime = 0L;
                         Long ChapterEndTime = 0L;
@@ -2193,7 +2266,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                         classPeriodSectionVos.addAll(baseMapper.listperiodExam(classPeriodChapterVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), classPeriodVo.getId()));
                         classPeriodSectionVos.addAll(baseMapper.listperiodExam(classPeriodChapterVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), classPeriodVo.getId()));
                         for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos) {
                         for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos) {
                             if (classPeriodSectionVo.getType() == 3) {
                             if (classPeriodSectionVo.getType() == 3) {
-                                secTotalTime+=classPeriodSectionVo.getDurationTime();
+                                secTotalTime += classPeriodSectionVo.getDurationTime();
                                 //节
                                 //节
                                 UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
                                 UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
                                 userPeriodQueryBo.setSectionId(classPeriodSectionVo.getId());
                                 userPeriodQueryBo.setSectionId(classPeriodSectionVo.getId());
@@ -2216,13 +2289,13 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                                     classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
                                     classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
                                     classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
                                     classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
                                     classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
                                     classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
-                                    if(Validator.isNotEmpty(photoList)&&photoList.size()>0){
+                                    if (Validator.isNotEmpty(photoList) && photoList.size() > 0) {
                                         classPeriodSectionVo.setStudyStartTime(photoList.get(0).getCreateTime());
                                         classPeriodSectionVo.setStudyStartTime(photoList.get(0).getCreateTime());
                                     }
                                     }
-                                    if((startTotalTime==0L&&Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()))||(Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime())&&(startTotalTime.longValue()>classPeriodSectionVo.getStudyStartTime().longValue()))){
+                                    if ((startTotalTime == 0L && Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime())) || (Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()) && (startTotalTime.longValue() > classPeriodSectionVo.getStudyStartTime().longValue()))) {
                                         startTotalTime = classPeriodSectionVo.getStudyStartTime();
                                         startTotalTime = classPeriodSectionVo.getStudyStartTime();
                                     }
                                     }
-                                    if((endTotalTime==0L&&(Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime())))||(Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime())&&endTotalTime.longValue()<classPeriodSectionVo.getStudyEndTime().longValue())){
+                                    if ((endTotalTime == 0L && (Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime()))) || (Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime()) && endTotalTime.longValue() < classPeriodSectionVo.getStudyEndTime().longValue())) {
                                         endTotalTime = classPeriodSectionVo.getStudyEndTime();
                                         endTotalTime = classPeriodSectionVo.getStudyEndTime();
                                     }
                                     }
                                     classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
                                     classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
@@ -2231,15 +2304,15 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                                     classPeriodSectionVo.setAuditTime(userPeriodStatusVo.getAuditTime());
                                     classPeriodSectionVo.setAuditTime(userPeriodStatusVo.getAuditTime());
                                     classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
                                     classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
                                     classPeriodSectionVo.setDurationTime(userPeriodStatusVo.getDurationTime());
                                     classPeriodSectionVo.setDurationTime(userPeriodStatusVo.getDurationTime());
-                                    if(Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime())&&ChapterEndTime.longValue()<classPeriodSectionVo.getStudyEndTime().longValue()){
+                                    if (Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime()) && ChapterEndTime.longValue() < classPeriodSectionVo.getStudyEndTime().longValue()) {
                                         ChapterEndTime = classPeriodSectionVo.getStudyEndTime();
                                         ChapterEndTime = classPeriodSectionVo.getStudyEndTime();
                                     }
                                     }
-                                    if((ChapterStartTime==0L&&Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()))||((Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime())&&ChapterStartTime.longValue()>classPeriodSectionVo.getStudyStartTime().longValue()))){
+                                    if ((ChapterStartTime == 0L && Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime())) || ((Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()) && ChapterStartTime.longValue() > classPeriodSectionVo.getStudyStartTime().longValue()))) {
                                         ChapterStartTime = classPeriodSectionVo.getStudyStartTime();
                                         ChapterStartTime = classPeriodSectionVo.getStudyStartTime();
                                     }
                                     }
                                 }
                                 }
-                                if(userPeriodStatusVos.size()>1){
-                            //        int preIndex = userPeriodStatusVos.size() - 2;
+                                if (userPeriodStatusVos.size() > 1) {
+                                    //        int preIndex = userPeriodStatusVos.size() - 2;
                                     UserPeriodStatusVo userPeriodStatusVoPre = userPeriodStatusVos.get(0);
                                     UserPeriodStatusVo userPeriodStatusVoPre = userPeriodStatusVos.get(0);
                                     classPeriodSectionVo.setPreEndTime(userPeriodStatusVoPre.getRecordEndTime());
                                     classPeriodSectionVo.setPreEndTime(userPeriodStatusVoPre.getRecordEndTime());
                                     classPeriodSectionVo.setPreStartTime(userPeriodStatusVoPre.getRecordStartTime());
                                     classPeriodSectionVo.setPreStartTime(userPeriodStatusVoPre.getRecordStartTime());
@@ -2270,10 +2343,10 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                                     classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
                                     classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
                                     classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
                                     classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
                                     classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
                                     classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
-                                    if((startTotalTime==0L&&Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()))||(Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime())&&startTotalTime.longValue()>classPeriodSectionVo.getStudyStartTime().longValue())){
+                                    if ((startTotalTime == 0L && Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime())) || (Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()) && startTotalTime.longValue() > classPeriodSectionVo.getStudyStartTime().longValue())) {
                                         startTotalTime = classPeriodSectionVo.getStudyStartTime();
                                         startTotalTime = classPeriodSectionVo.getStudyStartTime();
                                     }
                                     }
-                                    if(endTotalTime==0L||(Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime())&&endTotalTime.longValue()<classPeriodSectionVo.getStudyEndTime().longValue())){
+                                    if (endTotalTime == 0L || (Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime()) && endTotalTime.longValue() < classPeriodSectionVo.getStudyEndTime().longValue())) {
                                         endTotalTime = classPeriodSectionVo.getStudyEndTime();
                                         endTotalTime = classPeriodSectionVo.getStudyEndTime();
                                     }
                                     }
                                     classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
                                     classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
@@ -2282,10 +2355,10 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                                     classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
                                     classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
                                     classPeriodSectionVo.setPeriodStatusId(userPeriodStatusVo.getId());
                                     classPeriodSectionVo.setPeriodStatusId(userPeriodStatusVo.getId());
                                     classPeriodSectionVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
                                     classPeriodSectionVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
-                                    if(Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime())&&ChapterEndTime.longValue()<classPeriodSectionVo.getStudyEndTime().longValue()){
+                                    if (Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime()) && ChapterEndTime.longValue() < classPeriodSectionVo.getStudyEndTime().longValue()) {
                                         ChapterEndTime = classPeriodSectionVo.getStudyEndTime();
                                         ChapterEndTime = classPeriodSectionVo.getStudyEndTime();
                                     }
                                     }
-                                    if((Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime())&&ChapterStartTime==0L)||(Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime())&&ChapterStartTime.longValue()>classPeriodSectionVo.getStudyStartTime().longValue())){
+                                    if ((Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()) && ChapterStartTime == 0L) || (Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()) && ChapterStartTime.longValue() > classPeriodSectionVo.getStudyStartTime().longValue())) {
                                         ChapterStartTime = classPeriodSectionVo.getStudyStartTime();
                                         ChapterStartTime = classPeriodSectionVo.getStudyStartTime();
                                     }
                                     }
                                 }
                                 }
@@ -2298,8 +2371,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                         classPeriodChapterVo.setStudyEndTime(ChapterEndTime);
                         classPeriodChapterVo.setStudyEndTime(ChapterEndTime);
                         classPeriodChapterVo.setStudyStartTime(ChapterStartTime);
                         classPeriodChapterVo.setStudyStartTime(ChapterStartTime);
                         classPeriodChapterVo.setClassPeriodSectionList(classPeriodSectionVos);
                         classPeriodChapterVo.setClassPeriodSectionList(classPeriodSectionVos);
-                    }
-                    else if (classPeriodChapterVo.getType() == 5) {
+                    } else if (classPeriodChapterVo.getType() == 5) {
                         UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
                         UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
                         userPeriodQueryBo.setExamId(classPeriodChapterVo.getId());
                         userPeriodQueryBo.setExamId(classPeriodChapterVo.getId());
                         userPeriodQueryBo.setCourseId(classPeriodChapterVo.getCourseId());
                         userPeriodQueryBo.setCourseId(classPeriodChapterVo.getCourseId());
@@ -2326,10 +2398,10 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                             classPeriodChapterVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
                             classPeriodChapterVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
                             classPeriodChapterVo.setPeriodStatusId(userPeriodStatusVo.getId());
                             classPeriodChapterVo.setPeriodStatusId(userPeriodStatusVo.getId());
                             classPeriodChapterVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
                             classPeriodChapterVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
-                            if(startTotalTime==0L||startTotalTime.longValue()>classPeriodChapterVo.getStudyStartTime().longValue()){
+                            if (startTotalTime == 0L || startTotalTime.longValue() > classPeriodChapterVo.getStudyStartTime().longValue()) {
                                 startTotalTime = classPeriodChapterVo.getStudyStartTime();
                                 startTotalTime = classPeriodChapterVo.getStudyStartTime();
                             }
                             }
-                            if(endTotalTime==0L||(Validator.isNotEmpty(classPeriodChapterVo.getStudyEndTime())&&endTotalTime.longValue()<classPeriodChapterVo.getStudyEndTime().longValue())){
+                            if (endTotalTime == 0L || (Validator.isNotEmpty(classPeriodChapterVo.getStudyEndTime()) && endTotalTime.longValue() < classPeriodChapterVo.getStudyEndTime().longValue())) {
                                 endTotalTime = classPeriodChapterVo.getStudyEndTime();
                                 endTotalTime = classPeriodChapterVo.getStudyEndTime();
                             }
                             }
                         }
                         }
@@ -2345,7 +2417,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                 List<ClassPeriodSectionVo> classPeriodSectionVos = baseMapper.listPeriodSection(classPeriodVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId());
                 List<ClassPeriodSectionVo> classPeriodSectionVos = baseMapper.listPeriodSection(classPeriodVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId());
                 Collections.sort(classPeriodSectionVos);
                 Collections.sort(classPeriodSectionVos);
                 for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos) {
                 for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos) {
-                    secTotalTime+=classPeriodSectionVo.getDurationTime();
+                    secTotalTime += classPeriodSectionVo.getDurationTime();
                     UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
                     UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
                     userPeriodQueryBo.setSectionId(classPeriodSectionVo.getId());
                     userPeriodQueryBo.setSectionId(classPeriodSectionVo.getId());
                     userPeriodQueryBo.setCourseId(classPeriodSectionVo.getCourseId());
                     userPeriodQueryBo.setCourseId(classPeriodSectionVo.getCourseId());
@@ -2367,13 +2439,13 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                         classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
                         classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
                         classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
                         classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
                         classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
                         classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
-                        if(Validator.isNotEmpty(photoList)&&photoList.size()>0){
+                        if (Validator.isNotEmpty(photoList) && photoList.size() > 0) {
                             classPeriodSectionVo.setStudyStartTime(photoList.get(0).getCreateTime());
                             classPeriodSectionVo.setStudyStartTime(photoList.get(0).getCreateTime());
                         }
                         }
-                        if((startTotalTime==0L&&Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()))||(Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime())&&startTotalTime.longValue()>classPeriodSectionVo.getStudyStartTime().longValue())){
+                        if ((startTotalTime == 0L && Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime())) || (Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()) && startTotalTime.longValue() > classPeriodSectionVo.getStudyStartTime().longValue())) {
                             startTotalTime = classPeriodSectionVo.getStudyStartTime();
                             startTotalTime = classPeriodSectionVo.getStudyStartTime();
                         }
                         }
-                        if(endTotalTime==0L||(Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime())&&endTotalTime.longValue()<classPeriodSectionVo.getStudyEndTime().longValue())){
+                        if (endTotalTime == 0L || (Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime()) && endTotalTime.longValue() < classPeriodSectionVo.getStudyEndTime().longValue())) {
                             endTotalTime = classPeriodSectionVo.getStudyEndTime();
                             endTotalTime = classPeriodSectionVo.getStudyEndTime();
                         }
                         }
                         classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
                         classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
@@ -2382,15 +2454,15 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                         classPeriodSectionVo.setAuditTime(userPeriodStatusVo.getAuditTime());
                         classPeriodSectionVo.setAuditTime(userPeriodStatusVo.getAuditTime());
                         classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
                         classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
                         classPeriodSectionVo.setDurationTime(userPeriodStatusVo.getDurationTime());
                         classPeriodSectionVo.setDurationTime(userPeriodStatusVo.getDurationTime());
-                        if(Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime())&&ChapterEndTime.longValue()<classPeriodSectionVo.getStudyEndTime().longValue()){
+                        if (Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime()) && ChapterEndTime.longValue() < classPeriodSectionVo.getStudyEndTime().longValue()) {
                             ChapterEndTime = classPeriodSectionVo.getStudyEndTime();
                             ChapterEndTime = classPeriodSectionVo.getStudyEndTime();
                         }
                         }
-                        if(ChapterStartTime==0L||ChapterStartTime.longValue()>classPeriodSectionVo.getStudyStartTime().longValue()){
+                        if (ChapterStartTime == 0L || ChapterStartTime.longValue() > classPeriodSectionVo.getStudyStartTime().longValue()) {
                             ChapterStartTime = classPeriodSectionVo.getStudyStartTime();
                             ChapterStartTime = classPeriodSectionVo.getStudyStartTime();
                         }
                         }
                     }
                     }
-                    if(userPeriodStatusVos.size()>1){
-                //        int preIndex = userPeriodStatusVos.size() - 2;
+                    if (userPeriodStatusVos.size() > 1) {
+                        //        int preIndex = userPeriodStatusVos.size() - 2;
                         UserPeriodStatusVo userPeriodStatusVoPre = userPeriodStatusVos.get(0);
                         UserPeriodStatusVo userPeriodStatusVoPre = userPeriodStatusVos.get(0);
                         classPeriodSectionVo.setPreEndTime(userPeriodStatusVoPre.getRecordEndTime());
                         classPeriodSectionVo.setPreEndTime(userPeriodStatusVoPre.getRecordEndTime());
                         classPeriodSectionVo.setPreStartTime(userPeriodStatusVoPre.getRecordStartTime());
                         classPeriodSectionVo.setPreStartTime(userPeriodStatusVoPre.getRecordStartTime());
@@ -2422,10 +2494,10 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                         classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
                         classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
                         classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
                         classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
                         classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
                         classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
-                        if((startTotalTime==0L&&Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()))||(Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime())&&startTotalTime.longValue()>classPeriodSectionVo.getStudyStartTime().longValue())){
+                        if ((startTotalTime == 0L && Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime())) || (Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()) && startTotalTime.longValue() > classPeriodSectionVo.getStudyStartTime().longValue())) {
                             startTotalTime = classPeriodSectionVo.getStudyStartTime();
                             startTotalTime = classPeriodSectionVo.getStudyStartTime();
                         }
                         }
-                        if((Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime())&&endTotalTime==0L)||(Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime())&&endTotalTime.longValue()<classPeriodSectionVo.getStudyEndTime().longValue())){
+                        if ((Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime()) && endTotalTime == 0L) || (Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime()) && endTotalTime.longValue() < classPeriodSectionVo.getStudyEndTime().longValue())) {
                             endTotalTime = classPeriodSectionVo.getStudyEndTime();
                             endTotalTime = classPeriodSectionVo.getStudyEndTime();
                         }
                         }
                         classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
                         classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
@@ -2435,10 +2507,10 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                         classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
                         classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
                         classPeriodSectionVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
                         classPeriodSectionVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
                         classPeriodVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
                         classPeriodVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
-                        if(Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime())&&ChapterEndTime.longValue()<classPeriodSectionVo.getStudyEndTime().longValue()){
+                        if (Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime()) && ChapterEndTime.longValue() < classPeriodSectionVo.getStudyEndTime().longValue()) {
                             ChapterEndTime = classPeriodSectionVo.getStudyEndTime();
                             ChapterEndTime = classPeriodSectionVo.getStudyEndTime();
                         }
                         }
-                        if(ChapterStartTime==0L||ChapterStartTime.longValue()>classPeriodSectionVo.getStudyStartTime().longValue()){
+                        if (ChapterStartTime == 0L || ChapterStartTime.longValue() > classPeriodSectionVo.getStudyStartTime().longValue()) {
                             ChapterStartTime = classPeriodSectionVo.getStudyStartTime();
                             ChapterStartTime = classPeriodSectionVo.getStudyStartTime();
                         }
                         }
                     }
                     }
@@ -2455,7 +2527,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
 
 
             //为节搜索学时记录
             //为节搜索学时记录
             if (classPeriodVo.getType() == 3) {
             if (classPeriodVo.getType() == 3) {
-                secTotalTime+=classPeriodVo.getDurationTime();
+                secTotalTime += classPeriodVo.getDurationTime();
                 UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
                 UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
                 userPeriodQueryBo.setSectionId(classPeriodVo.getId());
                 userPeriodQueryBo.setSectionId(classPeriodVo.getId());
                 userPeriodQueryBo.setCourseId(classPeriodVo.getCourseId());
                 userPeriodQueryBo.setCourseId(classPeriodVo.getCourseId());
@@ -2477,13 +2549,13 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                     classPeriodVo.setStatus(userPeriodStatusVo.getStatus());
                     classPeriodVo.setStatus(userPeriodStatusVo.getStatus());
                     classPeriodVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
                     classPeriodVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
                     classPeriodVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
                     classPeriodVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
-                    if(photoList.size()>0){
+                    if (photoList.size() > 0) {
                         classPeriodVo.setStudyStartTime(photoList.get(0).getCreateTime());
                         classPeriodVo.setStudyStartTime(photoList.get(0).getCreateTime());
                     }
                     }
-                    if((Validator.isNotEmpty(classPeriodVo.getStudyStartTime())&&startTotalTime==0L)||(Validator.isNotEmpty(classPeriodVo.getStudyStartTime())&&startTotalTime.longValue()>classPeriodVo.getStudyStartTime().longValue())){
+                    if ((Validator.isNotEmpty(classPeriodVo.getStudyStartTime()) && startTotalTime == 0L) || (Validator.isNotEmpty(classPeriodVo.getStudyStartTime()) && startTotalTime.longValue() > classPeriodVo.getStudyStartTime().longValue())) {
                         startTotalTime = classPeriodVo.getStudyStartTime();
                         startTotalTime = classPeriodVo.getStudyStartTime();
                     }
                     }
-                    if(endTotalTime==0L||(Validator.isNotEmpty(classPeriodVo.getStudyEndTime())&&endTotalTime.longValue()<classPeriodVo.getStudyEndTime().longValue())){
+                    if (endTotalTime == 0L || (Validator.isNotEmpty(classPeriodVo.getStudyEndTime()) && endTotalTime.longValue() < classPeriodVo.getStudyEndTime().longValue())) {
                         endTotalTime = classPeriodVo.getStudyEndTime();
                         endTotalTime = classPeriodVo.getStudyEndTime();
                     }
                     }
                     classPeriodVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
                     classPeriodVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
@@ -2493,8 +2565,8 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                     classPeriodVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
                     classPeriodVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
                     classPeriodVo.setDurationTime(userPeriodStatusVo.getDurationTime());
                     classPeriodVo.setDurationTime(userPeriodStatusVo.getDurationTime());
                 }
                 }
-                if(userPeriodStatusVos.size()>1){
-                //    int preIndex = userPeriodStatusVos.size() - 2;
+                if (userPeriodStatusVos.size() > 1) {
+                    //    int preIndex = userPeriodStatusVos.size() - 2;
                     UserPeriodStatusVo userPeriodStatusVoPre = userPeriodStatusVos.get(0);
                     UserPeriodStatusVo userPeriodStatusVoPre = userPeriodStatusVos.get(0);
                     classPeriodVo.setPreEndTime(userPeriodStatusVoPre.getRecordEndTime());
                     classPeriodVo.setPreEndTime(userPeriodStatusVoPre.getRecordEndTime());
                     classPeriodVo.setPreStartTime(userPeriodStatusVoPre.getRecordStartTime());
                     classPeriodVo.setPreStartTime(userPeriodStatusVoPre.getRecordStartTime());
@@ -2506,7 +2578,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
             }
             }
 
 
         }
         }
-        if(classPeriodVos.size()>0){
+        if (classPeriodVos.size() > 0) {
             classPeriodVos.get(0).setStartTotalTime(startTotalTime);
             classPeriodVos.get(0).setStartTotalTime(startTotalTime);
             classPeriodVos.get(0).setEndTotalTime(endTotalTime);
             classPeriodVos.get(0).setEndTotalTime(endTotalTime);
             classPeriodVos.get(0).setSecTotalTime(secTotalTime);
             classPeriodVos.get(0).setSecTotalTime(secTotalTime);
@@ -2567,7 +2639,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
             classPeriodSectionVo.setId(bo.getSectionId());
             classPeriodSectionVo.setId(bo.getSectionId());
             classPeriodSectionVo.setDurationTime(userPeriodStatusVo.getDurationTime());
             classPeriodSectionVo.setDurationTime(userPeriodStatusVo.getDurationTime());
             classPeriodSectionVo.setType(3L);
             classPeriodSectionVo.setType(3L);
-            if(numIndex>0){
+            if (numIndex > 0) {
                 UserPeriodStatusVo userPeriodStatusVoPre = userPeriodStatusVos.get(0);
                 UserPeriodStatusVo userPeriodStatusVoPre = userPeriodStatusVos.get(0);
                 classPeriodSectionVo.setPreStartTime(userPeriodStatusVoPre.getRecordStartTime());
                 classPeriodSectionVo.setPreStartTime(userPeriodStatusVoPre.getRecordStartTime());
                 classPeriodSectionVo.setPreEndTime(userPeriodStatusVoPre.getRecordEndTime());
                 classPeriodSectionVo.setPreEndTime(userPeriodStatusVoPre.getRecordEndTime());

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassPeriodStudentVo.java

@@ -223,4 +223,8 @@ public class ClassPeriodStudentVo {
 	private Long onLineTime;
 	private Long onLineTime;
 	@ApiModelProperty("学习的总时长(秒)")
 	@ApiModelProperty("学习的总时长(秒)")
 	private Long studyTime;
 	private Long studyTime;
+	@ApiModelProperty("班级类型 1继续教育二级建造师 2继续教育二级造价师")
+	private Integer gradeType;
+	@ApiModelProperty("业务层次名称")
+	private String fullName;
 }
 }

+ 4 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserStudyRecordServiceImpl.java

@@ -347,7 +347,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                 queryBo.setId(goodsVo.getBusinessId());
                 queryBo.setId(goodsVo.getBusinessId());
                 String fullName = iCourseBusinessService.queryFullName(queryBo);
                 String fullName = iCourseBusinessService.queryFullName(queryBo);
                 if(Validator.isNotEmpty(fullName)){
                 if(Validator.isNotEmpty(fullName)){
-                    if(fullName.equals("继续教育二级建造师")||fullName.equals("继续教育二级造价师")){
+                    if(fullName.equals("继续教育二级建造师")||fullName.equals("继续教育二级造价师")||fullName.equals("考前培训七大员施工现场专业人员")){
                         if(Validator.isNotEmpty(courseSectionVo.getDurationTime())||Validator.isNotEmpty(bo.getVideoCurrentTime())){
                         if(Validator.isNotEmpty(courseSectionVo.getDurationTime())||Validator.isNotEmpty(bo.getVideoCurrentTime())){
                             Long videoTime = 0L;
                             Long videoTime = 0L;
                             if(Validator.isNotEmpty(courseSectionVo.getDurationTime())&&courseSectionVo.getDurationTime().longValue()>0){
                             if(Validator.isNotEmpty(courseSectionVo.getDurationTime())&&courseSectionVo.getDurationTime().longValue()>0){
@@ -356,6 +356,9 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                                 videoTime = bo.getVideoCurrentTime();
                                 videoTime = bo.getVideoCurrentTime();
                             }
                             }
                             Integer num =  (int)Math.floor(videoTime.intValue()/(15*60))+2;
                             Integer num =  (int)Math.floor(videoTime.intValue()/(15*60))+2;
+                            if(fullName.equals("考前培训七大员施工现场专业人员")){
+                                num = 3;
+                            }
                             UserPeriodQueryBo userPeriodQueryBo2 = new UserPeriodQueryBo();
                             UserPeriodQueryBo userPeriodQueryBo2 = new UserPeriodQueryBo();
                             userPeriodQueryBo2.setSectionId(bo.getSectionId());
                             userPeriodQueryBo2.setSectionId(bo.getSectionId());
                             userPeriodQueryBo2.setCourseId(bo.getCourseId());
                             userPeriodQueryBo2.setCourseId(bo.getCourseId());