yourName 1 年間 前
コミット
e1f8daf0e6

+ 15 - 0
src/main/java/com/steerinfo/dil/controller/AMScontroller.java

@@ -978,4 +978,19 @@ public class AMScontroller  extends BaseRESTfulController {
     public Map<String, Object> readFixedNeedsExcel(MultipartFile file) throws Exception {
         return amsFeign.readFixedNeedsExcel(file);
     }
+
+    @ApiOperation("导入")
+    @PostMapping("/importTransPrice")
+    public Map<String, Object> importTransPrice(@RequestBody MultipartFile file,
+                                                    String userId,
+                                                    String userName) throws Exception {
+        Map<String, Object> map = new HashMap<>();
+        //获取Excel中包含的对象数组
+        List<Map<String, Object>> list = ExcelToolUtils.getExcelList(file, 0);
+        map.put("list", list);
+        map.put("setList",list);
+        map.put("userId",userId);
+        map.put("userName",userName);
+        return amsFeign.importTransPrice(map);
+    }
 }

+ 5 - 1
src/main/java/com/steerinfo/dil/feign/AmsFeign.java

@@ -348,4 +348,8 @@ public interface AmsFeign {
 
 
     @PostMapping(value = "api/v1/ams/amsfixedneedss/readFixedNeedsExcel", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
-    Map<String, Object> readFixedNeedsExcel(MultipartFile file );}
+    Map<String, Object> readFixedNeedsExcel(MultipartFile file );
+
+    @PostMapping(value = "api/v1/ams/amstransprices/importTransPrice")
+    Map<String, Object> importTransPrice(Map<String, Object> map);
+}