diff --git a/v5/apps-customize/src/main/java/com/seeyon/apps/src_powerfeeinvoice/job/PowerFeePushJob.java b/v5/apps-customize/src/main/java/com/seeyon/apps/src_powerfeeinvoice/job/PowerFeePushJob.java index f058cb1..0bc0a63 100644 --- a/v5/apps-customize/src/main/java/com/seeyon/apps/src_powerfeeinvoice/job/PowerFeePushJob.java +++ b/v5/apps-customize/src/main/java/com/seeyon/apps/src_powerfeeinvoice/job/PowerFeePushJob.java @@ -56,9 +56,9 @@ public class PowerFeePushJob extends AbstractQuartzTask { PowerFeeInvoiceInfo invoiceInfo = null; if(columns != null && columns.size() > 0) { for (FormColumn column : columns) { + String formId = column.getId(); try { invoiceInfo = new PowerFeeInvoiceInfo(); - String formId = column.getId(); if(column.getVos() == null) { continue; } @@ -96,16 +96,23 @@ public class PowerFeePushJob extends AbstractQuartzTask { throw new RuntimeException("某些必传参数为空,请检查金额、单价、手机号、订单请求流水号、纳税识别号等信息"); } - fillService.pushInvoiceInfo(param,secretKey,secretId,url); + String respText = fillService.pushInvoiceInfo(param, secretKey, secretId, url); List updateFiels = new ArrayList<>(); updateFiels.add(FormUpdateField.build().display("是否推送开票系统").value("是")); updateFiels.add(FormUpdateField.build().display("订单请求流水号").value(ddqqlsh)); + updateFiels.add(FormUpdateField.build().display("开票接口返回").value(respText)); List whereClause = new ArrayList<>(); whereClause.add(FormWhereCondition.build().display("ID").value(Long.parseLong(formId)).clauseFactor(ClauseFactor.EQ)); powerFeeService.updateForm(updateFiels,whereClause,formNo); }catch (Exception e) { log.error("推送失败,请求批次号为:" + invoiceInfo.getReqNo() + " ,失败原因为: "+ e.getMessage()); log.error(e); + List updateFiels = new ArrayList<>(); + updateFiels.add(FormUpdateField.build().display("是否推送开票系统").value("是")); + updateFiels.add(FormUpdateField.build().display("开票接口返回").value("推送出现异常: " + e.getMessage())); + List whereClause = new ArrayList<>(); + whereClause.add(FormWhereCondition.build().display("ID").value(Long.parseLong(formId)).clauseFactor(ClauseFactor.EQ)); + powerFeeService.updateForm(updateFiels,whereClause,formNo); } } } diff --git a/v5/apps-customize/src/main/java/com/seeyon/apps/src_powerfeeinvoice/service/HxInvoiceInfoFillService.java b/v5/apps-customize/src/main/java/com/seeyon/apps/src_powerfeeinvoice/service/HxInvoiceInfoFillService.java index e38cf83..409e4bb 100644 --- a/v5/apps-customize/src/main/java/com/seeyon/apps/src_powerfeeinvoice/service/HxInvoiceInfoFillService.java +++ b/v5/apps-customize/src/main/java/com/seeyon/apps/src_powerfeeinvoice/service/HxInvoiceInfoFillService.java @@ -210,7 +210,7 @@ public class HxInvoiceInfoFillService { 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"; // secretId // String secretId = "NfD7rBPYAk1Zod37wqlB4wWdgSFtRgMj"; @@ -304,8 +304,8 @@ public class HxInvoiceInfoFillService { log.info("开票信息推送成功: " + hxinvoiceResponse.getData()); System.out.println("推送成功显示" + hxinvoiceResponse.getMsg()); } else { - System.out.println(hxinvoiceResponse.getMsg()); log.info("电费发票信息推送失败: " + hxinvoiceResponse.getMsg()); } + return hxinvoiceResponse.getMsg(); } }