|
|
@@ -1,15 +1,15 @@
|
|
|
package com.usoftchina.saas.document.controller;
|
|
|
|
|
|
+import com.usoftchina.saas.base.Result;
|
|
|
+import com.usoftchina.saas.document.po.Warehouse;
|
|
|
import com.usoftchina.saas.document.service.WarehouseService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
@RestController
|
|
|
-@RequestMapping("/api/document/warehouse")
|
|
|
+@RequestMapping("/warehouse")
|
|
|
public class WarehouseController {
|
|
|
|
|
|
@Autowired
|
|
|
@@ -20,9 +20,14 @@ public class WarehouseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/post")
|
|
|
- public String post(Map<String, Object> map){
|
|
|
- String result = warehouseService.callProcedure(map);
|
|
|
- return result;
|
|
|
+ public Result post(Map<String, Object> map){
|
|
|
+ warehouseService.callProcedure(map);
|
|
|
+ return Result.success(map.get("result"));
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/save")
|
|
|
+ public Result saveFormData(@RequestBody Warehouse data){
|
|
|
+ boolean result = warehouseService.save(data);
|
|
|
+ return Result.success(result);
|
|
|
+ }
|
|
|
}
|