SSPvOneApi.java
3.24 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
package com.huaheng.api.SSP.controller;
import com.alibaba.fastjson.JSON;
import com.huaheng.api.SSP.domain.ConfirmModel;
import com.huaheng.api.SSP.domain.SSPOnlineModel;
import com.huaheng.api.SSP.service.*;
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;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/SSP/v1")
@Slf4j
@Api(tags = {"SSPvOneApi"}, description = "SSP钱柜接口V1")
public class SSPvOneApi extends BaseController {
@Autowired
SSPOnlineApiService sspOnlineApiService;
@Autowired
LocationUploadApiService lus;
@Autowired
OrderConfirmApiService confirmService;
@Autowired
ItemDownloadApiService itemDownloadApiService;
@Autowired
OrderAssignApiService orderAssignApiService;
@Log(title = "联机心跳接口", action = BusinessType.INSERT)
@PostMapping("/SSPOnline")
// @ApiOperation("SSP联机心跳接口")
@ResponseBody
public AjaxResult SSPOnline(@RequestBody SSPOnlineModel sspOnlineModel)
{
AjaxResult ajaxResult = sspOnlineApiService.SspOnline(sspOnlineModel);
return ajaxResult;
}
@Log(title = "库位信息上传", action = BusinessType.INSERT)
@PostMapping("/locationUpload")
@ApiOperation("SSP库位信息上传")
@ResponseBody
@ApiLogger(apiName = "SSP库位信息上传", from = "SSP")
public AjaxResult locationUpload(@RequestBody SSPOnlineModel sspOnlineModel){
AjaxResult ajaxResult = lus.loupd(sspOnlineModel);
return ajaxResult;
}
@Log(title = "订单回传", action = BusinessType.INSERT)
@PostMapping("/OrderConfirm")
@ApiOperation("SSP任务回传接口")
@ResponseBody
@ApiLogger(apiName = "SSP任务回传接口", from = "SSP")
public AjaxResult OrderConfirm(@RequestBody ConfirmModel confirmModel) throws Exception {
String JsonParam = JSON.toJSONString(confirmModel);
log.info("回传任务信息:{}",JsonParam);
AjaxResult ajaxResult = confirmService.ocfm(confirmModel);
//AjaxResult ajaxResult=AjaxResult.success();
return ajaxResult;
}
@Log(title = "物料信息同步", action = BusinessType.GRANT)
@PostMapping("/ItemDownload")
@ApiOperation("SSP物料信息同步接口")
@ResponseBody
@ApiLogger(apiName = "SSP物料信息同步接口", from = "SSP")
public AjaxResult ItemDownload(String url){
AjaxResult ajaxResult = itemDownloadApiService.Idls(url);
return ajaxResult;
}
// @Log(title = "订单下发", action = BusinessType.GRANT)
// @PostMapping("/OrderAssign")
// @ApiOperation("SSP订单下发")
// @ResponseBody
// public AjaxResult OrderAssign(String url){
// AjaxResult ajaxResult = orderAssignApiService.receiptAssign(url);
// return ajaxResult;
// }
}