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