Commit 6e3219ad authored by zhkwei's avatar zhkwei

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

parents 5192642d fa3ea239
......@@ -57,7 +57,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.*;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
......@@ -233,8 +232,7 @@ public class ReportServiceImpl extends BaseService {
return operationResult;
}
private void clearPeriodData(String projectId, Integer period, List<Long> templateIds, boolean isMergeManualData) {
if (templateIds.isEmpty()) templateIds.add(Long.MAX_VALUE);
private void clearPeriodData(String projectId, Integer period, boolean isMergeManualData) {
PeriodFormulaBlockExample periodFormulaBlockExample = new PeriodFormulaBlockExample();
periodFormulaBlockExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period);
periodFormulaBlockMapper.deleteByExample(periodFormulaBlockExample);
......@@ -244,15 +242,15 @@ public class ReportServiceImpl extends BaseService {
periodTaxRuleSettingMapper.deleteByExample(periodTaxRuleSettingExample);
PeriodCellTemplateExample periodCellTemplateExample = new PeriodCellTemplateExample();
periodCellTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period).andReportTemplateIdNotIn(templateIds);
periodCellTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period);
periodCellTemplateMapper.deleteByExample(periodCellTemplateExample);
PeriodCellTemplateConfigExample periodCellTemplateConfigExample = new PeriodCellTemplateConfigExample();
periodCellTemplateConfigExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period).andReportTemplateIdNotIn(templateIds);
periodCellTemplateConfigExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period);
periodCellTemplateConfigMapper.deleteByExample(periodCellTemplateConfigExample);
PeriodTemplateExample periodTemplateExample = new PeriodTemplateExample();
periodTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period).andTemplateIdNotIn(templateIds);
periodTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period);
periodTemplateMapper.deleteByExample(periodTemplateExample);
PeriodTaxPayerReportRuleExample periodTaxPayerReportRuleExample = new PeriodTaxPayerReportRuleExample();
......@@ -306,12 +304,13 @@ public class ReportServiceImpl extends BaseService {
}
private void updateConfig(String projectId, Integer period, Boolean isMergeManualData, List<Template> templates, PeriodJob job) {
List<Long> exceptTemplateIds = templateMapper.getIdsForExceptTemplate();
//财务报表不删除,这个逻辑用不到,先注释掉
// List<Long> exceptTemplateIds = templateMapper.getIdsForExceptTemplate();
//根据收入类型映射生成开票记录关联数据
assembleInvoiceRecord(projectId, period, isMergeManualData);
//生成trial_balance_final数据
assembleTrialBalanceFinal(projectId, period);
clearPeriodData(projectId, period, exceptTemplateIds, isMergeManualData);
clearPeriodData(projectId, period, isMergeManualData);
copyTemplateAndConfigFromAdmin(projectId, templates, period);
setStatus(job, STATUS_END);
periodJobMapper.updateByPrimaryKey(job);
......@@ -375,8 +374,10 @@ public class ReportServiceImpl extends BaseService {
destRecord.setRevenueCofId(map.get(mapping.getContent()));
InvoiceRecordExample recordExample = new InvoiceRecordExample();
recordExample.createCriteria().andProjectIdEqualTo(projectId)
.andOrganizationIdEqualTo(mapping.getOrgId()).andBillingContentEqualTo(mapping.getContent()).
andPeriodEqualTo(Integer.valueOf(queryDate.replace("-", "")));
.andOrganizationIdEqualTo(mapping.getOrgId()).andBillingContentEqualTo(mapping.getContent())
.andTaxRateEqualTo(mapping.getTaxRate())
.andDepartmentEqualTo(mapping.getOuName())
.andPeriodEqualTo(Integer.valueOf(queryDate.replace("-", "")));
invoiceRecordMapper.updateByExampleSelective(destRecord, recordExample);
}
}
......@@ -877,8 +878,8 @@ public class ReportServiceImpl extends BaseService {
row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue(0.00);
} else if (1 == config.getAccountType()) {//科目
row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue(
"DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",1,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")-"
+ "JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",1,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")");
"DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",3,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")-"
+ "JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",3,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")");
} else if (2 == config.getAccountType()) {//手工输入
} else {
......@@ -896,9 +897,9 @@ public class ReportServiceImpl extends BaseService {
} else if (3 == config.getTaxBase()) {//手工录入
} else if (4 == config.getTaxBase()) {//借方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("JFFS(\"" + config.getBaseDrCode() + "\"," + project.getYear() + "," + period + ",1,,)");
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("JFFS(\"" + config.getBaseDrCode() + "\"," + project.getYear() + "," + period + ",3,,)");
} else if (5 == config.getTaxBase()) {//贷方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("DFFS(\"" + config.getBaseCrCode() + "\"," + project.getYear() + "," + period + ",1,,)");
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("DFFS(\"" + config.getBaseCrCode() + "\"," + project.getYear() + "," + period + ",3,,)");
} else {
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("");
}
......@@ -934,7 +935,7 @@ public class ReportServiceImpl extends BaseService {
sumStr += cellNum + ",";
}
sumStr += "\")";
sumStr = sumStr.replace(",\")", "\")");
// sumStr = sumStr.replace(",\")", "\")");
sumRow.getCell(entry.getKey()).setCellValue(sumStr);
}
......@@ -2091,16 +2092,17 @@ public class ReportServiceImpl extends BaseService {
PeriodDataSource dataSourceModel = null;
if (dataSourceExtendDtos.size() > 0) {
dataSourceModel = dataSourceExtendDtos.get(0).getDataSource();
dataSourceModel= periodDataSourceMapper.selectByPrimaryKey(dataSourceModel.getId());
if (StringUtils.isBlank(data.getKeyinData()))
updateCellValueForDataSourceChange(dataSourceModel, data.getAmount());
originalAmount = dataSourceModel.getAmount() != null ? dataSourceModel.getAmount() : new BigDecimal("0");
dataSourceModel.setName(data.getName());
dataSourceModel.setDescription(data.getDescription());
dataSourceModel.setAmount(data.getAmount());
dataSourceModel.setAmount(data.getAmount()==null?new BigDecimal(0):data.getAmount());
dataSourceModel.setUpdateBy("Admin");
dataSourceModel.setKeyinData(data.getKeyinData());
dataSourceModel.setUpdateTime(new Date());
periodDataSourceMapper.updateByPrimaryKeySelective(dataSourceModel);
periodDataSourceMapper.updateByPrimaryKey(dataSourceModel);
} else {
dataSourceModel = new PeriodDataSource();
Long cellDataSourceId = distributedIdService.nextId();
......
<template>
<div id="tableau">
<div id="tableau" style="margin-bottom: 45px;">
<!-- <button @click="initViz">nice</button>-->
</div>
</template>
......@@ -72,7 +72,7 @@
if (!this.options) {
options = {
height: this.height ? this.height : 1000,
height: this.height ? this.height: 1000,
width: this.width ? this.width : 1000,
hideTabs: true,
hideToolbar: true,
......
......@@ -6,7 +6,7 @@
"PleaseChecksRequired":"Please Checks Required",
"Business Line":"Business Line",
"Company Name":"Company Name",
"Effective_Date":"Effective_Date",
"Effective_Date":"Effective Date",
"Period":"Period",
"Due Date":"Due Date",
"Tax Type":"Tax Type",
......
......@@ -927,7 +927,7 @@
"false": "否",
"ConditionColumnNum": "条件列",
"Condition": "查询条件",
"Cancel4Tax": "取消",
"Cancel": "取消",
"FinancialStatementsType": "财务报表",
"~MustBeEndOneApp": "I Must be the End One, please!"
}
......@@ -193,7 +193,7 @@
></button>
<!--ng-disabled="newDocFileTypeForm.roleName.$invalid || newDocFileTypeForm.service_id.$invalid"-->
<button type="button" class="btn btn-third" data-dismiss="modal"
ng-click="cancelDocFileType()" translate="Cancel4Tax"></button>
ng-click="cancelDocFileType()" translate="Cancel"></button>
</center>
</div>
</form>
......
......@@ -537,7 +537,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: $translate.instant('Confirm'),
cancelButtonText: $translate.instant('Cancel4Tax'),
cancelButtonText: $translate.instant('Cancel'),
closeOnConfirm: true,
closeOnCancel: true
},
......@@ -616,7 +616,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: $translate.instant('Confirm'),
cancelButtonText: $translate.instant('Cancel4Tax'),
cancelButtonText: $translate.instant('Cancel'),
closeOnConfirm: true,
closeOnCancel: true
},
......@@ -721,7 +721,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: $translate.instant('Confirm'),
cancelButtonText: $translate.instant('Cancel4Tax'),
cancelButtonText: $translate.instant('Cancel'),
closeOnConfirm: true,
closeOnCancel: true
},
......@@ -1631,6 +1631,7 @@ taxDocumentManageModule.directive('pdfPreview', function () {
if(typeof dataURL =="string"){
pdfData = convertDataURIToBinary(dataURL);
}
pdfPromise=window.PDFJS.getDocument({data:pdfData});
return window.PDFJS.getDocument({data:pdfData});
}).then(function(data) {
pdfSumPages = data.numPages;
......
......@@ -24,4 +24,4 @@
if(ddTicket==undefined || ddTicket=="" || ddTicket == null){
document.location=ReUrl;
}</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.cf16809e.css rel=preload as=style><link href=css/chunk-vendors.ce5e3dd4.css rel=preload as=style><link href=js/app.d72258a0.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.cf16809e.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.d72258a0.js></script></body></html>
\ No newline at end of file
}</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.cf16809e.css rel=preload as=style><link href=css/chunk-vendors.ce5e3dd4.css rel=preload as=style><link href=js/app.d48d460b.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.cf16809e.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.d48d460b.js></script></body></html>
\ 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