|
|
@ -87,6 +87,31 @@ public class InvoicePushServiceImpl implements InvoicePushService { |
|
|
|
r.put(OrderManagementConstant.ALL_MESSAGE, "推送内容为空"); |
|
|
|
r.put(OrderManagementConstant.ALL_MESSAGE, "推送内容为空"); |
|
|
|
return r; |
|
|
|
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); |
|
|
|
CommonTsMqData fpTsMqData = JSONObject.parseObject(pushInfoRecord.getPushContent(), CommonTsMqData.class); |
|
|
|
List<String> shList = new ArrayList<>(); |
|
|
|
List<String> shList = new ArrayList<>(); |
|
|
|
shList.add(fpTsMqData.getNsrsbh()); |
|
|
|
shList.add(fpTsMqData.getNsrsbh()); |
|
|
@ -94,13 +119,7 @@ public class InvoicePushServiceImpl implements InvoicePushService { |
|
|
|
String pushUrl = ""; |
|
|
|
String pushUrl = ""; |
|
|
|
String errorMsg = ""; |
|
|
|
String errorMsg = ""; |
|
|
|
String xtly = "SAP"; |
|
|
|
String xtly = "SAP"; |
|
|
|
PushInfo pushInfo = new PushInfo(); |
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
//查询推送地址
|
|
|
|
|
|
|
|
pushInfo.setId(pushInfoRecord.getPushInfoId()); |
|
|
|
|
|
|
|
pushInfo = pushInfoMapper.selectByPushInfo(pushInfo); |
|
|
|
|
|
|
|
log.info("查询到的推送地址信息:{}", JsonUtils.getInstance().toJsonString(pushInfo)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (pushInfo == null) { |
|
|
|
if (pushInfo == null) { |
|
|
|
log.warn("{}税号:{},推送地址没有配置", LOGGER_MSG, fpTsMqData.getNsrsbh()); |
|
|
|
log.warn("{}税号:{},推送地址没有配置", LOGGER_MSG, fpTsMqData.getNsrsbh()); |
|
|
|
String error = "税号:" + fpTsMqData.getNsrsbh() + ",推送地址没有配置"; |
|
|
|
String error = "税号:" + fpTsMqData.getNsrsbh() + ",推送地址没有配置"; |
|
|
@ -129,23 +148,6 @@ public class InvoicePushServiceImpl implements InvoicePushService { |
|
|
|
r.put(OrderManagementConstant.ALL_MESSAGE, error); |
|
|
|
r.put(OrderManagementConstant.ALL_MESSAGE, error); |
|
|
|
return r; |
|
|
|
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; |
|
|
|
OrderProcessInfo orderProcessInfo = null; |
|
|
|
Map<String, String> requestMap = commonDisposeService.getRequestParameter(pushInfo.getNsrsbh(), pushInfo.getZipCode(), pushInfo.getEncryptCode(), content, pushInfo.getPushUrl(), pushInfo.getInterfaceType(), pushInfo.getVersionIdent()); |
|
|
|
Map<String, String> requestMap = commonDisposeService.getRequestParameter(pushInfo.getNsrsbh(), pushInfo.getZipCode(), pushInfo.getEncryptCode(), content, pushInfo.getPushUrl(), pushInfo.getInterfaceType(), pushInfo.getVersionIdent()); |
|
|
|