This commit is contained in:
linfso 2024-08-07 16:42:27 +08:00
parent 1b3e600141
commit e32fa93b1d

View File

@ -257,9 +257,6 @@ public class EmisSettleInvoiceChRecordServiceImpl implements IEmisSettleInvoiceC
String token = HXSdk.getToken(emisBaseInvoiceChInfo.getAppKey(), emisBaseInvoiceChInfo.getAppSecret());
EmisSettleInvoiceChRecord updRecord = new EmisSettleInvoiceChRecord();
updRecord.setId(itemRecord.getId());
// 立即查询状态
JSONObject jQRst = HXSdk.queryInvoiceResult(itemRecord.getReqNo(), token);
if ("00000".equals(jQRst.getString("code"))) {
@ -267,6 +264,9 @@ public class EmisSettleInvoiceChRecordServiceImpl implements IEmisSettleInvoiceC
JSONArray jInvoiceInfos = data.getJSONArray("invoiceInfos");
if (!CollectionUtils.isEmpty(jInvoiceInfos)) {
EmisSettleInvoiceChRecord updRecord=new EmisSettleInvoiceChRecord();
updRecord.setId(itemRecord.getId());
JSONObject item0 = jInvoiceInfos.getJSONObject(0);
if ("2".equals(item0.getString("status"))) {
updRecord.setFilePath(item0.getString("pdfUrl"));
@ -287,7 +287,7 @@ public class EmisSettleInvoiceChRecordServiceImpl implements IEmisSettleInvoiceC
// 更新渠道开票状态,更新下载文件
// 开票成功
// 更新开票状态
EmisSettleInvoiceRecord oldApply=emisSettleInvoiceRecordMapper.selectInvoiceRecordByApplySeqNo(updRecord.getApplySeqNo());
EmisSettleInvoiceRecord oldApply=emisSettleInvoiceRecordMapper.selectInvoiceRecordByApplySeqNo(itemRecord.getApplySeqNo());
EmisSettleInvoiceRecord newApply = new EmisSettleInvoiceRecord();
newApply.setId(oldApply.getId());
newApply.setInvoiceStatus(updRecord.getOpenChStatus());