CZT
2023-08-18 e97e5cc1d6b14914ed2aa5cb281bfaeef78c7757
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
package com.fzzy.push.sh2023;
 
import com.fzzy.api.Constant;
import com.fzzy.api.data.ApiParam;
import com.fzzy.api.data.PushProtocol;
import com.fzzy.api.dto.ResponseDto;
import com.fzzy.api.entity.Api1101;
import com.fzzy.api.service.ApiRemoteService;
import com.fzzy.api.service.PushService11;
import com.fzzy.api.view.repository.Api1101Rep;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
 
/**
 * 上海市平台2023版-基础数据上传
 *
 * @author czt
 * @date 2023/08/17
 */
@Slf4j
@Component
public class SH2023PushService11 implements PushService11 {
 
 
    @Autowired
    private SH2023ApiRemoteService apiRemoteService;
    @Autowired
    private Api1101Rep api1101Rep;
 
    @Override
    public String getProtocol() {
        return PushProtocol.SB_SH_2023.getCode();
    }
 
    @Override
    public void pushData(ApiParam param) {
 
        log.info("------->>>>基础信息 接口模块上报开始");
 
        //推送单位信息
        this.pushData1101(apiRemoteService, param);
        //TODO 其他基础信息
 
 
        log.info("------->>>>基础信息 接口模块上报结束");
    }
 
    /**
     * 1101 单位信息
     */
    public void pushData1101(ApiRemoteService apiRemoteService, ApiParam param) {
 
        //获取单位信息
        List<Api1101> list = api1101Rep.getDataByTime(param.getKqdm(), param.getStart(), param.getEnd());
 
        if (null == list || list.isEmpty()) {
            log.error("-----上海市平台2023版:未获取到单位信息,不推送-----");
            return;
        }
 
        //推送,数据为集合形式
        ResponseDto responseDto = apiRemoteService.pushData(param, list);
        if (responseDto.getSuccess() == 0) {
            //推送成功,更新数据上传状态
            for (Api1101 data : list) {
                if (Constant.CZBZ_I.equals(data.getCzbz())) {
 
                    data.setCzbz(Constant.CZBZ_U);
                    //更新状态
                    api1101Rep.save(data);
                }
            }
        }
    }
 
    /**
     * 1102 库区信息
     */
    public void pushData1102(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
 
    /**
     * 1103  仓房信息
     */
    public void pushData1103(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
 
    /**
     * 1104  廒间信息
     */
    public void pushData1104(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
 
    /**
     * 1105 货位信息
     */
    public void pushData1105(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
 
    /**
     * 1106 油罐信息
     */
    public void pushData1106(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
 
    /**
     * 1107  设备信息
     */
    public void pushData1107(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
 
    /**
     * 1108  药剂信息
     */
    public void pushData1108(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
 
    /**
     * 1109  文件信息
     */
    public void pushData1109(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
 
    /**
     * 1110 库区图仓房点位标注
     */
    public void pushData1110(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
 
    /**
     * 1111 库区图视频监控设备点位标注
     */
    public void pushData1111(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
 
    /**
     * 1112  人员信息
     */
    public void pushData1112(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
 
    /**
     * 1113  企业信用信息
     */
    public void pushData1113(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
 
    /**
     * 1114  财务报表
     */
    public void pushData1114(ApiRemoteService apiRemoteService, ApiParam param) {
        //TODO
 
    }
}