Commit 6c141721 authored by chase's avatar chase

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

parents 7ff3b9c3 2a22fe7d
package pwc.taxtech.atms.common;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
/**
* author kevin
* target : Solve ThousandConvert
* version 1.0
*/
public class ThousandConvert extends JsonSerializer<BigDecimal> {
@Override
public void serialize(BigDecimal value, JsonGenerator jgen, SerializerProvider arg2)
throws IOException {
jgen.writeString(NumberFormat.getIntegerInstance(Locale.getDefault()).format(value));
}
}
package pwc.taxtech.atms.dto.analysis; package pwc.taxtech.atms.dto.analysis;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.common.ThousandConvert;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
...@@ -11,16 +14,17 @@ public class AnalysisTaxDto { ...@@ -11,16 +14,17 @@ public class AnalysisTaxDto {
private String companyName; private String companyName;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment1; private BigDecimal segment1;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment2; private BigDecimal segment2;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment3; private BigDecimal segment3;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment4; private BigDecimal segment4;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment5; private BigDecimal segment5;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment6; private BigDecimal segment6;
public String getCompanyName() { public String getCompanyName() {
......
...@@ -32,6 +32,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -32,6 +32,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
...@@ -197,18 +198,19 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -197,18 +198,19 @@ public class AnalysisServiceImpl extends BaseService {
} }
public OperationResultDto importDomesitcExcelFile(MultipartFile file, String periodDate, Integer type) { public OperationResultDto importDomesitcExcelFile(MultipartFile file, String periodDate, Integer type) {
StringBuilder notOrgMatch = new StringBuilder();
switch (type) { switch (type) {
case 0: case 0:
importAnalysisTaxExcelFile(file, periodDate); notOrgMatch = importAnalysisTaxExcelFile(file, periodDate);
break; break;
case 1: case 1:
importAnalysisReturnTaxExcelFile(file, periodDate); notOrgMatch = importAnalysisReturnTaxExcelFile(file, periodDate);
break; break;
case 2: case 2:
importAnalysisGMVSubsidyExcelFile(file, periodDate); importAnalysisGMVSubsidyExcelFile(file, periodDate);
break; break;
case 3: case 3:
importAnalysisEmployeeNumExcelFile(file, periodDate); notOrgMatch = importAnalysisEmployeeNumExcelFile(file, periodDate);
break; break;
case 4: case 4:
importAnalysisDriverNumExcelFile(file, periodDate); importAnalysisDriverNumExcelFile(file, periodDate);
...@@ -216,7 +218,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -216,7 +218,7 @@ public class AnalysisServiceImpl extends BaseService {
default: default:
break; break;
} }
return OperationResultDto.success(); return OperationResultDto.success(notOrgMatch);
} }
public OperationResultDto importInterNationalExcelFile(MultipartFile file, String periodDate, Integer type, public OperationResultDto importInterNationalExcelFile(MultipartFile file, String periodDate, Integer type,
...@@ -237,7 +239,9 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -237,7 +239,9 @@ public class AnalysisServiceImpl extends BaseService {
private String[] headerArr = null; private String[] headerArr = null;
private void importAnalysisTaxExcelFile(MultipartFile file, String periodDate) { private StringBuilder importAnalysisTaxExcelFile(MultipartFile file, String periodDate) {
StringBuilder notMatchOrg = new StringBuilder();
List orgNotList = Lists.newArrayList();
try { try {
InputStream inputStream = file.getInputStream(); InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream); Workbook workbook = WorkbookFactory.create(inputStream);
...@@ -263,7 +267,8 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -263,7 +267,8 @@ public class AnalysisServiceImpl extends BaseService {
example.createCriteria().andNameEqualTo(companyName); example.createCriteria().andNameEqualTo(companyName);
List<Organization> orgs = organizationMapper.selectByExample(example); List<Organization> orgs = organizationMapper.selectByExample(example);
if (orgs.isEmpty()) { if (orgs.isEmpty()) {
break; orgNotList.add(j + 1);
continue;
} }
for (int k = 1; k < sheet.getRow(0).getLastCellNum(); k++) { for (int k = 1; k < sheet.getRow(0).getLastCellNum(); k++) {
AnalysisTax model = getAnalysisTax(selectedPer, sheet, k, j, orgs.get(0)); AnalysisTax model = getAnalysisTax(selectedPer, sheet, k, j, orgs.get(0));
...@@ -284,6 +289,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -284,6 +289,7 @@ public class AnalysisServiceImpl extends BaseService {
} catch (Exception e) { } catch (Exception e) {
throw new ServiceException(e); throw new ServiceException(e);
} }
return notMatchOrg.append(orgNotList + "机构匹配失败");
} }
private AnalysisTax getAnalysisTax(Integer period, Sheet sheet, int k, int j, Organization org) { private AnalysisTax getAnalysisTax(Integer period, Sheet sheet, int k, int j, Organization org) {
...@@ -326,7 +332,9 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -326,7 +332,9 @@ public class AnalysisServiceImpl extends BaseService {
} }
private void importAnalysisReturnTaxExcelFile(MultipartFile file, String periodDate) { private StringBuilder importAnalysisReturnTaxExcelFile(MultipartFile file, String periodDate) {
StringBuilder notMatchOrg = new StringBuilder();
List orgNotList = Lists.newArrayList();
try { try {
InputStream inputStream = file.getInputStream(); InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream); Workbook workbook = WorkbookFactory.create(inputStream);
...@@ -351,7 +359,8 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -351,7 +359,8 @@ public class AnalysisServiceImpl extends BaseService {
example.createCriteria().andNameEqualTo(companyName); example.createCriteria().andNameEqualTo(companyName);
List<Organization> orgs = organizationMapper.selectByExample(example); List<Organization> orgs = organizationMapper.selectByExample(example);
if (orgs.isEmpty()) { if (orgs.isEmpty()) {
break; orgNotList.add(j + 1);
continue;
} }
for (int k = 1; k < sheet.getRow(0).getLastCellNum(); k++) { for (int k = 1; k < sheet.getRow(0).getLastCellNum(); k++) {
AnalysisActualTaxReturn model = getAnalysisActualTaxReturn(selectedPer, sheet, k, j, orgs.get(0)); AnalysisActualTaxReturn model = getAnalysisActualTaxReturn(selectedPer, sheet, k, j, orgs.get(0));
...@@ -373,6 +382,7 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -373,6 +382,7 @@ public class AnalysisServiceImpl extends BaseService {
} catch (Exception e) { } catch (Exception e) {
throw new ServiceException(e); throw new ServiceException(e);
} }
return notMatchOrg.append(orgNotList + "行匹配失败");
} }
private AnalysisActualTaxReturn getAnalysisActualTaxReturn(Integer period, Sheet sheet, int k, int j, Organization org) { private AnalysisActualTaxReturn getAnalysisActualTaxReturn(Integer period, Sheet sheet, int k, int j, Organization org) {
...@@ -387,7 +397,9 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -387,7 +397,9 @@ public class AnalysisServiceImpl extends BaseService {
return model; return model;
} }
private void importAnalysisEmployeeNumExcelFile(MultipartFile file, String periodDate) { private StringBuilder importAnalysisEmployeeNumExcelFile(MultipartFile file, String periodDate) {
StringBuilder notMatchOrg = new StringBuilder();
List orgNotList = Lists.newArrayList();
try { try {
InputStream inputStream = file.getInputStream(); InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream); Workbook workbook = WorkbookFactory.create(inputStream);
...@@ -409,7 +421,17 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -409,7 +421,17 @@ public class AnalysisServiceImpl extends BaseService {
if (null == cell1 || StringUtils.isEmpty(getCellStringValue(cell1))) { if (null == cell1 || StringUtils.isEmpty(getCellStringValue(cell1))) {
continue; continue;
} }
model.setCompanyName(getCellStringValue(sheet.getRow(j).getCell(0)));
//进行机构验证
String companyName = getCellStringValue(sheet.getRow(j).getCell(0));
OrganizationExample example1 = new OrganizationExample();
example1.createCriteria().andNameEqualTo(companyName);
List<Organization> orgs = organizationMapper.selectByExample(example1);
if (orgs.isEmpty()) {
orgNotList.add(j + 1);
continue;
}
model.setCompanyName(companyName);
try { try {
model.setSeqNo(getSeqNoByPeriod(getOrgByCompanyName(getCellStringValue(sheet.getRow(j).getCell(0))).getId(), selectedPer)); model.setSeqNo(getSeqNoByPeriod(getOrgByCompanyName(getCellStringValue(sheet.getRow(j).getCell(0))).getId(), selectedPer));
} catch (Exception e) { } catch (Exception e) {
...@@ -447,9 +469,11 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -447,9 +469,11 @@ public class AnalysisServiceImpl extends BaseService {
e.printStackTrace(); e.printStackTrace();
throw new ServiceException(e); throw new ServiceException(e);
} }
return notMatchOrg.append(orgNotList + "行匹配失败");
} }
private void importAnalysisGMVSubsidyExcelFile(MultipartFile file, String periodDate) { private void importAnalysisGMVSubsidyExcelFile(MultipartFile file, String periodDate) {
try { try {
InputStream inputStream = file.getInputStream(); InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream); Workbook workbook = WorkbookFactory.create(inputStream);
...@@ -719,7 +743,6 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -719,7 +743,6 @@ public class AnalysisServiceImpl extends BaseService {
public HttpServletResponse downloadDomesticFile(HttpServletResponse response, AnalysisDomesticlParam param, String fileName) { public HttpServletResponse downloadDomesticFile(HttpServletResponse response, AnalysisDomesticlParam param, String fileName) {
String excelTemplatePathInClassPath = EnumAnalysisExpTempPath.getPath(param.getType()); String excelTemplatePathInClassPath = EnumAnalysisExpTempPath.getPath(param.getType());
List<Object> datas = displayAnalysisImportData(param); List<Object> datas = displayAnalysisImportData(param);
try { try {
if (datas.size() < 1) { if (datas.size() < 1) {
throw new Exception("无可导出的数据"); throw new Exception("无可导出的数据");
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
class="mx-auto d-block" class="mx-auto d-block"
size="130" size="130"
> >
<img src="https://demos.creative-tim.com/vue-material-dashboard/img/marc.aba54d65.jpg"> <img src="../assets/dts-mine.png">
</v-avatar> </v-avatar>
<v-card-text class="text-xs-center"> <v-card-text class="text-xs-center">
<h6 class="category text-gray font-weight-thin mb-9"></h6> <h6 class="category text-gray font-weight-thin mb-9"></h6>
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
clipped-right clipped-right
height="90" height="90"
color="#ffffff" color="#ffffff"
style="border-bottom: 1px solid #dddddd"
> >
<!--<v-toolbar-side-icon @click.stop="drawer = !drawer"></v-toolbar-side-icon> <!--<v-toolbar-side-icon @click.stop="drawer = !drawer"></v-toolbar-side-icon>
<v-toolbar-title></v-toolbar-title> <v-toolbar-title></v-toolbar-title>
...@@ -60,7 +61,7 @@ ...@@ -60,7 +61,7 @@
> >
<svg class="icon" aria-hidden="true" ><use <svg class="icon" aria-hidden="true" ><use
:xlink:href="selectedItem.iconName"></use></svg> :xlink:href="selectedItem.iconName"></use></svg>
<span style="vertical-align: middle; margin-left: 10px; font-size:27px" v-text="selectedItem.title"></span> <span style="vertical-align: middle; margin-left: 10px;font-weight:normal; font-size:26px" v-text="selectedItem.title"></span>
<v-icon style="vertical-align: middle;margin-top:5px;float:right;height:28px;width:28px;color:#333333;">menu</v-icon> <v-icon style="vertical-align: middle;margin-top:5px;float:right;height:28px;width:28px;color:#333333;">menu</v-icon>
</span> </span>
......
...@@ -780,6 +780,7 @@ ...@@ -780,6 +780,7 @@
"ImportShipmentList": "导入发车清单", "ImportShipmentList": "导入发车清单",
"ImportShipmentListGd": "导入发车清单-GD", "ImportShipmentListGd": "导入发车清单-GD",
"ImportSuccess": "导入成功", "ImportSuccess": "导入成功",
"ImportSuccessCount": "导入成功,验证失败:",
"ImportTrialBalance": "导入试算平衡表", "ImportTrialBalance": "导入试算平衡表",
"ImportTypeTip": "需要清除本月导入的财务数据,是否确认?", "ImportTypeTip": "需要清除本月导入的财务数据,是否确认?",
"Import_AccountMapping": "科目对应", "Import_AccountMapping": "科目对应",
......
analysisModule.controller('domesticDataImportController', ['$scope','$filter', '$log', '$translate', '$timeout', '$q', '$interval' analysisModule.controller('domesticDataImportController', ['$scope', '$filter', '$log', '$translate', '$timeout', '$q', '$interval'
, 'apiInterceptor', 'Upload', 'vatImportService', 'SweetAlert', 'uiGridConstants', '$uibModal' , 'apiInterceptor', 'Upload', 'vatImportService', 'SweetAlert', 'uiGridConstants', '$uibModal'
, 'vatSessionService', 'enums', 'vatOperationLogService' , 'vatSessionService', 'enums', 'vatOperationLogService'
, 'projectService', 'vatCommonService','templateService','orgService', , 'projectService', 'vatCommonService', 'templateService', 'orgService',
function ($scope,$filter, $log, $translate, $timeout, $q, $interval function ($scope, $filter, $log, $translate, $timeout, $q, $interval
, apiInterceptor, Upload, vatImportService, SweetAlert, uiGridConstants, $uibModal , apiInterceptor, Upload, vatImportService, SweetAlert, uiGridConstants, $uibModal
, vatSessionService, enums, vatOperationLogService , vatSessionService, enums, vatOperationLogService
, projectService, vatCommonService,templateService,orgService) { , projectService, vatCommonService, templateService, orgService) {
'use strict'; 'use strict';
var comment = vatSessionService.project.name + " " + vatSessionService.project.year + "年" + vatSessionService.month + "月"; var comment = vatSessionService.project.name + " " + vatSessionService.project.year + "年" + vatSessionService.month + "月";
$scope.period = $scope.periodId; $scope.period = $scope.periodId;
$scope.moduleid = enums.vatModuleEnum.Import_TrialBalance; $scope.moduleid = enums.vatModuleEnum.Import_TrialBalance;
$scope.chunkSize = 100000; $scope.chunkSize = 100000;
$scope.success = false; $scope.success = false;
$scope.showErrorTable = false; $scope.showErrorTable = false;
$scope.showInitTable = false; $scope.showInitTable = false;
$scope.showImportTable = false; $scope.showImportTable = false;
...@@ -21,20 +21,20 @@ ...@@ -21,20 +21,20 @@
$scope.projectID = vatSessionService.project.id; $scope.projectID = vatSessionService.project.id;
$scope.startRowNum = 2; $scope.startRowNum = 2;
$scope.validationType = 0; $scope.validationType = 0;
$scope.sheetData = { sheetNameList: [], dataList: [], selectedSheetIndex: 0 }; $scope.sheetData = {sheetNameList: [], dataList: [], selectedSheetIndex: 0};
$scope.sheetInfo = { selectedSheetName: '', selectedSheetIndex: 0 }; $scope.sheetInfo = {selectedSheetName: '', selectedSheetIndex: 0};
$scope.balanceInputList = []; $scope.balanceInputList = [];
$scope.toInputList = []; $scope.toInputList = [];
$scope.importEnum = { Import: 0, CoverImport: 1, AddImport: 2 }; //导入方式 $scope.importEnum = {Import: 0, CoverImport: 1, AddImport: 2}; //导入方式
$scope.selectedPeriod = null; $scope.selectedPeriod = null;
$scope.showTotalSecondRow = false; $scope.showTotalSecondRow = false;
$scope.importExcelFileUrlList = { $scope.importExcelFileUrlList = {
taxData : apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile', taxData: apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile',
returnTax : apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile', returnTax: apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile',
gmvSubsidy : apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile', gmvSubsidy: apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile',
employeeNum : apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile', employeeNum: apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile',
driverNum : apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile' driverNum: apiInterceptor.webApiHostUrl + '/Analysis/DomesitcExcelFile'
}; };
$scope.maxTitleLength = constant.maxButtonTitleLength; $scope.maxTitleLength = constant.maxButtonTitleLength;
...@@ -57,18 +57,18 @@ ...@@ -57,18 +57,18 @@
var date = new Date(); var date = new Date();
var year = date.getFullYear(); var year = date.getFullYear();
var month = date.getMonth()+1; var month = date.getMonth() + 1;
$scope.selectedDate = new Date(year,date.getMonth(),1); $scope.selectedDate = new Date(year, date.getMonth(), 1);
$scope.startDate = new Date(year - 20, 1, 1); $scope.startDate = new Date(year - 20, 1, 1);
$scope.endDate = new Date(year + 20, 1, 1); $scope.endDate = new Date(year + 20, 1, 1);
$scope.viewMode = 1; $scope.viewMode = 1;
$scope.dateFormat = $translate.instant('dateFormat4YearMonth'); $scope.dateFormat = $translate.instant('dateFormat4YearMonth');
$scope.importExcelFile = null; $scope.importExcelFile = null;
if(month.length<2){ if (month.length < 2) {
$scope.UploadPeriodTime = year+" - 0"+month; $scope.UploadPeriodTime = year + " - 0" + month;
}else{ } else {
$scope.UploadPeriodTime = year+" - "+month; $scope.UploadPeriodTime = year + " - " + month;
} }
//写日志 //写日志
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
var param = { var param = {
companyName : $scope.selectCountry, companyName: $scope.selectCountry,
type: $scope.importType, type: $scope.importType,
period: $scope.UploadPeriodTime period: $scope.UploadPeriodTime
}; };
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
var url = urlCreator.createObjectURL(blob); var url = urlCreator.createObjectURL(blob);
a.href = url; a.href = url;
a.target = '_blank'; a.target = '_blank';
a.download = fileName+".xlsx"; a.download = fileName + ".xlsx";
document.body.appendChild(a); document.body.appendChild(a);
a.click(); a.click();
} }
...@@ -164,26 +164,54 @@ ...@@ -164,26 +164,54 @@
}; };
var doExport = function () { var doExport = function () {
var localDate=$filter('date')(new Date(), 'yyyyMMddHHmmss'); var localDate = $filter('date')(new Date(), 'yyyyMMddHHmmss');
var fileName = ''; var fileName = '';
constant.anlDownLoadFileNameList.forEach(function (m) { constant.anlDownLoadFileNameList.forEach(function (m) {
if (m.code === $scope.importType) { if (m.code === $scope.importType) {
fileName = m.name + $scope.UploadPeriodTime+"_" +localDate; fileName = m.name + $scope.UploadPeriodTime + "_" + localDate;
} }
}); });
// param.companyName = $scope.selectCompany; // param.companyName = $scope.selectCompany;
param.type = $scope.importType; param.type = $scope.importType;
param.period = $scope.UploadPeriodTime; param.period = $scope.UploadPeriodTime;
vatImportService.downloadDomesticFile(param,fileName).then(function (data) { vatImportService.downloadDomesticFile(param, fileName).then(function (data) {
if (data) { if (data) {
ackMessageBox.success(translate('FileExportSuccess')); ackMessageBox.success(translate('FileExportSuccess'));
} }
}); });
}; };
var inProgress = false;
$scope.progressBarValue = 0;
$scope.progressBarOptions = {
min: 0,
max: 100,
width: "90%",
bindingOptions: {
value: "progressBarValue"
},
statusFormat: function (value) {
return "进度: " + value * 100 + "%";
},
onComplete: function (e) {
inProgress = true;
e.element.addClass("complete");
}
};
$('#progressBarStatus').hide();
var objPro;
var proBarFun = function () {
objPro = setInterval(function () {
if ($scope.progressBarValue < 95) {
$scope.progressBarValue =$scope.progressBarValue + Math.ceil(Math.random()*10);
}
}, 800)
}
//导入事件 //导入事件
var doUpload = function () { var doUpload = function () {
$('#progressBarStatus').show();
$scope.progressBarValue = 0;
proBarFun();
var impExl = $scope.importExcelFile; var impExl = $scope.importExcelFile;
var deferred = $q.defer(); var deferred = $q.defer();
var token = $('input[name="__RequestVerificationToken"]').val(); var token = $('input[name="__RequestVerificationToken"]').val();
...@@ -192,11 +220,9 @@ ...@@ -192,11 +220,9 @@
SweetAlert.warning($translate.instant('PleaseSelectFileFirst')); SweetAlert.warning($translate.instant('PleaseSelectFileFirst'));
return; return;
} }
var url = getUploadUrl(); var url = getUploadUrl();
var period = $scope.UploadPeriodTime; var period = $scope.UploadPeriodTime;
$('#busy-indicator-container').show();
Upload.upload({ Upload.upload({
url: url, url: url,
data: { data: {
...@@ -213,24 +239,34 @@ ...@@ -213,24 +239,34 @@
}, },
__RequestVerificationToken: token, __RequestVerificationToken: token,
withCredentials: true withCredentials: true
}).then(function(resp) {
}).success(function(resp) {
var ret = resp.data; var ret = resp.data;
$scope.fileName= '';
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (ret.result) { uploadAfter();
if (resp.data|| resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess'); logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess')); if (resp.data) {
SweetAlert.success($translate.instant("ImportSuccessCount") + resp.data);
} else {
SweetAlert.success($translate.instant('ImportSuccess'));
}
} else { } else {
if (ret.resultMsg && ret.resultMsg.length > 0) { if (resp.resultMsg && resp.resultMsg.length > 0) {
SweetAlert.warning($translate.instant(ret.resultMsg)); SweetAlert.warning($translate.instant(resp.resultMsg));
}else{ } else {
SweetAlert.error($translate.instant('ImportFailed')); SweetAlert.error($translate.instant('ImportFailed'));
} }
} }
$('#busy-indicator-container').hide();
$('#progressBarStatus').hide();
refreshGrid(); refreshGrid();
}, function(resp) { }).error(function (resp) {
deferred.resolve(); deferred.resolve();
uploadAfter()
if (resp.statusText === 'HttpRequestValidationException') { if (resp.statusText === 'HttpRequestValidationException') {
SweetAlert.warning($translate.instant('HttpRequestValidationException')); SweetAlert.warning($translate.instant('HttpRequestValidationException'));
} else { } else {
...@@ -238,14 +274,19 @@ ...@@ -238,14 +274,19 @@
} }
SweetAlert.error($translate.instant('ImportFail')); SweetAlert.error($translate.instant('ImportFail'));
console.log('Error status: ' + resp.status); console.log('Error status: ' + resp.status);
}, function(evt) { }).progress(function (evt) {
deferred.resolve(); /* console.log(parseInt(100.0 * evt.loaded / evt.total))
var progressPercentage = parseInt(100.0 * evt.loaded / evt.total); $scope.progressBarValue = parseInt(100.0 * evt.loaded / evt.total);*/
$log.debug('progress: ' + progressPercentage + '% ' + evt.config.data.file.name);
}); });
}; };
var uploadAfter = function(){
$('#busy-indicator-container').hide();
$('#progressBarStatus').hide();
clearInterval(objPro);
$scope.progressBarValue =100;
}
var getUploadUrl = function(){ var getUploadUrl = function () {
var url = ""; var url = "";
switch ($scope.importType) { switch ($scope.importType) {
case 0: case 0:
...@@ -293,10 +334,10 @@ ...@@ -293,10 +334,10 @@
var getGridHeight = function () { var getGridHeight = function () {
if ($scope.isLoadComplete) { if ($scope.isLoadComplete) {
return { height: ($('.balance-ouput-grid-wrapper').height()) + "px" }; return {height: ($('.balance-ouput-grid-wrapper').height()) + "px"};
} }
else { else {
return { height: 0 + "px" }; return {height: 0 + "px"};
} }
}; };
...@@ -360,7 +401,7 @@ ...@@ -360,7 +401,7 @@
autoExpandAll: false autoExpandAll: false
}, },
allowColumnResizing: true, allowColumnResizing: true,
allowColumnReordering:true, allowColumnReordering: true,
columnAutoWidth: true, columnAutoWidth: true,
showRowLines: true, showRowLines: true,
showColumnLines: true, showColumnLines: true,
...@@ -395,7 +436,7 @@ ...@@ -395,7 +436,7 @@
vatImportService.displayAnalysisImportData(param).success(function (data) { vatImportService.displayAnalysisImportData(param).success(function (data) {
if (data.data) { if (data.data) {
$scope.taxGridSource = data.data; $scope.taxGridSource = data.data;
}else { } else {
SweetAlert.error($translate.instant('SystemError')); SweetAlert.error($translate.instant('SystemError'));
} }
}); });
...@@ -455,7 +496,7 @@ ...@@ -455,7 +496,7 @@
autoExpandAll: false autoExpandAll: false
}, },
allowColumnResizing: true, allowColumnResizing: true,
allowColumnReordering:true, allowColumnReordering: true,
columnAutoWidth: true, columnAutoWidth: true,
showRowLines: true, showRowLines: true,
showColumnLines: true, showColumnLines: true,
...@@ -490,7 +531,7 @@ ...@@ -490,7 +531,7 @@
vatImportService.displayAnalysisImportData(param).success(function (data) { vatImportService.displayAnalysisImportData(param).success(function (data) {
if (data.data) { if (data.data) {
$scope.returnTaxGridSource = data.data; $scope.returnTaxGridSource = data.data;
}else { } else {
SweetAlert.error($translate.instant('SystemError')); SweetAlert.error($translate.instant('SystemError'));
} }
}); });
...@@ -555,7 +596,7 @@ ...@@ -555,7 +596,7 @@
autoExpandAll: false autoExpandAll: false
}, },
allowColumnResizing: true, allowColumnResizing: true,
allowColumnReordering:true, allowColumnReordering: true,
columnAutoWidth: true, columnAutoWidth: true,
showRowLines: true, showRowLines: true,
showColumnLines: true, showColumnLines: true,
...@@ -590,7 +631,7 @@ ...@@ -590,7 +631,7 @@
vatImportService.displayAnalysisImportData(param).success(function (data) { vatImportService.displayAnalysisImportData(param).success(function (data) {
if (data.data) { if (data.data) {
$scope.GMVSubsidyGridSource = data.data; $scope.GMVSubsidyGridSource = data.data;
}else { } else {
SweetAlert.error($translate.instant('SystemError')); SweetAlert.error($translate.instant('SystemError'));
} }
}); });
...@@ -650,7 +691,7 @@ ...@@ -650,7 +691,7 @@
autoExpandAll: false autoExpandAll: false
}, },
allowColumnResizing: true, allowColumnResizing: true,
allowColumnReordering:true, allowColumnReordering: true,
columnAutoWidth: true, columnAutoWidth: true,
showRowLines: true, showRowLines: true,
showColumnLines: true, showColumnLines: true,
...@@ -685,7 +726,7 @@ ...@@ -685,7 +726,7 @@
vatImportService.displayAnalysisImportData(param).success(function (data) { vatImportService.displayAnalysisImportData(param).success(function (data) {
if (data.data) { if (data.data) {
$scope.employeeNumGridSource = data.data; $scope.employeeNumGridSource = data.data;
}else { } else {
SweetAlert.error($translate.instant('SystemError')); SweetAlert.error($translate.instant('SystemError'));
} }
}); });
...@@ -730,7 +771,7 @@ ...@@ -730,7 +771,7 @@
autoExpandAll: false autoExpandAll: false
}, },
allowColumnResizing: true, allowColumnResizing: true,
allowColumnReordering:true, allowColumnReordering: true,
columnAutoWidth: true, columnAutoWidth: true,
showRowLines: true, showRowLines: true,
showColumnLines: true, showColumnLines: true,
...@@ -765,7 +806,7 @@ ...@@ -765,7 +806,7 @@
vatImportService.displayAnalysisImportData(param).success(function (data) { vatImportService.displayAnalysisImportData(param).success(function (data) {
if (data.data) { if (data.data) {
$scope.driverNumGridSource = data.data; $scope.driverNumGridSource = data.data;
}else { } else {
SweetAlert.error($translate.instant('SystemError')); SweetAlert.error($translate.instant('SystemError'));
} }
}); });
...@@ -825,16 +866,16 @@ ...@@ -825,16 +866,16 @@
var setButtonWrapStyle = function () { var setButtonWrapStyle = function () {
if ($scope.fileName) { if ($scope.fileName) {
return { width: "100%" }; return {width: "100%"};
} }
}; };
var setGridStyle = function () { var setGridStyle = function () {
if ($scope.showTotalSecondRow) { if ($scope.showTotalSecondRow) {
return { 'margin-top': '60px' } return {'margin-top': '60px'}
} }
else { else {
return { 'margin-top': '55px' } return {'margin-top': '55px'}
} }
}; };
...@@ -872,18 +913,18 @@ ...@@ -872,18 +913,18 @@
}); });
}; };
$scope.selectCompanyEvent = function(i){ $scope.selectCompanyEvent = function (i) {
$scope.selectCompany=i.name; $scope.selectCompany = i.name;
refreshGrid(); refreshGrid();
}; };
$scope.selectOne = function () { $scope.selectOne = function () {
$scope.checkedCompanyList = []; $scope.checkedCompanyList = [];
angular.forEach($scope.companyList , function (i) { angular.forEach($scope.companyList, function (i) {
var index = $scope.checkedCompanyList.indexOf(i.id); var index = $scope.checkedCompanyList.indexOf(i.id);
if(i.checked && index === -1) { if (i.checked && index === -1) {
$scope.checkedCompanyList.push(i); $scope.checkedCompanyList.push(i);
} else if (!i.checked && index !== -1){ } else if (!i.checked && index !== -1) {
$scope.checkedCompanyList.splice(index, 1); $scope.checkedCompanyList.splice(index, 1);
} }
}); });
...@@ -892,22 +933,22 @@ ...@@ -892,22 +933,22 @@
$scope.checkedCompanyTypeList = ""; $scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = []; $scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) { angular.forEach($scope.checkedCompanyList, function (i) {
$scope.checkedCompanyTypeList += i.name+";"; $scope.checkedCompanyTypeList += i.name + ";";
$scope.checkedCompanyCodeList.push(i.id); $scope.checkedCompanyCodeList.push(i.id);
}); });
console.log($scope.checkedCompanyList); console.log($scope.checkedCompanyList);
}; };
$scope.selectAll = function () { $scope.selectAll = function () {
if($scope.selectedAll) { if ($scope.selectedAll) {
$scope.selectedOne = true; $scope.selectedOne = true;
$scope.checkedCompanyList = []; $scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) { angular.forEach($scope.companyList, function (i, index) {
$scope.checkedCompanyList.push(i); $scope.checkedCompanyList.push(i);
i.checked = true; i.checked = true;
}) })
}else { } else {
$scope.selectedOne = false; $scope.selectedOne = false;
$scope.checkedCompanyList = []; $scope.checkedCompanyList = [];
angular.forEach($scope.companyList, function (i, index) { angular.forEach($scope.companyList, function (i, index) {
...@@ -916,14 +957,14 @@ ...@@ -916,14 +957,14 @@
} }
$scope.checkedCompanyTypeList = ""; $scope.checkedCompanyTypeList = "";
$scope.checkedCompanyCodeList = []; $scope.checkedCompanyCodeList = [];
angular.forEach($scope.checkedCompanyList,function (i) { angular.forEach($scope.checkedCompanyList, function (i) {
$scope.checkedCompanyTypeList += i.name; $scope.checkedCompanyTypeList += i.name;
$scope.checkedCompanyCodeList.push(i.id); $scope.checkedCompanyCodeList.push(i.id);
}); });
console.log($scope.checkedCompanyList); console.log($scope.checkedCompanyList);
}; };
$scope.changeTab = function(i){ $scope.changeTab = function (i) {
$scope.importType = i.code; $scope.importType = i.code;
$scope.selectType = i.type; $scope.selectType = i.type;
$scope.showTaxGrid = false; $scope.showTaxGrid = false;
...@@ -931,6 +972,7 @@ ...@@ -931,6 +972,7 @@
$scope.showGMVSubsidyGrid = false; $scope.showGMVSubsidyGrid = false;
$scope.showEmployeeNumGrid = false; $scope.showEmployeeNumGrid = false;
$scope.showDriverNumGrid = false; $scope.showDriverNumGrid = false;
$scope.fileName='';
switch (i.code) { switch (i.code) {
case 0: case 0:
$scope.showTaxGrid = true; $scope.showTaxGrid = true;
......
...@@ -71,7 +71,9 @@ ...@@ -71,7 +71,9 @@
</div> </div>
</div> </div>
</form> </form>
<div id="progress">
<div id="progressBarStatus" dx-progress-bar="progressBarOptions"></div>
</div>
<div class="dt-init-wrapper"> <div class="dt-init-wrapper">
<div class="dx-viewport grid-container"> <div class="dx-viewport grid-container">
<div id="taxGridContainer" dx-data-grid="taxGridOptions" <div id="taxGridContainer" dx-data-grid="taxGridOptions"
......
...@@ -206,6 +206,7 @@ ...@@ -206,6 +206,7 @@
withCredentials: true withCredentials: true
}).then(function (resp) { }).then(function (resp) {
var ret = resp.data; var ret = resp.data;
$scope.fileName = '';
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (ret.result) { if (ret.result) {
...@@ -640,6 +641,7 @@ ...@@ -640,6 +641,7 @@
$scope.selectType = i.type; $scope.selectType = i.type;
$scope.showInternationalBUDataGrid = false; $scope.showInternationalBUDataGrid = false;
$scope.showInternationalTaxDataGrid = false; $scope.showInternationalTaxDataGrid = false;
$scope.fileName='';
switch (i.code) { switch (i.code) {
case 100: case 100:
$scope.showInternationalBUDataGrid = true; $scope.showInternationalBUDataGrid = true;
......
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
__RequestVerificationToken: token, __RequestVerificationToken: token,
withCredentials: true withCredentials: true
}).then(function(data) { }).then(function(data) {
$scope.fileName=''; $scope.fileNameShow=false;
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
var resp = data.data; var resp = data.data;
deferred.resolve(); deferred.resolve();
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<i class="fa fa-calendar imp-subheader red-color" style="width:20px;"></i> <i class="fa fa-calendar imp-subheader red-color" style="width:20px;"></i>
</div> </div>
</div> </div>
<div ng-show="fileName" style="display:inline-block"> <div ng-show="fileNameShow" style="display:inline-block">
<span title="{{fileName}}">{{'FileName' | translate}}{{fileName | limitString:20}}</span> <span title="{{fileName}}">{{'FileName' | translate}}{{fileName | limitString:20}}</span>
</div> </div>
<div class="form-group"> <div class="form-group">
......
...@@ -192,6 +192,7 @@ ...@@ -192,6 +192,7 @@
withCredentials: true withCredentials: true
}).then(function(resp) { }).then(function(resp) {
var ret = resp.data; var ret = resp.data;
$('#busy-indicator-container').hide(); $('#busy-indicator-container').hide();
deferred.resolve(); deferred.resolve();
if (ret.result) { if (ret.result) {
......
...@@ -210,7 +210,6 @@ ...@@ -210,7 +210,6 @@
vatOperationLogService.addOperationLog(logDto); vatOperationLogService.addOperationLog(logDto);
} }
getImportRLITStatus(); getImportRLITStatus();
}, function(resp) { }, function(resp) {
deferred.resolve(); deferred.resolve();
if (resp.statusText === 'HttpRequestValidationException') { if (resp.statusText === 'HttpRequestValidationException') {
......
...@@ -133,7 +133,6 @@ ...@@ -133,7 +133,6 @@
//todo:注册之后这里去掉注释 //todo:注册之后这里去掉注释
//var sheet = spread.getActiveSheet(); //var sheet = spread.getActiveSheet();
var sheet; var sheet;
if (constant.regesterInformation.active) { if (constant.regesterInformation.active) {
sheet = spread.getActiveSheet(); sheet = spread.getActiveSheet();
......
...@@ -1234,6 +1234,5 @@ ...@@ -1234,6 +1234,5 @@
_.extend(scope.selectOrgOptions, exp); _.extend(scope.selectOrgOptions, exp);
}; };
/*-----------------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------------*/
})(window) })(window)
\ No newline at end of file
.color_active[data-v-1ced4d0d]{color:red!important}.head[data-v-0817fb63]{height:90px;background-color:red}.icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.color_active{color:red!important}
\ No newline at end of file
.color_active[data-v-1ced4d0d]{color:red!important}.head[data-v-579027fe]{height:90px;background-color:red}.icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}
\ No newline at end of file
...@@ -49,4 +49,4 @@ ...@@ -49,4 +49,4 @@
//send 发送 //send 发送
xmlhttp.send(); xmlhttp.send();
}*/</script><link rel=icon href=favicon.ico><title>didi2</title><link rel=stylesheet href=font_roboto.css><link rel=stylesheet href=font_material.css><link href=js/about.17654e8a.js rel=prefetch><link href=css/app.8f5ac7e7.css rel=preload as=style><link href=css/chunk-vendors.ce5e3dd4.css rel=preload as=style><link href=js/app.cf3691a6.js rel=preload as=script><link href=js/chunk-vendors.670ff040.js rel=preload as=script><link href=css/chunk-vendors.ce5e3dd4.css rel=stylesheet><link href=css/app.8f5ac7e7.css rel=stylesheet></head><body><noscript><strong>We're sorry but didi2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.670ff040.js></script><script src=js/app.cf3691a6.js></script></body></html> }*/</script><link rel=icon href=favicon.ico><title>didi2</title><link rel=stylesheet href=font_roboto.css><link rel=stylesheet href=font_material.css><link href=js/about.17654e8a.js rel=prefetch><link href=css/app.e87f05ce.css rel=preload as=style><link href=css/chunk-vendors.ce5e3dd4.css rel=preload as=style><link href=js/app.6ae9ce65.js rel=preload as=script><link href=js/chunk-vendors.670ff040.js rel=preload as=script><link href=css/chunk-vendors.ce5e3dd4.css rel=stylesheet><link href=css/app.e87f05ce.css rel=stylesheet></head><body><noscript><strong>We're sorry but didi2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.670ff040.js></script><script src=js/app.6ae9ce65.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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