|
|
|
@ -75,7 +75,7 @@ public class PoolAddTaxThread extends BaseThread { |
|
|
|
|
private final String[] detailTitleColumns = |
|
|
|
|
{"序号", "发票代码", "发票号码", "货物或应税劳务名称", "规格型号", "单位", "数量", "单价", "金额", "税额", "税率", "车牌号", "类型", "通行日期起", "通行日期止"}; |
|
|
|
|
|
|
|
|
|
// private Sheet sheet;
|
|
|
|
|
// private Sheet sheet;
|
|
|
|
|
// private Table table;
|
|
|
|
|
private WriteSheet writeSheet; |
|
|
|
|
private WriteTable writeTable; |
|
|
|
@ -197,7 +197,6 @@ public class PoolAddTaxThread extends BaseThread { |
|
|
|
|
pramsMap.put("inAccountStatus", inAccountStatus); |
|
|
|
|
pramsMap.put("company", company); |
|
|
|
|
pramsMap.put("invoiceSource",prams.getString("invoiceSource")); |
|
|
|
|
log.info("传入的参数为:{}",pramsMap); |
|
|
|
|
// 导出文件名
|
|
|
|
|
StringBuilder ftpFileName = new StringBuilder(); |
|
|
|
|
ftpFileName.append(fileNamePrefix); |
|
|
|
@ -225,7 +224,6 @@ public class PoolAddTaxThread extends BaseThread { |
|
|
|
|
StringBuilder excelFile = new StringBuilder(); |
|
|
|
|
excelFile.append(fileService.getLocalPathDefault()); |
|
|
|
|
excelFile.append(ftpFileName.toString()); |
|
|
|
|
log.info("导出的文件名字为:{}",excelFile.toString()); |
|
|
|
|
File filePath = new File(getFilePath(excelFile.toString())); |
|
|
|
|
if (!filePath.exists()) { |
|
|
|
|
filePath.mkdirs(); |
|
|
|
@ -247,8 +245,8 @@ public class PoolAddTaxThread extends BaseThread { |
|
|
|
|
// 递归导出数据到excel 发票信息
|
|
|
|
|
this.cicleExport(pramsMap, default_curr, excelFile.toString(), out, writer); |
|
|
|
|
|
|
|
|
|
// this.detailCicleExport(pramsMap, default_curr, excelFile.toString(), out, writer);
|
|
|
|
|
// writer.finish();
|
|
|
|
|
this.detailCicleExport(pramsMap, default_curr, excelFile.toString(), out, writer); |
|
|
|
|
writer.finish(); |
|
|
|
|
// FTP文件存储路径
|
|
|
|
|
String[] toDay = DateUtil.today().split("-"); |
|
|
|
|
String ftpFilePath = fileService.getPathPrefix() + userName + "/" + "excelFile/" + toDay[0] + "/" |
|
|
|
@ -277,7 +275,6 @@ public class PoolAddTaxThread extends BaseThread { |
|
|
|
|
// 记录导出出错状态
|
|
|
|
|
exportLogService.updateFail(id, errmsg, dbName); |
|
|
|
|
} finally { |
|
|
|
|
writer.finish(); |
|
|
|
|
// 发送导出消息到mq
|
|
|
|
|
String responseResult = JsonResponseUtils.responseResult(msg); |
|
|
|
|
sender.sendToMsg(responseResult); |
|
|
|
@ -388,9 +385,8 @@ public class PoolAddTaxThread extends BaseThread { |
|
|
|
|
String titleColumn = datas[var12]; |
|
|
|
|
titles.add(Collections.singletonList(titleColumn)); |
|
|
|
|
} |
|
|
|
|
log.info("导出文件的标头为:{}",titles); |
|
|
|
|
writeTable.setHead(titles); |
|
|
|
|
|
|
|
|
|
writeTable.setHead(titles); |
|
|
|
|
List<List<String>> list = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
for (String[] strings : dataList) { |
|
|
|
|