From 111f952ebe91c261fa418be96226e1fa01865e3b Mon Sep 17 00:00:00 2001
From: CZT <czt18638530771@163.com>
Date: 星期六, 11 十一月 2023 20:37:52 +0800
Subject: [PATCH] 优化上海接口信息

---
 src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1311.java          |    9 ---------
 src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1210.java       |   13 +++++++++----
 src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1311.java       |    3 ---
 src/main/java/com/fzzy/api/view/repository/Api1210Rep.java         |    3 +++
 src/main/java/com/fzzy/push/gd2022/GD2022ApiRemoteService2022.java |    2 +-
 src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1205.java       |    2 +-
 src/main/java/com/fzzy/otherview/sh2023/ShApi1311.view.xml         |   12 ------------
 src/main/java/com/fzzy/push/gd2022/ApiCodeConstant.java            |    4 ++++
 src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java     |    1 +
 9 files changed, 19 insertions(+), 30 deletions(-)

diff --git a/src/main/java/com/fzzy/api/view/repository/Api1210Rep.java b/src/main/java/com/fzzy/api/view/repository/Api1210Rep.java
index 6cd45ab..714c35c 100644
--- a/src/main/java/com/fzzy/api/view/repository/Api1210Rep.java
+++ b/src/main/java/com/fzzy/api/view/repository/Api1210Rep.java
@@ -22,4 +22,7 @@
 
     @Query("from Api1210 where kqdm=:kqdm and zhgxsj >=:start and zhgxsj <:end order by zhgxsj ")
     List<Api1210> findPushDataByTime(@Param("kqdm") String kqdm, @Param("start") Date start, @Param("end") Date end);
+
+    @Query("from Api1210 where lsxzzbdh=:lsxzzbdh ")
+    List<Api1210> getDataById(@Param("lsxzzbdh") String lsxzzbdh);
 }
diff --git a/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1205.java b/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1205.java
index dcb39c9..f2c482d 100644
--- a/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1205.java
+++ b/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1205.java
@@ -122,7 +122,7 @@
                     }
                 }
                 if (StringUtils.isNotEmpty(listInoutNotice.get(0).getPlanId())) {
-                    List<Api1404> api1404List = api1404Rep.getDataByBizId(listInoutNotice.get(0).getContractId());
+                    List<Api1404> api1404List = api1404Rep.getDataByBizId(listInoutNotice.get(0).getPlanId());
                     if(null != api1404List && api1404List.size() > 0){
                         apiData.setJhmxh(api1404List.get(0).getJhmxdh());
                     }
diff --git a/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1210.java b/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1210.java
index 463d0ee..efe0608 100644
--- a/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1210.java
+++ b/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1210.java
@@ -65,7 +65,7 @@
 
             Api1210 apiData;
             Api1105 api1105;
-
+            List<Api1210> api1210List;
             for (Fz40InoutVarietyChange sysData : list) {
                 //鑾峰彇璐т綅淇℃伅
                 api1105 = commonService.getApi1105Cache(sysData.getDepotId());
@@ -82,7 +82,7 @@
                 apiData.setLspzdm(mappingCode);
                 mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSXZ, sysData.getFoodType());
                 apiData.setHzqlsxzdm(mappingCode);
-                mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSXZ, sysData.getFoodType());
+                mappingCode = apiTriggerService.getMappingCode(Constant.TRIGGER_P_LSXZ, sysData.getNewFoodType());
                 apiData.setHzhlsxzdm(mappingCode);
                 apiData.setHzrq(sysData.getChangeTime());
                 apiData.setCcshr(sysData.getCcshr());
@@ -91,13 +91,18 @@
                 apiData.setKjshr(sysData.getKjshr());
                 apiData.setLdshr(sysData.getLdshr());
                 apiData.setBz(sysData.getRemark());
-                apiData.setCzbz(Constant.CZBZ_I);
-                apiData.setZhgxsj(sysData.getUpdateTime());
+                apiData.setZhgxsj(new Date());
 
                 //涓氬姟id銆佸簱鍖虹紪鐮併�佸悓姝ユ椂闂�
                 apiData.setBizId(sysData.getId());
                 apiData.setKqdm(kqdm);
                 apiData.setSyncTime(new Date());
+                api1210List = api1210Rep.getDataById(apiData.getLsxzzbdh());
+                if(null == api1210List || api1210List.isEmpty()){
+                    apiData.setCzbz(Constant.CZBZ_I);
+                }else {
+                    apiData.setCzbz(api1210List.get(0).getCzbz());
+                }
                 //淇濆瓨鏁版嵁
                 api1210Rep.save(apiData);
 
diff --git a/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1311.java b/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1311.java
index 42982f9..9dfc223 100644
--- a/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1311.java
+++ b/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1311.java
@@ -64,8 +64,6 @@
                 sh2023Api1311 = new SH2023Api1311();
                 sh2023Api1311.setSpjksbid(api1102.getXzqhdm() + "00401327" + String.valueOf(num).substring(1));
                 sh2023Api1311.setTdbh(sysData.getChanNum());
-                sh2023Api1311.setTdmc(sysData.getChanNum() + "鍙烽�氶亾");
-                sh2023Api1311.setJksbbm(sysData.getId());
                 sh2023Api1311.setJksbmc(sysData.getName());
                 sh2023Api1311.setKqdm(kqdm);
 
@@ -73,7 +71,6 @@
                 sh2023Api1311.setJkcs(getBrandId(sysData.getBrand()));
 
                 sh2023Api1311.setJkxh(sysData.getSn());
-                sh2023Api1311.setJkxlh(sysData.getSn());
 
                 sh2023Api1311.setSpjklx(StringUtils.isEmpty(sysData.getSpjklx()) ? "3" : sysData.getSpjklx());
                 sh2023Api1311.setSblxbm("1");
diff --git a/src/main/java/com/fzzy/otherview/sh2023/ShApi1311.view.xml b/src/main/java/com/fzzy/otherview/sh2023/ShApi1311.view.xml
index 3a0d42c..e772385 100644
--- a/src/main/java/com/fzzy/otherview/sh2023/ShApi1311.view.xml
+++ b/src/main/java/com/fzzy/otherview/sh2023/ShApi1311.view.xml
@@ -15,14 +15,6 @@
         <Property name="label">閫氶亾缂栧彿</Property>
         <Property name="required">true</Property>
       </PropertyDef>
-      <PropertyDef name="tdmc">
-        <Property name="label">閫氶亾鍚嶇О</Property>
-        <Property name="required">true</Property>
-      </PropertyDef>
-      <PropertyDef name="jksbbm">
-        <Property></Property>
-        <Property name="label">鐩戞帶璁惧缂栫爜</Property>
-      </PropertyDef>
       <PropertyDef name="jksbmc">
         <Property name="label">鐩戞帶璁惧鍚嶇О</Property>
       </PropertyDef>
@@ -71,10 +63,6 @@
       <PropertyDef name="jkxh">
         <Property></Property>
         <Property name="label">鐩戞帶鍨嬪彿</Property>
-      </PropertyDef>
-      <PropertyDef name="jkxlh">
-        <Property></Property>
-        <Property name="label">鐩戞帶搴忓垪鍙�</Property>
       </PropertyDef>
       <PropertyDef name="spjklx">
         <Property></Property>
diff --git a/src/main/java/com/fzzy/push/gd2022/ApiCodeConstant.java b/src/main/java/com/fzzy/push/gd2022/ApiCodeConstant.java
index 12a6045..dc47239 100644
--- a/src/main/java/com/fzzy/push/gd2022/ApiCodeConstant.java
+++ b/src/main/java/com/fzzy/push/gd2022/ApiCodeConstant.java
@@ -173,6 +173,10 @@
      */
     public static String API_CODE_CWBBXX = "cwbbxx";
     /**
+     * 鎺ュ彛缂栫爜-1041 璐㈠姟鎶ヨ〃淇℃伅鎺ュ彛
+     */
+    public static String API_CODE_QYXYXX = "qyxyxx";
+    /**
      * 鎺ュ彛缂栫爜-1042 鏂囦欢涓婁紶鎺ュ彛
      */
     public static String API_CODE_WJSC = "upload";
diff --git a/src/main/java/com/fzzy/push/gd2022/GD2022ApiRemoteService2022.java b/src/main/java/com/fzzy/push/gd2022/GD2022ApiRemoteService2022.java
index aa1f79d..251e9dd 100644
--- a/src/main/java/com/fzzy/push/gd2022/GD2022ApiRemoteService2022.java
+++ b/src/main/java/com/fzzy/push/gd2022/GD2022ApiRemoteService2022.java
@@ -668,7 +668,7 @@
             case "1112":
                 return ApiCodeConstant.API_CODE_RYXX;
             case "1113":
-                return "";
+                return ApiCodeConstant.API_CODE_QYXYXX;
             case "1201":
                 return ApiCodeConstant.API_CODE_HTXX;
             case "1202":
diff --git a/src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java b/src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java
index 2e0b758..4b2c9dc 100644
--- a/src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java
+++ b/src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java
@@ -399,6 +399,7 @@
             BeanUtils.copyProperties(apiData, api1204);
             api1204.setBjw(ShAreaBjw.getBjw(code));
 
+            //TODO 鏌ヨ鍚堝悓鑾峰彇鎵规鍙�
             //璁剧疆鎵规鍙�
             api1204.setPch(apiData.getHwdm() + DateFormatUtils.format(apiData.getJssj(), "yyyy"));
 
diff --git a/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1311.java b/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1311.java
index ee1837c..529b88c 100644
--- a/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1311.java
+++ b/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1311.java
@@ -29,12 +29,6 @@
     @PropertyDef(label = "閫氶亾缂栧彿")
     private Integer tdbh;
 
-    @PropertyDef(label = "閫氶亾鍚嶇О")
-    private String tdmc;
-
-    @PropertyDef(label = "鐩戞帶璁惧缂栫爜")
-    private String jksbbm;
-
     @PropertyDef(label = "鐩戞帶璁惧鍚嶇О")
     private String jksbmc;
 
@@ -50,9 +44,6 @@
 
     @PropertyDef(label = "鐩戞帶鍨嬪彿")
     private String jkxh;
-
-    @PropertyDef(label = "鐩戞帶搴忓垪鍙�")
-    private String jkxlh;
 
     /**
      * 1:浠撳唴锛�2:涓氬姟锛�

--
Gitblit v1.9.3