Commit dc7fd7a0 authored by kevin's avatar kevin

#

parent 5a872d30
...@@ -548,6 +548,8 @@ public class AnalysisServiceImpl extends BaseService { ...@@ -548,6 +548,8 @@ public class AnalysisServiceImpl extends BaseService {
if (isSheetEmpty(sheet)) continue; if (isSheetEmpty(sheet)) continue;
List<AnalysisInternationalBusinessData> lists = Lists.newArrayList(); List<AnalysisInternationalBusinessData> lists = Lists.newArrayList();
for (int j = 1; j <= sheet.getLastRowNum(); j++) { for (int j = 1; j <= sheet.getLastRowNum(); j++) {
if(j>2)
break;
AnalysisInternationalBusinessData model = new AnalysisInternationalBusinessData(); AnalysisInternationalBusinessData model = new AnalysisInternationalBusinessData();
model.setId(idService.nextId()); model.setId(idService.nextId());
model.setPeriod(selectedPer); model.setPeriod(selectedPer);
......
...@@ -2520,7 +2520,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -2520,7 +2520,7 @@ public class ReportServiceImpl extends BaseService {
} }
InputStream inputStream = httpFileService.getUserTemplate(path); InputStream inputStream = httpFileService.getUserTemplate(path);
Workbook workbook1 = WorkbookFactory.create(inputStream); Workbook workbook1 = WorkbookFactory.create(inputStream);
fileName = zipPath + "/" + requestParameterDto.getPeriod() + ".xlsx"; fileName = zipPath + "/" + getOrgName(ebitSpreadData.get(i).getOrganizationId()) +requestParameterDto.getPeriod() + ".xlsx";
fileList.add(FileExcelUtil.generateExcelToPath(workbook1, fileName)); fileList.add(FileExcelUtil.generateExcelToPath(workbook1, fileName));
} }
String zipPath1 = zipPath + "/sizegang.zip"; String zipPath1 = zipPath + "/sizegang.zip";
...@@ -2532,6 +2532,13 @@ public class ReportServiceImpl extends BaseService { ...@@ -2532,6 +2532,13 @@ public class ReportServiceImpl extends BaseService {
InputStream is = new ByteArrayInputStream(barray);*/ InputStream is = new ByteArrayInputStream(barray);*/
// FileOutputStream fileOut = new FileOutputStream(path); // FileOutputStream fileOut = new FileOutputStream(path);
} }
@Autowired
private OrganizationMapper organizationMapper;
public String getOrgName (String orgId){
OrganizationExample example = new OrganizationExample();
example.createCriteria().andIdEqualTo(orgId);
return organizationMapper.selectByExample(example).get(0).getName();
}
private String getCellStringValue(Cell cell) { private String getCellStringValue(Cell cell) {
if (cell.getCellTypeEnum().equals(CellType.STRING)) { if (cell.getCellTypeEnum().equals(CellType.STRING)) {
......
...@@ -59,7 +59,7 @@ org_sync_token=174af08f ...@@ -59,7 +59,7 @@ org_sync_token=174af08f
dd_pubkey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ== dd_pubkey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ==
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts/glMonthlyBal?pageNum=1&pageSize=1000&ledgerId=2021&companyCode=120200&period=2018-11 ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
#tableau config #tableau config
tableau_get_ticket=http://47.94.233.173:16010/trusted?username=%s tableau_get_ticket=http://47.94.233.173:16010/trusted?username=%s
......
...@@ -892,7 +892,7 @@ ...@@ -892,7 +892,7 @@
"Form":"表格", "Form":"表格",
"DomesticDataImport":"国内数据", "DomesticDataImport":"国内数据",
"InternationalDataImport":"国际税数据", "InternationalDataImport":"国际税数据",
"TBEBITForm":"TB EBIT 表格", "TBEBITForm":"TP EBIT 表格",
"ClickEnsureTip": "请点击确定按钮!", "ClickEnsureTip": "请点击确定按钮!",
"MenuUnreturnedTax": "未返还税金分析", "MenuUnreturnedTax": "未返还税金分析",
"MenuTaxComparison": "未返还/返还后税金比较", "MenuTaxComparison": "未返还/返还后税金比较",
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
$scope.selectCountry = ''; $scope.selectCountry = '';
$scope.internationalDataList = constant.internationalDataList; $scope.internationalDataList = constant.internationalDataList;
$scope.countryList = constant.countryCNList; $scope.countryCNNAMEList = constant.countryCNList;
var date = new Date(); var date = new Date();
var year = date.getFullYear(); var year = date.getFullYear();
...@@ -195,12 +195,12 @@ ...@@ -195,12 +195,12 @@
} }
if (!$scope.selectCountry || '' === $scope.selectCountry) { if (!$scope.selectCountry || '' === $scope.selectCountry) {
SweetAlert.warning($translate.instant('PleaseSelectFileFirst')); SweetAlert.warning($translate.instant('PleaseSelectCountryFirst'));
return; return;
} }
if (!$scope.selectCompany || '' === $scope.selectCompany) { if (!$scope.selectCompany || '' === $scope.selectCompany) {
SweetAlert.warning($translate.instant('PleaseSelectFileFirst')); SweetAlert.warning($translate.instant('PleaseSelectCompanyFirst'));
return; return;
} }
...@@ -576,8 +576,8 @@ ...@@ -576,8 +576,8 @@
refreshGrid(); refreshGrid();
}; };
$scope.selectCountryEvent = function (country) { $scope.selectCountryEvent = function () {
$scope.selectCountry = country; ////$scope.selectCountry = country;
refreshGrid(); refreshGrid();
}; };
...@@ -654,11 +654,32 @@ ...@@ -654,11 +654,32 @@
//机构下拉设置 //机构下拉设置
$scope.selectOrgOptions = { $scope.selectOrgOptionsContry = {
displayExpr: 'name', displayExpr: 'name',
valueExpr: 'id', valueExpr: 'id',
bindingOptions: { bindingOptions: {
value: 'relation._orgId', value: '_selectCountry',
dataSource: 'countryCNNAMEList'
},
height: '30px',
placeholder: $translate.instant('PleaseSelected'),
showClearButton: true,
searchEnabled: true,
noDataText: $translate.instant('RevenueNoOrgData'),
showSelectionControls: false,
onInitialized : function(e){
},
onItemClick: function (e) {
$scope.selectCountryEvent();
}
};
$scope.selectOrgOptionsComany = {
displayExpr: 'name',
valueExpr: 'id',
bindingOptions: {
value: '_selectCompany',
dataSource: 'companyList' dataSource: 'companyList'
}, },
height: '30px', height: '30px',
...@@ -670,12 +691,23 @@ ...@@ -670,12 +691,23 @@
onInitialized : function(e){ onInitialized : function(e){
}, },
onItemClick: function (e) { onItemClick: function (e) {
loadCellData($scope.relation.period, e.itemData.id,function(){ $scope.selectCompanyEvent(e.itemData);
$scope.relation.orgId = e.itemData.id; /* loadCellData($scope.relation.period, e.itemData.id,function(){
$scope.relation.orgName = e.itemData.name; $scope.selectCompany = e.itemData.name;
}); });*/
} }
}; };
$scope._selectCountry = null;
$scope.$watch('_selectCountry', function(n, o){
if(n != undefined )
$scope.selectCountry = n.pop();
});
$scope._selectCompany = null;
$scope.$watch('_selectCompany', function(n, o){
if(n != undefined )
$scope.selectCompany = n.pop();
});
/*------------------------------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------------------------------*/
//开始 //开始
......
...@@ -10,9 +10,10 @@ ...@@ -10,9 +10,10 @@
<!--导航栏--> <!--导航栏-->
<div id="tab_total"> <div id="tab_total">
<form class="form-inline" id="navigationForm" name="navigationForm"> <form class="form-inline" id="navigationForm" name="navigationForm">
<div class="form-group" ng-style="setButtonWrapStyle()"> <div class="form-group" ng-style="setButtonWrapStyle()" style="width:100%;">
<div class="import-wrapper" style="margin-left: 17px;"> <div class="import-wrapper" style="margin-left: 17px;">
<div class="row"> <div class="row" style="margin-top: 10px;">
<div class="col-sm-7">
<span class="text-bold" translate="SelectedImportType"></span>: <span class="text-bold" translate="SelectedImportType"></span>:
<div class="dropdown" style="margin-left:10px"> <div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2"
...@@ -34,7 +35,8 @@ ...@@ -34,7 +35,8 @@
readonly="readonly" ng-model="UploadPeriodTime"/> readonly="readonly" ng-model="UploadPeriodTime"/>
<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 class="col-sm-5" style="width:60%;padding-left: 0px;">
<button type="button" <button type="button"
ngf-select="" type="file" ng-model="importExcelFile" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx" ngf-multiple="false" ngf-select="" type="file" ng-model="importExcelFile" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx" ngf-multiple="false"
ngf-allow-dir="false" class="btn btn-vat-third" > ngf-allow-dir="false" class="btn btn-vat-third" >
...@@ -56,9 +58,11 @@ ...@@ -56,9 +58,11 @@
translate="ExportBtn" translate="ExportBtn"
ng-click="doExport()"></button> ng-click="doExport()"></button>
</div> </div>
</div>
<div class="row" style="margin-top: 10px;"> <div class="row" style="margin-top: 10px;">
<span class="text-bold" translate="Country"></span>: <span class="text-bold" translate="Country" style="position: relative; top: -7px;">:</span>
<div class="dropdown" style="margin-left:10px"> <!-- <div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu3" <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu3"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 150px;margin-left: 28px;"> data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 150px;margin-left: 28px;">
{{selectCountry ? ((selectCountry)|translate):('PleaseSelect' | translate)}} {{selectCountry ? ((selectCountry)|translate):('PleaseSelect' | translate)}}
...@@ -71,9 +75,11 @@ ...@@ -71,9 +75,11 @@
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>-->
<span class="text-bold" translate="Company"></span>: <div dx-tag-box="selectOrgOptionsContry" style="width: 287px;display: inline-block"></div>
<div class="dropdown" style="margin-left:38px"> <span class="text-bold" translate="Company" style="position: relative; top: -7px;">:</span>
<div dx-tag-box="selectOrgOptionsComany" style="width: 287px;display: inline-block"></div>
<!-- <div class="dropdown" style="margin-left:38px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu4" <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu4"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 320px;"> data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 320px;">
{{selectCompany ? ((selectCompany)|translate):('PleaseSelect' | translate)}} {{selectCompany ? ((selectCompany)|translate):('PleaseSelect' | translate)}}
...@@ -86,7 +92,7 @@ ...@@ -86,7 +92,7 @@
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>-->
</div> </div>
</div> </div>
</div> </div>
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
.import-wrapper { .import-wrapper {
span { span {
margin-left: 10px; /* margin-left: 10px;*/
color: #333; color: #333;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
font-style: normal; font-style: normal;
...@@ -147,10 +147,10 @@ ...@@ -147,10 +147,10 @@
} }
input { input {
width: 50px; width:100%;
outline: none; outline: none;
border-radius: 3px; border-radius: 3px;
border: 1px solid #3c3a36; /* border: 1px solid #3c3a36;*/
padding: 2px; padding: 2px;
text-align: center; text-align: center;
} }
......
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
var addEbitRow = function (sheet) { var addEbitRow = function (sheet) {
if (sheet == undefined || sheet == null) if (sheet == undefined || sheet == null)
sheet = scope.spread.getActiveSheet(); sheet = scope.spread.getActiveSheet();
sheet.setColumnWidth(0, 400) //sheet.setColumnWidth(0, 2)
//添加单元格 //添加单元格
if (sheet.getRowCount() > 43) if (sheet.getRowCount() > 43)
return; return;
...@@ -225,6 +225,9 @@ ...@@ -225,6 +225,9 @@
///解锁指定单元格 ///解锁指定单元格
sheet.getCell(38, 2).locked(false);//特殊因素 sheet.getCell(38, 2).locked(false);//特殊因素
sheet.getCell(40, 2).locked(false);//ebit比率 sheet.getCell(40, 2).locked(false);//ebit比率
//
sheet.setFormatter( 38, 2,"0.00");
sheet.setFormatter( 40, 2,"0.00");
}; };
// 每个单元格大致由以下部分构成:_SumAll(_Inter(...)+_Manual(...)+C1) // 每个单元格大致由以下部分构成:_SumAll(_Inter(...)+_Manual(...)+C1)
...@@ -298,7 +301,7 @@ ...@@ -298,7 +301,7 @@
// 根据已有信息通过spreadJS计算各单元格的值 // 根据已有信息通过spreadJS计算各单元格的值
var setData = function (init) { var setData = function (upload) {
var sheet = scope.spread.sheets[0]; var sheet = scope.spread.sheets[0];
/* if (!init && scope.relation.broadcast == true) { /* if (!init && scope.relation.broadcast == true) {
scope.relation.loadEbitCell(sheet); scope.relation.loadEbitCell(sheet);
...@@ -313,7 +316,14 @@ ...@@ -313,7 +316,14 @@
}*/ }*/
scope.spread.suspendPaint(); scope.spread.suspendPaint();
if(upload){
scope.relation.loadEbitCell(sheet); scope.relation.loadEbitCell(sheet);
lockCell(scope.spread);
scope.spread.resumePaint();
return
}else{
scope.relation.loadEbitCell(sheet);
}
/* if (scope.reportSource.length == 0 && scope.relation.emptyData && scope.relation.emptyData == true) { /* if (scope.reportSource.length == 0 && scope.relation.emptyData && scope.relation.emptyData == true) {
_init(scope.templateId, true);///如果没有数据,需要重新加载 _init(scope.templateId, true);///如果没有数据,需要重新加载
lockCell(scope.spread); lockCell(scope.spread);
...@@ -349,6 +359,7 @@ ...@@ -349,6 +359,7 @@
} }
}; };
scope.relation.setData = setData;
(function initialize() { (function initialize() {
loadSheet(scope.templateId); loadSheet(scope.templateId);
})(); })();
......
...@@ -2924,10 +2924,12 @@ ...@@ -2924,10 +2924,12 @@
onInitialized : function(e){ onInitialized : function(e){
}, },
onItemClick: function (e) { onItemClick: function (e) {
setTimeout(function(){
loadCellData($scope.relation.period, e.itemData.id,function(){ loadCellData($scope.relation.period, e.itemData.id,function(){
$scope.relation.orgId = e.itemData.id; $scope.relation.orgId = e.itemData.id;
$scope.relation.orgName = e.itemData.name; $scope.relation.orgName = e.itemData.name;
}); });
}, 500);
} }
}; };
...@@ -2951,16 +2953,18 @@ ...@@ -2951,16 +2953,18 @@
vatReportService.saveAndRefresh($scope.relation.orgId, $scope.relation.period, specialConsiderations, ebitRate ).success(function(res){ vatReportService.saveAndRefresh($scope.relation.orgId, $scope.relation.period, specialConsiderations, ebitRate ).success(function(res){
if(res.result){ if(res.result){
var cb = function(){
$scope.relation.data = res.data; $scope.relation.data = res.data;
}
$timeout(function(){ $timeout(function(){
spreadTODb(); spreadTODb(cb);
}, 3000); }, 3000);
} }
}).error(function(error){ }).error(function(error){
}); });
} }
var spreadTODb = function(){ var spreadTODb = function(cb){
/*//spread序列化参数 /*//spread序列化参数
var serializationOption = { var serializationOption = {
ignoreFormula: false, // indicate to ignore the style when convert workbook to json, default value is false ignoreFormula: false, // indicate to ignore the style when convert workbook to json, default value is false
...@@ -3000,6 +3004,7 @@ ...@@ -3000,6 +3004,7 @@
success: function (data) { success: function (data) {
if(data.result){ if(data.result){
//alert("上传成功!"); //alert("上传成功!");
cb();
}else{ }else{
SweetAlert.error(data.resultMsg); SweetAlert.error(data.resultMsg);
} }
...@@ -3016,6 +3021,9 @@ ...@@ -3016,6 +3021,9 @@
}); });
//上传模板 //上传模板
$scope.upload = function (file) { $scope.upload = function (file) {
if(file.length == 0)
return
file = file[0];
frontImport(file);//前端导入 frontImport(file);//前端导入
/*if(file.length == 0) /*if(file.length == 0)
return return
...@@ -3095,6 +3103,7 @@ ...@@ -3095,6 +3103,7 @@
excelIo.open(file, function (json) { excelIo.open(file, function (json) {
var workbookObj = json; var workbookObj = json;
$scope.spread.fromJSON(workbookObj); $scope.spread.fromJSON(workbookObj);
$scope.relation.setData(true);
}, function (e) { }, function (e) {
// process error // process error
alert(e.errorMessage); alert(e.errorMessage);
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
, vatSessionService, enums, vatOperationLogService , vatSessionService, enums, vatOperationLogService
, projectService, vatCommonService,orgService,templateService) { , projectService, vatCommonService,orgService,templateService) {
'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;
......
...@@ -149,10 +149,10 @@ ...@@ -149,10 +149,10 @@
} }
input { input {
width: 50px; width: 100%;
outline: none; outline: none;
border-radius: 3px; border-radius: 3px;
border: 1px solid #3c3a36; /* border: 1px solid #3c3a36;*/
padding: 2px; padding: 2px;
text-align: center; text-align: center;
} }
......
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