|
1
2
3
4
5
6
7
8
|
package com.huaheng.api.U8.controller;
import com.alibaba.fastjson.JSON;
import com.huaheng.framework.aspectj.lang.annotation.ApiLogger;
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;
|
|
9
10
|
import com.huaheng.pc.u8.domain.*;
import com.huaheng.pc.u8.service.*;
|
|
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
|
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @BelongsProject: hhwms
* @BelongsPackage: com.huaheng.api.U8.controller
* @Author: zhouhong
* @CreateTime: 2022-09-08 14:41
* @Description: TODO
* @Version: 1.0
*/
@RestController
@RequestMapping("/api/icsBasicData")
@Api(tags = {"icsBasicData"}, description = "ICS基本数据接口")
public class ICSBasicDataApi extends BaseController {
private static final Logger logger = LoggerFactory.getLogger(ICSBasicDataApi.class);
@Resource
private MaterialAPIService materialAPIService;
@Resource
private ComputationUnitApiService computationUnitApiService;
|
|
39
40
41
42
43
44
45
46
|
@Resource
private UserAPIService userAPIService;
@Resource
private DeptAPIService deptAPIService;
@Resource
private CustomerAPIService customerAPIService;
@Resource
private SupplierAPIService supplierAPIService;
|
|
47
48
|
@Resource
private WarehouseApiService warehouseApiService;
|
|
49
50
|
|
|
51
|
@Log(title = "物料添加", operating = "物料添加", action = BusinessType.INSERT)
|
|
52
53
54
|
@PostMapping("/GetICSInventory")
@ApiOperation("ICS物料添加接口")
@ResponseBody
|
|
55
56
|
@ApiLogger(apiName = "ICS物料添加接口", from = "U8")
public AjaxResult ICSInventory(@RequestBody List<ICSMaterialModel> iCSInventorys) {
|
|
57
|
String json = JSON.toJSONString(iCSInventorys);
|
|
58
|
logger.info("物料:{}", json);
|
|
59
60
61
62
63
|
// 添加物料保存到字典
AjaxResult ajaxResult = materialAPIService.ICSInventory(iCSInventorys);
return ajaxResult;
}
|
|
64
65
66
67
|
@Log(title = "人员档案添加", action = BusinessType.INSERT)
@PostMapping("/GetICSPerson")
@ApiOperation("ICS人员档案添加接口")
@ResponseBody
|
|
68
|
public AjaxResult ICSPerson(@RequestBody ICSPersonModel icsPerson) {
|
|
69
|
String json = JSON.toJSONString(icsPerson);
|
|
70
|
logger.info("人员:{}", json);
|
|
71
72
73
74
|
AjaxResult ajaxResult = userAPIService.ICSPerson(icsPerson);
return ajaxResult;
}
|
|
75
76
77
78
|
@Log(title = "计量单位添加", action = BusinessType.INSERT)
@PostMapping("/GetICSComputationUnit")
@ApiOperation("ICS计量单位添加接口")
@ResponseBody
|
|
79
|
public AjaxResult ICSComputationUnit(@RequestBody ICScomputationUnitModel icsComputationUnit) {
|
|
80
|
String json = JSON.toJSONString(icsComputationUnit);
|
|
81
|
logger.info("计量单位:{}", json);
|
|
82
83
84
85
|
AjaxResult ajaxResult = computationUnitApiService.ICSUnit(icsComputationUnit);
return ajaxResult;
}
|
|
86
87
88
89
|
@Log(title = "部门档案添加", action = BusinessType.INSERT)
@PostMapping("/GetICSDepartment")
@ApiOperation("ICS部门档案添加接口")
@ResponseBody
|
|
90
|
public AjaxResult ICSDepartment(@RequestBody ICSDepartmentModel icsDepartment) {
|
|
91
|
String json = JSON.toJSONString(icsDepartment);
|
|
92
|
logger.info("部门:{}", json);
|
|
93
94
95
96
97
98
99
100
|
AjaxResult ajaxResult = deptAPIService.ICSDepartment(icsDepartment);
return ajaxResult;
}
@Log(title = "客户档案添加", action = BusinessType.INSERT)
@PostMapping("/GetICSCustomer")
@ApiOperation("ICS客户档案添加接口")
@ResponseBody
|
|
101
102
|
@ApiLogger(apiName = "客户档案添加", from = "U8")
public AjaxResult ICSCustomer(@RequestBody ICSCustomerModel icsCustomer) {
|
|
103
|
String json = JSON.toJSONString(icsCustomer);
|
|
104
|
logger.info("客户:{}", json);
|
|
105
106
107
108
109
110
111
112
|
AjaxResult ajaxResult = customerAPIService.ICSCustomer(icsCustomer);
return ajaxResult;
}
@Log(title = "供应商档案添加", action = BusinessType.INSERT)
@PostMapping("/GetICSVendor")
@ApiOperation("ICS供应商档案添加接口")
@ResponseBody
|
|
113
114
|
@ApiLogger(apiName = "ICS供应商档案添加接口", from = "U8")
public AjaxResult ICSVendor(@RequestBody ICSVendorModel icsVendor) {
|
|
115
|
String json = JSON.toJSONString(icsVendor);
|
|
116
|
logger.info("供应商:{}", json);
|
|
117
118
119
|
AjaxResult ajaxResult = supplierAPIService.ICSVendor(icsVendor);
return ajaxResult;
}
|
|
120
121
122
123
124
|
@Log(title = "仓库档案添加", action = BusinessType.INSERT)
@PostMapping("/GetICSWarehouse")
@ApiOperation("ICS仓库档案添加接口")
@ResponseBody
|
|
125
|
public AjaxResult ICSWarehouse(@RequestBody ICSWarehouseModel icsWarehouse) {
|
|
126
127
128
|
AjaxResult ajaxResult = warehouseApiService.ICSWarehouse(icsWarehouse);
return ajaxResult;
}
|
|
129
|
}
|