Commit dc7fd7a0 authored by kevin's avatar kevin

#

parent 5a872d30
......@@ -548,6 +548,8 @@ public class AnalysisServiceImpl extends BaseService {
if (isSheetEmpty(sheet)) continue;
List<AnalysisInternationalBusinessData> lists = Lists.newArrayList();
for (int j = 1; j <= sheet.getLastRowNum(); j++) {
if(j>2)
break;
AnalysisInternationalBusinessData model = new AnalysisInternationalBusinessData();
model.setId(idService.nextId());
model.setPeriod(selectedPer);
......
......@@ -2520,7 +2520,7 @@ public class ReportServiceImpl extends BaseService {
}
InputStream inputStream = httpFileService.getUserTemplate(path);
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));
}
String zipPath1 = zipPath + "/sizegang.zip";
......@@ -2532,6 +2532,13 @@ public class ReportServiceImpl extends BaseService {
InputStream is = new ByteArrayInputStream(barray);*/
// 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) {
if (cell.getCellTypeEnum().equals(CellType.STRING)) {
......
......@@ -59,7 +59,7 @@ org_sync_token=174af08f
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_get_ticket=http://47.94.233.173:16010/trusted?username=%s
......
......@@ -892,7 +892,7 @@
"Form":"表格",
"DomesticDataImport":"国内数据",
"InternationalDataImport":"国际税数据",
"TBEBITForm":"TB EBIT 表格",
"TBEBITForm":"TP EBIT 表格",
"ClickEnsureTip": "请点击确定按钮!",
"MenuUnreturnedTax": "未返还税金分析",
"MenuTaxComparison": "未返还/返还后税金比较",
......
......@@ -49,7 +49,7 @@
$scope.selectCountry = '';
$scope.internationalDataList = constant.internationalDataList;
$scope.countryList = constant.countryCNList;
$scope.countryCNNAMEList = constant.countryCNList;
var date = new Date();
var year = date.getFullYear();
......@@ -195,12 +195,12 @@
}
if (!$scope.selectCountry || '' === $scope.selectCountry) {
SweetAlert.warning($translate.instant('PleaseSelectFileFirst'));
SweetAlert.warning($translate.instant('PleaseSelectCountryFirst'));
return;
}
if (!$scope.selectCompany || '' === $scope.selectCompany) {
SweetAlert.warning($translate.instant('PleaseSelectFileFirst'));
SweetAlert.warning($translate.instant('PleaseSelectCompanyFirst'));
return;
}
......@@ -576,8 +576,8 @@
refreshGrid();
};
$scope.selectCountryEvent = function (country) {
$scope.selectCountry = country;
$scope.selectCountryEvent = function () {
////$scope.selectCountry = country;
refreshGrid();
};
......@@ -654,11 +654,32 @@
//机构下拉设置
$scope.selectOrgOptions = {
$scope.selectOrgOptionsContry = {
displayExpr: 'name',
valueExpr: 'id',
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'
},
height: '30px',
......@@ -670,12 +691,23 @@
onInitialized : function(e){
},
onItemClick: function (e) {
loadCellData($scope.relation.period, e.itemData.id,function(){
$scope.relation.orgId = e.itemData.id;
$scope.relation.orgName = e.itemData.name;
});
$scope.selectCompanyEvent(e.itemData);
/* loadCellData($scope.relation.period, e.itemData.id,function(){
$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 @@
<!--导航栏-->
<div id="tab_total">
<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="row">
<div class="row" style="margin-top: 10px;">
<div class="col-sm-7">
<span class="text-bold" translate="SelectedImportType"></span>:
<div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2"
......@@ -34,7 +35,8 @@
readonly="readonly" ng-model="UploadPeriodTime"/>
<i class="fa fa-calendar imp-subheader red-color" style="width:20px;"></i>
</div>
</div>
<div class="col-sm-5" style="width:60%;padding-left: 0px;">
<button type="button"
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" >
......@@ -56,9 +58,11 @@
translate="ExportBtn"
ng-click="doExport()"></button>
</div>
</div>
<div class="row" style="margin-top: 10px;">
<span class="text-bold" translate="Country"></span>:
<div class="dropdown" style="margin-left:10px">
<span class="text-bold" translate="Country" style="position: relative; top: -7px;">:</span>
<!-- <div class="dropdown" style="margin-left:10px">
<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;">
{{selectCountry ? ((selectCountry)|translate):('PleaseSelect' | translate)}}
......@@ -71,9 +75,11 @@
</div>
</li>
</ul>
</div>
<span class="text-bold" translate="Company"></span>:
<div class="dropdown" style="margin-left:38px">
</div>-->
<div dx-tag-box="selectOrgOptionsContry" style="width: 287px;display: inline-block"></div>
<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"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 320px;">
{{selectCompany ? ((selectCompany)|translate):('PleaseSelect' | translate)}}
......@@ -86,7 +92,7 @@
</div>
</li>
</ul>
</div>
</div>-->
</div>
</div>
</div>
......
......@@ -109,7 +109,7 @@
.import-wrapper {
span {
margin-left: 10px;
/* margin-left: 10px;*/
color: #333;
font-family: "Microsoft YaHei";
font-style: normal;
......@@ -147,10 +147,10 @@
}
input {
width: 50px;
width:100%;
outline: none;
border-radius: 3px;
border: 1px solid #3c3a36;
/* border: 1px solid #3c3a36;*/
padding: 2px;
text-align: center;
}
......
......@@ -194,7 +194,7 @@
var addEbitRow = function (sheet) {
if (sheet == undefined || sheet == null)
sheet = scope.spread.getActiveSheet();
sheet.setColumnWidth(0, 400)
//sheet.setColumnWidth(0, 2)
//添加单元格
if (sheet.getRowCount() > 43)
return;
......@@ -225,6 +225,9 @@
///解锁指定单元格
sheet.getCell(38, 2).locked(false);//特殊因素
sheet.getCell(40, 2).locked(false);//ebit比率
//
sheet.setFormatter( 38, 2,"0.00");
sheet.setFormatter( 40, 2,"0.00");
};
// 每个单元格大致由以下部分构成:_SumAll(_Inter(...)+_Manual(...)+C1)
......@@ -298,7 +301,7 @@
// 根据已有信息通过spreadJS计算各单元格的值
var setData = function (init) {
var setData = function (upload) {
var sheet = scope.spread.sheets[0];
/* if (!init && scope.relation.broadcast == true) {
scope.relation.loadEbitCell(sheet);
......@@ -313,7 +316,14 @@
}*/
scope.spread.suspendPaint();
if(upload){
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) {
_init(scope.templateId, true);///如果没有数据,需要重新加载
lockCell(scope.spread);
......@@ -349,6 +359,7 @@
}
};
scope.relation.setData = setData;
(function initialize() {
loadSheet(scope.templateId);
})();
......
......@@ -2924,10 +2924,12 @@
onInitialized : function(e){
},
onItemClick: function (e) {
setTimeout(function(){
loadCellData($scope.relation.period, e.itemData.id,function(){
$scope.relation.orgId = e.itemData.id;
$scope.relation.orgName = e.itemData.name;
});
}, 500);
}
};
......@@ -2951,16 +2953,18 @@
vatReportService.saveAndRefresh($scope.relation.orgId, $scope.relation.period, specialConsiderations, ebitRate ).success(function(res){
if(res.result){
var cb = function(){
$scope.relation.data = res.data;
}
$timeout(function(){
spreadTODb();
spreadTODb(cb);
}, 3000);
}
}).error(function(error){
});
}
var spreadTODb = function(){
var spreadTODb = function(cb){
/*//spread序列化参数
var serializationOption = {
ignoreFormula: false, // indicate to ignore the style when convert workbook to json, default value is false
......@@ -3000,6 +3004,7 @@
success: function (data) {
if(data.result){
//alert("上传成功!");
cb();
}else{
SweetAlert.error(data.resultMsg);
}
......@@ -3016,6 +3021,9 @@
});
//上传模板
$scope.upload = function (file) {
if(file.length == 0)
return
file = file[0];
frontImport(file);//前端导入
/*if(file.length == 0)
return
......@@ -3095,6 +3103,7 @@
excelIo.open(file, function (json) {
var workbookObj = json;
$scope.spread.fromJSON(workbookObj);
$scope.relation.setData(true);
}, function (e) {
// process error
alert(e.errorMessage);
......
......@@ -7,7 +7,6 @@
, vatSessionService, enums, vatOperationLogService
, projectService, vatCommonService,orgService,templateService) {
'use strict';
var comment = vatSessionService.project.name + " " + vatSessionService.project.year + "年" + vatSessionService.month + "月";
$scope.period = $scope.periodId;
$scope.moduleid = enums.vatModuleEnum.Import_TrialBalance;
......
......@@ -149,10 +149,10 @@
}
input {
width: 50px;
width: 100%;
outline: none;
border-radius: 3px;
border: 1px solid #3c3a36;
/* border: 1px solid #3c3a36;*/
padding: 2px;
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