|
@@ -14,6 +14,7 @@ import com.jeeplus.modules.sg.project.util.ExportUtil;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.ui.Model;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
@@ -58,12 +59,10 @@ public class ProjectTemController extends BaseController {
|
|
*数据导入
|
|
*数据导入
|
|
*/
|
|
*/
|
|
@RequestMapping("/import")
|
|
@RequestMapping("/import")
|
|
- public String importFile(MultipartFile[] file, RedirectAttributes redirectAttributes, HttpServletRequest request, Model model) {
|
|
|
|
|
|
+ public String importFile(@RequestBody MultipartFile[] file, RedirectAttributes redirectAttributes, HttpServletRequest request, Model model) {
|
|
String projectName = request.getParameter("projectName"); //项目名称
|
|
String projectName = request.getParameter("projectName"); //项目名称
|
|
- String itemNames = request.getParameter("itemName"); //项目名称
|
|
|
|
- String types = request.getParameter("type"); //工程类型
|
|
|
|
- String[] itemName = itemNames.split(",");
|
|
|
|
- String[] type = types.split(",");
|
|
|
|
|
|
+ String[] itemName = request.getParameterValues("itemNames"); //项目名称
|
|
|
|
+ String[] type = request.getParameterValues("types"); //工程类型
|
|
String id = getId();
|
|
String id = getId();
|
|
WbsProject wbsProject = new WbsProject();
|
|
WbsProject wbsProject = new WbsProject();
|
|
wbsProject.setProjectName(projectName);
|
|
wbsProject.setProjectName(projectName);
|