新火炬后端单体项目初始化代码
zhangherong
3 天以前 c938ce5e9bd93e3f4250cce28c8780165f3769dd
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
package org.jeecg.modules.wms.service.impl;
 
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.aspect.annotation.ApiLog;
import org.jeecg.common.constant.ApiLogCategoryEnum;
import org.jeecg.modules.wms.WMSWebService;
import org.jeecg.modules.wms.dto.WSResponse;
import org.jeecg.modules.wms.request.ArrayOfWebServiceSendItem;
import org.jeecg.modules.wms.request.WebReservationOrder;
import org.jeecg.modules.wms.service.WMSWebServiceClient;
import org.jeecg.modules.wms.service.WebServiceSoap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.HashMap;
import java.util.Map;
 
@Service
@Slf4j
public class WMSWebServiceClientImpl implements WMSWebServiceClient {
    @Autowired
    private WMSWebService webService;
 
    @Override
    @ApiLog(apiName = "WMS测试连通接口(HelloWorld)", apiCategory = ApiLogCategoryEnum.WMS)
    public Map<String, Object> helloWorld() {
        Map<String, Object> resultMap = new HashMap<>();
        WebServiceSoap port = webService.getWebServiceSoap();
        String result = port.helloWorld();
        resultMap.put("zmess", "请求成功");
        resultMap.put("ztype", 200);
        resultMap.put("importParameters", null);
        resultMap.put("result", result);
        return resultMap;
    }
 
    @Override
    @ApiLog(apiName = "物料拉动(receiveReservation)", apiCategory = ApiLogCategoryEnum.WMS)
    public Map<String, Object> receiveReservation(WebReservationOrder oWebReservationOrder) {
        Map<String, Object> resultMap = new HashMap<>();
        WebServiceSoap port = webService.getWebServiceSoap();
        WSResponse result = port.receiveReservation(oWebReservationOrder);
        resultMap.put("zmess", "请求成功");
        resultMap.put("ztype", 200);
        resultMap.put("importParameters", oWebReservationOrder);
        resultMap.put("result", result);
        return resultMap;
    }
 
    @Override
    @ApiLog(apiName = "移库申请(receiveMESScanItemList)", apiCategory = ApiLogCategoryEnum.WMS)
    public Map<String, Object> receiveMESScanItemList(ArrayOfWebServiceSendItem oMESScanItemList) {
        Map<String, Object> resultMap = new HashMap<>();
        WebServiceSoap port = webService.getWebServiceSoap();
        WSResponse result = port.receiveMESScanItemList(oMESScanItemList);
        resultMap.put("zmess", "请求成功");
        resultMap.put("ztype", 200);
        resultMap.put("importParameters", oMESScanItemList);
        resultMap.put("result", result);
        return resultMap;
    }
 
    @Override
    @ApiLog(apiName = "撤销移库申请(deliOrderDelete)", apiCategory = ApiLogCategoryEnum.WMS)
    public Map<String, Object> deliOrderDelete(String sFactoryCode, String sStockRecord) {
        Map<String, Object> resultMap = new HashMap<>();
        WebServiceSoap port = webService.getWebServiceSoap();
        WSResponse result = port.deliOrderDelete(sFactoryCode, sStockRecord);
        resultMap.put("zmess", "请求成功");
        resultMap.put("ztype", 200);
        resultMap.put("importParameters", sStockRecord);
        resultMap.put("result", result);
        return resultMap;
    }
}