yangdamao 3 месяцев назад
Родитель
Сommit
964d47740a

+ 1 - 0
zhongzheng-admin-saas/src/main/resources/application-dev.yml

@@ -135,6 +135,7 @@ oldStudySys:
     salePassword: http://gdxypx.xy.com/WitSystem/BussinessApi/GetSaleInfo
     updateInvoicePath: http://gdxypx.xy.com/system/BussinessApi/UpdateInvoiceData
     createExamPath: http://gdxypx.xy.com/system/BussinessApi/CreateSameClass
+    saveInvoice: http://gdxypx.xy.com/WitSystem/BussinessApi/InvoiceUpdate
 
 officialPush:
     infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan

+ 1 - 0
zhongzheng-admin-saas/src/main/resources/application-prod.yml

@@ -135,6 +135,7 @@ oldStudySys:
     salePassword: http://www.xyyxt.net/WitSystem/BussinessApi/GetSaleInfo
     updateInvoicePath: http://www.xyyxt.net/system/BussinessApi/UpdateInvoiceData
     createExamPath: http://www.xyyxt.net/system/BussinessApi/CreateSameClass
+    saveInvoice: https://www.xyyxt.net/WitSystem/BussinessApi/InvoiceUpdate
 
 officialPush:
     infoPath: https://jypt.gdcic.net/organjxjy/ShangBaoMingdan

+ 1 - 0
zhongzheng-admin/src/main/resources/application-dev.yml

@@ -135,6 +135,7 @@ oldStudySys:
     salePassword: http://gdxypx.xy.com/WitSystem/BussinessApi/GetSaleInfo
     updateInvoicePath: http://gdxypx.xy.com/system/BussinessApi/UpdateInvoiceData
     createExamPath: http://gdxypx.xy.com/system/BussinessApi/CreateSameClass
+    saveInvoice: http://gdxypx.xy.com/WitSystem/BussinessApi/InvoiceUpdate
 
 officialPush:
     infoPath: closehttps://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan

+ 1 - 0
zhongzheng-admin/src/main/resources/application-prod.yml

@@ -135,6 +135,7 @@ oldStudySys:
     salePassword: http://www.xyyxt.net/WitSystem/BussinessApi/GetSaleInfo
     updateInvoicePath: http://www.xyyxt.net/system/BussinessApi/UpdateInvoiceData
     createExamPath: http://www.xyyxt.net/system/BussinessApi/CreateSameClass
+    saveInvoice: https://www.xyyxt.net/WitSystem/BussinessApi/InvoiceUpdate
 
 officialPush:
     infoPath: https://jypt.gdcic.net/organjxjy/ShangBaoMingdan

+ 2 - 1
zhongzheng-api/src/main/resources/application-dev.yml

@@ -137,7 +137,8 @@ oldStudySys:
     classOpenPath: http://gdxypx.xy.com/System/BussinessApi/OpenClass
     salePassword: http://gdxypx.xy.com/WitSystem/BussinessApi/GetSaleInfo
     updateInvoicePath: http://gdxypx.xy.com/system/BussinessApi/UpdateInvoiceData
-    createExamPath: http://gdxypx.xy.com/system/BussinessApi/CreateSameClass0
+    createExamPath: http://gdxypx.xy.com/system/BussinessApi/CreateSameClass
+    saveInvoice: http://gdxypx.xy.com/WitSystem/BussinessApi/InvoiceUpdate
 
 officialPush:
     infoPath: https://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan

+ 1 - 0
zhongzheng-api/src/main/resources/application-prod.yml

@@ -147,6 +147,7 @@ oldStudySys:
     salePassword: http://www.xyyxt.net/WitSystem/BussinessApi/GetSaleInfo
     updateInvoicePath: http://www.xyyxt.net/system/BussinessApi/UpdateInvoiceData
     createExamPath: http://www.xyyxt.net/system/BussinessApi/CreateSameClass
+    saveInvoice: https://www.xyyxt.net/WitSystem/BussinessApi/InvoiceUpdate
 
 officialPush:
     infoPath: https://jypt.gdcic.net/organjxjy/ShangBaoMingdan

+ 26 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/goods/service/impl/TopOldOrderServiceImpl.java

@@ -322,6 +322,9 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
     @Value("${shared.saleData}")
     private String SHARED_SALE_DATA;
 
+    @Value("${oldStudySys.saveInvoice}")
+    private String OLD_SAVE_INVOICE;
+
 
     @Override
     public TopOldOrderVo queryById(String orderSn) {
@@ -5198,6 +5201,7 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
         if (ObjectUtils.isNull(order)){
             throw new CustomException("订单查询失败,请检查订单号");
         }
+
         //新增发票
         TopNuoMplatformLog entity = new TopNuoMplatformLog();
         entity.setOrderNo(bo.getOrderSn());
@@ -5212,9 +5216,30 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
         topNuoMplatformLogService.save(entity);
 
         //修改订单发票状态
-        return update(new LambdaUpdateWrapper<TopOldOrder>()
+        update(new LambdaUpdateWrapper<TopOldOrder>()
                 .eq(TopOldOrder::getOrderSn,bo.getOrderSn())
                 .set(TopOldOrder::getInvoiceStatus,1));
+
+        //通知旧系统
+        Map<String, String> params = new HashMap<>();
+        Long nowTime = DateUtils.getNowTime();
+        String sign = ToolsUtils.EncoderByMd5(nowTime.toString() + "pubilc2022");
+        params.put("stamp", nowTime.toString());
+        params.put("sign", sign);
+        params.put("orderSn", order.getOrderSn());
+        params.put("invoiceUrl", bo.getInvoiceUrl());
+        String respone = "";
+        String path = OLD_SAVE_INVOICE;
+        try {
+            respone = HttpUtils.postFormBody(path, params);
+            if (!respone.contains("\"Status\":true")) {
+                throw new CustomException("旧系统新增发票接口请求错误" + respone);
+            }
+        } catch (IOException e) {
+            throw new CustomException("旧系统新增发票接口请求错误" + e.getMessage());
+        }
+
+        return true;
     }
 
     private String hideIDCard(String idCard) {