Commit 0e707ae1 authored by Memorydoc's avatar Memorydoc

#

parent 0f43797a
...@@ -15,7 +15,7 @@ public class ErrorMessage { ...@@ -15,7 +15,7 @@ public class ErrorMessage {
public static final String ImportFailed = "ImportFailed!"; public static final String ImportFailed = "ImportFailed!";
public static final String ImportNotMatch = "导入文件与选择机构或期间不匹配!"; public static final String ImportNotMatch = "导入文件与选择机构或期间不匹配!";
public static final String ExportFailed = "ExportFailed!"; public static final String ExportFailed = "ExportFailed!";
public static final String NoData = "无数据!";
} }
...@@ -965,7 +965,7 @@ public class DataImportService extends BaseService { ...@@ -965,7 +965,7 @@ public class DataImportService extends BaseService {
addDataImportLog(dataImportLogs); addDataImportLog(dataImportLogs);
int isSuccess = (int) dataImportLogs.stream().filter(di -> Boolean.TRUE.equals(di.getImportResult())).count(); int isSuccess = (int) dataImportLogs.stream().filter(di -> Boolean.TRUE.equals(di.getImportResult())).count();
if (isSuccess < 1) { if (isSuccess < 1) {
return OperationResultDto.error(ErrorMessage.ImportFailed); return OperationResultDto.error(ErrorMessage.NoData);
} }
return operationResultDto.success(); return operationResultDto.success();
} catch (Exception e) { } catch (Exception e) {
...@@ -1070,7 +1070,7 @@ public class DataImportService extends BaseService { ...@@ -1070,7 +1070,7 @@ public class DataImportService extends BaseService {
addDataImportLog(dataImportLogs); addDataImportLog(dataImportLogs);
int isSuccess = (int) dataImportLogs.stream().filter(di -> Boolean.TRUE.equals(di.getImportResult())).count(); int isSuccess = (int) dataImportLogs.stream().filter(di -> Boolean.TRUE.equals(di.getImportResult())).count();
if (isSuccess < 1) { if (isSuccess < 1) {
return OperationResultDto.error(ErrorMessage.ImportNotMatch); return OperationResultDto.error(ErrorMessage.NoData);
} }
return OperationResultDto.success(); return OperationResultDto.success();
} catch (ServiceException e) { } catch (ServiceException e) {
...@@ -1174,7 +1174,7 @@ public class DataImportService extends BaseService { ...@@ -1174,7 +1174,7 @@ public class DataImportService extends BaseService {
int isSuccess = (int) dataImportLogs.stream().filter(di -> Boolean.TRUE.equals(di.getImportResult())).count(); int isSuccess = (int) dataImportLogs.stream().filter(di -> Boolean.TRUE.equals(di.getImportResult())).count();
addDataImportLog(dataImportLogs); addDataImportLog(dataImportLogs);
if (isSuccess < 1) { if (isSuccess < 1) {
return OperationResultDto.error(ErrorMessage.ImportFailed); return OperationResultDto.error(ErrorMessage.NoData);
} }
return OperationResultDto.success(); return OperationResultDto.success();
} catch (ServiceException e) { } catch (ServiceException e) {
...@@ -1461,7 +1461,7 @@ public class DataImportService extends BaseService { ...@@ -1461,7 +1461,7 @@ public class DataImportService extends BaseService {
int isSuccess = (int) dataImportLogs.stream().filter(di -> Boolean.TRUE.equals(di.getImportResult())).count(); int isSuccess = (int) dataImportLogs.stream().filter(di -> Boolean.TRUE.equals(di.getImportResult())).count();
addDataImportLog(dataImportLogs); addDataImportLog(dataImportLogs);
if (isSuccess < 1) { if (isSuccess < 1) {
return OperationResultDto.error(ErrorMessage.ImportFailed); return OperationResultDto.error(ErrorMessage.NoData);
} }
return OperationResultDto.success(); return OperationResultDto.success();
} catch (ServiceException e) { } catch (ServiceException e) {
...@@ -1841,6 +1841,7 @@ public class DataImportService extends BaseService { ...@@ -1841,6 +1841,7 @@ public class DataImportService extends BaseService {
private int addDataImportLog(List<DataImportLog> dataImportLogs) { private int addDataImportLog(List<DataImportLog> dataImportLogs) {
if(dataImportLogs.size() == 0) return 0;
dataImportLogMapper.displayOld(dataImportLogs.get(0).getType()); dataImportLogMapper.displayOld(dataImportLogs.get(0).getType());
int res = 0; int res = 0;
for (DataImportLog dataImportLog : dataImportLogs) { for (DataImportLog dataImportLog : dataImportLogs) {
......
webservices.factory('vatSessionService', ['$log', 'localStorageService', function ($log, localStorageService) { webservices.factory('vatSessionService', ['$log', 'localStorageService', function ($log, localStorageService) {
'use strict'; 'use strict';
$log.debug('vatSessionService.ctor()...'); $log.debug('vatSessionService.ctor()...');
var date = new Date(); var date = new Date();
var month = date.getMonth(); var month = date.getMonth();
var projectyear = date.getFullYear(); var projectyear = date.getFullYear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment