增加推送开票信息回写
This commit is contained in:
@@ -56,9 +56,9 @@ public class PowerFeePushJob extends AbstractQuartzTask {
|
|||||||
PowerFeeInvoiceInfo invoiceInfo = null;
|
PowerFeeInvoiceInfo invoiceInfo = null;
|
||||||
if(columns != null && columns.size() > 0) {
|
if(columns != null && columns.size() > 0) {
|
||||||
for (FormColumn column : columns) {
|
for (FormColumn column : columns) {
|
||||||
|
String formId = column.getId();
|
||||||
try {
|
try {
|
||||||
invoiceInfo = new PowerFeeInvoiceInfo();
|
invoiceInfo = new PowerFeeInvoiceInfo();
|
||||||
String formId = column.getId();
|
|
||||||
if(column.getVos() == null) {
|
if(column.getVos() == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -96,16 +96,23 @@ public class PowerFeePushJob extends AbstractQuartzTask {
|
|||||||
throw new RuntimeException("某些必传参数为空,请检查金额、单价、手机号、订单请求流水号、纳税识别号等信息");
|
throw new RuntimeException("某些必传参数为空,请检查金额、单价、手机号、订单请求流水号、纳税识别号等信息");
|
||||||
}
|
}
|
||||||
|
|
||||||
fillService.pushInvoiceInfo(param,secretKey,secretId,url);
|
String respText = fillService.pushInvoiceInfo(param, secretKey, secretId, url);
|
||||||
List<FormUpdateField> updateFiels = new ArrayList<>();
|
List<FormUpdateField> updateFiels = new ArrayList<>();
|
||||||
updateFiels.add(FormUpdateField.build().display("是否推送开票系统").value("是"));
|
updateFiels.add(FormUpdateField.build().display("是否推送开票系统").value("是"));
|
||||||
updateFiels.add(FormUpdateField.build().display("订单请求流水号").value(ddqqlsh));
|
updateFiels.add(FormUpdateField.build().display("订单请求流水号").value(ddqqlsh));
|
||||||
|
updateFiels.add(FormUpdateField.build().display("开票接口返回").value(respText));
|
||||||
List<FormWhereCondition> whereClause = new ArrayList<>();
|
List<FormWhereCondition> whereClause = new ArrayList<>();
|
||||||
whereClause.add(FormWhereCondition.build().display("ID").value(Long.parseLong(formId)).clauseFactor(ClauseFactor.EQ));
|
whereClause.add(FormWhereCondition.build().display("ID").value(Long.parseLong(formId)).clauseFactor(ClauseFactor.EQ));
|
||||||
powerFeeService.updateForm(updateFiels,whereClause,formNo);
|
powerFeeService.updateForm(updateFiels,whereClause,formNo);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
log.error("推送失败,请求批次号为:" + invoiceInfo.getReqNo() + " ,失败原因为: "+ e.getMessage());
|
log.error("推送失败,请求批次号为:" + invoiceInfo.getReqNo() + " ,失败原因为: "+ e.getMessage());
|
||||||
log.error(e);
|
log.error(e);
|
||||||
|
List<FormUpdateField> updateFiels = new ArrayList<>();
|
||||||
|
updateFiels.add(FormUpdateField.build().display("是否推送开票系统").value("是"));
|
||||||
|
updateFiels.add(FormUpdateField.build().display("开票接口返回").value("推送出现异常: " + e.getMessage()));
|
||||||
|
List<FormWhereCondition> whereClause = new ArrayList<>();
|
||||||
|
whereClause.add(FormWhereCondition.build().display("ID").value(Long.parseLong(formId)).clauseFactor(ClauseFactor.EQ));
|
||||||
|
powerFeeService.updateForm(updateFiels,whereClause,formNo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ public class HxInvoiceInfoFillService {
|
|||||||
return jsonObject.toString();
|
return jsonObject.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void pushInvoiceInfo(String params,String secretKey,String secretId,String url) throws Exception {
|
public String pushInvoiceInfo(String params,String secretKey,String secretId,String url) throws Exception {
|
||||||
// String secretKey = "IGedAOlfMsPotl7WXePNPSNdPtjnvn85Tvt9";
|
// String secretKey = "IGedAOlfMsPotl7WXePNPSNdPtjnvn85Tvt9";
|
||||||
// secretId
|
// secretId
|
||||||
// String secretId = "NfD7rBPYAk1Zod37wqlB4wWdgSFtRgMj";
|
// String secretId = "NfD7rBPYAk1Zod37wqlB4wWdgSFtRgMj";
|
||||||
@@ -304,8 +304,8 @@ public class HxInvoiceInfoFillService {
|
|||||||
log.info("开票信息推送成功: " + hxinvoiceResponse.getData());
|
log.info("开票信息推送成功: " + hxinvoiceResponse.getData());
|
||||||
System.out.println("推送成功显示" + hxinvoiceResponse.getMsg());
|
System.out.println("推送成功显示" + hxinvoiceResponse.getMsg());
|
||||||
} else {
|
} else {
|
||||||
System.out.println(hxinvoiceResponse.getMsg());
|
|
||||||
log.info("电费发票信息推送失败: " + hxinvoiceResponse.getMsg());
|
log.info("电费发票信息推送失败: " + hxinvoiceResponse.getMsg());
|
||||||
}
|
}
|
||||||
|
return hxinvoiceResponse.getMsg();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user