Browse Source

银行接口修改 2022年7月12日16点30分

纪新园 3 years ago
parent
commit
9a90243da3

+ 2 - 2
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/ccb/CargoInOutResult.java

@@ -7,10 +7,10 @@ import java.util.List;
 @Data
 public class CargoInOutResult {
 
-    private String result;
+   /* private String result;
 
     private String reason;
 
-    private List<CargoInfo> cargo;
+    private List<CargoInfo> cargo;*/
 
 }

+ 5 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/ccb/InCargoRsp.java

@@ -13,6 +13,10 @@ public class InCargoRsp {
 
     private String reqUser;
 
-    private List<CargoInOutResult> cargoInResults;
+    private String result;
+
+    private String reason;
+
+    private List<CargoInfo> cargoInResults;
 
 }

+ 5 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/ccb/OutCargoRsp.java

@@ -13,6 +13,10 @@ public class OutCargoRsp {
 
     private String reqUser;
 
-    private List<CargoInOutResult> cargoOutResults;
+    private String result;
+
+    private String reason;
+
+    private List<CargoInfo> cargoOutResults;
 
 }

+ 18 - 7
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -54,7 +54,6 @@ import com.ruoyi.warehouseBusiness.component.WarehouseBillsfilterService;
 import com.ruoyi.warehouseBusiness.component.impl.QueryWhgenlegServiceImpl;
 import com.ruoyi.warehouseBusiness.domain.*;
 import com.ruoyi.warehouseBusiness.domain.ccb.CargoInfo;
-import com.ruoyi.warehouseBusiness.domain.ccb.CargoInOutResult;
 import com.ruoyi.warehouseBusiness.domain.ccb.InCargoRsp;
 import com.ruoyi.warehouseBusiness.domain.ccb.OutCargoRsp;
 import com.ruoyi.warehouseBusiness.domain.dto.CalculateStorageFeesDTO;
@@ -4253,13 +4252,18 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                         + "requestTime=" + requestTime + "&"
                         + "body=" + JsonUtil.toJson(rsp);
 
-                CargoInOutResult inOutResult = new CargoInOutResult();
+                rsp.setResult("Y");
+                rsp.setCargoInResults(cargos);
+
+               /* CargoInOutResult inOutResult = new CargoInOutResult();
                 inOutResult.setResult("Y");
                 inOutResult.setCargo(cargos);
 
                 List<CargoInOutResult> inOutResults = new ArrayList<>();
                 inOutResults.add(inOutResult);
-                rsp.setCargoInResults(inOutResults);
+                rsp.setCargoInResults(inOutResults);*/
+
+                System.err.println("======" + JsonUtil.toJson(rsp));
 
                 OkHttpClient okHttpClient = new OkHttpClient();
                 Request request = new Request.Builder()
@@ -4267,12 +4271,14 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                         .addHeader("X-RC-AppId", CcbConstants.APP_ID)
                         .addHeader("X-RC-Sign", ShaUtil.sha256(str))
                         .addHeader("X-RC-SignType", "SHA256")
-                        .addHeader("X-RC-RequestTime", "application/json")
+                        .addHeader("X-RC-RequestTime", requestTime)
                         .addHeader("X-RC-RLF-Uid", CcbConstants.PLATFORM_ID)
                         .url(CcbConstants.IN_URL)
                         .post(RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), JsonUtil.toJson(rsp)))
                         .build();
 
+                System.err.println(request);
+
                 String s;
                 try {
                     s = Objects.requireNonNull(okHttpClient.newCall(request).execute().body()).string();
@@ -4597,13 +4603,18 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                             + "requestTime=" + requestTime + "&"
                             + "body=" + JsonUtil.toJson(rsp);
 
-                    CargoInOutResult inOutResult = new CargoInOutResult();
+                    rsp.setResult("Y");
+                    rsp.setCargoOutResults(cargos);
+
+                    System.err.println("=======" + rsp);
+
+                   /* CargoInOutResult inOutResult = new CargoInOutResult();
                     inOutResult.setResult("Y");
                     inOutResult.setCargo(cargos);
 
                     List<CargoInOutResult> inOutResults = new ArrayList<>();
                     inOutResults.add(inOutResult);
-                    rsp.setCargoOutResults(inOutResults);
+                    rsp.setCargoOutResults(inOutResults);*/
 
                     OkHttpClient okHttpClient = new OkHttpClient();
                     Request request = new Request.Builder()
@@ -4611,7 +4622,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                             .addHeader("X-RC-AppId", CcbConstants.APP_ID)
                             .addHeader("X-RC-Sign", ShaUtil.sha256(str))
                             .addHeader("X-RC-SignType", "SHA256")
-                            .addHeader("X-RC-RequestTime", "application/json")
+                            .addHeader("X-RC-RequestTime", requestTime)
                             .addHeader("X-RC-RLF-Uid", CcbConstants.PLATFORM_ID)
                             .url(CcbConstants.OUT_URL)
                             .post(RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), JsonUtil.toJson(rsp)))

+ 15 - 15
ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -797,22 +797,22 @@
             leg.f_trademodeid AS fTrademodeids,
             goods.f_packagespecs AS fPackagespecs,
             leg.f_goodsid AS fGoodsid,
-            IFNULL(SUM(leg.f_volumnD),0) AS fVolumnD,
-            IFNULL(SUM(leg.f_qtyD),0) AS fQtyD,
+            leg.f_volumnD AS fVolumnD,
+            leg.f_qtyD AS fQtyD,
             leg.f_mblno AS fMblno,
-            IFNULL(SUM(leg.f_grossweightD),0) AS fGrossweightD,
-            IFNULL(SUM(leg.f_netweightD),0) AS fNetweightD,
-            IFNULL(SUM(leg.f_volumnC),0) AS fVolumnC,
-            IFNULL(SUM(leg.f_volumnblc),0) AS fVolumnblc,
-            SUM(leg.f_qtyC) AS fQtyC,
+            leg.f_grossweightD AS fGrossweightD,
+            leg.f_netweightD AS fNetweightD,
+            leg.f_volumnC AS fVolumnC,
+            leg.f_volumnblc AS fVolumnblc,
+            leg.f_qtyC AS fQtyC,
             leg.f_business_type AS fBusinessType,
-            IFNULL(SUM(leg.f_grossweightC),0) AS fGrossweightC,
-            IFNULL(SUM(leg.f_netweightC),0) AS fNetweightC,
-            IFNULL(SUM(leg.f_qtyblc),0) AS fQtyblc,
+            leg.f_grossweightC AS fGrossweightC,
+            leg.f_netweightC AS fNetweightC,
+            leg.f_qtyblc AS fQtyblc,
             leg.f_billingway AS fBillingway,
             leg.f_chargedate AS fChargedate,
-            IFNULL(SUM(leg.f_grossweightblc),0) AS fGrossweightblc,
-            IFNULL(SUM(leg.f_netweightblc),0) AS fNetweightblc,
+            leg.f_grossweightblc AS fGrossweightblc,
+            leg.f_netweightblc AS fNetweightblc,
             dict.dict_label AS fBusinessTypes,
             leg.f_marks AS fMarks,
             DATE_FORMAT( leg.create_time, '%Y-%m-%d' ) AS createTime,
@@ -875,12 +875,12 @@
             <if test="fLocalcntrno != null  and fLocalcntrno != ''">and leg.f_localcntrno  LIKE  concat('%', #{fLocalcntrno}, '%')</if>
             <if test="fLocation != null  and fLocation ==0 ">and ware.ancestors  LIKE  concat('%', #{fWarehouseLocationid}, '%')</if>
             <if test="isCntrno == null">
-                GROUP BY leg.f_corpid, leg.f_originalbillno, leg.f_originalbilldate, leg.f_warehouse_locationid, leg.f_goodsid, leg.f_trademodeid
+                GROUP BY leg.f_corpid, leg.f_originalbillno, leg.f_originalbilldate, leg.f_warehouse_locationid, leg.f_goodsid, leg.f_trademodeid,leg.f_marks
             </if>
             <if test="isCntrno == 1 ">
-                GROUP BY leg.f_corpid, leg.f_originalbillno, leg.f_originalbilldate, leg.f_warehouse_locationid, leg.f_goodsid, leg.f_trademodeid,leg.f_cntrno
+                GROUP BY leg.f_corpid, leg.f_originalbillno, leg.f_originalbilldate, leg.f_warehouse_locationid, leg.f_goodsid, leg.f_trademodeid,leg.f_cntrno,leg.f_marks
             </if>
-            <if test="isCntrno == 2 ">GROUP BY leg.f_corpid, leg.f_mblno, leg.f_goodsid, leg.f_warehouseid</if>
+            <if test="isCntrno == 2 ">GROUP BY leg.f_corpid, leg.f_mblno, leg.f_goodsid, leg.f_warehouseid,leg.f_marks</if>
         </where>
         ${params.dataScope}
         order by leg.f_bsdate desc