|
|
|
@ -101,7 +101,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 发票开具 |
|
|
|
|
* |
|
|
|
|
* v6 |
|
|
|
|
* @param billInfo |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
@ -310,7 +310,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 单个发票查询接口 |
|
|
|
|
* |
|
|
|
|
* V6 |
|
|
|
|
* @param billInfo |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
@ -505,7 +505,8 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
debugLog("断点12", uuid, timestamp); |
|
|
|
|
// 上传文件到oss
|
|
|
|
|
String defaultStorage = configService.selectConfigByKey("default_storage"); |
|
|
|
|
if (StringUtils.isNotEmpty(defaultStorage) && StringUtils.isEmpty(invoice.getInvoicePdfUrl())) { |
|
|
|
|
// TODO: 2023/10/23 中交建暂时关闭
|
|
|
|
|
/*if (StringUtils.isNotEmpty(defaultStorage) && StringUtils.isEmpty(invoice.getInvoicePdfUrl())) { |
|
|
|
|
try { |
|
|
|
|
IStorageService service = storageFactory.getStorageInstance(defaultStorage); |
|
|
|
|
String pdfzjl = ddfpxx.getPDFZJL(); |
|
|
|
@ -532,7 +533,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
} catch (JianshiSystemErrorException e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}*/ |
|
|
|
|
debugLog("断点13", uuid, timestamp); |
|
|
|
|
|
|
|
|
|
if (invoice.getId() != null) { |
|
|
|
@ -1022,6 +1023,9 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
@Override |
|
|
|
|
public HXResponse uploadRedInfo(Redinfo redinfo, Companyservice companyservice) { |
|
|
|
|
|
|
|
|
|
// TODO: 2023/10/23 一步的红字上传接口
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理redinfo
|
|
|
|
|
redinfo.setCompanyId(companyservice.getCompanyid()); |
|
|
|
|
redinfo.setSystemOrderno(IdUtils.randomSystemOrderno()); |
|
|
|
@ -1118,7 +1122,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
queryResult.put("msg", dxhyInterfaceResponse.getMessage()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.info("【销项发票】【大象发票】红字信息表上传请求结果{}", queryResult.toString()); |
|
|
|
|
log.info("【销项发票】【大象发票V6】红字信息表上传请求结果{}", queryResult.toString()); |
|
|
|
|
|
|
|
|
|
// 判断外层报文是否成功
|
|
|
|
|
if (queryResult.isError()) { |
|
|
|
@ -1135,6 +1139,8 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
contentJson = queryResult.getJsonData(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TODO: 2023/10/23 处理回填字段
|
|
|
|
|
|
|
|
|
|
// 外部状态代码
|
|
|
|
|
String ztdm = contentJson.getString("ZTDM"); |
|
|
|
|
if (StringUtils.equals("060111", ztdm) || StringUtils.equals("060001", ztdm)) { |
|
|
|
@ -1155,6 +1161,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
JSONArray hzsqdscjg = contentJson.getJSONArray("HZSQDSCJG"); |
|
|
|
|
String ztxx = "同步成功"; |
|
|
|
|
ztdm = "0000"; |
|
|
|
|
String queryId = ""; |
|
|
|
|
for (int i = 0; i < hzsqdscjg.size(); i++) { |
|
|
|
|
JSONObject temp = hzsqdscjg.getJSONObject(i); |
|
|
|
|
QueryWrapper<Redinfo> queryWrapper = new QueryWrapper<>(); |
|
|
|
@ -1180,12 +1187,31 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
ztxx = temp.getString("ZTXX"); |
|
|
|
|
ztdm = "9999"; |
|
|
|
|
} |
|
|
|
|
queryId = myRedinfo.getSystemOrderno(); |
|
|
|
|
redinfoMapper.updateRedinfo(myRedinfo); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 存入金四关联日志表
|
|
|
|
|
if("0000".equals(ztxx) && StrUtil.isNotEmpty(queryId)){ |
|
|
|
|
InvoiceAllApiLog allApiLog = new InvoiceAllApiLog(); |
|
|
|
|
allApiLog.setUrl(WebServiceConstant.SQHZFPXXQRD); |
|
|
|
|
allApiLog.setSendMsg(""); |
|
|
|
|
allApiLog.setResultMsg(""); |
|
|
|
|
allApiLog.setCompany(companyservice.getSellertax()); |
|
|
|
|
allApiLog.setIdentityId(companyservice.getIdentity()); |
|
|
|
|
allApiLog.setRequestId(queryId); |
|
|
|
|
allApiLog.setCreateTime(new Date()); |
|
|
|
|
allApiLog.setCompanyName("大象V6"); |
|
|
|
|
allApiLogMapper.insertInvoiceAllApiLog(allApiLog); |
|
|
|
|
|
|
|
|
|
HXResponse response = new HXResponse("0000", "申请成功"); |
|
|
|
|
response.put("queryid", queryId); |
|
|
|
|
return response; |
|
|
|
|
}else{ |
|
|
|
|
return new HXResponse(ztxx); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return new HXResponse(ztdm, ztxx); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1914,25 +1940,33 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
response.put("data", invoice); |
|
|
|
|
|
|
|
|
|
return response; |
|
|
|
|
}else if (WebServiceConstant.FPEWMXZ.equals(finalServiceId)) { |
|
|
|
|
}else if (WebServiceConstant.QRCODE.equals(finalServiceId)) { |
|
|
|
|
// 获取人脸二维码
|
|
|
|
|
|
|
|
|
|
} else if (WebServiceConstant.ADD_RED_INVOICE.equals(finalServiceId)) { |
|
|
|
|
}else if (WebServiceConstant.SQHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
|
// 申请红字信息表
|
|
|
|
|
|
|
|
|
|
} else if (WebServiceConstant.KSHC.equals(finalServiceId)) { |
|
|
|
|
|
|
|
|
|
}else if (WebServiceConstant.ADD_RED_INVOICE.equals(finalServiceId)) { |
|
|
|
|
// 红字发票开具
|
|
|
|
|
|
|
|
|
|
} else if (WebServiceConstant.CXHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
|
}else if (WebServiceConstant.CXHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
|
// 查询红字信息表
|
|
|
|
|
|
|
|
|
|
} else if (WebServiceConstant.SHHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
|
// 审核红字信息表
|
|
|
|
|
|
|
|
|
|
} else if (WebServiceConstant.QDFPWJHQ.equals(finalServiceId)) { |
|
|
|
|
} else if (WebServiceConstant.FPEWMXZ.equals(finalServiceId)) { |
|
|
|
|
// 获取发票下载地址
|
|
|
|
|
|
|
|
|
|
} else if (WebServiceConstant.QRCODE.equals(finalServiceId)) { |
|
|
|
|
} else if (WebServiceConstant.KSHC.equals(finalServiceId)) { |
|
|
|
|
// 快速红冲
|
|
|
|
|
|
|
|
|
|
} else if (WebServiceConstant.SQHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
|
|
|
|
|
|
} else if (WebServiceConstant.QDFPWJHQ.equals(finalServiceId)) { |
|
|
|
|
// 全电发票文件获取
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
} else{ |
|
|
|
|
return new HXResponse("功能升级中~请稍等~"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|