From 40776beb224799d5dd51ca1d92ea2f5e883ff4f5 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期五, 02 八月 2024 11:30:18 +0800
Subject: [PATCH] 增加增城东部粮油中心库配置信息
---
src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java | 45 +++++++++++++++++++++------------------------
1 files changed, 21 insertions(+), 24 deletions(-)
diff --git a/src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java b/src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java
index ccb10da..6fd38c7 100644
--- a/src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java
+++ b/src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java
@@ -130,7 +130,7 @@
infoData.setUpdateTime(new Date());
infoData.setDataId(data.getHwdm());
infoData.setData(JSON.toJSONString(data));
- infoData.setCzbz(Constant.CZBZ_I);
+ infoData.setCzbz(data.getCzbz());
infoData.setRemarks("澶囨敞淇℃伅");
apiInfoDataRep.save(infoData);
@@ -158,7 +158,7 @@
@Expose
public String pushData(List<SH2023Api2103> items) {
- ResponseDto responseDto;
+
String result = "";
String kqdm = items.get(0).getHwdm().substring(0, 21);
@@ -169,7 +169,7 @@
}
//灏佽鍙傛暟
- ApiParam param = new ApiParam(apiConf, "21", SH2023Constant.SH_2023_API_CODE_2103);
+ ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, SH2023Constant.SH_2023_API_CODE_2103);
//鑾峰彇瀹炵幇鎺ュ彛
ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol());
@@ -177,31 +177,28 @@
return "绯荤粺娌℃湁褰撳墠鎺ㄩ�佸崗璁厤缃紝鎵ц澶辫触";
}
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- responseDto = apiService.pushData(param, apiConf, items);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
+ ResponseDto responseDto;
+ ApiInfoData infoData;
+ for (SH2023Api2103 data : items) {
+ responseDto = apiService.pushData(param, apiConf, data);
+ if (responseDto.getSuccess() == 0) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
+ infoData = new ApiInfoData();
+ infoData.setId(data.getHwdm());
+ infoData.setKqdm(data.getHwdm().substring(0, 21));
+ infoData.setInteType("21");
+ infoData.setInteId(SH2023Constant.SH_2023_API_CODE_2103);
+ infoData.setUpdateTime(new Date());
+ infoData.setDataId(data.getHwdm());
- ApiInfoData infoData;
- for (SH2023Api2103 data : items) {
-
- infoData = new ApiInfoData();
- infoData.setId(data.getHwdm());
- infoData.setKqdm(data.getHwdm().substring(0, 21));
- infoData.setInteType("21");
- infoData.setInteId(SH2023Constant.SH_2023_API_CODE_2103);
- infoData.setUpdateTime(new Date());
- infoData.setDataId(data.getHwdm());
-
- infoData.setCzbz(Constant.CZBZ_U);
- infoData.setData(JSON.toJSONString(data));
-
- apiInfoDataRep.save(infoData);
-
+ infoData.setCzbz(Constant.CZBZ_U);
+ data.setCzbz(Constant.CZBZ_U);
+ infoData.setData(JSON.toJSONString(data));
+ apiInfoDataRep.save(infoData);
+ }
}
result += responseDto.toString();
}
return result;
}
-
}
--
Gitblit v1.9.3