|
|
@@ -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) {
|