wanghc
2023-03-07 c59d3777fea2e08731bc8b6c0fa7e32e5d3f6ded
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
package com.jttech.pfcs.services.impl;
 
import com.jttech.pfcs.services.ITradeService;
import com.jttech.pfcs.services.wsdl.ESBServerPortType;
import com.jttech.pfcs.services.wsdl.S080030795;
import com.jttech.pfcs.vo.req.ReqEPCSnglTranType;
import com.jttech.pfcs.vo.req.ReqTranQryType;
import com.jttech.pfcs.vo.resp.RspEPCSnglTranType;
import com.jttech.pfcs.vo.resp.RspTranQryType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;
 
/**
 * @author wanghc
 * @version 1.0.0
 * @date 2023-03-07
 */
@Service
public class TradeServiceImpl implements ITradeService, InitializingBean {
 
    private Logger mLogger = LoggerFactory.getLogger(getClass());
 
    private ESBServerPortType mESBServerPortType;
 
    @Override
    public void afterPropertiesSet() throws Exception {
        mESBServerPortType = new S080030795().getESBServerSoapEndpoint();
    }
 
    /**
     * 单笔交易
     *
     * @param reqVo
     * @return
     */
    @Override
    public RspEPCSnglTranType epcSnglTran(ReqEPCSnglTranType reqVo) {
        mLogger.info("TradeServiceImpl.epcSnglTran req={}", reqVo);
        RspEPCSnglTranType result = mESBServerPortType.epcSnglTran(reqVo);
        mLogger.info("TradeServiceImpl.epcSnglTran resp={}", result);
        return result;
    }
 
    /**
     * 交易查询
     *
     * @param req
     * @return
     */
    @Override
    public RspTranQryType tranQry(ReqTranQryType req) {
        mLogger.info("TradeServiceImpl.tranQry req={}", req);
        RspTranQryType result = mESBServerPortType.tranQry(req);
        mLogger.info("TradeServiceImpl.tranQry resp={}", result);
        return result;
    }
}