Browse Source

fix 审核资料导出

he2802 3 years ago
parent
commit
b1906abb64

+ 7 - 3
zhongzheng-admin/src/main/java/com/zhongzheng/controller/base/UserProfileController.java

@@ -10,6 +10,7 @@ import cn.hutool.core.lang.Validator;
 import com.zhongzheng.common.core.domain.model.LoginUser;
 import com.zhongzheng.common.core.domain.model.LoginUser;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.framework.web.service.TokenService;
 import com.zhongzheng.framework.web.service.TokenService;
+import com.zhongzheng.modules.base.vo.UserProfileExportGaiVo;
 import com.zhongzheng.modules.base.vo.UserProfileExportVo;
 import com.zhongzheng.modules.base.vo.UserProfileExportVo;
 import com.zhongzheng.modules.grade.vo.ClassPeriodStudentExportVo;
 import com.zhongzheng.modules.grade.vo.ClassPeriodStudentExportVo;
 import com.zhongzheng.modules.user.bo.UserQueryBo;
 import com.zhongzheng.modules.user.bo.UserQueryBo;
@@ -113,7 +114,7 @@ public class UserProfileController extends BaseController {
     @PreAuthorize("@ss.hasPermi('system:profile:export')")
     @PreAuthorize("@ss.hasPermi('system:profile:export')")
     @Log(title = "客户端用户", businessType = BusinessType.EXPORT)
     @Log(title = "客户端用户", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     @GetMapping("/export")
-    public AjaxResult<UserProfileExportVo> export(UserProfileQueryBo bo) {
+    public AjaxResult<Map<String,Object>> export(UserProfileQueryBo bo) {
         String fileName = "";
         String fileName = "";
         if(Validator.isEmpty(bo.getStatus())){
         if(Validator.isEmpty(bo.getStatus())){
             bo.setStatus(new ArrayList<Integer>(Arrays.asList(0)));
             bo.setStatus(new ArrayList<Integer>(Arrays.asList(0)));
@@ -139,7 +140,8 @@ public class UserProfileController extends BaseController {
             bo.getStatus().remove(0);
             bo.getStatus().remove(0);
             bo.setStatus(bo.getStatus());
             bo.setStatus(bo.getStatus());
         }
         }
-        List<UserProfileExportVo> list = iUserProfileService.export(bo);
+        Map<String,Object> map = iUserProfileService.export(bo);
+        List<UserProfileExportVo> list = (List<UserProfileExportVo>)map.get("list");
         ExcelUtil<UserProfileExportVo> util = new ExcelUtil<UserProfileExportVo>(UserProfileExportVo.class);
         ExcelUtil<UserProfileExportVo> util = new ExcelUtil<UserProfileExportVo>(UserProfileExportVo.class);
 
 
         String timeStr= LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
         String timeStr= LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
@@ -153,7 +155,9 @@ public class UserProfileController extends BaseController {
         deptExportMap.put("data", list);
         deptExportMap.put("data", list);
         List<Map<String, Object>> sheetsList = new ArrayList<>();
         List<Map<String, Object>> sheetsList = new ArrayList<>();
         sheetsList.add(deptExportMap);
         sheetsList.add(deptExportMap);
-        return util.exportEasyExcel(sheetsList, "填写资料审核-"+fileName+"-学员数据-"+timeStr);
+        map.put("excel",util.exportEasyExcel(sheetsList, "填写资料审核-"+fileName+"-学员数据-"+timeStr));
+        map.remove("list");
+        return AjaxResult.success(map);
     }
     }
 
 
     /*@ApiOperation("审核资料测试")
     /*@ApiOperation("审核资料测试")

+ 6 - 3
zhongzheng-admin/src/main/java/com/zhongzheng/controller/base/UserProfileStampController.java

@@ -102,7 +102,7 @@ public class UserProfileStampController extends BaseController {
     @PreAuthorize("@ss.hasPermi('system:profile:export')")
     @PreAuthorize("@ss.hasPermi('system:profile:export')")
     @Log(title = "客户端用户", businessType = BusinessType.EXPORT)
     @Log(title = "客户端用户", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     @GetMapping("/export")
-    public AjaxResult<UserProfileExportGaiVo> export(UserProfileQueryBo bo) {
+    public AjaxResult<Map<String,Object>> export(UserProfileQueryBo bo) {
         String fileName = "";
         String fileName = "";
         if(bo.getStatus().get(0)==0){
         if(bo.getStatus().get(0)==0){
             fileName="全部";
             fileName="全部";
@@ -123,7 +123,8 @@ public class UserProfileStampController extends BaseController {
             bo.getStatus().remove(0);
             bo.getStatus().remove(0);
             bo.setStatus(bo.getStatus());
             bo.setStatus(bo.getStatus());
         }
         }
-        List<UserProfileExportGaiVo> list = iUserProfileService.exportPo(bo);
+        Map<String,Object> map = iUserProfileService.exportPo(bo);
+        List<UserProfileExportGaiVo> list = (List<UserProfileExportGaiVo>)map.get("list");
         ExcelUtil<UserProfileExportGaiVo> util = new ExcelUtil<UserProfileExportGaiVo>(UserProfileExportGaiVo.class);
         ExcelUtil<UserProfileExportGaiVo> util = new ExcelUtil<UserProfileExportGaiVo>(UserProfileExportGaiVo.class);
 
 
         String timeStr= LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
         String timeStr= LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
@@ -137,6 +138,8 @@ public class UserProfileStampController extends BaseController {
         deptExportMap.put("data", list);
         deptExportMap.put("data", list);
         List<Map<String, Object>> sheetsList = new ArrayList<>();
         List<Map<String, Object>> sheetsList = new ArrayList<>();
         sheetsList.add(deptExportMap);
         sheetsList.add(deptExportMap);
-        return util.exportEasyExcel(sheetsList, "填写盖章审核-"+fileName+"-学员数据-"+timeStr);
+        map.put("excel",util.exportEasyExcel(sheetsList, "填写盖章审核-"+fileName+"-学员数据-"+timeStr));
+        map.remove("list");
+        return AjaxResult.success(map);
     }
     }
 }
 }

+ 12 - 0
zhongzheng-common/src/main/java/com/zhongzheng/common/utils/file/FileUtils.java

@@ -2,6 +2,7 @@ package com.zhongzheng.common.utils.file;
 
 
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.core.util.StrUtil;
+import com.zhongzheng.common.config.RuoYiConfig;
 
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
@@ -203,4 +204,15 @@ public class FileUtils extends org.apache.commons.io.FileUtils
         String  filename = prefix+"_"+ UUID.randomUUID().toString() + ".zip";
         String  filename = prefix+"_"+ UUID.randomUUID().toString() + ".zip";
         return filename;
         return filename;
     }
     }
+
+    public static String getZipAbsoluteFile(String filename)
+    {
+        String downloadPath = RuoYiConfig.getDownloadPath() + filename;
+        File desc = new File(downloadPath);
+        if (!desc.getParentFile().exists())
+        {
+            desc.getParentFile().mkdirs();
+        }
+        return downloadPath;
+    }
 }
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/alioss/service/OssService.java

@@ -10,6 +10,7 @@ import org.springframework.web.multipart.MultipartFile;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import java.io.FileNotFoundException;
 import java.io.FileNotFoundException;
 import java.io.InputStream;
 import java.io.InputStream;
+import java.util.List;
 import java.util.Map;
 import java.util.Map;
 import java.util.zip.ZipOutputStream;
 import java.util.zip.ZipOutputStream;
 
 
@@ -27,4 +28,6 @@ public interface OssService {
     void closeClient();
     void closeClient();
 
 
     void zipPeopleDownload(ClassPeriodStudentExportVo vo, ZipOutputStream outStream);
     void zipPeopleDownload(ClassPeriodStudentExportVo vo, ZipOutputStream outStream);
+
+    void zipCommonDownload(List<String> fileList, ZipOutputStream zipOut, String dir);
 }
 }

+ 11 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/alioss/service/impl/OssServiceImpl.java

@@ -340,6 +340,12 @@ public class OssServiceImpl implements OssService {
             return;
             return;
         }
         }
         for (String filePath : fileList) {
         for (String filePath : fileList) {
+            if(Validator.isEmpty(filePath)){
+                continue;
+            }
+            if(filePath.indexOf("?")!=-1){
+                filePath = filePath.substring(0,filePath.indexOf("?"));
+            }
             try (InputStream in = getStreamByObject(filePath)) {
             try (InputStream in = getStreamByObject(filePath)) {
                 zipOut.putNextEntry(new ZipEntry(getFileName(filePath,dir)));
                 zipOut.putNextEntry(new ZipEntry(getFileName(filePath,dir)));
                 byte[] bytes = new byte[1024];
                 byte[] bytes = new byte[1024];
@@ -381,4 +387,9 @@ public class OssServiceImpl implements OssService {
         zipFile(listInfo, outStream,vo.getRealName()+"-"+vo.getIdCard()+"-"+vo.getGradeId()+"/"+"资料照片");  //
         zipFile(listInfo, outStream,vo.getRealName()+"-"+vo.getIdCard()+"-"+vo.getGradeId()+"/"+"资料照片");  //
     }
     }
 
 
+    @Override
+    public void zipCommonDownload(List<String> fileList, ZipOutputStream zipOut,String dir) {
+        zipFile(fileList, zipOut,dir);
+    }
+
 }
 }

+ 3 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/IUserProfileService.java

@@ -15,6 +15,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Collection;
 import java.util.List;
 import java.util.List;
+import java.util.Map;
 
 
 /**
 /**
  * 填写资料审核Service接口
  * 填写资料审核Service接口
@@ -66,7 +67,7 @@ public interface IUserProfileService extends IService<UserProfile> {
 
 
 	List<UserProfileVo> listRecord(UserProfileQueryBo bo);
 	List<UserProfileVo> listRecord(UserProfileQueryBo bo);
 
 
-	List<UserProfileExportVo> export(UserProfileQueryBo bo);
+	Map<String,Object> export(UserProfileQueryBo bo);
 
 
-	List<UserProfileExportGaiVo> exportPo(UserProfileQueryBo bo);
+	Map<String,Object> exportPo(UserProfileQueryBo bo);
 }
 }

+ 232 - 182
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/UserProfileServiceImpl.java

@@ -15,10 +15,13 @@ import com.fasterxml.jackson.databind.exc.InvalidFormatException;
 import com.openhtmltopdf.swing.Java2DRenderer;
 import com.openhtmltopdf.swing.Java2DRenderer;
 import com.openhtmltopdf.util.FSImageWriter;
 import com.openhtmltopdf.util.FSImageWriter;
 import com.zhongzheng.common.annotation.DataScope;
 import com.zhongzheng.common.annotation.DataScope;
+import com.zhongzheng.common.core.domain.AjaxResult;
 import com.zhongzheng.common.core.domain.model.LoginUser;
 import com.zhongzheng.common.core.domain.model.LoginUser;
+import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.SecurityUtils;
 import com.zhongzheng.common.utils.SecurityUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.common.utils.ServletUtils;
+import com.zhongzheng.common.utils.file.FileUtils;
 import com.zhongzheng.modules.alioss.bo.OssRequest;
 import com.zhongzheng.modules.alioss.bo.OssRequest;
 import com.zhongzheng.modules.alioss.service.impl.OssServiceImpl;
 import com.zhongzheng.modules.alioss.service.impl.OssServiceImpl;
 import com.zhongzheng.modules.alisms.service.IAliSmsService;
 import com.zhongzheng.modules.alisms.service.IAliSmsService;
@@ -72,6 +75,7 @@ import java.net.URL;
 import java.util.*;
 import java.util.*;
 import java.util.List;
 import java.util.List;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
+import java.util.zip.ZipOutputStream;
 
 
 /**
 /**
  * 填写资料审核Service业务层处理
  * 填写资料审核Service业务层处理
@@ -119,7 +123,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
     private String commitmentFailsCode;
     private String commitmentFailsCode;
 
 
     @Override
     @Override
-    public UserProfileVo queryById(Long id){
+    public UserProfileVo queryById(Long id) {
         UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
         UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
         userProfileQueryBo.setId(id);
         userProfileQueryBo.setId(id);
         UserProfileVo userProfileVo = baseMapper.selectUserProfile(userProfileQueryBo).get(0);
         UserProfileVo userProfileVo = baseMapper.selectUserProfile(userProfileQueryBo).get(0);
@@ -133,19 +137,19 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
     }
     }
 
 
     /**
     /**
-    * 实体类转化成视图对象
-    *
-    * @param collection 实体类集合
-    * @return
-    */
+     * 实体类转化成视图对象
+     *
+     * @param collection 实体类集合
+     * @return
+     */
     private List<UserProfileVo> entity2Vo(Collection<UserProfile> collection) {
     private List<UserProfileVo> entity2Vo(Collection<UserProfile> collection) {
         List<UserProfileVo> voList = collection.stream()
         List<UserProfileVo> voList = collection.stream()
                 .map(any -> BeanUtil.toBean(any, UserProfileVo.class))
                 .map(any -> BeanUtil.toBean(any, UserProfileVo.class))
                 .collect(Collectors.toList());
                 .collect(Collectors.toList());
         if (collection instanceof Page) {
         if (collection instanceof Page) {
-            Page<UserProfile> page = (Page<UserProfile>)collection;
+            Page<UserProfile> page = (Page<UserProfile>) collection;
             Page<UserProfileVo> pageVo = new Page<>();
             Page<UserProfileVo> pageVo = new Page<>();
-            BeanUtil.copyProperties(page,pageVo);
+            BeanUtil.copyProperties(page, pageVo);
             pageVo.addAll(voList);
             pageVo.addAll(voList);
             voList = pageVo;
             voList = pageVo;
         }
         }
@@ -172,7 +176,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         UserProfileVo userProfileVo = this.queryById(bo.getId());
         UserProfileVo userProfileVo = this.queryById(bo.getId());
 
 
         //新增待审的资料填写
         //新增待审的资料填写
-        UserProfile addProfile = BeanUtil.toBean(bo,UserProfile.class);
+        UserProfile addProfile = BeanUtil.toBean(bo, UserProfile.class);
         addProfile.setCreateTime(DateUtils.getNowTime());
         addProfile.setCreateTime(DateUtils.getNowTime());
         addProfile.setUpdateTime(DateUtils.getNowTime());
         addProfile.setUpdateTime(DateUtils.getNowTime());
         addProfile.setStatus(3);
         addProfile.setStatus(3);
@@ -194,13 +198,13 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
      *
      *
      * @param entity 实体类数据
      * @param entity 实体类数据
      */
      */
-    private void validEntityBeforeSave(UserProfile entity){
+    private void validEntityBeforeSave(UserProfile entity) {
         //TODO 做一些数据校验,如唯一约束
         //TODO 做一些数据校验,如唯一约束
     }
     }
 
 
     @Override
     @Override
     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
-        if(isValid){
+        if (isValid) {
             //TODO 做一些业务上的校验,判断是否需要校验
             //TODO 做一些业务上的校验,判断是否需要校验
         }
         }
         return this.removeByIds(ids);
         return this.removeByIds(ids);
@@ -214,12 +218,12 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         userProfileQueryBo.setTypeStatus(1L);
         userProfileQueryBo.setTypeStatus(1L);
         UserProfileVo info = baseMapper.getInfo(userProfileQueryBo);
         UserProfileVo info = baseMapper.getInfo(userProfileQueryBo);
         //第一种方式
         //第一种方式
-        Map<String, String> maps = JSONObject.parseObject(info.getKeyValue(),Map.class);
+        Map<String, String> maps = JSONObject.parseObject(info.getKeyValue(), Map.class);
 
 
  /*       TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
  /*       TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
         Template template = engine.getTemplate("word.ftl");*/
         Template template = engine.getTemplate("word.ftl");*/
         //给模板绑定数据
         //给模板绑定数据
-        Calendar rightNow= Calendar.getInstance();
+        Calendar rightNow = Calendar.getInstance();
         Map<String, Object> bindingMap = new HashMap<>();
         Map<String, Object> bindingMap = new HashMap<>();
         bindingMap.put("username", JSONObject.parseObject(String.valueOf(maps.get("name")), UserProfileFit.class).getValue());
         bindingMap.put("username", JSONObject.parseObject(String.valueOf(maps.get("name")), UserProfileFit.class).getValue());
         bindingMap.put("s", JSONObject.parseObject(String.valueOf(maps.get("sex")), UserProfileFit.class).getValue());
         bindingMap.put("s", JSONObject.parseObject(String.valueOf(maps.get("sex")), UserProfileFit.class).getValue());
@@ -231,22 +235,22 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         bindingMap.put("major", JSONObject.parseObject(String.valueOf(maps.get("major")), UserProfileFit.class).getValue());
         bindingMap.put("major", JSONObject.parseObject(String.valueOf(maps.get("major")), UserProfileFit.class).getValue());
         bindingMap.put("cname", JSONObject.parseObject(String.valueOf(maps.get("unit_contact")), UserProfileFit.class).getValue());
         bindingMap.put("cname", JSONObject.parseObject(String.valueOf(maps.get("unit_contact")), UserProfileFit.class).getValue());
         bindingMap.put("cphone", JSONObject.parseObject(String.valueOf(maps.get("unit_tel")), UserProfileFit.class).getValue());
         bindingMap.put("cphone", JSONObject.parseObject(String.valueOf(maps.get("unit_tel")), UserProfileFit.class).getValue());
-        bindingMap.put("image",  ALIYUN_OSS_ENDPOINT+"/"+JSONObject.parseObject(String.valueOf(maps.get("commitment_electr_signature")), UserProfileFit.class).getValue());
+        bindingMap.put("image", ALIYUN_OSS_ENDPOINT + "/" + JSONObject.parseObject(String.valueOf(maps.get("commitment_electr_signature")), UserProfileFit.class).getValue());
         bindingMap.put("y", Convert.toStr(rightNow.get(Calendar.YEAR)));
         bindingMap.put("y", Convert.toStr(rightNow.get(Calendar.YEAR)));
-        bindingMap.put("m", rightNow.get(Calendar.MONTH)+1);
+        bindingMap.put("m", rightNow.get(Calendar.MONTH) + 1);
         bindingMap.put("d", rightNow.get(Calendar.DAY_OF_MONTH));
         bindingMap.put("d", rightNow.get(Calendar.DAY_OF_MONTH));
         bindingMap.put("time", JSONObject.parseObject(String.valueOf(maps.get("graduation_time")), UserProfileFit.class).getValue());
         bindingMap.put("time", JSONObject.parseObject(String.valueOf(maps.get("graduation_time")), UserProfileFit.class).getValue());
         bindingMap.put("year", JSONObject.parseObject(String.valueOf(maps.get("working_years")), UserProfileFit.class).getValue());
         bindingMap.put("year", JSONObject.parseObject(String.valueOf(maps.get("working_years")), UserProfileFit.class).getValue());
-        File touch = FileUtil.touch(ZHONGZHENG_PROFILE+"word.html");
+        File touch = FileUtil.touch(ZHONGZHENG_PROFILE + "word.html");
         //默认freemake配置
         //默认freemake配置
         Configuration configuration = new Configuration();
         Configuration configuration = new Configuration();
         configuration.setDefaultEncoding("UTF-8");
         configuration.setDefaultEncoding("UTF-8");
         configuration.setClassForTemplateLoading(this.getClass(), "/templates");
         configuration.setClassForTemplateLoading(this.getClass(), "/templates");
         Template template = configuration.getTemplate("wordPhone.ftl");
         Template template = configuration.getTemplate("wordPhone.ftl");
-        Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(touch),"UTF-8"));
+        Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(touch), "UTF-8"));
         try {
         try {
             //写入数据
             //写入数据
-            template.process(bindingMap,out);
+            template.process(bindingMap, out);
             out.flush();
             out.flush();
             out.close();
             out.close();
 
 
@@ -258,11 +262,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         final BufferedImage img = renderer.getImage();
         final BufferedImage img = renderer.getImage();
         final FSImageWriter imageWriter = new FSImageWriter();
         final FSImageWriter imageWriter = new FSImageWriter();
         imageWriter.setWriteCompressionQuality(1.0f);
         imageWriter.setWriteCompressionQuality(1.0f);
-        imageWriter.write(img, ZHONGZHENG_PROFILE+"wordJpg.jpg");//输出路径
+        imageWriter.write(img, ZHONGZHENG_PROFILE + "wordJpg.jpg");//输出路径
 
 
         OssRequest ossRequest = new OssRequest();
         OssRequest ossRequest = new OssRequest();
-        FileInputStream fileInputStream = new FileInputStream(ZHONGZHENG_PROFILE+"wordJpg.jpg");
-        MultipartFile multipartFile = new MockMultipartFile(ZHONGZHENG_PROFILE+"wordJpg.jpg", ZHONGZHENG_PROFILE+"wordJpg.jpg",
+        FileInputStream fileInputStream = new FileInputStream(ZHONGZHENG_PROFILE + "wordJpg.jpg");
+        MultipartFile multipartFile = new MockMultipartFile(ZHONGZHENG_PROFILE + "wordJpg.jpg", ZHONGZHENG_PROFILE + "wordJpg.jpg",
                 ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
                 ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
         ossRequest.setFile(multipartFile);
         ossRequest.setFile(multipartFile);
         ossRequest.setImageStatus(6);
         ossRequest.setImageStatus(6);
@@ -280,16 +284,16 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         userProfileQueryBo.setTypeStatus(1L);
         userProfileQueryBo.setTypeStatus(1L);
         UserProfileVo info = baseMapper.getInfo(userProfileQueryBo);
         UserProfileVo info = baseMapper.getInfo(userProfileQueryBo);
         System.out.println(info);
         System.out.println(info);
-        if(Validator.isEmpty(info)){
+        if (Validator.isEmpty(info)) {
             return "";
             return "";
         }
         }
         //第一种方式
         //第一种方式
-        Map<String, String> maps = JSONObject.parseObject(info.getKeyValue(),Map.class);
+        Map<String, String> maps = JSONObject.parseObject(info.getKeyValue(), Map.class);
 
 
  /*       TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
  /*       TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
         Template template = engine.getTemplate("word.ftl");*/
         Template template = engine.getTemplate("word.ftl");*/
         //给模板绑定数据
         //给模板绑定数据
-        Calendar rightNow= Calendar.getInstance();
+        Calendar rightNow = Calendar.getInstance();
         Map<String, Object> bindingMap = new HashMap<>();
         Map<String, Object> bindingMap = new HashMap<>();
         bindingMap.put("name", JSONObject.parseObject(String.valueOf(maps.get("name")), UserProfileFit.class).getValue());
         bindingMap.put("name", JSONObject.parseObject(String.valueOf(maps.get("name")), UserProfileFit.class).getValue());
         bindingMap.put("s", JSONObject.parseObject(String.valueOf(maps.get("sex")), UserProfileFit.class).getValue());
         bindingMap.put("s", JSONObject.parseObject(String.valueOf(maps.get("sex")), UserProfileFit.class).getValue());
@@ -301,13 +305,13 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         bindingMap.put("major", JSONObject.parseObject(String.valueOf(maps.get("major")), UserProfileFit.class).getValue());
         bindingMap.put("major", JSONObject.parseObject(String.valueOf(maps.get("major")), UserProfileFit.class).getValue());
         bindingMap.put("cname", JSONObject.parseObject(String.valueOf(maps.get("unit_contact")), UserProfileFit.class).getValue());
         bindingMap.put("cname", JSONObject.parseObject(String.valueOf(maps.get("unit_contact")), UserProfileFit.class).getValue());
         bindingMap.put("cphone", JSONObject.parseObject(String.valueOf(maps.get("unit_tel")), UserProfileFit.class).getValue());
         bindingMap.put("cphone", JSONObject.parseObject(String.valueOf(maps.get("unit_tel")), UserProfileFit.class).getValue());
-        bindingMap.put("image",  ALIYUN_OSS_ENDPOINT+"/"+JSONObject.parseObject(String.valueOf(maps.get("commitment_electr_signature")), UserProfileFit.class).getValue());
+        bindingMap.put("image", ALIYUN_OSS_ENDPOINT + "/" + JSONObject.parseObject(String.valueOf(maps.get("commitment_electr_signature")), UserProfileFit.class).getValue());
         bindingMap.put("y", Convert.toStr(rightNow.get(Calendar.YEAR)));
         bindingMap.put("y", Convert.toStr(rightNow.get(Calendar.YEAR)));
-        bindingMap.put("m", rightNow.get(Calendar.MONTH)+1);
+        bindingMap.put("m", rightNow.get(Calendar.MONTH) + 1);
         bindingMap.put("d", rightNow.get(Calendar.DAY_OF_MONTH));
         bindingMap.put("d", rightNow.get(Calendar.DAY_OF_MONTH));
         bindingMap.put("time", JSONObject.parseObject(String.valueOf(maps.get("graduation_time")), UserProfileFit.class).getValue());
         bindingMap.put("time", JSONObject.parseObject(String.valueOf(maps.get("graduation_time")), UserProfileFit.class).getValue());
         bindingMap.put("year", JSONObject.parseObject(String.valueOf(maps.get("working_years")), UserProfileFit.class).getValue());
         bindingMap.put("year", JSONObject.parseObject(String.valueOf(maps.get("working_years")), UserProfileFit.class).getValue());
-        File touch = FileUtil.touch(ZHONGZHENG_PROFILE+"word.html");
+        File touch = FileUtil.touch(ZHONGZHENG_PROFILE + "word.html");
         //默认freemake配置
         //默认freemake配置
         Configuration configuration = new Configuration();
         Configuration configuration = new Configuration();
         configuration.setDefaultEncoding("UTF-8");
         configuration.setDefaultEncoding("UTF-8");
@@ -315,12 +319,12 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
 
 
         configuration.setClassForTemplateLoading(this.getClass(), "/templates");
         configuration.setClassForTemplateLoading(this.getClass(), "/templates");
         Template template = configuration.getTemplate("wordPhone.ftl");
         Template template = configuration.getTemplate("wordPhone.ftl");
-    //    File outFile = new File(ZHONGZHENG_PROFILE+"wordJpg.doc"); //导出文件
-        Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(touch),"UTF-8"));
-    //    Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile),"UTF-8"));
+        //    File outFile = new File(ZHONGZHENG_PROFILE+"wordJpg.doc"); //导出文件
+        Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(touch), "UTF-8"));
+        //    Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile),"UTF-8"));
         try {
         try {
             //写入数据
             //写入数据
-            template.process(bindingMap,out);
+            template.process(bindingMap, out);
             out.flush();
             out.flush();
             out.close();
             out.close();
 
 
@@ -341,11 +345,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
         final BufferedImage img = renderer.getImage();
         final BufferedImage img = renderer.getImage();
         final FSImageWriter imageWriter = new FSImageWriter();
         final FSImageWriter imageWriter = new FSImageWriter();
         imageWriter.setWriteCompressionQuality(1.0f);
         imageWriter.setWriteCompressionQuality(1.0f);
-        imageWriter.write(img, ZHONGZHENG_PROFILE+"wordJpg.jpg");//输出路径
+        imageWriter.write(img, ZHONGZHENG_PROFILE + "wordJpg.jpg");//输出路径
 
 
         OssRequest ossRequest = new OssRequest();
         OssRequest ossRequest = new OssRequest();
-        FileInputStream fileInputStream = new FileInputStream(ZHONGZHENG_PROFILE+"wordJpg.jpg");
-        MultipartFile multipartFile = new MockMultipartFile(ZHONGZHENG_PROFILE+"wordJpg.jpg", ZHONGZHENG_PROFILE+"wordJpg.jpg",
+        FileInputStream fileInputStream = new FileInputStream(ZHONGZHENG_PROFILE + "wordJpg.jpg");
+        MultipartFile multipartFile = new MockMultipartFile(ZHONGZHENG_PROFILE + "wordJpg.jpg", ZHONGZHENG_PROFILE + "wordJpg.jpg",
                 ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
                 ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
         ossRequest.setFile(multipartFile);
         ossRequest.setFile(multipartFile);
         ossRequest.setImageStatus(6);
         ossRequest.setImageStatus(6);
@@ -360,12 +364,17 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
     }
     }
 
 
     @Override
     @Override
-    public boolean updateAuditByEditBo(UserProfileEditBo bo,LoginUser loginUser) {
-        UserProfile update = BeanUtil.toBean(bo,UserProfile.class);
+    public boolean updateAuditByEditBo(UserProfileEditBo bo, LoginUser loginUser) {
+        if(Validator.isNotEmpty(bo.getKeyValue())){
+            if(bo.getKeyValue().indexOf("http")!=-1){
+                throw new CustomException("图片地址错误");
+            }
+        }
+        UserProfile update = BeanUtil.toBean(bo, UserProfile.class);
         UserProfileVo userProfileVo1 = this.queryById(bo.getId());
         UserProfileVo userProfileVo1 = this.queryById(bo.getId());
         //查询此人审核资料是否有权限
         //查询此人审核资料是否有权限
-        if(!loginUser.getUser().isAdmin()){
-            if (baseMapper.selectCountProfile(loginUser.getUser().getUserId(),userProfileVo1.getGoodsId()) < 1){
+        if (!loginUser.getUser().isAdmin()) {
+            if (baseMapper.selectCountProfile(loginUser.getUser().getUserId(), userProfileVo1.getGoodsId()) < 1) {
                 throw new IllegalArgumentException("您没有审核权限");
                 throw new IllegalArgumentException("您没有审核权限");
             }
             }
         }
         }
@@ -377,7 +386,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
 
 
         UserProfileVo userProfileVo = this.queryById(bo.getId());
         UserProfileVo userProfileVo = this.queryById(bo.getId());
         //发送消息分为资料审核发送,和盖章审核发送 1资料 2盖章
         //发送消息分为资料审核发送,和盖章审核发送 1资料 2盖章
-        if (userProfileVo.getTypeStatus().equals(1)){
+        if (userProfileVo.getTypeStatus().equals(1)) {
             //审核资料发送消息
             //审核资料发送消息
             sendAuidit(update);
             sendAuidit(update);
             if (update.getStatus().equals(1)) {
             if (update.getStatus().equals(1)) {
@@ -385,7 +394,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 getUserPicInfo(update);
                 getUserPicInfo(update);
             }
             }
 
 
-        }else if (userProfileVo.getTypeStatus().equals(2)){
+        } else if (userProfileVo.getTypeStatus().equals(2)) {
             //审核承诺书发送消息
             //审核承诺书发送消息
             sendAuiditSMS(update);
             sendAuiditSMS(update);
         }
         }
@@ -395,33 +404,33 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
     /**
     /**
      * 同步身份证到用户信息
      * 同步身份证到用户信息
      */
      */
-    private void getUserPicInfo(UserProfile bo){
+    private void getUserPicInfo(UserProfile bo) {
         String keyValue = bo.getKeyValue();
         String keyValue = bo.getKeyValue();
-        if(Validator.isNotEmpty(keyValue)){
-            Map<String, String> maps = JSONObject.parseObject(keyValue,Map.class);
-            String recent_photos,idcard_face_photo,idcard_national_photo = null;
+        if (Validator.isNotEmpty(keyValue)) {
+            Map<String, String> maps = JSONObject.parseObject(keyValue, Map.class);
+            String recent_photos, idcard_face_photo, idcard_national_photo = null;
             LambdaUpdateWrapper<User> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
             LambdaUpdateWrapper<User> objectLambdaUpdateWrapper = Wrappers.lambdaUpdate();
             objectLambdaUpdateWrapper.eq(User::getUserId, bo.getUserId());
             objectLambdaUpdateWrapper.eq(User::getUserId, bo.getUserId());
-            if(maps.containsKey("recent_photos")){
+            if (maps.containsKey("recent_photos")) {
                 recent_photos = JSONObject.parseObject(String.valueOf(maps.get("recent_photos")), UserProfileFit.class).getValue();
                 recent_photos = JSONObject.parseObject(String.valueOf(maps.get("recent_photos")), UserProfileFit.class).getValue();
                 objectLambdaUpdateWrapper.set(User::getOneInchPhotos, recent_photos);
                 objectLambdaUpdateWrapper.set(User::getOneInchPhotos, recent_photos);
             }
             }
-            if(maps.containsKey("idcard_face_photo")){
+            if (maps.containsKey("idcard_face_photo")) {
                 idcard_face_photo = JSONObject.parseObject(String.valueOf(maps.get("idcard_face_photo")), UserProfileFit.class).getValue();
                 idcard_face_photo = JSONObject.parseObject(String.valueOf(maps.get("idcard_face_photo")), UserProfileFit.class).getValue();
                 objectLambdaUpdateWrapper.set(User::getIdCardImg1, idcard_face_photo);
                 objectLambdaUpdateWrapper.set(User::getIdCardImg1, idcard_face_photo);
             }
             }
-            if(maps.containsKey("idcard_national_photo")){
+            if (maps.containsKey("idcard_national_photo")) {
                 idcard_national_photo = JSONObject.parseObject(String.valueOf(maps.get("idcard_national_photo")), UserProfileFit.class).getValue();
                 idcard_national_photo = JSONObject.parseObject(String.valueOf(maps.get("idcard_national_photo")), UserProfileFit.class).getValue();
                 objectLambdaUpdateWrapper.set(User::getIdCardImg2, idcard_national_photo);
                 objectLambdaUpdateWrapper.set(User::getIdCardImg2, idcard_national_photo);
             }
             }
-            objectLambdaUpdateWrapper.set(User::getUpdateTime,DateUtils.getNowTime());
+            objectLambdaUpdateWrapper.set(User::getUpdateTime, DateUtils.getNowTime());
             iUserService.update(null, objectLambdaUpdateWrapper);
             iUserService.update(null, objectLambdaUpdateWrapper);
         }
         }
     }
     }
 
 
     private void sendAuiditSMS(UserProfile bo) {
     private void sendAuiditSMS(UserProfile bo) {
         UserProfileVo userProfileVo = this.queryById(bo.getId());
         UserProfileVo userProfileVo = this.queryById(bo.getId());
-        Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(),userProfileVo.getGoodsId());
+        Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(), userProfileVo.getGoodsId());
         if (bo.getStatus().equals(1)) {
         if (bo.getStatus().equals(1)) {
             InformRemindVo informRemindVo = informRemindService.queryById(23L);
             InformRemindVo informRemindVo = informRemindService.queryById(23L);
             //站内信有无启用,启用发送
             //站内信有无启用,启用发送
@@ -438,11 +447,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGradeId(gradeId);
                 informUserAddBo.setGradeId(gradeId);
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
-                informUserAddBo.setText("尊敬的用户:您上传"+goodsVo1.getGoodsName()+"课程的承诺书审核成功");
+                informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核成功");
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
             }
             }
             //短信有无启用,启用发送
             //短信有无启用,启用发送
-            if (informRemindVo.getNoteStatus().equals(1)){
+            if (informRemindVo.getNoteStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 informUserAddBo.setUserId(userProfileVo.getUserId());
                 informUserAddBo.setUserId(userProfileVo.getUserId());
                 informUserAddBo.setSendTime(DateUtils.getNowTime());
                 informUserAddBo.setSendTime(DateUtils.getNowTime());
@@ -454,14 +463,14 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setRemind("资料审核通过通知");
                 informUserAddBo.setRemind("资料审核通过通知");
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
-                informUserAddBo.setText("尊敬的用户:您上传"+goodsVo1.getGoodsName()+"课程的承诺书审核成功");
+                informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核成功");
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
                 param.put("goods", goodsVo1.getGoodsName());
                 param.put("goods", goodsVo1.getGoodsName());
                 IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), commitmentCode);
                 IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), commitmentCode);
             }
             }
-        }else {
+        } else {
             InformRemindVo informRemindTwoVo = informRemindService.queryById(24L);
             InformRemindVo informRemindTwoVo = informRemindService.queryById(24L);
             //站内信有无启用,启用发送
             //站内信有无启用,启用发送
             if (informRemindTwoVo.getWayStatus().equals(1)) {
             if (informRemindTwoVo.getWayStatus().equals(1)) {
@@ -477,11 +486,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGradeId(gradeId);
                 informUserAddBo.setGradeId(gradeId);
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
-                informUserAddBo.setText("尊敬的用户:您上传"+goodsVo1.getGoodsName()+"课程的承诺书审核不通过,请重新完善吧");
+                informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核不通过,请重新完善吧");
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
             }
             }
             //短信有无启用,启用发送
             //短信有无启用,启用发送
-            if (informRemindTwoVo.getNoteStatus().equals(1)){
+            if (informRemindTwoVo.getNoteStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 informUserAddBo.setUserId(userProfileVo.getUserId());
                 informUserAddBo.setUserId(userProfileVo.getUserId());
                 informUserAddBo.setSendTime(DateUtils.getNowTime());
                 informUserAddBo.setSendTime(DateUtils.getNowTime());
@@ -493,7 +502,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setRemind("资料审核不通过通知");
                 informUserAddBo.setRemind("资料审核不通过通知");
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
-                informUserAddBo.setText("尊敬的用户:您上传"+goodsVo1.getGoodsName()+"课程的承诺书审核不通过,请重新完善吧");
+                informUserAddBo.setText("尊敬的用户:您上传" + goodsVo1.getGoodsName() + "课程的承诺书审核不通过,请重新完善吧");
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
@@ -506,7 +515,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
     private void sendAuidit(UserProfile bo) {
     private void sendAuidit(UserProfile bo) {
         UserProfileVo userProfileVo = this.queryById(bo.getId());
         UserProfileVo userProfileVo = this.queryById(bo.getId());
         //查询所在班级
         //查询所在班级
-        Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(),userProfileVo.getGoodsId());
+        Long gradeId = baseMapper.selectGrade(userProfileVo.getUserId(), userProfileVo.getGoodsId());
         if (bo.getStatus().equals(1)) {
         if (bo.getStatus().equals(1)) {
             InformRemindVo informRemindVo = informRemindService.queryById(3L);
             InformRemindVo informRemindVo = informRemindService.queryById(3L);
             //站内信有无启用,启用发送
             //站内信有无启用,启用发送
@@ -523,11 +532,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGradeId(gradeId);
                 informUserAddBo.setGradeId(gradeId);
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
-                informUserAddBo.setText("尊敬的用户:您填写的"+goodsVo1.getGoodsName()+"课程报名信息审核成功,请尽快去学习吧");
+                informUserAddBo.setText("尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核成功,请尽快去学习吧");
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
             }
             }
             //短信有无启用,启用发送
             //短信有无启用,启用发送
-            if (informRemindVo.getNoteStatus().equals(1)){
+            if (informRemindVo.getNoteStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 informUserAddBo.setUserId(userProfileVo.getUserId());
                 informUserAddBo.setUserId(userProfileVo.getUserId());
                 informUserAddBo.setSendTime(DateUtils.getNowTime());
                 informUserAddBo.setSendTime(DateUtils.getNowTime());
@@ -546,7 +555,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 param.put("goods", goodsVo1.getGoodsName());
                 param.put("goods", goodsVo1.getGoodsName());
                 IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), materialReviewCode);
                 IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), materialReviewCode);
             }
             }
-        }else {
+        } else {
             InformRemindVo informRemindTwoVo = informRemindService.queryById(4L);
             InformRemindVo informRemindTwoVo = informRemindService.queryById(4L);
             //站内信有无启用,启用发送
             //站内信有无启用,启用发送
             if (informRemindTwoVo.getWayStatus().equals(1)) {
             if (informRemindTwoVo.getWayStatus().equals(1)) {
@@ -562,11 +571,11 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGradeId(gradeId);
                 informUserAddBo.setGradeId(gradeId);
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
-                informUserAddBo.setText("尊敬的用户:您填写的"+goodsVo1.getGoodsName()+"课程报名信息审核不通过,请重新完善吧");
+                informUserAddBo.setText("尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核不通过,请重新完善吧");
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
             }
             }
             //短信有无启用,启用发送
             //短信有无启用,启用发送
-            if (informRemindTwoVo.getNoteStatus().equals(1)){
+            if (informRemindTwoVo.getNoteStatus().equals(1)) {
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 InformUserAddBo informUserAddBo = new InformUserAddBo();
                 informUserAddBo.setUserId(userProfileVo.getUserId());
                 informUserAddBo.setUserId(userProfileVo.getUserId());
                 informUserAddBo.setSendTime(DateUtils.getNowTime());
                 informUserAddBo.setSendTime(DateUtils.getNowTime());
@@ -578,7 +587,7 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 informUserAddBo.setRemind("报名资料审核不通过通知");
                 informUserAddBo.setRemind("报名资料审核不通过通知");
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 informUserAddBo.setGoodsId(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
                 GoodsVo goodsVo1 = iGoodsService.queryById(userProfileVo.getGoodsId());
-                informUserAddBo.setText("尊敬的用户:您填写的"+goodsVo1.getGoodsName()+"课程报名信息审核不通过,请重新完善吧");
+                informUserAddBo.setText("尊敬的用户:您填写的" + goodsVo1.getGoodsName() + "课程报名信息审核不通过,请重新完善吧");
                 iInformUserService.insertByAddBo(informUserAddBo);
                 iInformUserService.insertByAddBo(informUserAddBo);
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 UserVo userVo = iUserService.queryById(userProfileVo.getUserId());
                 Map<String, Object> param = new HashMap<>();
                 Map<String, Object> param = new HashMap<>();
@@ -594,118 +603,30 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
     }
     }
 
 
     @Override
     @Override
-    public List<UserProfileExportVo> export(UserProfileQueryBo bo) {
+    public Map<String, Object> export(UserProfileQueryBo bo) {
         List<UserProfileVo> userProfileVos = baseMapper.selectUserProfile(bo);
         List<UserProfileVo> userProfileVos = baseMapper.selectUserProfile(bo);
         List<UserProfileExportVo> userProfileExportVos = new ArrayList<>();
         List<UserProfileExportVo> userProfileExportVos = new ArrayList<>();
-        for (UserProfileVo userProfileVo : userProfileVos) {
-            UserProfileExportVo userProfileExportVo = new UserProfileExportVo();
-            //将keyvlue转成对象
-            JsonBean jsonBean = JSON.parseObject(userProfileVo.getKeyValue(), JsonBean.class);
-
-            //赋值
-            userProfileExportVo.setGoodsName(userProfileVo.getGoodsName());
-            if (userProfileVo.getStatus().equals(1)) {
-                userProfileExportVo.setStatus("通过");
-            }
-            if (userProfileVo.getStatus().equals(2)) {
-                userProfileExportVo.setStatus("待审");
-            }
-            if (userProfileVo.getStatus().equals(3)) {
-                userProfileExportVo.setStatus("不通过");
-            }
-            userProfileExportVo.setUserAccount(userProfileVo.getUserAccount());
-            userProfileExportVo.setName(jsonBean.getName().getValue());
-            userProfileExportVo.setSex(jsonBean.getSex().getValue());
-            userProfileExportVo.setIdcard(jsonBean.getIdcard().getValue());
-            userProfileExportVo.setTelphone(jsonBean.getTelphone().getValue());
-            userProfileExportVo.setEducation(jsonBean.getEducation().getValue());
-            userProfileExportVo.setSchool(jsonBean.getSchool().getValue());
-            userProfileExportVo.setGraduation_time(DateUtil.formatDate(jsonBean.getGraduation_time().getValue()));
-            userProfileExportVo.setWork_unit(jsonBean.getWork_unit().getValue());
-            userProfileExportVo.setUnit_contact(jsonBean.getUnit_contact().getValue());
-            userProfileExportVo.setUnit_tel(jsonBean.getUnit_tel().getValue());
-            userProfileExportVo.setApply_post(jsonBean.getApply_post().getValue());
-            userProfileExportVo.setMajor(jsonBean.getMajor().getValue());
-            userProfileExportVo.setWorking_years(jsonBean.getWorking_years().getValue());
-            if (Validator.isNotEmpty(jsonBean.getRecent_photos())) {
-                userProfileExportVo.setRecent_photos(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getRecent_photos().getValue());
-            }
-
-            if (Validator.isNotEmpty(jsonBean.getIdcard_face_photo())) {
-                userProfileExportVo.setIdcard_face_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_face_photo().getValue());
-            }
-
-            if (Validator.isNotEmpty(jsonBean.getIdcard_national_photo())) {
-                userProfileExportVo.setIdcard_national_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_national_photo().getValue());
-            }
-
-            if (Validator.isNotEmpty(jsonBean.getCommitment_electr_signature())) {
-                userProfileExportVo.setCommitment_electr_signature(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getCommitment_electr_signature().getValue());
-            }
-            //查找盖章得记录
-            UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
-            userProfileQueryBo.setTypeStatus(2L);
-            userProfileQueryBo.setGoodsId(userProfileVo.getGoodsId());
-            userProfileQueryBo.setUserId(userProfileVo.getUserId());
-            List<UserProfileVo> userProfile = baseMapper.selectUserProfile(userProfileQueryBo);
-            if (CollectionUtils.isNotEmpty(userProfile)){
-                UserProfileVo userProfileVo1 = userProfile.get(0);
-                JsonBean jsonBean1 = JSON.parseObject(userProfileVo1.getKeyValue(), JsonBean.class);
-                if (!StringUtils.isEmpty(jsonBean1.getCommitment_seal().getValue())) {
-                    if (StringUtils.isNotBlank(jsonBean1.getCommitment_seal().getValue())) {
-                        userProfileExportVo.setCommitment_seal(ALIYUN_OSS_ENDPOINT + "/" + jsonBean1.getCommitment_seal().getValue());
-                    }
+        String filename = FileUtils.encodingZipFilename("用户盖章资料数据");
+        String zipFile = FileUtils.getZipAbsoluteFile(filename);
+        try {
+            ZipOutputStream outStream = new ZipOutputStream(new FileOutputStream(zipFile));
+            for (UserProfileVo userProfileVo : userProfileVos) {
+                UserProfileExportVo userProfileExportVo = new UserProfileExportVo();
+                //将keyvlue转成对象
+                JsonBean jsonBean = JSON.parseObject(userProfileVo.getKeyValue(), JsonBean.class);
+
+                //赋值
+                userProfileExportVo.setGoodsName(userProfileVo.getGoodsName());
+                if (userProfileVo.getStatus().equals(1)) {
+                    userProfileExportVo.setStatus("通过");
                 }
                 }
-            }
-            userProfileExportVo.setOneTime(DateUtil.formatDateTime(new Date(userProfileVo.getOneTime()*1000)));
-            userProfileExportVo.setLastTime(DateUtil.formatDateTime(new Date(userProfileVo.getLastTime()*1000)));
-            userProfileExportVo.setCreateByName(userProfileVo.getCreateByName());
-            if (userProfileVo.getAuditTime() != null) {
-                userProfileExportVo.setAuditTime(DateUtil.formatDateTime(new Date(userProfileVo.getAuditTime() * 1000)));
-            }
-            userProfileExportVos.add(userProfileExportVo);
-        }
-        return userProfileExportVos;
-    }
-
-    @Override
-    public List<UserProfileExportGaiVo> exportPo(UserProfileQueryBo bo) {
-        List<UserProfileVo> userProfileVos = baseMapper.selectUserProfile(bo);
-        List<UserProfileExportGaiVo> userProfileExportVos = new ArrayList<>();
-        for (UserProfileVo userProfileVo : userProfileVos) {
-            UserProfileExportGaiVo userProfileExportVo = new UserProfileExportGaiVo();
-            //将keyvlue转成对象
-            JsonBean jsonBean1 = JSON.parseObject(userProfileVo.getKeyValue(), JsonBean.class);
-
-            //赋值
-
-            if (!StringUtils.isEmpty(jsonBean1.getCommitment_seal().getValue())) {
-                if (StringUtils.isNotBlank(jsonBean1.getCommitment_seal().getValue())) {
-                    userProfileExportVo.setCommitment_seal(ALIYUN_OSS_ENDPOINT + "/" + jsonBean1.getCommitment_seal().getValue());
+                if (userProfileVo.getStatus().equals(2)) {
+                    userProfileExportVo.setStatus("待审");
                 }
                 }
-            }
-
-            userProfileExportVo.setGoodsName(userProfileVo.getGoodsName());
-            if (userProfileVo.getStatus().equals(1)) {
-                userProfileExportVo.setStatus("通过");
-            }
-            if (userProfileVo.getStatus().equals(2)) {
-                userProfileExportVo.setStatus("待审");
-            }
-            if (userProfileVo.getStatus().equals(3)) {
-                userProfileExportVo.setStatus("不通过");
-            }
-            userProfileExportVo.setUserAccount(userProfileVo.getUserAccount());
-
-            //查找盖章得记录
-            UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
-            userProfileQueryBo.setTypeStatus(1L);
-            userProfileQueryBo.setGoodsId(userProfileVo.getGoodsId());
-            userProfileQueryBo.setUserId(userProfileVo.getUserId());
-            List<UserProfileVo> userProfile = baseMapper.selectUserProfile(userProfileQueryBo);
-            if (CollectionUtils.isNotEmpty(userProfile)){
-                UserProfileVo userProfileVo1 = userProfile.get(0);
-                JsonBean jsonBean = JSON.parseObject(userProfileVo1.getKeyValue(), JsonBean.class);
+                if (userProfileVo.getStatus().equals(3)) {
+                    userProfileExportVo.setStatus("不通过");
+                }
+                userProfileExportVo.setUserAccount(userProfileVo.getUserAccount());
                 userProfileExportVo.setName(jsonBean.getName().getValue());
                 userProfileExportVo.setName(jsonBean.getName().getValue());
                 userProfileExportVo.setSex(jsonBean.getSex().getValue());
                 userProfileExportVo.setSex(jsonBean.getSex().getValue());
                 userProfileExportVo.setIdcard(jsonBean.getIdcard().getValue());
                 userProfileExportVo.setIdcard(jsonBean.getIdcard().getValue());
@@ -719,28 +640,157 @@ public class UserProfileServiceImpl extends ServiceImpl<UserProfileMapper, UserP
                 userProfileExportVo.setApply_post(jsonBean.getApply_post().getValue());
                 userProfileExportVo.setApply_post(jsonBean.getApply_post().getValue());
                 userProfileExportVo.setMajor(jsonBean.getMajor().getValue());
                 userProfileExportVo.setMajor(jsonBean.getMajor().getValue());
                 userProfileExportVo.setWorking_years(jsonBean.getWorking_years().getValue());
                 userProfileExportVo.setWorking_years(jsonBean.getWorking_years().getValue());
-                if (Validator.isNotEmpty(jsonBean.getRecent_photos())) {
+                List<String> fileList = new ArrayList<>();
+                if (Validator.isNotEmpty(jsonBean.getRecent_photos().getValue())) {
                     userProfileExportVo.setRecent_photos(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getRecent_photos().getValue());
                     userProfileExportVo.setRecent_photos(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getRecent_photos().getValue());
+                    fileList.add(jsonBean.getRecent_photos().getValue());
                 }
                 }
-                if (Validator.isNotEmpty(jsonBean.getIdcard_face_photo())) {
+
+                if (Validator.isNotEmpty(jsonBean.getIdcard_face_photo().getValue())) {
                     userProfileExportVo.setIdcard_face_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_face_photo().getValue());
                     userProfileExportVo.setIdcard_face_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_face_photo().getValue());
+                    fileList.add(jsonBean.getIdcard_face_photo().getValue());
                 }
                 }
-                if (Validator.isNotEmpty(jsonBean.getIdcard_national_photo())) {
+
+                if (Validator.isNotEmpty(jsonBean.getIdcard_national_photo().getValue())) {
                     userProfileExportVo.setIdcard_national_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_national_photo().getValue());
                     userProfileExportVo.setIdcard_national_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_national_photo().getValue());
+                    fileList.add(jsonBean.getIdcard_national_photo().getValue());
                 }
                 }
-                if (Validator.isNotEmpty(jsonBean.getCommitment_electr_signature())) {
+
+                if (Validator.isNotEmpty(jsonBean.getCommitment_electr_signature().getValue())) {
                     userProfileExportVo.setCommitment_electr_signature(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getCommitment_electr_signature().getValue());
                     userProfileExportVo.setCommitment_electr_signature(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getCommitment_electr_signature().getValue());
+                    fileList.add(jsonBean.getCommitment_electr_signature().getValue());
                 }
                 }
+                String dir = userProfileExportVo.getName() + "_" + userProfileExportVo.getIdcard();
+                ossService.zipCommonDownload(fileList, outStream, dir);
+                //查找盖章得记录
+                UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
+                userProfileQueryBo.setTypeStatus(2L);
+                userProfileQueryBo.setGoodsId(userProfileVo.getGoodsId());
+                userProfileQueryBo.setUserId(userProfileVo.getUserId());
+                List<UserProfileVo> userProfile = baseMapper.selectUserProfile(userProfileQueryBo);
+                if (CollectionUtils.isNotEmpty(userProfile)) {
+                    UserProfileVo userProfileVo1 = userProfile.get(0);
+                    JsonBean jsonBean1 = JSON.parseObject(userProfileVo1.getKeyValue(), JsonBean.class);
+                    if (!StringUtils.isEmpty(jsonBean1.getCommitment_seal().getValue())) {
+                        if (StringUtils.isNotBlank(jsonBean1.getCommitment_seal().getValue())) {
+                            userProfileExportVo.setCommitment_seal(ALIYUN_OSS_ENDPOINT + "/" + jsonBean1.getCommitment_seal().getValue());
+                        }
+                    }
+                }
+                userProfileExportVo.setOneTime(DateUtil.formatDateTime(new Date(userProfileVo.getOneTime() * 1000)));
+                userProfileExportVo.setLastTime(DateUtil.formatDateTime(new Date(userProfileVo.getLastTime() * 1000)));
+                userProfileExportVo.setCreateByName(userProfileVo.getCreateByName());
+                if (userProfileVo.getAuditTime() != null) {
+                    userProfileExportVo.setAuditTime(DateUtil.formatDateTime(new Date(userProfileVo.getAuditTime() * 1000)));
+                }
+                userProfileExportVos.add(userProfileExportVo);
             }
             }
-            userProfileExportVo.setOneTime(DateUtil.formatDateTime(new Date(userProfileVo.getOneTime()*1000)));
-            userProfileExportVo.setLastTime(DateUtil.formatDateTime(new Date(userProfileVo.getLastTime()*1000)));
-            userProfileExportVo.setCreateByName(userProfileVo.getCreateByName());
-            if (userProfileVo.getAuditTime() != null) {
-                userProfileExportVo.setAuditTime(DateUtil.formatDateTime(new Date(userProfileVo.getAuditTime() * 1000)));
+            outStream.close();
+        } catch (IOException e) {
+            System.out.println(e.getMessage() + "压缩");
+        }
+        Map<String, Object> rs = new HashMap<>();
+        rs.put("list", userProfileExportVos);
+        rs.put("zip", AjaxResult.success(filename));
+        //List<UserProfileExportGaiVo>
+        return rs;
+    }
+
+    @Override
+    public Map<String, Object> exportPo(UserProfileQueryBo bo) {
+        List<UserProfileVo> userProfileVos = baseMapper.selectUserProfile(bo);
+        List<UserProfileExportGaiVo> userProfileExportVos = new ArrayList<>();
+        String filename = FileUtils.encodingZipFilename("用户盖章资料数据");
+        String zipFile = FileUtils.getZipAbsoluteFile(filename);
+        try {
+            ZipOutputStream outStream = new ZipOutputStream(new FileOutputStream(zipFile));
+            for (UserProfileVo userProfileVo : userProfileVos) {
+                UserProfileExportGaiVo userProfileExportVo = new UserProfileExportGaiVo();
+                //将keyvlue转成对象
+                JsonBean jsonBean1 = JSON.parseObject(userProfileVo.getKeyValue(), JsonBean.class);
+
+                //赋值
+
+                if (!StringUtils.isEmpty(jsonBean1.getCommitment_seal().getValue())) {
+                    if (StringUtils.isNotBlank(jsonBean1.getCommitment_seal().getValue())) {
+                        userProfileExportVo.setCommitment_seal(ALIYUN_OSS_ENDPOINT + "/" + jsonBean1.getCommitment_seal().getValue());
+                    }
+                }
+
+                userProfileExportVo.setGoodsName(userProfileVo.getGoodsName());
+                if (userProfileVo.getStatus().equals(1)) {
+                    userProfileExportVo.setStatus("通过");
+                }
+                if (userProfileVo.getStatus().equals(2)) {
+                    userProfileExportVo.setStatus("待审");
+                }
+                if (userProfileVo.getStatus().equals(3)) {
+                    userProfileExportVo.setStatus("不通过");
+                }
+                userProfileExportVo.setUserAccount(userProfileVo.getUserAccount());
+
+                //查找盖章得记录
+                UserProfileQueryBo userProfileQueryBo = new UserProfileQueryBo();
+                userProfileQueryBo.setTypeStatus(1L);
+                userProfileQueryBo.setGoodsId(userProfileVo.getGoodsId());
+                userProfileQueryBo.setUserId(userProfileVo.getUserId());
+                List<UserProfileVo> userProfile = baseMapper.selectUserProfile(userProfileQueryBo);
+                if (CollectionUtils.isNotEmpty(userProfile)) {
+                    UserProfileVo userProfileVo1 = userProfile.get(0);
+                    JsonBean jsonBean = JSON.parseObject(userProfileVo1.getKeyValue(), JsonBean.class);
+                    userProfileExportVo.setName(jsonBean.getName().getValue());
+                    userProfileExportVo.setSex(jsonBean.getSex().getValue());
+                    userProfileExportVo.setIdcard(jsonBean.getIdcard().getValue());
+                    userProfileExportVo.setTelphone(jsonBean.getTelphone().getValue());
+                    userProfileExportVo.setEducation(jsonBean.getEducation().getValue());
+                    userProfileExportVo.setSchool(jsonBean.getSchool().getValue());
+                    userProfileExportVo.setGraduation_time(DateUtil.formatDate(jsonBean.getGraduation_time().getValue()));
+                    userProfileExportVo.setWork_unit(jsonBean.getWork_unit().getValue());
+                    userProfileExportVo.setUnit_contact(jsonBean.getUnit_contact().getValue());
+                    userProfileExportVo.setUnit_tel(jsonBean.getUnit_tel().getValue());
+                    userProfileExportVo.setApply_post(jsonBean.getApply_post().getValue());
+                    userProfileExportVo.setMajor(jsonBean.getMajor().getValue());
+                    userProfileExportVo.setWorking_years(jsonBean.getWorking_years().getValue());
+                    List<String> fileList = new ArrayList<>();
+                    if (Validator.isNotEmpty(jsonBean.getRecent_photos().getValue())) {
+                        userProfileExportVo.setRecent_photos(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getRecent_photos().getValue());
+                        fileList.add(jsonBean.getRecent_photos().getValue());
+                    }
+                    if (Validator.isNotEmpty(jsonBean.getIdcard_face_photo().getValue())) {
+                        userProfileExportVo.setIdcard_face_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_face_photo().getValue());
+                        fileList.add(jsonBean.getIdcard_face_photo().getValue());
+                    }
+                    if (Validator.isNotEmpty(jsonBean.getIdcard_national_photo().getValue())) {
+                        userProfileExportVo.setIdcard_national_photo(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getIdcard_national_photo().getValue());
+                        fileList.add(jsonBean.getIdcard_national_photo().getValue());
+
+                    }
+                    if (Validator.isNotEmpty(jsonBean.getCommitment_electr_signature().getValue())) {
+                        userProfileExportVo.setCommitment_electr_signature(ALIYUN_OSS_ENDPOINT + "/" + jsonBean.getCommitment_electr_signature().getValue());
+                        fileList.add(jsonBean.getCommitment_electr_signature().getValue());
+
+                    }
+                    String dir = userProfileExportVo.getName() + "_" + userProfileExportVo.getIdcard();
+                    ossService.zipCommonDownload(fileList, outStream, dir);
+
+                }
+                userProfileExportVo.setOneTime(DateUtil.formatDateTime(new Date(userProfileVo.getOneTime() * 1000)));
+                userProfileExportVo.setLastTime(DateUtil.formatDateTime(new Date(userProfileVo.getLastTime() * 1000)));
+                userProfileExportVo.setCreateByName(userProfileVo.getCreateByName());
+                if (userProfileVo.getAuditTime() != null) {
+                    userProfileExportVo.setAuditTime(DateUtil.formatDateTime(new Date(userProfileVo.getAuditTime() * 1000)));
+                }
+                userProfileExportVos.add(userProfileExportVo);
             }
             }
-            userProfileExportVos.add(userProfileExportVo);
+            outStream.close();
+        } catch (IOException e) {
+            System.out.println(e.getMessage() + "压缩");
         }
         }
-        return userProfileExportVos;
+        Map<String, Object> rs = new HashMap<>();
+        rs.put("list", userProfileExportVos);
+        rs.put("zip", AjaxResult.success(filename));
+        //List<UserProfileExportGaiVo>
+        return rs;
     }
     }
 
 
     /**
     /**

+ 2 - 11
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -749,7 +749,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         List<ClassPeriodStudentExportAllVo> newList = new ArrayList<>();
         List<ClassPeriodStudentExportAllVo> newList = new ArrayList<>();
         Map<String,Object> rs = new HashMap<>();
         Map<String,Object> rs = new HashMap<>();
         String filename = FileUtils.encodingZipFilename("用户压缩数据");
         String filename = FileUtils.encodingZipFilename("用户压缩数据");
-        String zipFile = getZipAbsoluteFile(filename);
+        String zipFile = FileUtils.getZipAbsoluteFile(filename);
         try {
         try {
             ZipOutputStream outStream = new ZipOutputStream(new FileOutputStream(zipFile));
             ZipOutputStream outStream = new ZipOutputStream(new FileOutputStream(zipFile));
             for (ClassPeriodStudentExportVo vo : list) {
             for (ClassPeriodStudentExportVo vo : list) {
@@ -779,16 +779,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
 
 
 
 
 
 
-    private String getZipAbsoluteFile(String filename)
-    {
-        String downloadPath = RuoYiConfig.getDownloadPath() + filename;
-        File desc = new File(downloadPath);
-        if (!desc.getParentFile().exists())
-        {
-            desc.getParentFile().mkdirs();
-        }
-        return downloadPath;
-    }
+
 
 
     private UserPeriodExportVo mergeData(Long index, String moduleName, String chapterName, String sectionName, ClassPeriodSectionVo classPeriodSectionVo, BigDecimal performance, Boolean isExam) {
     private UserPeriodExportVo mergeData(Long index, String moduleName, String chapterName, String sectionName, ClassPeriodSectionVo classPeriodSectionVo, BigDecimal performance, Boolean isExam) {
         //录入学时记录
         //录入学时记录