Jelajahi Sumber

Merge branch 'master' of http://47.100.37.243:10080/ZHOU/yunsu

# Conflicts:
#	cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldFileServiceImpl.java
5 tahun lalu
induk
melakukan
2703d40974

+ 1 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/controller/MouldFileController.java

@@ -177,7 +177,7 @@ public class MouldFileController {
     public HttpRespMsg downloadfileList(UserVO userVO,HttpServletRequest request, HttpServletResponse response){
         HttpRespMsg msg = new HttpRespMsg();
         try {
-            msg = mouldFileService.dowloadFileList(userVO,request,response,downloadPath);
+            msg = mouldFileService.dowloadFileList(userVO,request,response,downloadPath,path);
         } catch (IOException e) {
             e.printStackTrace();
         }

+ 1 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/MouldFileService.java

@@ -28,6 +28,6 @@ public interface MouldFileService extends IService<MouldFile> {
     HttpRespMsg getFileList(int mouldId, Integer blongType, UserVO userVO);
     HttpRespMsg delFile(MouldFile mouldFile);
     HttpRespMsg getListByUserAndProjectId(UserVO userVO, PageUtil page);
-    HttpRespMsg dowloadFileList(UserVO userVO, HttpServletRequest request, HttpServletResponse response,String downloadPath) throws IOException;
+    HttpRespMsg dowloadFileList(UserVO userVO, HttpServletRequest request, HttpServletResponse response,String downloadPath,String path) throws IOException;
     HttpRespMsg addPartFile(UserVO userVO, String path, MultipartFile[] files);
 }

+ 4 - 4
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldFileServiceImpl.java

@@ -366,14 +366,14 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
     }
 
     @Override
-    public HttpRespMsg dowloadFileList(UserVO userVO, HttpServletRequest request, HttpServletResponse response, String downloadPath) throws IOException {
+    public HttpRespMsg dowloadFileList(UserVO userVO, HttpServletRequest request, HttpServletResponse response, String downloadPath,String path) throws IOException {
         HttpRespMsg msg = new HttpRespMsg();
         if (null != userVO.getIds()) {
             List<Integer> ids = ListUtil.convertIntegerIdsArrayToList(userVO.getIds());
             for (Integer id : ids) {
                 Mould mould = mouldMapper.selectById(id);
                 List<MouldFile> mouldFiles = mouldFileMapper.selectList(new QueryWrapper<MouldFile>().eq("model_id", id).eq("state", 3));
-                feedBackDirectMultiDownload(request, response, downloadPath, mould, mouldFiles);
+                feedBackDirectMultiDownload(request, response, downloadPath, mould, mouldFiles,path);
             }
         }
         return msg;
@@ -453,7 +453,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
     }
 
 
-    public Map<String, Object> feedBackDirectMultiDownload(HttpServletRequest request, HttpServletResponse response, String downloadPath, Mould vo, List<MouldFile> mouldFiles) throws IOException {
+    public Map<String, Object> feedBackDirectMultiDownload(HttpServletRequest request, HttpServletResponse response, String downloadPath, Mould vo, List<MouldFile> mouldFiles,String oldFilePath) throws IOException {
         //压缩文件初始设置
         String path = downloadPath;
         String base_name = vo.getModelNo() + vo.getModelName();
@@ -463,7 +463,7 @@ public class MouldFileServiceImpl extends ServiceImpl<MouldFileMapper, MouldFile
         //mouldFiles为根据前台传过来的信息,通过数据库查询所得出的pdf文件路径集合(具体到后缀),此处省略
         File[] files = new File[mouldFiles.size()];//
         for (int i = 0; i < mouldFiles.size(); i++) {
-            files[i] = new File(mouldFiles.get(i).getFileUrl());//获取所有需要下载的pdf
+            files[i] = new File(oldFilePath+mouldFiles.get(i).getFileUrl());//获取所有需要下载的pdf
         }
 
         // 创建临时压缩文件

+ 4 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldServiceImpl.java

@@ -420,13 +420,16 @@ public class MouldServiceImpl extends ServiceImpl<MouldMapper, Mould> implements
                 m.setId(mould.getId());
                 m.setEquipmentId(mould.getEquipmentId());
                 mouldMapper.updateById(m);
+                //通知资产方管理员
+                
+
             }else{
                 msg.setError("您没有该项权限");
             }
         }else{
             msg.setError("用户不存在或未登录");
         }
-        return null;
+        return msg;
     }
 
     //告警模板推送通用接口