BasicDataApi.java
3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
package com.huaheng.api.general.Controller;
import com.huaheng.api.general.service.BasicDataApiService;
import com.huaheng.framework.aspectj.lang.annotation.Log;
import com.huaheng.framework.aspectj.lang.constant.BusinessType;
import com.huaheng.framework.web.controller.BaseController;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.general.customer.domain.Customer;
import com.huaheng.pc.general.material.domain.Material;
import com.huaheng.pc.general.supplier.domain.Supplier;
import com.huaheng.pc.general.warehouse.domain.Warehouse;
import com.huaheng.pc.system.dept.domain.Dept;
import com.huaheng.pc.system.dict.domain.DictData;
import com.huaheng.pc.system.user.domain.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/api/basicData")
@Api(tags = {"basicData"}, description = "基础数据接口")
public class BasicDataApi extends BaseController {
@Autowired
private BasicDataApiService basicDataApiService;
/**
* 同步物料
*/
@Log(title = "物料添加", action = BusinessType.INSERT)
@PostMapping("/material")
@ApiOperation("物料添加公共接口")
@ResponseBody
public AjaxResult MaterialApi(@RequestBody Material material)
{
AjaxResult ajaxResult = basicDataApiService.material(material);
return ajaxResult;
}
/**
* 同步字典
*/
@Log(title = "字典添加", action = BusinessType.INSERT)
@PostMapping("/dictData")
@ApiOperation("字典添加公共接口")
@ResponseBody
public AjaxResult UnitlApi(@RequestBody DictData dictData)
{
AjaxResult ajaxResult = basicDataApiService.dict(dictData);
return ajaxResult;
}
/**
* 同步仓库和货主
*/
@Log(title = "仓库添加", action = BusinessType.INSERT)
@PostMapping("/warehouse")
@ApiOperation("仓库添加公共接口")
@ResponseBody
public AjaxResult WarehouseApi(@RequestBody Warehouse warehouse)
{
AjaxResult ajaxResult = basicDataApiService.warehouse(warehouse);
return ajaxResult;
}
/**
* 同步客户档案
*/
@Log(title = "客户档案添加", action = BusinessType.INSERT)
@PostMapping("/customer")
@ApiOperation("客户档案添加公共接口")
@ResponseBody
public AjaxResult CustomerApi(@RequestBody Customer customer)
{
AjaxResult ajaxResult = basicDataApiService.customer(customer);
return ajaxResult;
}
/**
* 同步部门档案
*/
@Log(title = "部门档案添加", action = BusinessType.INSERT)
@PostMapping("/dept")
@ApiOperation("部门档案添加公共接口")
@ResponseBody
public AjaxResult DeptApi(@RequestBody Dept dept)
{
AjaxResult ajaxResult = basicDataApiService.dept(dept);
return ajaxResult;
}
/**
* 同步人员档案
*/
@Log(title = "人员档案添加", action = BusinessType.INSERT)
@PostMapping("/user")
@ApiOperation("人员档案添加公共接口")
@ResponseBody
public AjaxResult UserApi(@RequestBody User user)
{
AjaxResult ajaxResult = basicDataApiService.user(user);
return ajaxResult;
}
/**
* 同步供应商档案
*/
@Log(title = "供应商档案添加", action = BusinessType.INSERT)
@PostMapping("/supplier")
@ApiOperation("供应商档案添加公共接口")
@ResponseBody
public AjaxResult SupplierApi(@RequestBody Supplier supplier){
AjaxResult ajaxResult = basicDataApiService.supplier(supplier);
return ajaxResult;
}
}