Переглянути джерело

专用费、事务费、外协费、项目预算导入

LLL 1 рік тому
батько
коміт
d7967ad2ea

+ 7 - 0
module_kzks/src/main/java/org/jeecg/modules/projectBudget/service/IProjectBudgetService.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.projectBudget.service;
 
+import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.projectBudget.entity.ProjectBudget;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -11,4 +12,10 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProjectBudgetService extends IService<ProjectBudget> {
 
+    /**
+     * 通过excel导入数据
+     * @return
+     */
+    public Result<?> importExcel1(String strUrl, Class<ProjectBudget> clazz);
+
 }

+ 94 - 1
module_kzks/src/main/java/org/jeecg/modules/projectBudget/service/impl/ProjectBudgetServiceImpl.java

@@ -1,11 +1,22 @@
 package org.jeecg.modules.projectBudget.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.projectBudget.entity.ProjectBudget;
 import org.jeecg.modules.projectBudget.mapper.ProjectBudgetMapper;
 import org.jeecg.modules.projectBudget.service.IProjectBudgetService;
+import org.jeecg.modules.projectChbSwf.mapper.ProjectChbSwfMapper;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
 
 /**
  * @Description: 项目预算
@@ -13,7 +24,89 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  * @Date:   2023-08-10
  * @Version: V1.0
  */
+@Slf4j
 @Service
 public class ProjectBudgetServiceImpl extends ServiceImpl<ProjectBudgetMapper, ProjectBudget> implements IProjectBudgetService {
 
+
+    @Autowired
+    @SuppressWarnings("all")
+    public ProjectBudgetMapper budgetMapper;
+
+    /**
+     * 通过excel导入数据
+     * @return
+     */
+    public Result<?> importExcel1(String strUrl, Class<ProjectBudget> clazz) {
+
+        InputStream inputStream = null;
+        try {
+            inputStream = new FileInputStream(strUrl);
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        }
+
+        // 获取上传文件对象
+        ImportParams params = new ImportParams();
+        params.setTitleRows(0);/*表格标题所占行数(默认是0)*/
+        params.setHeadRows(1);/*表头所占据的行数行数,默认1,代表标题占据一行*/
+        params.setNeedSave(true);
+        try {
+            List<ProjectBudget> list = ExcelImportUtil.importExcel(inputStream, clazz, params);
+
+//            List<ProjectBudget> list1 = new ArrayList<>();
+//            for(ProjectBudget fy:list){
+//                String nd = fy.getNd();
+//                String taskNo = fy.getTaskno();
+//                if(!nd.equals("") && !taskNo.equals("") && nd!=null && taskNo!=null){
+//                    ProjectBudget fy1 = new ProjectBudget();
+//                    fy1.setNd(nd);
+//                    fy1.setTaskno(taskNo);
+//                    boolean yon = true;
+//                    for (ProjectBudget fy2 : list1){
+//                        if(fy2.equals(fy1)){
+//                            yon = false;
+//                            break;
+//                        }else {
+//                            continue;
+//                        }
+//                    }
+//                    if(yon) list1.add(fy1);
+//                    //删除该年度该任务号所有数据
+//                    for (ProjectBudget fy3 : list1){
+//                        Map<String, Object> map = new HashMap<>();
+//                        map.put("nd",fy3.getNd());
+//                        map.put("taskno",fy3.getTaskno());
+//                        budgetMapper.deleteByMap(map);
+//                    }
+//                }
+//            }
+
+            //update-begin-author:taoyan date:20190528 for:批量插入数据
+            long start = System.currentTimeMillis();
+            this.saveBatch(list);
+            //400条 saveBatch消耗时间1592毫秒  循环插入消耗时间1947毫秒
+            //1200条  saveBatch消耗时间3687毫秒 循环插入消耗时间5212毫秒
+            log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
+            //update-end-author:taoyan date:20190528 for:批量插入数据
+            return Result.ok("文件导入成功!数据行数:" + list.size());
+        } catch (Exception e) {
+            //update-begin-author:taoyan date:20211124 for: 导入数据重复增加提示
+            String msg = e.getMessage();
+            log.error(msg, e);
+            if(msg!=null && msg.indexOf("Duplicate entry")>=0){
+                return Result.error("文件导入失败:有重复数据!");
+            }else{
+                return Result.error("文件导入失败:" + e.getMessage());
+            }
+            //update-end-author:taoyan date:20211124 for: 导入数据重复增加提示
+        } finally {
+            try {
+                inputStream.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
 }

+ 8 - 1
module_kzks/src/main/java/org/jeecg/modules/projectChbSwf/service/IProjectChbSwfService.java

@@ -1,7 +1,8 @@
 package org.jeecg.modules.projectChbSwf.service;
 
-import org.jeecg.modules.projectChbSwf.entity.ProjectChbSwf;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.projectChbSwf.entity.ProjectChbSwf;
 
 /**
  * @Description: 事务费
@@ -11,4 +12,10 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProjectChbSwfService extends IService<ProjectChbSwf> {
 
+    /**
+     * 通过excel导入数据
+     * @return
+     */
+    public Result<?> importExcel1(String strUrl, Class<ProjectChbSwf> clazz);
+
 }

+ 96 - 1
module_kzks/src/main/java/org/jeecg/modules/projectChbSwf/service/impl/ProjectChbSwfServiceImpl.java

@@ -1,11 +1,24 @@
 package org.jeecg.modules.projectChbSwf.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.projectChbSwf.entity.ProjectChbSwf;
 import org.jeecg.modules.projectChbSwf.mapper.ProjectChbSwfMapper;
 import org.jeecg.modules.projectChbSwf.service.IProjectChbSwfService;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 事务费
@@ -14,6 +27,88 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  * @Version: V1.0
  */
 @Service
+@Slf4j
 public class ProjectChbSwfServiceImpl extends ServiceImpl<ProjectChbSwfMapper, ProjectChbSwf> implements IProjectChbSwfService {
 
+    @Autowired
+    @SuppressWarnings("all")
+    public ProjectChbSwfMapper swfMapper;
+
+    /**
+     * 通过excel导入数据
+     * @return
+     */
+    public Result<?> importExcel1(String strUrl, Class<ProjectChbSwf> clazz) {
+
+        InputStream inputStream = null;
+        try {
+            inputStream = new FileInputStream(strUrl);
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        }
+
+        // 获取上传文件对象
+        ImportParams params = new ImportParams();
+        params.setTitleRows(0);/*表格标题所占行数(默认是0)*/
+        params.setHeadRows(1);/*表头所占据的行数行数,默认1,代表标题占据一行*/
+        params.setNeedSave(true);
+        try {
+            List<ProjectChbSwf> list = ExcelImportUtil.importExcel(inputStream, clazz, params);
+
+            List<ProjectChbSwf> list1 = new ArrayList<>();
+            for(ProjectChbSwf fy:list){
+                String nd = fy.getNd();
+                String taskNo = fy.getTaskno();
+                if(!nd.equals("") && !taskNo.equals("") && nd!=null && taskNo!=null){
+                    ProjectChbSwf fy1 = new ProjectChbSwf();
+                    fy1.setNd(nd);
+                    fy1.setTaskno(taskNo);
+                    boolean yon = true;
+                    for (ProjectChbSwf fy2 : list1){
+                        if(fy2.equals(fy1)){
+                            yon = false;
+                            break;
+                        }else {
+                            continue;
+                        }
+                    }
+                    if(yon) list1.add(fy1);
+                    //删除该年度该任务号所有数据
+                    for (ProjectChbSwf fy3 : list1){
+                        Map<String, Object> map = new HashMap<>();
+                        map.put("nd",fy3.getNd());
+                        map.put("taskno",fy3.getTaskno());
+                        swfMapper.deleteByMap(map);
+                    }
+
+                }
+            }
+
+            //update-begin-author:taoyan date:20190528 for:批量插入数据
+            long start = System.currentTimeMillis();
+            this.saveBatch(list);
+            //400条 saveBatch消耗时间1592毫秒  循环插入消耗时间1947毫秒
+            //1200条  saveBatch消耗时间3687毫秒 循环插入消耗时间5212毫秒
+            log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
+            //update-end-author:taoyan date:20190528 for:批量插入数据
+            return Result.ok("文件导入成功!数据行数:" + list.size());
+        } catch (Exception e) {
+            //update-begin-author:taoyan date:20211124 for: 导入数据重复增加提示
+            String msg = e.getMessage();
+            log.error(msg, e);
+            if(msg!=null && msg.indexOf("Duplicate entry")>=0){
+                return Result.error("文件导入失败:有重复数据!");
+            }else{
+                return Result.error("文件导入失败:" + e.getMessage());
+            }
+            //update-end-author:taoyan date:20211124 for: 导入数据重复增加提示
+        } finally {
+            try {
+                inputStream.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
 }

+ 7 - 0
module_kzks/src/main/java/org/jeecg/modules/projectChbWxf/service/IProjectChbWxfService.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.projectChbWxf.service;
 
+import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.projectChbWxf.entity.ProjectChbWxf;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -11,4 +12,10 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProjectChbWxfService extends IService<ProjectChbWxf> {
 
+    /**
+     * 通过excel导入数据
+     * @return
+     */
+    public Result<?> importExcel1(String strUrl, Class<ProjectChbWxf> clazz);
+
 }

+ 98 - 1
module_kzks/src/main/java/org/jeecg/modules/projectChbWxf/service/impl/ProjectChbWxfServiceImpl.java

@@ -1,11 +1,26 @@
 package org.jeecg.modules.projectChbWxf.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.projectChbWxf.entity.ProjectChbWxf;
 import org.jeecg.modules.projectChbWxf.mapper.ProjectChbWxfMapper;
 import org.jeecg.modules.projectChbWxf.service.IProjectChbWxfService;
+import org.jeecg.modules.projectChbZyf.entity.ProjectChbZyf;
+import org.jeecg.modules.projectChbZyf.mapper.ProjectChbZyfMapper;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 外协费
@@ -14,6 +29,88 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  * @Version: V1.0
  */
 @Service
+@Slf4j
 public class ProjectChbWxfServiceImpl extends ServiceImpl<ProjectChbWxfMapper, ProjectChbWxf> implements IProjectChbWxfService {
 
+    @Autowired
+    @SuppressWarnings("all")
+    public ProjectChbWxfMapper wxfMapper;
+
+    /**
+     * 通过excel导入数据
+     * @return
+     */
+    public Result<?> importExcel1(String strUrl, Class<ProjectChbWxf> clazz) {
+
+        InputStream inputStream = null;
+        try {
+            inputStream = new FileInputStream(strUrl);
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        }
+
+        // 获取上传文件对象
+        ImportParams params = new ImportParams();
+        params.setTitleRows(0);/*表格标题所占行数(默认是0)*/
+        params.setHeadRows(1);/*表头所占据的行数行数,默认1,代表标题占据一行*/
+        params.setNeedSave(true);
+        try {
+            List<ProjectChbWxf> list = ExcelImportUtil.importExcel(inputStream, clazz, params);
+
+            List<ProjectChbWxf> list1 = new ArrayList<>();
+            for(ProjectChbWxf fy:list){
+                String nd = fy.getNd();
+                String taskNo = fy.getTaskno();
+                if(!nd.equals("") && !taskNo.equals("") && nd!=null && taskNo!=null){
+                    ProjectChbWxf fy1 = new ProjectChbWxf();
+                    fy1.setNd(nd);
+                    fy1.setTaskno(taskNo);
+                    boolean yon = true;
+                    for (ProjectChbWxf fy2 : list1){
+                        if(fy2.equals(fy1)){
+                            yon = false;
+                            break;
+                        }else {
+                            continue;
+                        }
+                    }
+                    if(yon) list1.add(fy1);
+                    //删除该年度该任务号所有数据
+                    for (ProjectChbWxf fy3 : list1){
+                        Map<String, Object> map = new HashMap<>();
+                        map.put("nd",fy3.getNd());
+                        map.put("taskno",fy3.getTaskno());
+                        wxfMapper.deleteByMap(map);
+                    }
+
+                }
+            }
+
+            //update-begin-author:taoyan date:20190528 for:批量插入数据
+            long start = System.currentTimeMillis();
+            this.saveBatch(list);
+            //400条 saveBatch消耗时间1592毫秒  循环插入消耗时间1947毫秒
+            //1200条  saveBatch消耗时间3687毫秒 循环插入消耗时间5212毫秒
+            log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
+            //update-end-author:taoyan date:20190528 for:批量插入数据
+            return Result.ok("文件导入成功!数据行数:" + list.size());
+        } catch (Exception e) {
+            //update-begin-author:taoyan date:20211124 for: 导入数据重复增加提示
+            String msg = e.getMessage();
+            log.error(msg, e);
+            if(msg!=null && msg.indexOf("Duplicate entry")>=0){
+                return Result.error("文件导入失败:有重复数据!");
+            }else{
+                return Result.error("文件导入失败:" + e.getMessage());
+            }
+            //update-end-author:taoyan date:20211124 for: 导入数据重复增加提示
+        } finally {
+            try {
+                inputStream.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
 }

+ 0 - 2
module_kzks/src/main/java/org/jeecg/modules/projectChbZyf/service/IProjectChbZyfService.java

@@ -16,8 +16,6 @@ import javax.servlet.http.HttpServletResponse;
  */
 public interface IProjectChbZyfService extends IService<ProjectChbZyf> {
 
-//    public Result<?> importExcel1(HttpServletRequest request, HttpServletResponse response, Class<ProjectChbZyf> clazz);
-
     public void truncateTableByYear();
 
     public Result<?> importExcel1(String strUrl, Class<ProjectChbZyf> clazz);

+ 32 - 41
module_kzks/src/main/java/org/jeecg/modules/projectChbZyf/service/impl/ProjectChbZyfServiceImpl.java

@@ -20,6 +20,8 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.net.HttpURLConnection;
 import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -57,6 +59,36 @@ public class ProjectChbZyfServiceImpl extends ServiceImpl<ProjectChbZyfMapper, P
         params.setNeedSave(true);
         try {
             List<ProjectChbZyf> list = ExcelImportUtil.importExcel(inputStream, clazz, params);
+
+            List<ProjectChbZyf> list1 = new ArrayList<>();
+            for(ProjectChbZyf fy:list){
+                String nd = fy.getNd();
+                String taskNo = fy.getTaskno();
+                if(!nd.equals("") && !taskNo.equals("") && nd!=null && taskNo!=null){
+                    ProjectChbZyf fy1 = new ProjectChbZyf();
+                    fy1.setNd(nd);
+                    fy1.setTaskno(taskNo);
+                    boolean yon = true;
+                    for (ProjectChbZyf fy2 : list1){
+                        if(fy2.equals(fy1)){
+                            yon = false;
+                            break;
+                        }else {
+                            continue;
+                        }
+                    }
+                    if(yon) list1.add(fy1);
+                    //删除该年度该任务号所有数据
+                    for (ProjectChbZyf fy3 : list1){
+                        Map<String, Object> map = new HashMap<>();
+                        map.put("nd",fy3.getNd());
+                        map.put("taskno",fy3.getTaskno());
+                        zyfMapper.deleteByMap(map);
+                    }
+
+                }
+            }
+
             //update-begin-author:taoyan date:20190528 for:批量插入数据
             long start = System.currentTimeMillis();
             this.saveBatch(list);
@@ -84,47 +116,6 @@ public class ProjectChbZyfServiceImpl extends ServiceImpl<ProjectChbZyfMapper, P
         }
     }
 
-//    public Result<?> importExcel1(HttpServletRequest request, HttpServletResponse response, Class<ProjectChbZyf> clazz) {
-//        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-//        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
-//        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-//            // 获取上传文件对象
-//            MultipartFile file = entity.getValue();
-//            ImportParams params = new ImportParams();
-//            params.setTitleRows(0);
-//            params.setHeadRows(1);
-//            params.setNeedSave(true);
-//            try {
-//                List<ProjectChbZyf> list = ExcelImportUtil.importExcel(file.getInputStream(), clazz, params);
-//                //update-begin-author:taoyan date:20190528 for:批量插入数据
-//                long start = System.currentTimeMillis();
-//                this.saveBatch(list);
-//                //400条 saveBatch消耗时间1592毫秒  循环插入消耗时间1947毫秒
-//                //1200条  saveBatch消耗时间3687毫秒 循环插入消耗时间5212毫秒
-//                log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
-//                //update-end-author:taoyan date:20190528 for:批量插入数据
-//                return Result.ok("文件导入成功!数据行数:" + list.size());
-//            } catch (Exception e) {
-//                //update-begin-author:taoyan date:20211124 for: 导入数据重复增加提示
-//                String msg = e.getMessage();
-//                log.error(msg, e);
-//                if(msg!=null && msg.indexOf("Duplicate entry")>=0){
-//                    return Result.error("文件导入失败:有重复数据!");
-//                }else{
-//                    return Result.error("文件导入失败:" + e.getMessage());
-//                }
-//                //update-end-author:taoyan date:20211124 for: 导入数据重复增加提示
-//            } finally {
-//                try {
-//                    file.getInputStream().close();
-//                } catch (IOException e) {
-//                    e.printStackTrace();
-//                }
-//            }
-//        }
-//        return Result.error("文件导入失败!");
-//    }
-
     public void truncateTableByYear(){
         zyfMapper.truncateTableByYear();
     }

+ 27 - 45
module_kzks/src/main/java/org/jeecg/modules/projectImportList/controller/ProjectImportListController.java

@@ -11,6 +11,10 @@ import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.config.JeecgBaseConfig;
+import org.jeecg.modules.projectChbSwf.entity.ProjectChbSwf;
+import org.jeecg.modules.projectChbSwf.service.IProjectChbSwfService;
+import org.jeecg.modules.projectChbWxf.entity.ProjectChbWxf;
+import org.jeecg.modules.projectChbWxf.service.IProjectChbWxfService;
 import org.jeecg.modules.projectChbZyf.entity.ProjectChbZyf;
 import org.jeecg.modules.projectChbZyf.service.IProjectChbZyfService;
 import org.jeecg.modules.projectImportList.entity.ProjectImportList;
@@ -48,10 +52,16 @@ public class ProjectImportListController extends JeecgController<ProjectImportLi
 	private IProjectChbZyfService zyfService;
 	@Autowired
 	@SuppressWarnings("all")
+	private IProjectChbWxfService wxfService;
+	@Autowired
+	@SuppressWarnings("all")
+	private IProjectChbSwfService swfService;
+	@Autowired
+	@SuppressWarnings("all")
 	private JeecgBaseConfig jeecgBaseConfig;
 
 	 /**
-	  * 通过excel导入数据
+	  * 通过excel导入数据——————原表数据
 	  *
 	  * @param request
 	  * @param response
@@ -63,30 +73,6 @@ public class ProjectImportListController extends JeecgController<ProjectImportLi
 		 return super.importExcel(request, response, ProjectImportList.class);
 	 }
 
-//	 public InputStream getFileStream(String strUrl) {
-//		 InputStream inputStream = null;
-//		 try {
-//			 URL httpUrl = new URL(strUrl);
-//			 HttpURLConnection httpURLConnection = (HttpURLConnection) httpUrl.openConnection();
-//			 httpURLConnection.setConnectTimeout(1000 * 3);
-//			 httpURLConnection.setReadTimeout(1000 * 20);
-//			 httpURLConnection.connect();
-//			 inputStream = httpURLConnection.getInputStream();
-//			 byte[] in = StreamUtils.copyToByteArray(inputStream);
-//			 return new ByteArrayInputStream(in);
-//		 } catch (Exception e) {
-//			 log.error(e.getMessage(), e);
-////			 throw new ApplicationException(10086, "获取文件内容失败,请重新上传");
-//		 } finally {
-//			 if (inputStream != null) {
-//				 try {
-//					 inputStream.close();
-//				 } catch (IOException e) {
-//					 log.error("inputStream.close", e);
-//				 }
-//			 }
-//		 }
-//	 }
 
 	 /**
 	  * 通过excel导入其他表的数据
@@ -107,27 +93,23 @@ public class ProjectImportListController extends JeecgController<ProjectImportLi
 		 result.setCode(500);
 		 result.setMessage("请选择正确的导入类型!");
 
-		 System.out.println(projectImportList.getFileType());
-
-//		 String url =  "D:/opt/upFiles/" +
-
 		 String url = jeecgBaseConfig.getPath().getUpload() + "/"+  projectImportList.getFileAddress();
-
-//		 MultipartFile file = new
-		 return  zyfService.importExcel1(url, ProjectChbZyf.class);
-
-//		 if(projectImportList.getFileType().equals("1")){
-//			 return result;
-//		 }else if(projectImportList.getFileType().equals("2")){
-//			 return result;
-//		 }else if(projectImportList.getFileType().equals("3")){
-//			 return result;
-//		 }else if(projectImportList.getFileType().equals("4")){
-//			 return  zyfService.importExcel1(request, response, ProjectChbZyf.class);
-//		 }else {
-//			 return result;
-//		 }
-//		 return  zyfService.importExcel1(request, response, ProjectChbZyf.class);
+		 //		 String url =  "D:/opt/upFiles/" +
+		 System.out.println(projectImportList.getFileType());
+		 System.out.println("文件地址为:"+url);
+
+
+		 if(projectImportList.getFileType().equals("1")){ //项目预算
+			 return result;
+		 }else if(projectImportList.getFileType().equals("2")){ //外协费
+			 return wxfService.importExcel1(url, ProjectChbWxf.class);
+		 }else if(projectImportList.getFileType().equals("3")){ //事务费
+			 return swfService.importExcel1(url, ProjectChbSwf.class);
+		 }else if(projectImportList.getFileType().equals("4")){ //专用费
+			 return  zyfService.importExcel1(url, ProjectChbZyf.class);
+		 }else {
+			 return result;
+		 }
 	 }
 
 	/**