|
@@ -1,5 +1,6 @@
|
|
|
package com.platform.rest.controller.check;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.platform.common.util.R;
|
|
|
import com.platform.dao.dto.check.CheckJobDTO;
|
|
|
import com.platform.dao.dto.check.CheckStandardDTO;
|
|
@@ -17,7 +18,10 @@ import lombok.AllArgsConstructor;
|
|
|
import com.platform.common.bean.AbstractPageResultBean;
|
|
|
import com.platform.rest.log.annotation.SysLog;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
+import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Iterator;
|
|
|
import java.util.List;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
@@ -188,15 +192,17 @@ public class CheckStandardController {
|
|
|
/**
|
|
|
* 导入保养标准
|
|
|
*
|
|
|
- * @param file bom excel文件
|
|
|
+ * @param files bom excel文件
|
|
|
*
|
|
|
* @return R
|
|
|
*/
|
|
|
@SysLog("新增导入设备的保养标准")
|
|
|
- @PostMapping("/import")
|
|
|
- public R importListByAdd( @RequestParam("file") MultipartFile file) throws Exception {
|
|
|
- String result = "";
|
|
|
- result = checkStandardService.importListByAdd(file);
|
|
|
+ @PostMapping(value="/import",headers = "content-type=multipart/form-data")
|
|
|
+ public R importListByAdd( @RequestParam("files") MultipartFile[] files) throws Exception {
|
|
|
+ String result ="";
|
|
|
+ for(MultipartFile file: files){
|
|
|
+ result = result + checkStandardService.importListByAdd(file) + ",";
|
|
|
+ }
|
|
|
return new R<>(result);
|
|
|
}
|
|
|
}
|