6 Commits 9bf57d825a ... 7219f4f42c

Author SHA1 Message Date
  shenhao 7219f4f42c 修改 3 years ago
  shenhao df996bb50b 修改 3 years ago
  shenhao d51582c02b 修改 3 years ago
  shenhao 8dc80fe9ed 文件上传插件处理 3 years ago
  shenhao 48761a1f00 修改 3 years ago
  shenhao 22af94a2aa 修改上传 3 years ago
47 changed files with 3359 additions and 58 deletions
  1. 76 0
      src/main/java/com/ssj/api/domain/vo/vacation/SumPrevExcelImportVO.java
  2. 76 0
      src/main/java/com/ssj/api/domain/vo/vacation/SumPrevMaterialUnitVO.java
  3. 57 0
      src/main/java/com/ssj/api/domain/vo/vacation/SumPrevMaterialVO.java
  4. 41 0
      src/main/java/com/ssj/api/domain/vo/vacation/SumRevMaterialVO.java
  5. 27 0
      src/main/java/com/ssj/api/domain/vo/vacation/VersionUnitListVo.java
  6. 62 0
      src/main/java/com/ssj/api/domain/vo/vacation/VersionUnitVo.java
  7. 70 0
      src/main/java/com/ssj/api/domain/vo/vacation/VersionVo.java
  8. 153 0
      src/main/java/com/ssj/api/filter/VacationExcelImportHelper.java
  9. 66 0
      src/main/java/com/ssj/api/filter/VacationImportListener.java
  10. 68 0
      src/main/java/com/ssj/bean/vacation/SumPrevMaterial.java
  11. 70 0
      src/main/java/com/ssj/bean/vacation/SumPrevMaterialUnit.java
  12. 53 0
      src/main/java/com/ssj/bean/vacation/SumRevMaterial.java
  13. 3 0
      src/main/java/com/ssj/dao/conch/curator/dao/IVacationLimitDao.java
  14. 2 1
      src/main/java/com/ssj/dao/sys/imlibuser/dao/impl/TbClassQueryDaoImpl.java
  15. 1 1
      src/main/java/com/ssj/dao/sys/jxy/dao/JxyQueryDao.java
  16. 8 5
      src/main/java/com/ssj/dao/sys/jxy/dao/impl/JxyQueryDaoImpl.java
  17. 134 0
      src/main/java/com/ssj/framework/core/util/AjaxResult.java
  18. 2 0
      src/main/java/com/ssj/framework/core/util/ResponseConstant.java
  19. 150 0
      src/main/java/com/ssj/framework/core/util/ResponseJrEntity.java
  20. 94 0
      src/main/java/com/ssj/framework/core/util/TableDataInfo.java
  21. 15 0
      src/main/java/com/ssj/mapper/vacation/PrevMaterialMapper.java
  22. 16 0
      src/main/java/com/ssj/mapper/vacation/PrevMaterialUnitMapper.java
  23. 16 0
      src/main/java/com/ssj/mapper/vacation/RevMaterialMapper.java
  24. 26 0
      src/main/java/com/ssj/mapper/vacation/SummerVacationMapper.java
  25. 5 0
      src/main/java/com/ssj/service/conch/curator/service/impl/v1/VacationLimitServiceImpl.java
  26. 2 0
      src/main/java/com/ssj/service/conch/curator/service/v1/IVacationLimitService.java
  27. 2 1
      src/main/java/com/ssj/service/sys/fx/service/MerchantMealService.java
  28. 68 0
      src/main/java/com/ssj/service/sys/fx/service/impl/MerchantMealServiceImpl.java
  29. 1 1
      src/main/java/com/ssj/service/sys/jxy/service/JxyService.java
  30. 3 3
      src/main/java/com/ssj/service/sys/jxy/service/impl/JxyServiceImpl.java
  31. 37 0
      src/main/java/com/ssj/service/vacation/ISummerVacationService.java
  32. 191 0
      src/main/java/com/ssj/service/vacation/impl/SummerVacationServiceImpl.java
  33. 8 1
      src/main/java/com/ssj/sys/controller/ErrorController.java
  34. 68 31
      src/main/java/com/ssj/sys/controller/FxController.java
  35. 309 0
      src/main/java/com/ssj/sys/controller/SummerVacationController.java
  36. 17 7
      src/main/java/com/ssj/sys/model/ErrorModel.java
  37. 37 0
      src/main/java/com/ssj/sys/model/JsonDetailModel.java
  38. 47 0
      src/main/java/com/ssj/sys/model/JsonModel.java
  39. 11 0
      src/main/java/com/ssj/task/sz/MerchantSummaryTask.java
  40. 39 0
      src/main/resources/mybatis/mapper/SummerVacationMapper.xml
  41. 3 1
      src/main/resources/templates/sys/appinfo/appinfoAdd.html
  42. 3 1
      src/main/resources/templates/sys/appinfo/appinfoList.html
  43. 15 1
      src/main/resources/templates/sys/error/answerInfo.html
  44. 2 0
      src/main/resources/templates/sys/error/errorList.html
  45. 3 3
      src/main/resources/templates/sys/fx/merchantCapList.html
  46. 1 1
      src/main/resources/templates/sys/imlibuser/studentList.html
  47. 1201 0
      src/main/resources/templates/sys/vacation/review.html

+ 76 - 0
src/main/java/com/ssj/api/domain/vo/vacation/SumPrevExcelImportVO.java

@@ -0,0 +1,76 @@
+package com.ssj.api.domain.vo.vacation;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.ssj.bean.common.framework.core.domain.BaseRequest;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+/**
+ * @author sh
+ * @className SumPreMaterial
+ * @description 暑假大作战导入excel
+ * @date 2022/6/14
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class SumPrevExcelImportVO extends BaseRequest {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 科目
+     */
+    @Excel(name="学科")
+    private String subject;
+    /**
+     * 版本文字说明
+     */
+    @Excel(name="版本")
+    private String versionName;
+    /**
+     * 年级
+     */
+    @Excel(name="年级")
+    private String grade;
+    /**
+     * 学期 1上册 2-下册
+     */
+    @Excel(name="上下册")
+    private String semester;
+    /**
+     * 教材链接
+     */
+    @Excel(name="教材链接")
+    private String  materialLink;
+
+    /**
+     * 单元视频排序
+     */
+    @Excel(name="排序")
+    private Integer unitSort;
+    /**
+     * 版本文字说明
+     */
+    @Excel(name="单元ID")
+    private String unitId;
+
+    /**
+     * 版本文字说明
+     */
+    @Excel(name="单元名")
+    private String unitName;
+    /**
+     * 视频链接
+     */
+    @Excel(name="视频播放链接")
+    private String  videoLink;
+
+    /**
+     * 视频名称
+     */
+    @Excel(name="视频名称")
+    private String  videoName;
+
+
+}

+ 76 - 0
src/main/java/com/ssj/api/domain/vo/vacation/SumPrevMaterialUnitVO.java

@@ -0,0 +1,76 @@
+package com.ssj.api.domain.vo.vacation;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ssj.bean.common.framework.core.domain.BaseEntity;
+import com.ssj.bean.common.framework.core.domain.BaseResponse;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author sh
+ * @className SumPreMaterial
+ * @description 暑假大作战 预习教材版本单元明细
+ * @date 2022/6/14
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class SumPrevMaterialUnitVO extends BaseResponse {
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    /**
+     * 单元名称
+     */
+    private String unitName;
+    /**
+     * 单元视频排序
+     */
+    private Integer unitSort;
+    /**
+     * 版本文字说明
+     */
+    private String unitId;
+    /**
+     * 视频链接
+     */
+    private String  videoLink;
+
+    /**
+     * 视频名称
+     */
+    private String  videoName;
+
+    /**
+     * 版本数字说明
+     */
+    private Integer versionType;
+    /**
+     * 版本文字说明
+     */
+    private String versionName;
+    /**
+     * 年级
+     */
+    private String grade;
+
+    private Date createTime;
+
+    private List<Map<String,String>> videoList;
+
+    public List<Map<String, String>> getVideoList() {
+        return videoList;
+    }
+
+    public void setVideoList(List<Map<String, String>> videoList) {
+        this.videoList = videoList;
+    }
+}

+ 57 - 0
src/main/java/com/ssj/api/domain/vo/vacation/SumPrevMaterialVO.java

@@ -0,0 +1,57 @@
+package com.ssj.api.domain.vo.vacation;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ssj.bean.common.framework.core.domain.BaseEntity;
+import com.ssj.bean.common.framework.core.domain.BaseResponse;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.List;
+
+/**
+ * @author sh
+ * @className SumPreMaterial
+ * @description 暑假大作战 预习教材版本
+ * @date 2022/6/14
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class SumPrevMaterialVO extends BaseResponse {
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+    /**
+     * 科目
+     */
+    private String subject;
+    /**
+     * 版本数字说明
+     */
+    private Integer versionType;
+    /**
+     * 版本文字说明
+     */
+    private String versionName;
+    /**
+     * 年级
+     */
+    private String grade;
+    /**
+     * 学期 1上学期 2-下学期
+     */
+    private Integer semester;
+    /**
+     * 教材链接
+     */
+    private String  materialLink;
+
+    /**
+     * 单元名称
+     */
+    private String unitName;
+
+    private List<SumPrevMaterialUnitVO> unitList;
+
+}

+ 41 - 0
src/main/java/com/ssj/api/domain/vo/vacation/SumRevMaterialVO.java

@@ -0,0 +1,41 @@
+package com.ssj.api.domain.vo.vacation;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ssj.bean.common.framework.core.domain.BaseEntity;
+import com.ssj.bean.common.framework.core.domain.BaseRequest;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+/**
+ * @author sh
+ * @className SumPreMaterial
+ * @description 暑假大作战 复习教材版本
+ * @date 2022/6/14
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class SumRevMaterialVO extends BaseRequest {
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    /**
+     * 科目
+     */
+    private String subject;
+    /**
+     * 版本数字说明
+     */
+    private Integer versionType;
+    /**
+     * 版本文字说明
+     */
+    private String versionName;
+
+
+}

+ 27 - 0
src/main/java/com/ssj/api/domain/vo/vacation/VersionUnitListVo.java

@@ -0,0 +1,27 @@
+package com.ssj.api.domain.vo.vacation;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ssj.bean.common.framework.core.domain.BaseRequest;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author admin
+ * 版本
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class VersionUnitListVo extends BaseRequest {
+
+	@ApiModelProperty("视频名称")
+	private String videoName;
+
+	@ApiModelProperty("视频链接")
+	private String videoLink;
+	
+
+
+}

+ 62 - 0
src/main/java/com/ssj/api/domain/vo/vacation/VersionUnitVo.java

@@ -0,0 +1,62 @@
+package com.ssj.api.domain.vo.vacation;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ssj.bean.common.framework.core.domain.BaseRequest;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author admin
+ * 版本
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class VersionUnitVo extends BaseRequest {
+
+	@ApiModelProperty("parentId")
+	private String parentId;
+
+	@ApiModelProperty("id")
+	private String id;
+
+	@ApiModelProperty("单元ID")
+	private String unitId;
+
+	@ApiModelProperty("单元")
+	private String unitName;
+
+	@ApiModelProperty("视频list")
+	private List<VersionUnitListVo> unitList;
+
+	/**
+	 * 当前页
+	 */
+	@ApiModelProperty("当前页,默认为1")
+	@NotNull(message = "当前页不能为空")
+	private Integer current = 1;
+
+	/**
+	 * 每页数量大小
+	 */
+	@ApiModelProperty("每页size,默认为10")
+	@NotNull(message = "每页数量不能为空")
+	private Long size = 10L;
+
+
+	/**
+	 * 转换为MyBatisPlus分页查询类
+	 *
+	 * @return MyBatisPlus分页查询类
+	 */
+	public <T> Page<T> toPage() {
+		Page<T> page = new Page<T>();
+		page.setCurrent(this.current);
+		page.setSize(this.size);
+		return page;
+	}
+
+}

+ 70 - 0
src/main/java/com/ssj/api/domain/vo/vacation/VersionVo.java

@@ -0,0 +1,70 @@
+package com.ssj.api.domain.vo.vacation;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ssj.bean.common.framework.core.domain.BaseRequest;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author admin
+ * 版本
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class VersionVo extends BaseRequest {
+
+	@ApiModelProperty("id")
+	private String id;
+
+	@ApiModelProperty("科目")
+	private String subject;
+
+
+	@ApiModelProperty("科目")
+	private String courseName;
+
+	@ApiModelProperty("教材链接")
+	private String materialLink;
+
+	/**
+	 * versionType:版本的数字描述
+	 * grade:年级
+	 * semester:学期的数字描述 1-上学期 2-下学期
+	 */
+	@ApiModelProperty("版本信息")
+	private Integer versionType;
+	@ApiModelProperty("学期 1-上学期2-下学期")
+	private Integer semester;
+	@ApiModelProperty("年级")
+	private String grade;
+	/**
+	 * 当前页
+	 */
+	@ApiModelProperty("当前页,默认为1")
+	@NotNull(message = "当前页不能为空")
+	private Integer current = 1;
+
+	/**
+	 * 每页数量大小
+	 */
+	@ApiModelProperty("每页size,默认为10")
+	@NotNull(message = "每页数量不能为空")
+	private Long size = 10L;
+
+
+	/**
+	 * 转换为MyBatisPlus分页查询类
+	 *
+	 * @return MyBatisPlus分页查询类
+	 */
+	public <T> Page<T> toPage() {
+		Page<T> page = new Page<T>();
+		page.setCurrent(this.current);
+		page.setSize(this.size);
+		return page;
+	}
+
+}

+ 153 - 0
src/main/java/com/ssj/api/filter/VacationExcelImportHelper.java

@@ -0,0 +1,153 @@
+package com.ssj.api.filter;
+
+
+import com.ssj.api.domain.vo.vacation.SumPrevExcelImportVO;
+import com.ssj.bean.vacation.SumPrevMaterial;
+import com.ssj.bean.vacation.SumPrevMaterialUnit;
+import com.ssj.framework.basic.config.bean.VersionConfig;
+import com.ssj.framework.core.util.SystemResourceLocator;
+import com.ssj.mapper.vacation.PrevMaterialMapper;
+import com.ssj.mapper.vacation.PrevMaterialUnitMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 通过Excel导入添加学校处理器
+ *
+ * @author Nicemorning
+ * @date 2021-11-30
+ */
+@Component
+@Slf4j
+public class VacationExcelImportHelper {
+    @Resource
+    private PrevMaterialUnitMapper prevMaterialUnitMapper;
+
+    @Resource
+    private PrevMaterialMapper prevMaterialMapper;
+
+
+//    public static void main(String[] args) {
+//        List<SumPrevExcelImportVO> dataList = new ArrayList<>();
+//
+//        SumPrevExcelImportVO vo = new SumPrevExcelImportVO();
+//        vo.setGrade("一年级");
+//        vo.setSubject("英语");
+//        vo.setVersionName("湘少版");
+//        vo.setSemester("上册");
+//        vo.setVideoName("xxx");
+//        dataList.add(vo);
+//        SumPrevExcelImportVO vo2 = new SumPrevExcelImportVO();
+//        vo2.setGrade("一年级");
+//        vo2.setSubject("英语");
+//        vo2.setVersionName("湘少版");
+//        vo2.setSemester("上册");
+//        vo2.setVideoName("xxx2");
+//        dataList.add(vo2);
+//
+//        SumPrevExcelImportVO vo3 = new SumPrevExcelImportVO();
+//        vo3.setGrade("二年级");
+//        vo3.setSubject("英语");
+//        vo3.setVersionName("湘少版");
+//        vo3.setSemester("上册");
+//        vo3.setVideoName("xxx2");
+//        dataList.add(vo3);
+//        SumPrevMaterial prevMaterial = null;
+//        SumPrevMaterial temp = new SumPrevMaterial();
+//        for (SumPrevExcelImportVO schoolImport : dataList) {
+//            //判断 学科	版本	年级	教材链接	上下册 这5个相等那么就是同一条数据
+//            //(schoolImport.getSemester().equals("上册")?1:2)!=temp.getSemester()
+//            if (schoolImport.getSubject().equals(temp.getSubject()) &&
+//                    schoolImport.getVersionName().equals(temp.getVersionName()) && schoolImport.getGrade().equals(temp.getGrade())
+//                && (schoolImport.getSemester().equals("上册")?1:2) ==temp.getSemester()) {
+//
+//            }else{
+//                prevMaterial = new SumPrevMaterial();
+//                prevMaterial.setCreateTime(new Date());
+//                prevMaterial.setGrade(schoolImport.getGrade());
+//                prevMaterial.setSemester(schoolImport.getSemester().equals("上册") ? 1 : 2);
+//                prevMaterial.setMaterialLink(schoolImport.getMaterialLink());
+//                prevMaterial.setSubject(schoolImport.getSubject());
+//                prevMaterial.setVersionName(schoolImport.getVersionName());
+////                prevMaterial.setVersionType(this.getVersionNameByType(schoolImport.getVersionName(),schoolImport.getSubject()));
+//                prevMaterial.setCreateTime(new Date());
+////                prevMaterialMapper.insert(prevMaterial);
+//                BeanUtils.copyProperties(prevMaterial, temp);
+//            }
+//            SumPrevMaterialUnit materialUnit = new SumPrevMaterialUnit();
+//            materialUnit.setVideoName(schoolImport.getVideoName());
+//            materialUnit.setVideoLink(schoolImport.getVideoLink());
+//            materialUnit.setUnitName(schoolImport.getUnitName());
+//            materialUnit.setUnitId(schoolImport.getUnitId());
+//            materialUnit.setUnitSort(schoolImport.getUnitSort());
+//            materialUnit.setParentId(prevMaterial.getId());
+//            materialUnit.setCreateTime(new Date());
+////            prevMaterialUnitMapper.insert(materialUnit);
+//        }
+//    }
+    /**
+     * 处理导入的数据
+     *
+     * @param dataList 导入的数据
+     */
+
+
+    public void dataImporting(List<SumPrevExcelImportVO> dataList) {
+        System.out.println("data----size------"+dataList.size());
+        //不校验数据有效性
+        SumPrevMaterial prevMaterial = null;
+        SumPrevMaterial temp = new SumPrevMaterial();
+        for (SumPrevExcelImportVO schoolImport : dataList) {
+            //判断 学科	版本	年级	教材链接	上下册 这5个相等那么就是同一条数据
+             //(schoolImport.getSemester().equals("上册")?1:2)!=temp.getSemester()
+            if (schoolImport.getSubject().equals(temp.getSubject()) &&
+                    schoolImport.getVersionName().equals(temp.getVersionName()) && schoolImport.getGrade().equals(temp.getGrade())
+                    && (schoolImport.getSemester().equals("上册")?1:2) ==temp.getSemester()) {
+
+            }else{
+                prevMaterial = new SumPrevMaterial();
+                prevMaterial.setCreateTime(new Date());
+                prevMaterial.setGrade(schoolImport.getGrade());
+                prevMaterial.setSemester(schoolImport.getSemester().equals("上册")?1:2);
+                prevMaterial.setMaterialLink(schoolImport.getMaterialLink());
+                prevMaterial.setSubject(schoolImport.getSubject());
+                prevMaterial.setVersionName(schoolImport.getVersionName());
+                prevMaterial.setVersionType(getVersionNameByType(schoolImport.getVersionName(),schoolImport.getSubject()));
+                prevMaterial.setCreateTime(new Date());
+                prevMaterialMapper.insert(prevMaterial);
+                BeanUtils.copyProperties(prevMaterial,temp);
+            }
+            SumPrevMaterialUnit materialUnit = new SumPrevMaterialUnit();
+            materialUnit.setVideoName(schoolImport.getVideoName());
+            materialUnit.setVideoLink(schoolImport.getVideoLink());
+            materialUnit.setUnitName(schoolImport.getUnitName());
+            materialUnit.setUnitId(schoolImport.getUnitId());
+            materialUnit.setUnitSort(schoolImport.getUnitSort());
+            materialUnit.setParentId(prevMaterial.getId());
+            materialUnit.setCreateTime(new Date());
+            prevMaterialUnitMapper.insert(materialUnit);
+        }
+    }
+
+    private int getVersionNameByType(String versionName,String subject){
+        Map<String, List<VersionConfig>> data = SystemResourceLocator.getVersionList(subject);
+        int reStr = 0;
+        for(String key:data.keySet()) {
+            List<VersionConfig> list = data.get(key);
+            for(VersionConfig v:list){
+                if(v.getVersionName().equals(versionName)){
+                    reStr = v.getVersionType();
+                    break;
+                }
+            }
+        }
+        return reStr;
+    }
+}

+ 66 - 0
src/main/java/com/ssj/api/filter/VacationImportListener.java

@@ -0,0 +1,66 @@
+package com.ssj.api.filter;
+
+
+
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.event.AnalysisEventListener;
+import com.ssj.api.domain.vo.vacation.SumPrevExcelImportVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 通过Excel导入添加学校的监听器
+ *
+ * @author Nicemorning
+ * @date 2021-11-30
+ */
+@Component
+@Slf4j
+public class VacationImportListener extends AnalysisEventListener<SumPrevExcelImportVO> {
+    @Resource
+    private VacationExcelImportHelper excelImportHelper;
+
+    /**
+     * 每隔多少条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收
+     */
+    private static final int BATCH_COUNT = 1000;
+    List<SumPrevExcelImportVO> list = new ArrayList<>();
+
+    /**
+     * 每一条数据解析都会来调用
+     */
+    @Override
+    public void invoke(SumPrevExcelImportVO data, AnalysisContext context) {
+            list.add(data);
+        // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
+        if (list.size() >= BATCH_COUNT) {
+            saveData();
+            // 存储完成清理 list
+            list.clear();
+        }
+    }
+
+    /**
+     * 所有数据解析完成了都会来调用
+     */
+    @Override
+    public void doAfterAllAnalysed(AnalysisContext context) {
+        // 这里也要保存数据,确保最后遗留的数据也存储到数据库
+        saveData();
+        list.clear();
+        log.info("所有数据解析完成!");
+    }
+
+    /**
+     * 存储数据库
+     */
+    private void saveData() {
+        log.info("{}条数据,开始写入数据库!", list.size());
+        excelImportHelper.dataImporting(list);
+        log.info("写入数据库成功!");
+    }
+}

+ 68 - 0
src/main/java/com/ssj/bean/vacation/SumPrevMaterial.java

@@ -0,0 +1,68 @@
+package com.ssj.bean.vacation;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ssj.bean.common.framework.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author sh
+ * @className SumPreMaterial
+ * @description 暑假大作战 预习教材版本
+ * @date 2022/6/14
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("tb_sum_prev_material_xs")
+public class SumPrevMaterial {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.ID_WORKER_STR)
+    private String id;
+    /**
+     * 科目
+     */
+    @TableField("subject")
+    private String subject;
+    /**
+     * 版本数字说明
+     */
+    @TableField("version_type")
+    private Integer versionType;
+    /**
+     * 版本文字说明
+     */
+    @TableField("version_name")
+    private String versionName;
+    /**
+     * 年级
+     */
+    @TableField("grade")
+    private String grade;
+    /**
+     * 学期 1上学期 2-下学期
+     */
+    @TableField("semester")
+    private Integer semester = 0;
+    /**
+     * 教材链接
+     */
+    @TableField("material_link")
+    private String  materialLink;
+
+
+    /**
+     * 创建时间
+     */
+    @TableField("create_time")
+    private Date createTime;
+
+}

+ 70 - 0
src/main/java/com/ssj/bean/vacation/SumPrevMaterialUnit.java

@@ -0,0 +1,70 @@
+package com.ssj.bean.vacation;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ssj.bean.common.framework.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author sh
+ * @className SumPreMaterial
+ * @description 暑假大作战 预习教材版本单元明细
+ * @date 2022/6/14
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("tb_sum_prev_material_unit_xs")
+public class SumPrevMaterialUnit {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.ID_WORKER_STR)
+    private String id;
+    /**
+     *单元名	单元ID	视频播放链接	视频名称	排序
+     */
+
+    @TableField("parent_id")
+    private String parentId;
+
+    /**
+     * 单元名称
+     */
+    @TableField("unit_name")
+    private String unitName;
+    /**
+     * 单元视频排序
+     */
+    @TableField("unit_sort")
+    private Integer unitSort;
+    /**
+     * 版本文字说明
+     */
+    @TableField("unit_id")
+    private String unitId;
+    /**
+     * 视频链接
+     */
+    @TableField("video_link")
+    private String  videoLink;
+
+    /**
+     * 视频链接
+     */
+    @TableField("video_name")
+    private String  videoName;
+
+    /**
+     * 创建时间
+     */
+    @TableField("create_time")
+    private Date createTime;
+
+}

+ 53 - 0
src/main/java/com/ssj/bean/vacation/SumRevMaterial.java

@@ -0,0 +1,53 @@
+package com.ssj.bean.vacation;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ssj.bean.common.framework.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author sh
+ * @className SumPreMaterial
+ * @description 暑假大作战 复习教材版本
+ * @date 2022/6/14
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("tb_sum_rev_material_xs")
+public class SumRevMaterial {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.ID_WORKER_STR)
+    private String id;
+
+    /**
+     * 科目
+     */
+    @TableField("subject")
+    private String subject;
+    /**
+     * 版本数字说明
+     */
+    @TableField("version_type")
+    private Integer versionType;
+    /**
+     * 版本文字说明
+     */
+    @TableField("version_name")
+    private String versionName;
+
+    /**
+     * 创建时间
+     */
+    @TableField("create_time")
+    private Date createTime;
+
+}

+ 3 - 0
src/main/java/com/ssj/dao/conch/curator/dao/IVacationLimitDao.java

@@ -31,4 +31,7 @@ public interface IVacationLimitDao extends JpaRepository<TbVacationLimit, String
             "  and  (to_days(start_date) <= to_days(now()) AND to_days(end_date) >= to_days(now()))\n" +
             "  and lib_id = ?1 limit 1")
     TbVacationLimit findTopValidVocationLimit(String libId);
+
+    @Query(nativeQuery = true, value = "select * from tb_vacation_limit where lib_id=?1 and  (to_days(start_date) <= to_days(now()) AND to_days(end_date) >= to_days(now())) and limit_year=?2 order by type asc")
+    List<TbVacationLimit> findValidVocationList(String libId, String year);
 }

+ 2 - 1
src/main/java/com/ssj/dao/sys/imlibuser/dao/impl/TbClassQueryDaoImpl.java

@@ -46,9 +46,10 @@ public class TbClassQueryDaoImpl implements TbClassQueryDao {
 	public Page<Map<String, Object>> findStudentByPage(Map<String, Object> searchParam, Pageable pageable) {
 		StringBuffer selSql = new StringBuffer();
 		List<Object> queryParams = new ArrayList<Object>();
-		selSql.append("  SELECT v.* ,c.class_name from  tb_lib_vip v     ");
+		selSql.append("  SELECT v.* ,c.class_name,case when v.phone is null or v.phone='' then u.mobile else v.phone end as mobile from  tb_lib_vip v     ");
 		selSql.append("  left join   tb_class_student cs   on v.lib_id = cs.lib_id and v.id = cs.vip_id and cs.status = 1  ");
 		selSql.append("  left join   tb_class c   on cs.class_id = c.id  ");
+		selSql.append("  left join   tb_user u   on v.user_id = u.id  ");
 		selSql.append("   where v.stat=1  AND v.lib_id=?   ");
 		queryParams.add(searchParam.get("libId"));
 		if(!"".equals(searchParam.get("name"))){

+ 1 - 1
src/main/java/com/ssj/dao/sys/jxy/dao/JxyQueryDao.java

@@ -25,7 +25,7 @@ public interface JxyQueryDao {
 
     Map<String, Object> findWorkbook(String bookId);
 
-    List<Map<String, Object>> findAnswerList(String questionIds);
+    List<Map<String, Object>> findAnswerList(String bookId,String questionIds);
 
     Page<Map<String, Object>> refundList(Map<String, Object> params, Pageable initPage);
 }

+ 8 - 5
src/main/java/com/ssj/dao/sys/jxy/dao/impl/JxyQueryDaoImpl.java

@@ -58,7 +58,7 @@ public class JxyQueryDaoImpl implements JxyQueryDao {
 	public Page<ErrorModel> errorList(Map<String, Object> params, Pageable initPage) {
 		StringBuilder selSQL = new StringBuilder();
 		List<Object> queryParams = new ArrayList<Object>();
-		selSQL.append("SELECT t.homework_picture_id as id,t12.child_name,t13.league_name,t.create_time,t.error_reason_code,t11.file_key,t11.`subject`,t11.create_time as upload_time \n");
+		selSQL.append("SELECT t.homework_picture_id as id,t12.grade,t12.child_name,t13.league_name,t.create_time,t.error_reason_code,t11.file_key,t11.`subject`,t11.create_time as upload_time \n");
 		selSQL.append("from scon_homework_idetify_error t \n");
 		selSQL.append("left join scon_homework_picture t11 on t.homework_picture_id = t11.id\n");
 		selSQL.append("left join tb_lib_vip t12 on t.vip_id = t12.id\n");
@@ -113,16 +113,19 @@ public class JxyQueryDaoImpl implements JxyQueryDao {
 	}
 
 	@Override
-	public List<Map<String, Object>> findAnswerList(String questionIds) {
+	public List<Map<String, Object>> findAnswerList(String bookId,String pageNos) {
 		StringBuilder sb = new StringBuilder();
 		sb.append(" select  t2.id question_id, t2.big_question_index, t2.small_question_name small_question_index,")
 				.append(" t3.answer option_answer, t3.answer_json,t2.book_course_id, t2.num")
 				.append(" from  kmt_exercise_questions t2 ")
-				.append(" LEFT JOIN q_question_info t3 ON t2.id = t3.id   where t2.id in (")
-				.append(questionIds.replace("[","").replace("]","").replace("\"","'"))
-				.append(") ")
+				.append(" LEFT JOIN q_question_info t3 ON t2.id = t3.id ")
+				.append(" left join q_question_workbook t4 on t3.id = t4.question_id ")
+                .append("where t4.page_index in (")
+				.append(pageNos.replace("[","").replace("]",""))
+				.append(") and t4.book_id=?")
 				.append("order by  t2.num");
 		List<Object> params = new ArrayList<>();
+		params.add(bookId);
 		return  dao.findMap(sb.toString(),params.toArray());
 	}
 

+ 134 - 0
src/main/java/com/ssj/framework/core/util/AjaxResult.java

@@ -0,0 +1,134 @@
+package com.ssj.framework.core.util;
+
+import cn.hutool.http.HttpStatus;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+/**
+ * 操作消息提醒
+ *
+ * @author Lion Li
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Accessors(chain = true)
+@ApiModel("请求响应对象")
+public class AjaxResult<T> {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 状态码
+	 */
+	@ApiModelProperty("消息状态码")
+	private int code;
+
+	/**
+	 * 返回内容
+	 */
+	@ApiModelProperty("消息内容")
+	private String msg;
+
+	/**
+	 * 数据对象
+	 */
+	@ApiModelProperty("数据对象")
+	private T data;
+
+	/**
+	 * 初始化一个新创建的 AjaxResult 对象
+	 *
+	 * @param code 状态码
+	 * @param msg  返回内容
+	 */
+	public AjaxResult(int code, String msg) {
+		this.code = code;
+		this.msg = msg;
+	}
+
+	/**
+	 * 返回成功消息
+	 *
+	 * @return 成功消息
+	 */
+	public static AjaxResult<Void> success() {
+		return AjaxResult.success("操作成功");
+	}
+
+	/**
+	 * 返回成功数据
+	 *
+	 * @return 成功消息
+	 */
+	public static <T> AjaxResult<T> success(T data) {
+		return AjaxResult.success("操作成功", data);
+	}
+
+	/**
+	 * 返回成功消息
+	 *
+	 * @param msg 返回内容
+	 * @return 成功消息
+	 */
+	public static AjaxResult<Void> success(String msg) {
+		return AjaxResult.success(msg, null);
+	}
+
+	/**
+	 * 返回成功消息
+	 *
+	 * @param msg  返回内容
+	 * @param data 数据对象
+	 * @return 成功消息
+	 */
+	public static <T> AjaxResult<T> success(String msg, T data) {
+		return new AjaxResult<>(HttpStatus.HTTP_OK, msg, data);
+	}
+
+	/**
+	 * 返回错误消息
+	 *
+	 * @return
+	 */
+	public static AjaxResult<Void> error() {
+		return AjaxResult.error("操作失败");
+	}
+
+	/**
+	 * 返回错误消息
+	 *
+	 * @param msg 返回内容
+	 * @return 警告消息
+	 */
+	public static AjaxResult<Void> error(String msg) {
+		return AjaxResult.error(msg, null);
+	}
+
+	/**
+	 * 返回错误消息
+	 *
+	 * @param msg  返回内容
+	 * @param data 数据对象
+	 * @return 警告消息
+	 */
+	public static <T> AjaxResult<T> error(String msg, T data) {
+		return new AjaxResult<>(HttpStatus.HTTP_INTERNAL_ERROR, msg, data);
+	}
+
+	/**
+	 * 返回错误消息
+	 *
+	 * @param code 状态码
+	 * @param msg  返回内容
+	 * @return 警告消息
+	 */
+	public static AjaxResult<Void> error(int code, String msg) {
+		return new AjaxResult<>(code, msg, null);
+	}
+
+}

+ 2 - 0
src/main/java/com/ssj/framework/core/util/ResponseConstant.java

@@ -13,6 +13,8 @@ public class ResponseConstant {
      * 成功状态
      */
     public static final String CODE_999 = "999";
+    public static final int CODE_200 = 200;
+    public static final int CODE_209 = 209;
 
     /**
      * 用户名不存在

+ 150 - 0
src/main/java/com/ssj/framework/core/util/ResponseJrEntity.java

@@ -0,0 +1,150 @@
+package com.ssj.framework.core.util;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ *
+ * 类名称:Response<br>
+ * 类描述:Response 类<br>
+ * @version v1.0
+ *
+ */
+public class ResponseJrEntity implements Serializable{
+    /**
+	 * 
+	 */
+	private static final long serialVersionUID = 8731218855844435111L;
+	private static final String ERROR = "error";
+    private static final String SUCCESS = "success";
+
+    private String status;
+    private int code;
+    private String msg;
+    private Object rows;
+
+    public ResponseJrEntity success() {
+        this.status = SUCCESS;
+        this.msg = "成功";
+        this.code = ResponseConstant.CODE_200;
+        return this;
+    }
+
+    public ResponseJrEntity success(String msg) {
+        this.status = SUCCESS;
+        this.msg = msg;
+        this.code = ResponseConstant.CODE_200;
+        return this;
+    }
+
+    public ResponseJrEntity success(int code, String msg) {
+        this.status = SUCCESS;
+        this.code = code;
+        this.msg = msg;
+        return this;
+    }
+
+    public ResponseJrEntity success(Map<String, Object> data, String msg) {
+        this.status = SUCCESS;
+        this.code = ResponseConstant.CODE_200;
+        this.msg = msg;
+        this.rows = data;
+        return this;
+    }
+
+    public ResponseJrEntity success(Object data, String msg) {
+        this.status = SUCCESS;
+        this.code = ResponseConstant.CODE_200;
+        this.msg = msg;
+        this.rows = data;
+        return this;
+    }
+
+    public ResponseJrEntity success(int code, String msg, Map<String, Object> data) {
+        this.status = SUCCESS;
+        this.code = code;
+        this.msg = msg;
+        this.rows = data;
+        return this;
+    }
+
+    public ResponseJrEntity failure(int code, String msg) {
+        this.status = ERROR;
+        this.code = code;
+        this.msg = msg;
+        return this;
+    }
+
+    public ResponseJrEntity failure(String msg) {
+        this.status = ERROR;
+        this.code = ResponseConstant.CODE_209;
+        this.msg = msg;
+        return this;
+    }
+
+    public ResponseJrEntity failure(Object data, String msg) {
+        this.status = ERROR;
+        this.code = ResponseConstant.CODE_209;
+        this.msg = msg;
+        this.rows = data;
+        return this;
+    }
+
+    public ResponseJrEntity failure(int code, String msg, Object data) {
+        this.status = ERROR;
+        this.code = code;
+        this.msg = msg;
+        this.rows = data;
+        return this;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public Object getRows() {
+        return rows;
+    }
+
+    public void setRows(Object rows) {
+        this.rows = rows;
+    }
+
+    public class ResponseData implements Serializable{
+        /**
+		 * 
+		 */
+		private static final long serialVersionUID = 4460263954067427230L;
+		private Map<String, Object> data;
+
+        public ResponseData() {
+            super();
+        }
+
+        public ResponseData(Map<String, Object> data) {
+            super();
+            this.data = data;
+        }
+
+        public Map<String, Object> getData() {
+            return data;
+        }
+
+        public void setData(Map<String, Object> data) {
+            this.data = data;
+        }
+    }
+
+}

+ 94 - 0
src/main/java/com/ssj/framework/core/util/TableDataInfo.java

@@ -0,0 +1,94 @@
+package com.ssj.framework.core.util;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import org.apache.commons.collections4.CollectionUtils;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 表格分页数据对象
+ *
+ * @author Lion Li
+ */
+
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+@ApiModel("分页响应对象")
+@SuppressWarnings("unused")
+public class TableDataInfo<T> implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 总记录数
+     */
+    @ApiModelProperty("总记录数")
+    private long total;
+
+    /**
+     * 列表数据
+     */
+    @ApiModelProperty("列表数据")
+    private List<T> rows;
+
+    /**
+     * 消息状态码
+     */
+    @ApiModelProperty("消息状态码")
+    private int code;
+
+    /**
+     * 消息内容
+     */
+    @ApiModelProperty("消息内容")
+    private String msg;
+
+    /**
+     * 分页
+     *
+     * @param list  列表数据
+     * @param total 总记录数
+     */
+    public TableDataInfo(List<T> list, long total) {
+        this.rows = list;
+        this.total = total;
+    }
+
+    public static <T> TableDataInfo<T> success(long total, List<T> list) {
+        TableDataInfo<T> result = new TableDataInfo<T>();
+        result.setCode(200);
+        result.setTotal(total);
+        result.setRows(list);
+        return result;
+    }
+
+    public static <T> TableDataInfo<T> success(List<T> list) {
+        TableDataInfo<T> result = new TableDataInfo<T>();
+        result.setCode(200);
+        result.setTotal(CollectionUtils.isNotEmpty(list) ? list.size() : 0L);
+        result.setRows(list);
+        return result;
+    }
+
+    public static <T> TableDataInfo<T> success() {
+        TableDataInfo<T> result = new TableDataInfo<T>();
+        result.setCode(200);
+        result.setTotal(0L);
+        result.setRows(null);
+        return result;
+    }
+
+    public static <T> TableDataInfo<T> fail() {
+        TableDataInfo<T> result = new TableDataInfo<T>();
+        result.setCode(500);
+        result.setTotal(0L);
+        result.setRows(null);
+        return result;
+    }
+
+}

+ 15 - 0
src/main/java/com/ssj/mapper/vacation/PrevMaterialMapper.java

@@ -0,0 +1,15 @@
+package com.ssj.mapper.vacation;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ssj.bean.vacation.SumPrevMaterial;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author sh
+ * @className PrevMaterialMapper
+ * @description mapper
+ * @date 2022/6/14
+ */
+@Mapper
+public interface PrevMaterialMapper extends BaseMapper<SumPrevMaterial> {
+}

+ 16 - 0
src/main/java/com/ssj/mapper/vacation/PrevMaterialUnitMapper.java

@@ -0,0 +1,16 @@
+package com.ssj.mapper.vacation;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ssj.bean.vacation.SumPrevMaterialUnit;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author sh
+ * @className PrevMaterialUnitMapper
+ * @description mapper
+ * @date 2022/6/14
+ */
+@Mapper
+public interface PrevMaterialUnitMapper extends BaseMapper<SumPrevMaterialUnit> {
+}

+ 16 - 0
src/main/java/com/ssj/mapper/vacation/RevMaterialMapper.java

@@ -0,0 +1,16 @@
+package com.ssj.mapper.vacation;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ssj.bean.vacation.SumRevMaterial;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author sh
+ * @className RevMaterialMapper
+ * @description mapper
+ * @date 2022/6/14
+ */
+@Mapper
+public interface RevMaterialMapper extends BaseMapper<SumRevMaterial> {
+}

+ 26 - 0
src/main/java/com/ssj/mapper/vacation/SummerVacationMapper.java

@@ -0,0 +1,26 @@
+package com.ssj.mapper.vacation;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ssj.api.domain.vo.vacation.SumPrevMaterialUnitVO;
+import com.ssj.api.domain.vo.vacation.SumPrevMaterialVO;
+import com.ssj.api.domain.vo.vacation.SumRevMaterialVO;
+import com.ssj.api.domain.vo.vacation.VersionVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author sh
+ * @className SummerVacationMapper
+ * @description
+ * @date 2022/6/15
+ */
+@Mapper
+public interface SummerVacationMapper {
+    Page<SumPrevMaterialVO> getPrevPage(Page page,@Param("param") VersionVo param);
+
+    List<SumPrevMaterialUnitVO> getUnitList(@Param("id") String id);
+
+    Page<SumRevMaterialVO> vacationRevPage(Page page,@Param("param")  VersionVo param);
+}

+ 5 - 0
src/main/java/com/ssj/service/conch/curator/service/impl/v1/VacationLimitServiceImpl.java

@@ -171,4 +171,9 @@ public class VacationLimitServiceImpl extends BaseServiceImpl<TbVacationLimit, S
         }
         return responseEntity;
     }
+
+    @Override
+    public List<TbVacationLimit> findValidVocationList(String libId, String year) {
+        return dao.findValidVocationList(libId,year);
+    }
 }

+ 2 - 0
src/main/java/com/ssj/service/conch/curator/service/v1/IVacationLimitService.java

@@ -22,4 +22,6 @@ public interface IVacationLimitService extends BaseService<TbVacationLimit, Stri
     ResponseEntity vacationList(String libId);
 
     ResponseEntity vacationSetSave(VacationSaveReq req,String userId);
+
+    List<TbVacationLimit> findValidVocationList(String libId, String year);
 }

+ 2 - 1
src/main/java/com/ssj/service/sys/fx/service/MerchantMealService.java

@@ -34,5 +34,6 @@ public interface MerchantMealService extends BaseService<MerchantMeal, String> {
 	void updateMerchantByMeal(String merchantId);
 	
 	void updateMerchantActiveByMeal(String merchantId);
-	
+
+    void addMealByMerchantId(String merchantId);
 }

+ 68 - 0
src/main/java/com/ssj/service/sys/fx/service/impl/MerchantMealServiceImpl.java

@@ -2,12 +2,20 @@ package com.ssj.service.sys.fx.service.impl;
 
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.temporal.ChronoUnit;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
+import com.ssj.bean.curator.TbVacationLimit;
 import com.ssj.bean.weixin.libmy.domain.TbLibJoin;
+import com.ssj.framework.core.security.manager.TokenManager;
+import com.ssj.service.conch.curator.service.v1.IVacationLimitService;
 import com.ssj.service.weixin.library.service.ILibJoinService;
 import com.ssj.service.weixin.library.service.ILibVipService;
 import org.apache.commons.lang3.StringUtils;
@@ -63,6 +71,12 @@ public class MerchantMealServiceImpl extends BaseServiceImpl<MerchantMeal, Strin
     @Autowired
 	private ILibJoinService joinService;
 
+    @Autowired
+    private IVacationLimitService vacationLimitService;
+
+    @Autowired
+    TokenManager manager;
+
 	@Override
 	public PagingAndSortingRepository<MerchantMeal, String> getDao() {
 		return dao;
@@ -506,6 +520,60 @@ public class MerchantMealServiceImpl extends BaseServiceImpl<MerchantMeal, Strin
 		merchantService.save(merchant);
 		
 	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void addMealByMerchantId(String merchantId) {
+		Merchant merchant=merchantService.getById(merchantId);
+		if(merchant==null || merchant.getLibId()==null){
+			return;
+		}
+        /**
+         * 查询节假日列表
+         */
+        String year = DateHelper.format(new Date(), "yyyy");
+        String libId = merchant.getLibId();
+        List<TbVacationLimit> list = vacationLimitService.findValidVocationList(libId,year);
+        list.forEach(l->{
+            //未处理
+            if(!manager.exists(libId+l.getId())){
+                //计算假期天数
+                long days = betweenTowDays(l.getStartDate(),l.getEndDate());
+
+                //查询结束时间最大的数据。
+                MerchantMeal maxMerchantMeal=dao.getMerchantMealByMaxEndSignTime(merchantId);
+
+                //在这个馆的meal后增加一条订单明细
+                MerchantMeal addMeal = new MerchantMeal();
+                addMeal.setOrderId(maxMerchantMeal.getOrderId());
+                addMeal.setMerchantId(merchantId);
+                addMeal.setStatus(maxMerchantMeal.getStatus());
+                /**
+                 * type =2 赠送的
+                 */
+                addMeal.setType(2);
+                addMeal.setSignType(maxMerchantMeal.getSignType());
+                addMeal.setSignTime(maxMerchantMeal.getEndSignTime());
+                addMeal.setEndSignTime(DateHelper.getYesToday(maxMerchantMeal.getEndSignTime(),Integer.parseInt(String.valueOf(days))));
+                addMeal.setLibService(merchant.getLibService());
+                addMeal.setCreateTime(new Date());
+                this.save(addMeal);
+                //增加redis记录,有效期1年
+                manager.setString(libId+l.getId(),"1",3600*24*365);
+            }
+        });
+	}
+
+	private long betweenTowDays(Date startDate,Date endDate){
+	    Instant startInstant = startDate.toInstant();
+	    Instant endInstant = endDate.toInstant();
+	    ZoneId zone = ZoneId.systemDefault();
+        LocalDateTime startLocalTime = LocalDateTime.ofInstant(startInstant,zone);
+        LocalDateTime endLocalTime = LocalDateTime.ofInstant(endInstant,zone);
+        LocalDate startLocalDate = startLocalTime.toLocalDate();
+        LocalDate endLocalDate = endLocalTime.toLocalDate();
+        return ChronoUnit.DAYS.between(startLocalDate, endLocalDate);
+    }
 }
 
 

+ 1 - 1
src/main/java/com/ssj/service/sys/jxy/service/JxyService.java

@@ -76,7 +76,7 @@ public interface JxyService extends BaseService<Jxy, String> {
 	 * @param questionIds
 	 * @return
 	 */
-	List<Map<String, Object>> findAnswerList(String questionIds);
+	List<Map<String, Object>> findAnswerList(String bookId,String questionIds);
 
 	/**
 	 * 退款审核列表

+ 3 - 3
src/main/java/com/ssj/service/sys/jxy/service/impl/JxyServiceImpl.java

@@ -169,7 +169,7 @@ public class JxyServiceImpl extends BaseServiceImpl<Jxy, String> implements JxyS
 		data.putAll(workbook);
 
 		//查询题目答案
-		List<Map<String, Object>> answerList = jxyQueryDao.findAnswerList(deal.getQuestionIds());
+		List<Map<String, Object>> answerList = jxyQueryDao.findAnswerList(deal.getBookId(),deal.getBookPageNo());
 		data.put("answerList", answerList);
 		return data;
 	}
@@ -180,8 +180,8 @@ public class JxyServiceImpl extends BaseServiceImpl<Jxy, String> implements JxyS
 	}
 
 	@Override
-	public List<Map<String, Object>> findAnswerList(String questionIds) {
-		return jxyQueryDao.findAnswerList(questionIds);
+	public List<Map<String, Object>> findAnswerList(String bookId,String questionIds) {
+		return jxyQueryDao.findAnswerList(bookId,questionIds);
 	}
 
 	@Override

+ 37 - 0
src/main/java/com/ssj/service/vacation/ISummerVacationService.java

@@ -0,0 +1,37 @@
+package com.ssj.service.vacation;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ssj.api.domain.vo.vacation.*;
+
+import java.util.List;
+
+/**
+ * @author sh
+ * @className ISummerVacationService
+ * @description 暑假大作战相关业务接口
+ * @date 2022/6/14
+ */
+public interface ISummerVacationService {
+    /**
+     * 获取预习分页列表
+     * @param param 入参
+     * @return 分页实体
+     */
+    Page<SumPrevMaterialVO> getPrevPage(VersionVo param);
+
+    List<SumPrevMaterialUnitVO> getUnitList(String id);
+
+    void editPreMaterialVersion(VersionVo param);
+
+    void delPreMaterialVersion(VersionVo param);
+
+    void delPreMaterialUnitVersion(VersionVo param);
+
+    void editPreUnitVersion(VersionUnitVo param);
+
+    Page<SumRevMaterialVO> vacationRevPage(VersionVo param);
+
+    void revMaterialVersion(VersionVo param);
+
+    void delRevMaterialVersion(VersionVo param);
+}

+ 191 - 0
src/main/java/com/ssj/service/vacation/impl/SummerVacationServiceImpl.java

@@ -0,0 +1,191 @@
+package com.ssj.service.vacation.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ssj.api.domain.vo.vacation.*;
+import com.ssj.bean.vacation.SumPrevMaterial;
+import com.ssj.bean.vacation.SumPrevMaterialUnit;
+import com.ssj.bean.vacation.SumRevMaterial;
+import com.ssj.framework.basic.config.bean.VersionConfig;
+import com.ssj.framework.core.util.SystemResourceLocator;
+import com.ssj.mapper.vacation.PrevMaterialMapper;
+import com.ssj.mapper.vacation.PrevMaterialUnitMapper;
+import com.ssj.mapper.vacation.RevMaterialMapper;
+import com.ssj.mapper.vacation.SummerVacationMapper;
+import com.ssj.service.vacation.ISummerVacationService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * @author sh
+ * @className SummerVacationServiceImpl
+ * @description 暑假大作战业务实现
+ * @date 2022/6/14
+ */
+@Service
+@Slf4j
+public class SummerVacationServiceImpl implements ISummerVacationService {
+
+    @Resource
+    private SummerVacationMapper summerVacationMapper;
+    @Resource
+    private PrevMaterialMapper prevMaterialMapper;
+    @Resource
+    private PrevMaterialUnitMapper prevMaterialUnitMapper;
+
+    @Resource
+    private RevMaterialMapper revMaterialMapper;
+
+    @Override
+    public Page<SumPrevMaterialVO> getPrevPage(VersionVo param) {
+
+        return summerVacationMapper.getPrevPage(param.toPage(),param);
+    }
+
+    @Override
+    public List<SumPrevMaterialUnitVO> getUnitList(String id) {
+        return summerVacationMapper.getUnitList(id);
+    }
+
+    @Override
+    public void editPreMaterialVersion(VersionVo param) {
+        if(param.getId()== null || "".equals(param.getId())){
+            SumPrevMaterial sumPrevMaterial = new SumPrevMaterial();
+            sumPrevMaterial.setGrade(param.getGrade());
+            sumPrevMaterial.setSemester(param.getSemester());
+            sumPrevMaterial.setMaterialLink(param.getMaterialLink());
+            sumPrevMaterial.setVersionType(param.getVersionType());
+            sumPrevMaterial.setSubject(param.getSubject());
+            sumPrevMaterial.setVersionName(getVersionNameByType(param.getVersionType(),param.getSubject()));
+            sumPrevMaterial.setCreateTime(new Date());
+            prevMaterialMapper.insert(sumPrevMaterial);
+        }else{
+            SumPrevMaterial sumPrevMaterial = prevMaterialMapper.selectById(param.getId());
+            if(StringUtils.isNotEmpty(param.getGrade())){
+                sumPrevMaterial.setGrade(param.getGrade());
+            }
+            if(param.getSemester()>0) {
+                sumPrevMaterial.setSemester(param.getSemester());
+            }
+            if(StringUtils.isNotEmpty(param.getMaterialLink())) {
+                sumPrevMaterial.setMaterialLink(param.getMaterialLink());
+            }
+            if(StringUtils.isNotEmpty(param.getSubject())) {
+                sumPrevMaterial.setSubject(param.getSubject());
+            }
+            if(param.getVersionType()>0){
+                sumPrevMaterial.setVersionType(param.getVersionType());
+                sumPrevMaterial.setVersionName(getVersionNameByType(param.getVersionType(),param.getSubject()));
+            }
+            sumPrevMaterial.setCreateTime(new Date());
+            prevMaterialMapper.updateById(sumPrevMaterial);
+        }
+
+    }
+
+    @Override
+    public void delPreMaterialVersion(VersionVo param) {
+        if(param.getId()!= null && !"".equals(param.getId())){
+            prevMaterialMapper.deleteById(param.getId());
+        }
+    }
+
+    @Override
+    public void delPreMaterialUnitVersion(VersionVo param) {
+        if(param.getId()!= null && !"".equals(param.getId())){
+            SumPrevMaterialUnit sumPrevMaterial = prevMaterialUnitMapper.selectById(param.getId());
+            prevMaterialUnitMapper.delete(new QueryWrapper<SumPrevMaterialUnit>()
+                    .eq("parent_id",sumPrevMaterial.getParentId())
+                    .eq("unit_id",sumPrevMaterial.getUnitId()));
+        }
+    }
+
+    @Override
+    public void editPreUnitVersion(VersionUnitVo param) {
+        if(param.getId()!= null && !"".equals(param.getId())){
+            SumPrevMaterialUnit sumPrevMaterial = prevMaterialUnitMapper.selectById(param.getId());
+            //修改的话,先删除之前的记录,再插入新的记录
+            prevMaterialUnitMapper.delete(new QueryWrapper<SumPrevMaterialUnit>()
+                    .eq("parent_id",sumPrevMaterial.getParentId())
+                    .eq("unit_id",sumPrevMaterial.getUnitId()));
+        }
+        List<VersionUnitListVo> list = param.getUnitList();
+        if(list!=null && list.size()>0){
+            for (VersionUnitListVo vo:list){
+                SumPrevMaterialUnit sumPrevMaterial = new SumPrevMaterialUnit();
+                sumPrevMaterial.setParentId(param.getParentId());
+                sumPrevMaterial.setUnitId(param.getUnitId());
+                sumPrevMaterial.setUnitName(param.getUnitName());
+                sumPrevMaterial.setVideoLink(vo.getVideoLink());
+                sumPrevMaterial.setVideoName(vo.getVideoName());
+                sumPrevMaterial.setCreateTime(new Date());
+                prevMaterialUnitMapper.insert(sumPrevMaterial);
+            }
+        }else{
+            SumPrevMaterialUnit sumPrevMaterial = new SumPrevMaterialUnit();
+            sumPrevMaterial.setParentId(param.getParentId());
+            sumPrevMaterial.setUnitId(param.getUnitId());
+            sumPrevMaterial.setUnitName(param.getUnitName());
+            sumPrevMaterial.setCreateTime(new Date());
+            prevMaterialUnitMapper.insert(sumPrevMaterial);
+        }
+
+    }
+
+    @Override
+    public Page<SumRevMaterialVO> vacationRevPage(VersionVo param) {
+        return summerVacationMapper.vacationRevPage(param.toPage(),param);
+    }
+
+    @Override
+    public void revMaterialVersion(VersionVo param) {
+        if(param.getId()== null || "".equals(param.getId())){
+            SumRevMaterial sumPrevMaterial = new SumRevMaterial();
+            sumPrevMaterial.setVersionType(param.getVersionType());
+            sumPrevMaterial.setSubject(param.getSubject());
+            sumPrevMaterial.setVersionName(getVersionNameByType(param.getVersionType(),param.getSubject()));
+            sumPrevMaterial.setCreateTime(new Date());
+            revMaterialMapper.insert(sumPrevMaterial);
+        }else{
+            SumRevMaterial revMaterial = revMaterialMapper.selectById(param.getId());
+            if(StringUtils.isNotEmpty(param.getSubject())) {
+                revMaterial.setSubject(param.getSubject());
+            }
+            if(param.getVersionType()>0){
+                revMaterial.setVersionType(param.getVersionType());
+                revMaterial.setVersionName(getVersionNameByType(param.getVersionType(),param.getSubject()));
+            }
+            revMaterial.setCreateTime(new Date());
+            revMaterialMapper.updateById(revMaterial);
+        }
+    }
+
+    @Override
+    public void delRevMaterialVersion(VersionVo param) {
+        if(param.getId()!= null && !"".equals(param.getId())){
+            revMaterialMapper.deleteById(param.getId());
+        }
+    }
+
+    private String getVersionNameByType(int type,String subject){
+        Map<String, List<VersionConfig>> data = SystemResourceLocator.getVersionList(subject);
+        String reStr = "";
+        for(String key:data.keySet()) {
+            List<VersionConfig> list = data.get(key);
+            for(VersionConfig v:list){
+                if(v.getVersionType() == type){
+                    reStr = v.getVersionName();
+                    break;
+                }
+            }
+        }
+        return reStr;
+    }
+}

+ 8 - 1
src/main/java/com/ssj/sys/controller/ErrorController.java

@@ -5,6 +5,8 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
 import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
 import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.google.gson.JsonArray;
 import com.ssj.bean.sys.fx.domain.Merchant;
 import com.ssj.bean.sys.fx.domain.MerchantMealOrder;
 import com.ssj.bean.sys.homework.domain.HomeworkPicture;
@@ -29,6 +31,8 @@ import com.ssj.service.sys.picturepredeal.service.PicturePreDealService;
 import com.ssj.service.sys.role.service.RoleService;
 import com.ssj.service.sys.sort.service.SortService;
 import com.ssj.sys.model.ErrorModel;
+import com.ssj.sys.model.JsonModel;
+import org.apache.commons.collections4.MapUtils;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
@@ -250,7 +254,10 @@ public class ErrorController extends BaseController {
 
             if(deal.getDealFlag()>0){
                 Map<String, Object> workbook = jxyService.findWorkbook(deal.getBookId());
-                List<Map<String, Object>> answerList = jxyService.findAnswerList(deal.getQuestionIds());
+                List<Map<String, Object>> answerList = jxyService.findAnswerList(deal.getBookId(),deal.getBookPageNo());
+                answerList.forEach(map -> {
+                    map.put("json", JSON.parseArray(MapUtils.getString(map,"answer_json"), JsonModel.class));
+                });
                 model.addAttribute("workbook",workbook);
                 model.addAttribute("answerList",answerList);
             }else{

+ 68 - 31
src/main/java/com/ssj/sys/controller/FxController.java

@@ -2377,29 +2377,29 @@ public class FxController  extends BaseController {
 	        //设置样式;  
 	        XSSFCellStyle style = workbook.createCellStyle();  
 	        //设置底边框;  
-	        style.setBorderBottom(HSSFCellStyle.BORDER_THIN);  
-	        //设置底边框颜色;  
-	        style.setBottomBorderColor(HSSFColor.BLACK.index);  
-	        //设置左边框;  
-	        style.setBorderLeft(HSSFCellStyle.BORDER_THIN);  
-	        //设置左边框颜色;  
-	        style.setLeftBorderColor(HSSFColor.BLACK.index);  
-	        //设置右边框;  
-	        style.setBorderRight(HSSFCellStyle.BORDER_THIN);  
-	        //设置右边框颜色;  
-	        style.setRightBorderColor(HSSFColor.BLACK.index);  
-	        //设置顶边框;  
-	        style.setBorderTop(HSSFCellStyle.BORDER_THIN);  
-	        //设置顶边框颜色;  
-	        style.setTopBorderColor(HSSFColor.BLACK.index);  
+	        style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
+	        //设置底边框颜色;
+	        style.setBottomBorderColor(HSSFColor.BLACK.index);
+	        //设置左边框;
+	        style.setBorderLeft(HSSFCellStyle.BORDER_THIN);
+	        //设置左边框颜色;
+	        style.setLeftBorderColor(HSSFColor.BLACK.index);
+	        //设置右边框;
+	        style.setBorderRight(HSSFCellStyle.BORDER_THIN);
+	        //设置右边框颜色;
+	        style.setRightBorderColor(HSSFColor.BLACK.index);
+	        //设置顶边框;
+	        style.setBorderTop(HSSFCellStyle.BORDER_THIN);
+	        //设置顶边框颜色;
+	        style.setTopBorderColor(HSSFColor.BLACK.index);
 	        //在样式用应用设置的字体;  
 	         style.setFont(font);  
 	         //设置自动换行;  
 	         style.setWrapText(false);  
 	         //设置水平对齐的样式为居中对齐;  
-	         style.setAlignment(HSSFCellStyle.ALIGN_CENTER);  
-	         //设置垂直对齐的样式为居中对齐;  
-	         style.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);  
+	         style.setAlignment(HSSFCellStyle.ALIGN_CENTER);
+	         //设置垂直对齐的样式为居中对齐;
+	         style.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
 	         return style;  
 	     }  
 
@@ -3890,11 +3890,21 @@ public class FxController  extends BaseController {
 	        List<Map<String, Object>> mapList=page.getContent();
 	        for (Map<String, Object> map : mapList) {
 	        	if(Integer.parseInt(map.get("cap_type").toString())==1) {
-	        		map.put("pr_1",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()/(Integer.parseInt(map.get("buy_month").toString())+Integer.parseInt(map.get("give_month").toString()))/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
+	        	    if(Integer.parseInt(map.get("lib_service").toString())==0){
+                        map.put("pr_1","");
+                    }else{
+                        map.put("pr_1",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()/(Integer.parseInt(map.get("buy_month").toString())+Integer.parseInt(map.get("give_month").toString()))/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
+                    }
+
 	        		map.put("pr_2",map.get("price"));
 	        		map.put("pr_3","");
 	        	}else if(Integer.parseInt(map.get("cap_type").toString())==2) {
-	        		map.put("pr_1",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()/(Integer.parseInt(map.get("buy_month").toString())+Integer.parseInt(map.get("give_month").toString()))/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
+                    if(Integer.parseInt(map.get("lib_service").toString())==0){
+                        map.put("pr_1","");
+                    }else{
+                        map.put("pr_1",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()/(Integer.parseInt(map.get("buy_month").toString())+Integer.parseInt(map.get("give_month").toString()))/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
+                    }
+
 	        		map.put("pr_2","");
 	        		map.put("pr_3",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()/(Integer.parseInt(map.get("buy_month").toString())+Integer.parseInt(map.get("give_month").toString()))).setScale(2, RoundingMode.UP).doubleValue());
 	        	}else if(Integer.parseInt(map.get("cap_type").toString())==3) {
@@ -3905,12 +3915,22 @@ public class FxController  extends BaseController {
 	        		map.put("pr_1","");
 	        		map.put("pr_2","");
 	        		map.put("pr_3",map.get("price"));
-	        	}else if(Integer.parseInt(map.get("cap_type").toString())==5) { 
-	        		map.put("pr_1", new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("buy_month").toString()))/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
+	        	}else if(Integer.parseInt(map.get("cap_type").toString())==5) {
+                    if(Integer.parseInt(map.get("lib_service").toString())==0){
+                        map.put("pr_1","");
+                    }else{
+                        map.put("pr_1", new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("buy_month").toString()))/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
+                    }
+
 	        		map.put("pr_2", map.get("price"));
 	        		map.put("pr_3","");
 	        	}else if(Integer.parseInt(map.get("cap_type").toString())==6) {
-	        		map.put("pr_1", new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
+                    if(Integer.parseInt(map.get("lib_service").toString())==0){
+                        map.put("pr_1","");
+                    }else{
+                        map.put("pr_1", new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
+                    }
+
 	        		map.put("pr_2","");
 	        		map.put("pr_3",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()/(Integer.parseInt(map.get("buy_month").toString()))).setScale(2, RoundingMode.UP).doubleValue());
 	        	}
@@ -4993,12 +5013,20 @@ public class FxController  extends BaseController {
         
         List<Map<String, Object>> mapList=page.getContent();
         for (Map<String, Object> map : mapList) {
-        	if(Integer.parseInt(map.get("cap_type").toString())==1) {
-        		map.put("pr_1",new BigDecimal(map.get("price").toString()).divide(new BigDecimal(map.get("buy_month").toString()).add(new BigDecimal(map.get("give_month").toString())),RoundingMode.HALF_UP).divide(new BigDecimal(map.get("lib_service").toString()),RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP).doubleValue());
+        	if(Integer.parseInt(map.get("cap_type").toString())==0) {
+        	    if(Integer.parseInt(map.get("lib_service").toString())==0){
+                    map.put("pr_1","");
+                }else{
+                    map.put("pr_1",new BigDecimal(map.get("price").toString()).divide(new BigDecimal(map.get("buy_month").toString()).add(new BigDecimal(map.get("give_month").toString())),RoundingMode.HALF_UP).divide(new BigDecimal(map.get("lib_service").toString()),RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP).doubleValue());
+                }
         		map.put("pr_2",map.get("price"));
         		map.put("pr_3","");
         	}else if(Integer.parseInt(map.get("cap_type").toString())==2) {
-        		map.put("pr_1",new BigDecimal(map.get("price").toString()).divide(new BigDecimal(map.get("buy_month").toString()).add(new BigDecimal(map.get("give_month").toString())),RoundingMode.HALF_UP).divide(new BigDecimal(map.get("lib_service").toString()),RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP).doubleValue());
+                if(Integer.parseInt(map.get("lib_service").toString())==0){
+                    map.put("pr_1","");
+                }else {
+                    map.put("pr_1", new BigDecimal(map.get("price").toString()).divide(new BigDecimal(map.get("buy_month").toString()).add(new BigDecimal(map.get("give_month").toString())), RoundingMode.HALF_UP).divide(new BigDecimal(map.get("lib_service").toString()), RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP).doubleValue());
+                }
         		map.put("pr_2","");
         		map.put("pr_3",new BigDecimal(map.get("price").toString()).divide(new BigDecimal(map.get("buy_month").toString()).add(new BigDecimal(map.get("give_month").toString())),RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP).doubleValue());
         	}else if(Integer.parseInt(map.get("cap_type").toString())==3) {
@@ -5009,13 +5037,22 @@ public class FxController  extends BaseController {
         		map.put("pr_1","");
         		map.put("pr_2","");
         		map.put("pr_3",map.get("price"));
-        	}else if(Integer.parseInt(map.get("cap_type").toString())==5) { 
-        		map.put("pr_1", new BigDecimal(map.get("price").toString()).divide(new BigDecimal(map.get("buy_month").toString())).divide(new BigDecimal(map.get("lib_service").toString()),RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP).doubleValue());
-        		map.put("pr_2", map.get("price"));
+        	}else if(Integer.parseInt(map.get("cap_type").toString())==5) {
+                if(Integer.parseInt(map.get("lib_service").toString())==0){
+                    map.put("pr_1","");
+                }else {
+                    map.put("pr_1", new BigDecimal(map.get("price").toString()).divide(new BigDecimal(map.get("buy_month").toString())).divide(new BigDecimal(map.get("lib_service").toString()), RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP).doubleValue());
+
+                }
+                map.put("pr_2", map.get("price"));
         		map.put("pr_3","");
         	}else if(Integer.parseInt(map.get("cap_type").toString())==6) {
-        		map.put("pr_1", new BigDecimal(map.get("price").toString()).divide(new BigDecimal(map.get("lib_service").toString()),RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP).doubleValue());
-        		map.put("pr_2","");
+                if(Integer.parseInt(map.get("lib_service").toString())==0){
+                    map.put("pr_1","");
+                }else {
+                    map.put("pr_1", new BigDecimal(map.get("price").toString()).divide(new BigDecimal(map.get("lib_service").toString()), RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP).doubleValue());
+                }
+                map.put("pr_2","");
         		map.put("pr_3",new BigDecimal(new BigDecimal(map.get("price").toString()).divide(new BigDecimal(map.get("buy_month").toString()),RoundingMode.HALF_UP).setScale(2, RoundingMode.HALF_UP).doubleValue()));
         	}
 		}

+ 309 - 0
src/main/java/com/ssj/sys/controller/SummerVacationController.java

@@ -0,0 +1,309 @@
+package com.ssj.sys.controller;
+
+
+import cn.afterturn.easypoi.excel.ExcelImportUtil;
+import cn.afterturn.easypoi.excel.entity.ImportParams;
+import com.alibaba.excel.EasyExcel;
+import com.baomidou.mybatisplus.core.metadata.TableInfo;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ssj.api.domain.vo.vacation.*;
+import com.ssj.api.filter.VacationExcelImportHelper;
+import com.ssj.api.filter.VacationImportListener;
+import com.ssj.api.security.annotation.IgnoreSecurity;
+import com.ssj.framework.basic.config.bean.VersionConfig;
+import com.ssj.framework.core.common.controller.BaseController;
+import com.ssj.framework.core.util.*;
+import com.ssj.mapper.vacation.PrevMaterialMapper;
+import com.ssj.service.vacation.ISummerVacationService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @author sh
+ * @className SummerVacationController
+ * @description 暑假大作战
+ * @date 2022/6/14
+ */
+@Api(tags = "暑假大作战相关接口")
+@Controller
+@RequestMapping("/sys/summerVacation")
+@Slf4j
+public class SummerVacationController extends BaseController {
+
+    @Resource
+    private ISummerVacationService summerVacationService;
+
+    @Resource
+    private VacationExcelImportHelper excelImportHelper;
+
+    @RequestMapping("/index")
+    public String vacationIndex(Model model){
+        return "sys/vacation/review";
+    }
+
+    @IgnoreSecurity
+    @RequestMapping(value = "/get/vacationVersionName", method = RequestMethod.POST)
+    @ApiOperation(value = "获取教材版本",  notes = "获取教材版本")
+    @ResponseBody
+    public ResponseJrEntity vacationVersionName(@RequestBody VersionVo param) {
+        ResponseJrEntity responseEntity = new ResponseJrEntity();
+        try {
+            Map<String, List<VersionConfig>> data = SystemResourceLocator.getVersionList(param.getSubject());
+            List<Map<String,Object>> list = new ArrayList<>();
+            for(String key:data.keySet()) {
+                Map<String,Object> map = new HashMap<>();
+                map.put("courseName",key);
+                map.put("versionList",data.get(key));
+                list.add(map);
+            }
+            responseEntity.success(list, "获取教材版本成功");
+        } catch (Exception e) {
+            logger.error("获取教材版本接口", e);
+            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
+        }
+        return responseEntity;
+    }
+
+    @IgnoreSecurity
+    @RequestMapping(value = "/get/vacationPrePage", method = RequestMethod.POST)
+    @ApiOperation(value = "获取预习列表",  notes = "获取预习列表")
+    @ResponseBody
+    public TableDataInfo vacationPrePage(@RequestBody VersionVo param) {
+            Page<SumPrevMaterialVO> prevPage = summerVacationService.getPrevPage(param);
+
+     return   TableDataInfo.success(prevPage.getTotal(),
+                    prevPage.getRecords().stream()
+                            .map(item -> {
+                                List<SumPrevMaterialUnitVO> list = summerVacationService.getUnitList(item.getId());
+                                Map<String,List<SumPrevMaterialUnitVO>> groupMap = list.stream().collect(Collectors.groupingBy(SumPrevMaterialUnitVO::getUnitId));
+                                List<SumPrevMaterialUnitVO> lastList = new ArrayList<>();
+                                for(String key:groupMap.keySet()){
+                                    List<SumPrevMaterialUnitVO> temp = groupMap.get(key);
+                                    temp.sort(Comparator.comparing(SumPrevMaterialUnitVO::getCreateTime));
+                                    SumPrevMaterialUnitVO temp2 = new SumPrevMaterialUnitVO();
+                                    List<Map<String,String>> mList = new ArrayList<>();
+                                    boolean add = true;
+                                    for(SumPrevMaterialUnitVO vo:temp){
+                                        if(add){
+                                            temp2.setId(vo.getId());
+                                            temp2.setGrade(vo.getGrade());
+                                            temp2.setUnitId(vo.getUnitId());
+                                            temp2.setUnitName(vo.getUnitName());
+                                            temp2.setUnitSort(vo.getUnitSort());
+                                            add = false;
+                                        }
+                                        Map<String,String> map = new HashMap<>();
+                                        if(StringUtils.isNotBlank(vo.getVideoName())){
+                                            map.put("videoName",vo.getVideoName());
+                                            map.put("videoLink",vo.getVideoLink());
+                                            mList.add(map);
+                                        }
+                                    }
+                                    temp2.setVideoList(mList);
+                                    lastList.add(temp2);
+                                }
+                                item.setUnitList(lastList);
+                                return item;
+                            })
+                            .collect(Collectors.toList())
+            );
+    }
+
+    public static void main(String[] args) {
+        List<SumPrevMaterialUnitVO> list = new ArrayList<>();
+        SumPrevMaterialUnitVO vox = new SumPrevMaterialUnitVO();
+        vox.setUnitId("1");
+        vox.setVideoName("name1");
+        vox.setVideoLink("link1");
+        vox.setCreateTime(new Date());
+        list.add(vox);
+        SumPrevMaterialUnitVO vo2 = new SumPrevMaterialUnitVO();
+        vo2.setUnitId("1");
+        vo2.setVideoName("name2");
+        vo2.setVideoLink("link2");
+        vo2.setCreateTime(new Date());
+        list.add(vo2);
+        SumPrevMaterialUnitVO vo3 = new SumPrevMaterialUnitVO();
+        vo3.setUnitId("2");
+        vo3.setVideoName("name3");
+        vo3.setVideoLink("link3");
+        vo3.setCreateTime(new Date());
+        list.add(vo3);
+        SumPrevMaterialUnitVO vo4 = new SumPrevMaterialUnitVO();
+        vo4.setUnitId("2");
+        vo4.setVideoName("name4");
+        vo4.setVideoLink("link4");
+        vo4.setCreateTime(new Date());
+        list.add(vo4);
+
+        Map<String,List<SumPrevMaterialUnitVO>> groupMap = list.stream().collect(Collectors.groupingBy(SumPrevMaterialUnitVO::getUnitId));
+        List<SumPrevMaterialUnitVO> lastList = new ArrayList<>();
+        for(String key:groupMap.keySet()){
+            List<SumPrevMaterialUnitVO> temp = groupMap.get(key);
+            temp.sort(Comparator.comparing(SumPrevMaterialUnitVO::getCreateTime));
+            SumPrevMaterialUnitVO temp2 = new SumPrevMaterialUnitVO();
+            List<Map<String,String>> mList = new ArrayList<>();
+            boolean add = true;
+            for(SumPrevMaterialUnitVO vo:temp){
+                if(add){
+                    temp2.setId(vo.getId());
+                    temp2.setGrade(vo.getGrade());
+                    temp2.setUnitId(vo.getUnitId());
+                    temp2.setUnitName(vo.getUnitName());
+                    temp2.setUnitSort(vo.getUnitSort());
+                    add = false;
+                }
+                Map<String,String> map = new HashMap<>();
+                if(StringUtils.isNotBlank(vo.getVideoName())){
+                    map.put("videoName",vo.getVideoName());
+                    map.put("videoLink",vo.getVideoLink());
+                    mList.add(map);
+                }
+            }
+            temp2.setVideoList(mList);
+            lastList.add(temp2);
+        }
+       System.out.println(lastList.toString());
+    }
+
+    @IgnoreSecurity
+    @RequestMapping(value = "/edit/preMaterialVersion", method = RequestMethod.POST)
+    @ApiOperation(value = "保存预习教材版本信息",  notes = "保存预习教材版本信息")
+    @ResponseBody
+    public ResponseJrEntity editPreMaterialVersion(@RequestBody VersionVo param) {
+        ResponseJrEntity responseEntity = new ResponseJrEntity();
+        try {
+            summerVacationService.editPreMaterialVersion(param);
+            responseEntity.success("保存预习教材版本信息成功");
+        } catch (Exception e) {
+            logger.error("保存预习教材版本信息接口", e);
+            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
+        }
+        return responseEntity;
+    }
+
+    @IgnoreSecurity
+    @RequestMapping(value = "/del/preMaterialVersion", method = RequestMethod.POST)
+    @ApiOperation(value = "删除预习教材版本信息",  notes = "删除预习教材版本信息")
+    @ResponseBody
+    public ResponseJrEntity delPreMaterialVersion(@RequestBody VersionVo param) {
+        ResponseJrEntity responseEntity = new ResponseJrEntity();
+        try {
+            summerVacationService.delPreMaterialVersion(param);
+            responseEntity.success("删除预习教材版本信息成功");
+        } catch (Exception e) {
+            logger.error("获取预习列表接口", e);
+            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
+        }
+        return responseEntity;
+    }
+
+    @IgnoreSecurity
+    @RequestMapping(value = "/edit/preUnitVersion", method = RequestMethod.POST)
+    @ApiOperation(value = "编辑或添加预习教材版本单元明细",  notes = "编辑或添加预习教材版本单元明细")
+    @ResponseBody
+    public ResponseJrEntity editPreUnitVersion(@RequestBody VersionUnitVo param) {
+        ResponseJrEntity responseEntity = new ResponseJrEntity();
+        try {
+            summerVacationService.editPreUnitVersion(param);
+            responseEntity.success("保存预习教材版本信息成功");
+        } catch (Exception e) {
+            logger.error("获取预习列表接口", e);
+            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
+        }
+        return responseEntity;
+    }
+
+    @IgnoreSecurity
+    @RequestMapping(value = "/del/preMaterialUnitVersion", method = RequestMethod.POST)
+    @ApiOperation(value = "删除预习教材版本单元明细",  notes = "删除预习教材版本单元明细")
+    @ResponseBody
+    public ResponseJrEntity delPreMaterialUnitVersion(@RequestBody VersionVo param) {
+        ResponseJrEntity responseEntity = new ResponseJrEntity();
+        try {
+            summerVacationService.delPreMaterialUnitVersion(param);
+            responseEntity.success("删除预习教材版本单元明细成功");
+        } catch (Exception e) {
+            logger.error("删除预习教材版本单元明细接口", e);
+            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
+        }
+        return responseEntity;
+    }
+
+    @IgnoreSecurity
+    @RequestMapping(value = "/get/vactionRevPage", method = RequestMethod.POST)
+    @ApiOperation(value = "获取复习列表",  notes = "获取复习列表")
+    @ResponseBody
+    public TableDataInfo vacationRevPage(@RequestBody VersionVo param) {
+
+            Page<SumRevMaterialVO> prevPage = summerVacationService.vacationRevPage(param);
+            return TableDataInfo.success(prevPage.getTotal(),prevPage.getRecords());
+    }
+
+    @IgnoreSecurity
+    @RequestMapping(value = "/edit/revMaterialVersion", method = RequestMethod.POST)
+    @ApiOperation(value = "编辑或添加复习教材版本",  notes = "编辑或添加复习教材版本")
+    @ResponseBody
+    public ResponseJrEntity revMaterialVersion(@RequestBody VersionVo param) {
+        ResponseJrEntity responseEntity = new ResponseJrEntity();
+        try {
+            summerVacationService.revMaterialVersion(param);
+            responseEntity.success("保存复习教材版本成功");
+        } catch (Exception e) {
+            logger.error("复习教材版本接口", e);
+            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
+        }
+        return responseEntity;
+    }
+
+    @IgnoreSecurity
+    @RequestMapping(value = "/del/revMaterialVersion", method = RequestMethod.POST)
+    @ApiOperation(value = "删除预习教材版本信息",  notes = "删除预习教材版本信息")
+    @ResponseBody
+    public ResponseJrEntity delRevMaterialVersion(@RequestBody VersionVo param) {
+        ResponseJrEntity responseEntity = new ResponseJrEntity();
+        try {
+            summerVacationService.delRevMaterialVersion(param);
+            responseEntity.success("删除预习教材版本信息成功");
+        } catch (Exception e) {
+            logger.error("删除预习教材版本信息接口", e);
+            responseEntity.failure(ResponseConstant.CODE_500, "系统繁忙,请稍后重试");
+        }
+        return responseEntity;
+    }
+
+    @RequestMapping(value = "upload/addMaterialAndUnit", method = RequestMethod.POST)
+    @ApiOperation("通过导入Excel添加学校")
+    @ResponseBody
+    public AjaxResult<Void> addMaterialAndUnitExcelUpload(@RequestParam("file")MultipartFile file) {
+        try {
+            ImportParams params = new ImportParams();
+            params.setHeadRows(1);
+            List<SumPrevExcelImportVO> list = ExcelImportUtil.importExcel(
+                    file.getInputStream(), SumPrevExcelImportVO.class, params);
+            excelImportHelper.dataImporting(list);
+//            EasyExcel.read(file.getInputStream(), SumPrevExcelImportVO.class, vacationImportListener)
+//                    .sheet(0)
+//                    .headRowNumber(2)
+//                    .doRead();
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("Add new school while uploading excel file throw an exception ======= {}", e.getMessage());
+        }
+        return AjaxResult.success();
+    }
+
+}

+ 17 - 7
src/main/java/com/ssj/sys/model/ErrorModel.java

@@ -14,19 +14,21 @@ import java.util.Date;
  */
 public class ErrorModel implements Serializable {
 
-    @Excel(name="学生姓名",orderNum = "1",width = 15)
+    @Excel(name="学生姓名",orderNum = "2",width = 15)
     private String childName;
-    @Excel(name="校区",width = 30)
+    @Excel(name="年级",orderNum = "3",width = 15)
+    private String grade;
+    @Excel(name="校区",orderNum = "1",width = 30)
     private String leagueName;
-    @Excel(name="报错原因",orderNum = "3",replace={"答案识别失败_0","答案识别错误_1"},width = 20)
+    @Excel(name="报错原因",orderNum = "5",replace={"答案识别失败_0","答案识别错误_1"},width = 20)
     private String errorReasonCode;
-    @Excel(name="科目",orderNum = "2")
+    @Excel(name="科目",orderNum = "4")
     private String subject;
-    @Excel(name="报错时间",format ="yyyy-MM-dd HH:mm:ss",width = 20,orderNum = "4")
+    @Excel(name="报错时间",format ="yyyy-MM-dd HH:mm:ss",width = 20,orderNum = "6")
     private Date createTime;
-    @Excel(name="报错作业原图",orderNum = "5",width = 50)
+    @Excel(name="报错作业原图",orderNum = "7",width = 50)
     private String fileKey;
-    @Excel(name="上传时间",format ="yyyy-MM-dd HH:mm:ss",width = 20,orderNum = "6")
+    @Excel(name="上传时间",format ="yyyy-MM-dd HH:mm:ss",width = 20,orderNum = "8")
     private Date uploadTime;
 
     private String id;
@@ -94,4 +96,12 @@ public class ErrorModel implements Serializable {
     public void setId(String id) {
         this.id = id;
     }
+
+    public String getGrade() {
+        return grade;
+    }
+
+    public void setGrade(String grade) {
+        this.grade = grade;
+    }
 }

+ 37 - 0
src/main/java/com/ssj/sys/model/JsonDetailModel.java

@@ -0,0 +1,37 @@
+package com.ssj.sys.model;
+
+import java.io.Serializable;
+
+/**
+ * @author sh
+ * @className JsonModel
+ * @description jsonModel
+ * @date 2022/3/22
+ */
+public class JsonDetailModel implements Serializable {
+    /**
+     * [{"index":0,"list":[{"style":{"height":16,"width":16},"type":1,"value":"示例:"}],"selectedType":0},
+     * {"index":0,"list":[{"style":{"height":16,"width":16},"type":1,"value":"The sun rises in the morning."}],"selectedType":0},
+     * {"index":0,"list":[{"style":{"height":16,"width":16},"type":1,"value":"I can see my shadow."}],"selectedType":0},
+     * {"index":0,"list":[{"style":{"height":16,"width":16},"type":1,"value":"Look at my shadow."}],"selectedType":0},
+     * {"index":0,"list":[{"style":{"height":16,"width":16},"type":1,"value":"It's long."}],"selectedType":0}]
+     */
+    private Integer type;
+    private String value;
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

+ 47 - 0
src/main/java/com/ssj/sys/model/JsonModel.java

@@ -0,0 +1,47 @@
+package com.ssj.sys.model;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author sh
+ * @className JsonModel
+ * @description jsonModel
+ * @date 2022/3/22
+ */
+public class JsonModel implements Serializable {
+    /**
+     * [{"index":0,"list":[{"style":{"height":16,"width":16},"type":1,"value":"示例:"}],"selectedType":0},
+     * {"index":0,"list":[{"style":{"height":16,"width":16},"type":1,"value":"The sun rises in the morning."}],"selectedType":0},
+     * {"index":0,"list":[{"style":{"height":16,"width":16},"type":1,"value":"I can see my shadow."}],"selectedType":0},
+     * {"index":0,"list":[{"style":{"height":16,"width":16},"type":1,"value":"Look at my shadow."}],"selectedType":0},
+     * {"index":0,"list":[{"style":{"height":16,"width":16},"type":1,"value":"It's long."}],"selectedType":0}]
+     */
+    private Integer index;
+    private Integer selectedType;
+    private List<JsonDetailModel> list;
+
+    public Integer getIndex() {
+        return index;
+    }
+
+    public void setIndex(Integer index) {
+        this.index = index;
+    }
+
+    public Integer getSelectedType() {
+        return selectedType;
+    }
+
+    public void setSelectedType(Integer selectedType) {
+        this.selectedType = selectedType;
+    }
+
+    public List<JsonDetailModel> getList() {
+        return list;
+    }
+
+    public void setList(List<JsonDetailModel> list) {
+        this.list = list;
+    }
+}

+ 11 - 0
src/main/java/com/ssj/task/sz/MerchantSummaryTask.java

@@ -55,6 +55,17 @@ public class MerchantSummaryTask implements Job{
 					logger.info("0点系统刷新商户的激活情况,异常...>id="+merchant.getId());
 					e.printStackTrace();
 				}
+				/**
+				 * 计算节假日
+				 * 将节假日计算的延长日期,加入到订单
+				 */
+				try{
+					logger.info("0点系统刷新节假日延长时长,开始>id="+merchant.getId());
+					merchantMealService.addMealByMerchantId(merchant.getId());
+					logger.info("0点系统刷新节假日延长时长,成功>id="+merchant.getId());
+				}catch (Exception e){
+					logger.info("0点系统刷新节假日延长时长,异常...>id="+merchant.getId());
+				}
 				try {
 					//0点系统刷新服务人数与日期
 					logger.info("0点系统刷新服务人数与日期,开始>id="+merchant.getId());

+ 39 - 0
src/main/resources/mybatis/mapper/SummerVacationMapper.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ssj.mapper.vacation.SummerVacationMapper">
+
+    <select id="getPrevPage" resultType="com.ssj.api.domain.vo.vacation.SumPrevMaterialVO">
+        select id,subject,version_type,version_name,grade,semester,material_link
+        from tb_sum_prev_material_xs
+        where 1 = 1
+        <if test="param.courseName != null and param.courseName != '' ">
+            and subject = #{param.courseName}
+        </if>
+        <if test="param.versionType != null and param.versionType != '' ">
+            and version_type = #{param.versionType}
+        </if>
+        <if test="param.semester != null and param.semester != '' and param.semester>0 ">
+            and semester = #{param.semester}
+        </if>
+        <if test="param.grade != null and param.grade != '' ">
+            and grade = #{param.grade}
+        </if>
+        order by create_time desc
+    </select>
+    <select id="getUnitList" resultType="com.ssj.api.domain.vo.vacation.SumPrevMaterialUnitVO">
+        select t.id,t.unit_name,t.unit_id,t11.version_type,t11.version_name,t11.grade,t.video_link,t.video_name,t.create_time
+        from tb_sum_prev_material_unit_xs t
+        join tb_sum_prev_material_xs t11 on t.parent_id = t11.id
+        where t11.id=#{id}
+         order by t.create_time desc
+    </select>
+    <select id="vacationRevPage" resultType="com.ssj.api.domain.vo.vacation.SumRevMaterialVO">
+        select id,subject ,version_type,version_name
+        from tb_sum_rev_material_xs
+        where 1 = 1
+        <if test="param.courseName != null and param.courseName != '' ">
+            and subject = #{param.courseName}
+        </if>
+        order by create_time desc
+    </select>
+</mapper>

+ 3 - 1
src/main/resources/templates/sys/appinfo/appinfoAdd.html

@@ -83,7 +83,9 @@
 						<option  value="14" th:selected="${entity.type==14}" >小蚁学堂(iOS)</option>
 						<option  value="15" th:selected="${entity.type==15}" >小塾分组版(深圳)</option>
 						<option  value="16" th:selected="${entity.type==16}" >小塾教师HD</option>
-						<option  value="17" th:selected="${entity.type==17}" >小点斗HD</option>
+						<option  value="17" th:selected="${entity.type==17}" >小点斗HD(IOS)</option>
+						<option  value="18" th:selected="${entity.type==18}" >小点斗(Android)</option>
+						<option  value="19" th:selected="${entity.type==19}" >小点斗HD(Android)</option>
 					</select>
 				</div>
 			</li>

+ 3 - 1
src/main/resources/templates/sys/appinfo/appinfoList.html

@@ -72,7 +72,9 @@
 				<span th:case="14">小蚁学堂(iOS)</span>
 				<span th:case="15">小塾分组版(深圳)</span>
 				<span th:case="16">小塾教师HD</span>
-				<span th:case="17">小点斗HD</span>
+				<span th:case="17">小点斗HD(IOS)</span>
+				<span th:case="18">小点斗(Android)</span>
+				<span th:case="19">小点斗HD(Android)</span>
 			</td>
 			<td>
 				<textarea readonly="readonly" rows="1">[[${item.updateContent}]]</textarea>

+ 15 - 1
src/main/resources/templates/sys/error/answerInfo.html

@@ -146,7 +146,21 @@
 					<p class="p2">· 第[[${item.get('big_question_index')}]]大题
 						<span th:if="${(item.get('small_question_index') ne '0' && item.get('small_question_index') ne '(0)') }">(</span>
 						<span th:if="${item.get('small_question_index') ne '0' && item.get('small_question_index') ne '(0)' }">第[[${item.get('small_question_index')}]]小题目)</span>
-						<div th:utext="${item.get('option_answer')}"></div>
+<!--						<div th:utext="${item.get('option_answer')}"></div>-->
+						<div th:each="item1:${item.get('json')}" th:remove="tag">
+							<div th:each="item2:${item1.list}" th:remove="tag">
+								<div th:switch="${item2.type}" th:remove="tag">
+									<div th:case="1" th:remove="tag">
+										<div th:utext="${item2.value}"></div>
+									</div>
+									<div th:case="2" th:remove="tag">
+										<div>
+											<img th:src="${item2.value}">
+										</div>
+									</div>
+								</div>
+							</div>
+						</div>
 					</p>
 				</li>
 			</ul>

+ 2 - 0
src/main/resources/templates/sys/error/errorList.html

@@ -71,6 +71,7 @@
 		        <th style="width: 80px;">序号</th>
 		        <th>校区</th>
 		        <th>学生姓名</th>
+		        <th>年级</th>
 		        <th>科目</th>
 		        <th>报错原因</th>
 		        <th>报错时间</th>
@@ -84,6 +85,7 @@
 				<td th:text="${itemStat.count}"></td>
 					<td th:text="${item.leagueName}"  th:title="${item.leagueName}" ></td>
 					<td th:text="${item.childName}"  th:title="${item.childName}" ></td>
+					<td th:text="${item.grade}"  th:title="${item.grade}" ></td>
 					<td th:text="${item.subject}"  th:title="${item.subject}" ></td>
 				    <td th:utext="${item.errorReasonCode eq '0' } ?'答案识别失败':'答案识别错误'" ></td>
 					<td  th:text="${#calendars.format(item.createTime,'yyyy-MM-dd HH:mm:ss')}" ></td>

+ 3 - 3
src/main/resources/templates/sys/fx/merchantCapList.html

@@ -100,9 +100,9 @@
 					</td>
 					<td th:text="${item.lib_service}"></td>
 					
-					<td th:text="${item.pr_1}"></td>
-					<td th:text="${item.pr_2}"></td>
-					<td th:text="${item.pr_3}"></td>
+					<td th:text="${item.get('pr_1')}"></td>
+					<td th:text="${item.get('pr_2')}"></td>
+					<td th:text="${item.get('pr_3')}"></td>
 					
 					<td th:text="${item.time}" ></td>  
 					<td th:switch="${item.cap_type}">

+ 1 - 1
src/main/resources/templates/sys/imlibuser/studentList.html

@@ -103,7 +103,7 @@
 				<td th:text="${item.parent_name}"></td>
 				<td th:text="${item.parent_role}"></td>
 				<td>
-					<input type="number" th:value="${item.phone}" th:onBlur="'updateSort(\''+${item.id}+'\',\''+${item.phone}+'\',this)'"  class="dfinput" style="width: 160px; height: 30px;"  />
+					<input type="number" th:value="${item.mobile}" th:onBlur="'updateSort(\''+${item.id}+'\',\''+${item.mobile}+'\',this)'"  class="dfinput" style="width: 160px; height: 30px;"  />
 				</td>
 				<td th:text="${item.class_name}"></td>
 				<td th:text="${item.derver}"></td>

File diff suppressed because it is too large
+ 1201 - 0
src/main/resources/templates/sys/vacation/review.html