|
|
@@ -94,7 +94,7 @@ public class ElecInvoiceTask {
|
|
|
@Scheduled(cron = "0 0/2 * * * ?")
|
|
|
//PDF文件转存 一次转存
|
|
|
public void elecInvoiceAttachSave(){
|
|
|
- List<Object[]> obsList=baseDao.getFieldsDatasByCondition("YITOA_DATACENTER.dock_invoice_config",new String[]{"appKey","appSecret","token","taxnum","username"},"1=1");
|
|
|
+ List<Object[]> obsList=baseDao.getFieldsDatasByCondition("YITOA_DATACENTER.dock_invoice_config",new String[]{"appKey","appSecret","token","taxnum","username","INVOICE_PATH"},"1=1");
|
|
|
if(!CollectionUtil.isEmpty(obsList)){
|
|
|
logger.info("ElecI-AttachSave Begin");
|
|
|
for (Object[] obs: obsList) {
|
|
|
@@ -116,7 +116,7 @@ public class ElecInvoiceTask {
|
|
|
// 定义要保存的文件的路径
|
|
|
String fileName = ioList.getGeneralString("cu_name")+ioList.getGeneralString("ei_refno")+".pdf";//发票号码
|
|
|
String fileBasePath = "C:\\invoice\\"+fileName;//发票号码
|
|
|
- fileBasePath = "/usr/local/uas/invoice/"+fileName;//发票号码
|
|
|
+ fileBasePath = String.valueOf(obs[5])+fileName;//发票储存路径
|
|
|
try {
|
|
|
// 创建URL对象
|
|
|
URL url = new URL(fileUrl);
|
|
|
@@ -262,7 +262,7 @@ public class ElecInvoiceTask {
|
|
|
@Scheduled(cron = "0 0/2 * * * ?")
|
|
|
//红字PDF文件转存 一次转存
|
|
|
public void elecInvoiceRedAttachSave(){
|
|
|
- List<Object[]> obsList=baseDao.getFieldsDatasByCondition("YITOA_DATACENTER.dock_invoice_config",new String[]{"appKey","appSecret","token","taxnum","username"},"1=1");
|
|
|
+ List<Object[]> obsList=baseDao.getFieldsDatasByCondition("YITOA_DATACENTER.dock_invoice_config",new String[]{"appKey","appSecret","token","taxnum","username","INVOICE_PATH"},"1=1");
|
|
|
if(!CollectionUtil.isEmpty(obsList)){
|
|
|
logger.info("ElecI-AttachSave Begin");
|
|
|
for (Object[] obs: obsList) {
|
|
|
@@ -284,7 +284,7 @@ public class ElecInvoiceTask {
|
|
|
// 定义要保存的文件的路径
|
|
|
String fileName = ioList.getGeneralString("cu_name")+ioList.getGeneralString("ei_relativerefno")+".pdf";//发票号码
|
|
|
String fileBasePath = "C:\\invoice\\"+fileName;//发票号码
|
|
|
- fileBasePath = "/usr/local/uas/invoice/"+fileName;//发票号码
|
|
|
+ fileBasePath = String.valueOf(obs[5])+fileName;//发票储存路径
|
|
|
try {
|
|
|
// 创建URL对象
|
|
|
URL url = new URL(fileUrl);
|