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/whhpjl/pr/WhjlApi1214PR.java | 39 ++++++++++++++++++++++++---------------
1 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1214PR.java b/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1214PR.java
index 1ceaf32..b7e841e 100644
--- a/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1214PR.java
+++ b/src/main/java/com/fzzy/otherview/whhpjl/pr/WhjlApi1214PR.java
@@ -17,8 +17,7 @@
import com.fzzy.api.utils.ContextUtil;
import com.fzzy.api.view.repository.ApiInfoDataRep;
import com.fzzy.otherview.whhpjl.WhjlConstant;
-import com.fzzy.otherview.whhpjl.dto.WhjlApi1214;
-import com.fzzy.otherview.whhpjl.dto.WhjlQDItem;
+import com.fzzy.otherview.whhpjl.dto.*;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
@@ -113,8 +112,13 @@
* @return
*/
@DataProvider
- public List<WhjlQDItem> listItem(String id) {
- return null;
+ public List<WhjlJCNL> listJCNL(String code) {
+ return JSON.parseArray(code, WhjlJCNL.class);
+ }
+
+ @DataProvider
+ public List<WhjlYQSB> listYQSB(String code) {
+ return JSON.parseArray(code, WhjlYQSB.class);
}
/**
@@ -126,17 +130,22 @@
*/
@DataResolver
public void saveData(WhjlApi1214 data) {
- ApiInfoData infoData = new ApiInfoData();
- infoData.setId(data.getBizId());
- infoData.setKqdm(data.getKqdm());
- infoData.setInteType(WhjlConstant.API_CATEGORY_12);
- infoData.setInteId(WhjlConstant.API_CODE_1214);
- infoData.setUpdateTime(new Date());
- infoData.setDataId(data.getBizId());
- infoData.setData(JSON.toJSONString(data));
- infoData.setCzbz(data.getCzbz());
- infoData.setRemarks("澶囨敞淇℃伅");
-
+ ApiInfoData infoData;
+ List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(WhjlConstant.API_CODE_1214, data.getBizId(), data.getKqdm());
+ if (apiInfoList.size() != 0) {
+ infoData = apiInfoList.get(0);
+ infoData.setData(JSON.toJSONString(data));
+ } else {
+ infoData = new ApiInfoData();
+ infoData.setId(data.getBizId());
+ infoData.setKqdm(data.getKqdm());
+ infoData.setInteId(WhjlConstant.API_CODE_1214);
+ infoData.setUpdateTime(new Date());
+ infoData.setDataId(data.getBizId());
+ infoData.setData(JSON.toJSONString(data));
+ infoData.setCzbz(Constant.CZBZ_I);
+ infoData.setRemarks("澶囨敞淇℃伅");
+ }
apiInfoDataRep.save(infoData);
}
--
Gitblit v1.9.3