Merge branch 'feature/push_record' into test

release
wangrangrang 2 years ago
commit bce863feee
  1. 2
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/PushInvoiceServiceImpl.java
  2. 48
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/InvoicePushServiceImpl.java

@ -476,7 +476,7 @@ public class PushInvoiceServiceImpl implements PushInvoiceService {
PushInfo pushInfo1 = new PushInfo();
pushInfo1.setId(pushInfo.getId());
pushInfo1.setByzd1("YXXT");
failPush(null,JsonUtils.getInstance().toJsonString(fpTsMqData),error,e.getMessage(),pushInfo1,fpTsMqData.getPushType());
failPush(null,content,error,e.getMessage(),pushInfo1,fpTsMqData.getPushType());
e.printStackTrace();
}
OrderProcessInfo orderProcessInfo = null;

@ -87,6 +87,31 @@ public class InvoicePushServiceImpl implements InvoicePushService {
r.put(OrderManagementConstant.ALL_MESSAGE, "推送内容为空");
return r;
}
PushInfo pushInfo = new PushInfo();
//查询推送地址
pushInfo.setId(pushInfoRecord.getPushInfoId());
pushInfo = pushInfoMapper.selectByPushInfo(pushInfo);
log.info("查询到的推送地址信息:{}", JsonUtils.getInstance().toJsonString(pushInfo));
//判断是不是影像的推送
if ("YXXT".equals(pushInfoRecord.getQyType())) {
String pushType = pushInfoRecord.getInterfacePushType();
try {
//推送影像系统
pushInvoiceService.sendImageSys(pushInfoRecord.getPushContent(), pushType, pushInfo);
return r;
} catch (Exception e) {
String error = String.format("影像推送出现异常%s,推送类型%s", e.getMessage(), pushType);
log.error(error);
pushInfo.setByzd1("YXXT");
pushInvoiceService.failPush(pushInfoRecordId, pushInfoRecord.getPushContent(), error, e.getMessage(), pushInfo, pushType);
e.printStackTrace();
r.put(OrderManagementConstant.CODE, "9999");
r.put(OrderManagementConstant.ALL_MESSAGE, error);
return r;
}
}
CommonTsMqData fpTsMqData = JSONObject.parseObject(pushInfoRecord.getPushContent(), CommonTsMqData.class);
List<String> shList = new ArrayList<>();
shList.add(fpTsMqData.getNsrsbh());
@ -94,13 +119,7 @@ public class InvoicePushServiceImpl implements InvoicePushService {
String pushUrl = "";
String errorMsg = "";
String xtly = "SAP";
PushInfo pushInfo = new PushInfo();
try {
//查询推送地址
pushInfo.setId(pushInfoRecord.getPushInfoId());
pushInfo = pushInfoMapper.selectByPushInfo(pushInfo);
log.info("查询到的推送地址信息:{}", JsonUtils.getInstance().toJsonString(pushInfo));
if (pushInfo == null) {
log.warn("{}税号:{},推送地址没有配置", LOGGER_MSG, fpTsMqData.getNsrsbh());
String error = "税号:" + fpTsMqData.getNsrsbh() + ",推送地址没有配置";
@ -129,23 +148,6 @@ public class InvoicePushServiceImpl implements InvoicePushService {
r.put(OrderManagementConstant.ALL_MESSAGE, error);
return r;
}
//判断是不是影像的推送
if ("YXXT".equals(pushInfoRecord.getQyType())) {
try {
//推送影像系统
pushInvoiceService.sendImageSys(content, fpTsMqData.getPushType(), pushInfo);
return r;
} catch (Exception e) {
String error = String.format("影像推送出现异常%s,推送类型%s", e.getMessage(), fpTsMqData.getPushType());
log.error(error);
pushInfo.setByzd1("YXXT");
pushInvoiceService.failPush(pushInfoRecordId, JsonUtils.getInstance().toJsonString(fpTsMqData), error, e.getMessage(), pushInfo, fpTsMqData.getPushType());
e.printStackTrace();
r.put(OrderManagementConstant.CODE, "9999");
r.put(OrderManagementConstant.ALL_MESSAGE, error);
return r;
}
}
OrderProcessInfo orderProcessInfo = null;
Map<String, String> requestMap = commonDisposeService.getRequestParameter(pushInfo.getNsrsbh(), pushInfo.getZipCode(), pushInfo.getEncryptCode(), content, pushInfo.getPushUrl(), pushInfo.getInterfaceType(), pushInfo.getVersionIdent());

Loading…
Cancel
Save