|
@@ -77,7 +77,7 @@ public class FileServiceImpl implements FileService {
|
|
|
byte[] data = null;
|
|
byte[] data = null;
|
|
|
String stantardJrxmlsUrl = String.format(sysConf.getStandardJrxmlsUrl(), sourceUserName);
|
|
String stantardJrxmlsUrl = String.format(sysConf.getStandardJrxmlsUrl(), sourceUserName);
|
|
|
// 如果本机提供标准模板下载,直接从本地获取数据
|
|
// 如果本机提供标准模板下载,直接从本地获取数据
|
|
|
- if (stantardJrxmlsUrl.contains(sysConf.getHost())) {
|
|
|
|
|
|
|
+ if (sysConf.hasStandardJrxmls()) {
|
|
|
data = getStandardJrxmls(sourceUserName);
|
|
data = getStandardJrxmls(sourceUserName);
|
|
|
}
|
|
}
|
|
|
// 本机没有标准模板,则先下载标准模板数据
|
|
// 本机没有标准模板,则先下载标准模板数据
|
|
@@ -216,6 +216,9 @@ public class FileServiceImpl implements FileService {
|
|
|
if (StringUtils.isEmpty(userName)) {
|
|
if (StringUtils.isEmpty(userName)) {
|
|
|
throw new ReportException("未传入当前账套名称!");
|
|
throw new ReportException("未传入当前账套名称!");
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!sysConf.hasStandardJrxmls()) {
|
|
|
|
|
+ throw new ReportException("没有" + userName + "标准模板!");
|
|
|
|
|
+ }
|
|
|
byte[] data = ZipUtils.zipFolder(getMasterPath(sysConf.getStandardMaster()) + "/" + userName,
|
|
byte[] data = ZipUtils.zipFolder(getMasterPath(sysConf.getStandardMaster()) + "/" + userName,
|
|
|
FileServiceImpl.fileFilter);
|
|
FileServiceImpl.fileFilter);
|
|
|
if (ArrayUtils.isEmpty(data)) {
|
|
if (ArrayUtils.isEmpty(data)) {
|
|
@@ -229,6 +232,9 @@ public class FileServiceImpl implements FileService {
|
|
|
if (StringUtils.isEmpty(userName)) {
|
|
if (StringUtils.isEmpty(userName)) {
|
|
|
throw new ReportException("未传入当前账套名称!");
|
|
throw new ReportException("未传入当前账套名称!");
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!sysConf.hasStandardJrxmls()) {
|
|
|
|
|
+ throw new ReportException("没有" + userName + "标准模板!");
|
|
|
|
|
+ }
|
|
|
downloadZip(sysConf.getStandardMaster() + "/" + userName, response);
|
|
downloadZip(sysConf.getStandardMaster() + "/" + userName, response);
|
|
|
}
|
|
}
|
|
|
|
|
|