Commit 4020adf1 authored by zhkwei's avatar zhkwei

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents 53c3e1aa 85734248
......@@ -2555,17 +2555,17 @@ public class ReportServiceImpl extends BaseService {
/* if (j <= 36)
continue;*/
for (int k = 1; k < sheet.getRow(0).getLastCellNum(); k++) {
if (k != 1 || k != 2)//这里只保存两列
continue;
EbitCellData ebitCellData1 = new EbitCellData();
ebitCellData1.setId(idService.nextId());
ebitCellData1.setOrganizationId(orgId);
ebitCellData1.setPeriod(period);
ebitCellData1.setCreateTime(new Date());
ebitCellData1.setCol(k);
ebitCellData1.setRow(j);
ebitCellData1.setData(getCellStringValue(sheet.getRow(j).getCell(j)));
ebitCellDataList.add(ebitCellData1);
if (k ==1 || k == 2){
EbitCellData ebitCellData1 = new EbitCellData();
ebitCellData1.setId(idService.nextId());
ebitCellData1.setOrganizationId(orgId);
ebitCellData1.setPeriod(period);
ebitCellData1.setCreateTime(new Date());
ebitCellData1.setCol(k);
ebitCellData1.setRow(j);
ebitCellData1.setData(getCellStringValue(sheet.getRow(j).getCell(k)));
ebitCellDataList.add(ebitCellData1);
}//这里只保存两列{}
}
}
if (ebitCellDataList.size() == 0) {
......@@ -2687,6 +2687,9 @@ public class ReportServiceImpl extends BaseService {
sheetAt.createRow(i).createCell(0).setCellValue(ebitTitle.get(i - 37));
}
List<EbitDataDto> ebitCellDataList = new ArrayList<>();
if (finalMap.size() == 0)
throw new Exception("没有利润表模板,无法批量导出,请上传模板");
for (Map.Entry<String, List<EbitCellData>> entry : finalMap.entrySet()) {
//加载计算ebit数据
......@@ -2716,12 +2719,13 @@ public class ReportServiceImpl extends BaseService {
break;
if (sheetAt.getRow(m) != null && sheetAt.getRow(m).getCell(_index + 1) != null) {
for (EbitCellData ebitCellData : entry.getValue()) {
if (m == ebitCellData.getRow() && ebitCellData.getCol() == (_index + 1)) {
if (m == ebitCellData.getRow()) {
try {
sheetAt.getRow(m).getCell(_index + 1).setCellValue(ebitCellData.getData());
} catch (Exception e) {
sheetAt.getRow(m).createCell(_index + 1).setCellValue(ebitCellData.getData());
}
System.out.println(ebitCellData.getData());
}
}
}
......
......@@ -1121,7 +1121,7 @@
});
};
var loadCellData = function (period, orgId) {
var loadCellData = function (period) {
//period = Number(period);
if ($scope.templateId !== undefined) {
//todo: according to templateId and period get reportId
......@@ -2841,10 +2841,8 @@
}
var _date = tempYear.toString() + tempMonth;
_date = Number(_date);
if ($scope.relation.orgId != null) {
$scope.relation.period = _date;
loadCellData(_date, $scope.relation.orgId);//默认当前月
}
$scope.relation.period = _date;
loadCellData(_date, $scope.relation.orgId);//默认当前月
}
};
......@@ -3089,7 +3087,7 @@
$scope.relation.lockCell($scope.spread);
//关闭弹出层
$('#busy-indicator-container').hide();
spreadTODb();
}, function (e) {
alert(e.errorMessage);
if (e.errorCode === 2/*noPassword*/ || e.errorCode === 3 /*invalidPassword*/) {
......@@ -3144,7 +3142,7 @@
sheet.setValue(42, 2, $scope._ebitResult.sixAddtax);
sheet.setValue(43, 2, $scope._ebitResult.klzcjsz);
}
setTimeout(function(){spreadTODb();}, 1000)
}
$scope.singleExport = function () {
......
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