czt
2024-04-23 a03d12962c4439cce9193f178c02164db20f734c
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
package com.fzzy.push.gb2022;
 
import com.fzzy.api.data.ApiParam;
import com.fzzy.api.data.PushProtocol;
import com.fzzy.api.service.PushService13;
import com.fzzy.push.impl.ComPushService13;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
/**
 * 粮库管理-推送
 */
@Component
public class GBPushService13 implements PushService13 {
 
    @Autowired
    private GBApiRemoteService apiRemoteService;
    @Autowired
    private ComPushService13 pushService;
 
 
    @Override
    public String getProtocol() {
        return PushProtocol.GB_2022.getCode();
    }
 
    @Override
    public void pushData(ApiParam param) {
 
        //粮情推送
        pushService.pushData1302(apiRemoteService, param);
 
    }
 
 
//    public void pushData1302(ApiParam param) {
//
//        //获取需要推送的数据
//        List<Api1302> items = apiRep1302.findPushData(param.getKqdm());
//
//        if (null == items || items.isEmpty()) {
//            log.info("-------------没有粮情数据需要推送-----------");
//            return;
//        }
//
//        param.setInteCategory(Constant.API_CATEGORY_13);
//        param.setInteId(Constant.API_CODE_1302);
//
//        ResponseDto responseDto;
//
//        for (Api1302 data : items) {
//            param.setBizId(data.getBizId());
//            responseDto = apiRemoteService.pushData(param, data);
//
//            if (responseDto.getSuccess() == 0) {
//                if (Constant.CZBZ_I.equals(data.getCzbz())) {
//                    apiRep1302.updateStatus(data.getWsdjcdh(), Constant.CZBZ_U);
//                }
//            }
//        }
//    }
}