Commit 9ad4b6dc authored by zhkwei's avatar zhkwei

1、红字信息表覆盖导入;2、预提重分类展示;3、固资损失报废日期展示;

parent 841ba56d
...@@ -1046,7 +1046,7 @@ public class DataImportService extends BaseService { ...@@ -1046,7 +1046,7 @@ public class DataImportService extends BaseService {
} }
if (validateRes && EnumTbImportType.CoverImport.getCode().equals(importType)) { if (validateRes && EnumTbImportType.CoverImport.getCode().equals(importType)) {
RedLetterInfoTableExample redLetterInfoTableExample = new RedLetterInfoTableExample(); RedLetterInfoTableExample redLetterInfoTableExample = new RedLetterInfoTableExample();
redLetterInfoTableExample.createCriteria().andSubjectNumEqualTo(companyCode).andFillInDateEqualTo(rlits.get(0).getFillInDate()); redLetterInfoTableExample.createCriteria().andSubjectNumEqualTo(companyCode).andPeriodEqualTo(rlits.get(0).getPeriod());
redLetterInfoTableMapper.deleteByExample(redLetterInfoTableExample); redLetterInfoTableMapper.deleteByExample(redLetterInfoTableExample);
} }
redLetterInfoTableMapper.insertBatch(rlits); redLetterInfoTableMapper.insertBatch(rlits);
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</choose> </choose>
<choose> <choose>
<when test="item.disposedDate != null">#{item.disposedDate,jdbcType=TIMESTAMP},</when> <when test="item.disposedDate != null">#{item.disposedDate,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise> <otherwise>null,</otherwise>
</choose> </choose>
<choose> <choose>
<when test="item.residualRate != null">#{item.residualRate,jdbcType=DECIMAL},</when> <when test="item.residualRate != null">#{item.residualRate,jdbcType=DECIMAL},</when>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
"TotalYearDifferenceAmount": "Total Year Difference Amount:", "TotalYearDifferenceAmount": "Total Year Difference Amount:",
"AdjustmentValue": "Adjustment Value", "AdjustmentValue": "Adjustment Value",
"DisposedDate": "Disposed Date", "DisposedDate": "Disposed Date",
"ResidualRate": "Residual Rate", "ResidualRate": "Residual Amount",
"ResidualValue": "Residual Value", "ResidualValue": "Residual Value",
"TaxMonthDepreciationAmount": "Monthly Depreciation Amount(Tax)", "TaxMonthDepreciationAmount": "Monthly Depreciation Amount(Tax)",
"TaxToCurrentYearDepreciationAmount": "Up To Current Year Depreciation Amount(Tax)", "TaxToCurrentYearDepreciationAmount": "Up To Current Year Depreciation Amount(Tax)",
...@@ -1158,6 +1158,14 @@ ...@@ -1158,6 +1158,14 @@
"BeginOfNextYear": "Begin Of Next Year", "BeginOfNextYear": "Begin Of Next Year",
"PreClassified": "Pre Classified", "PreClassified": "Pre Classified",
"AssetType": "Asset Type", "AssetType": "Asset Type",
"TaxGroupName": "TaxGroupName" "TaxGroupName": "TaxGroupName",
"ProjectDescription": "Project Description",
"ProductDescription": "Product Description",
"Company":"Company",
"CompanyDescription": "Company Description",
"Segment1":"Segment1",
"Segment1Description": "Segment1 Description",
"Segment2":"Segment2",
"Segment2Description": "Segment2 Description"
} }
\ No newline at end of file
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
"TotalYearDifferenceAmount": "差异额:", "TotalYearDifferenceAmount": "差异额:",
"AdjustmentValue": "原值调整值", "AdjustmentValue": "原值调整值",
"DisposedDate": "报废日期", "DisposedDate": "报废日期",
"ResidualRate": "残值", "ResidualRate": "残值",
"ResidualValue": "残值", "ResidualValue": "残值",
"TaxMonthDepreciationAmount": "每月折旧额(税务)", "TaxMonthDepreciationAmount": "每月折旧额(税务)",
"TaxToCurrentYearDepreciationAmount": "截止本年累计折旧额(税务)", "TaxToCurrentYearDepreciationAmount": "截止本年累计折旧额(税务)",
...@@ -1212,8 +1212,13 @@ ...@@ -1212,8 +1212,13 @@
"PreClassified": "预提重分类", "PreClassified": "预提重分类",
"AssetType": "资产类型", "AssetType": "资产类型",
"TaxGroupName": "税务资产分类", "TaxGroupName": "税务资产分类",
"ImportNotMatch" : "导入文件与选择机构或期间不匹配" "ImportNotMatch" : "导入文件与选择机构或期间不匹配",
"ProjectDescription": "项目描述",
"ProductDescription": "产品描述",
"Company":"公司间",
} "CompanyDescription": "公司间描述",
\ No newline at end of file "Segment1":"备用段",
"Segment1Description": "备用段描述",
"Segment2":"备用段",
"Segment2Description": "备用段描述"
}
\ No newline at end of file
...@@ -896,6 +896,7 @@ ...@@ -896,6 +896,7 @@
onValueChanged: function (data) { onValueChanged: function (data) {
$scope.citAssetsListDto.taxAccountCompare = data.value; $scope.citAssetsListDto.taxAccountCompare = data.value;
$scope.taxAccountDifferenceOptions.value = data.value;
getAssetResultList($scope.displayType - 1); getAssetResultList($scope.displayType - 1);
} }
}; };
......
...@@ -53,13 +53,24 @@ ...@@ -53,13 +53,24 @@
{ caption: $translate.instant('usableInvoiceAmount'), dataField: "usableInvoiceAmount", allowEditing: false, fixed: true,width: 150 }, { caption: $translate.instant('usableInvoiceAmount'), dataField: "usableInvoiceAmount", allowEditing: false, fixed: true,width: 150 },
{ caption: $translate.instant('usableBalance'), dataField: "usableBalance", allowEditing: false, fixed: true ,width: 150}, { caption: $translate.instant('usableBalance'), dataField: "usableBalance", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('advanceWriteOff'), dataField: "advanceWriteOff", allowEditing: false, fixed: true,width: 150 }, { caption: $translate.instant('advanceWriteOff'), dataField: "advanceWriteOff", allowEditing: false, fixed: true,width: 150 },
{ caption: $translate.instant('checkOne'), dataField: "checkOne", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('reclassifyAmount'), dataField: "reclassifyAmount", allowEditing: false, fixed: true,width: 150 }, { caption: $translate.instant('Account'), dataField: "subjectCode", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('exchangeRate'), dataField: "exchangeRate", allowEditing: false, fixed: true ,width: 150}, { caption: $translate.instant('AccountDescription'), dataField: "subjectDescription", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('ledgerId'), dataField: "ledgerId", allowEditing: false, fixed: true,width: 150 }, { caption: $translate.instant('AuxiliarySubject'), dataField: "auxiliarySubject", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('debitAdvanceGene'), dataField: "debitAdvanceGene", allowEditing: false, fixed: true,width: 150 }, { caption: $translate.instant('AuxiliarySubjectDescription'), dataField: "auxiliarySubjectDescription", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('creditPrepaidAccounts'), dataField: "creditPrepaidAccounts", allowEditing: false, fixed: true,width: 150 }, { caption: $translate.instant('RevSearchProfitCenterCode'), dataField: "profitCenter", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('remark'), dataField: "remark", allowEditing: false, fixed: true ,width: 150} { caption: $translate.instant('RevSearchProfitCenterName'), dataField: "profitCenterDescription", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('RevDetailProduct'), dataField: "product", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('ProductDescription'), dataField: "productDescription", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('c_projectID'), dataField: "project", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('ProjectDescription'), dataField: "projectDescription", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('Company'), dataField: "company", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('CompanyDescription'), dataField: "companyDescription", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('Segment1'), dataField: "segment1", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('Segment1Description'), dataField: "segment1Description", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('Segment2'), dataField: "segment2", allowEditing: false, fixed: true ,width: 150},
{ caption: $translate.instant('Segment2Description'), dataField: "segment2Description", allowEditing: false, fixed: true ,width: 150},
]; ];
$scope.assetsResultGridOptions = { $scope.assetsResultGridOptions = {
......
...@@ -245,8 +245,8 @@ ...@@ -245,8 +245,8 @@
{caption: $translate.instant('AssetName'), dataField: "assetDescription",width: 200}, {caption: $translate.instant('AssetName'), dataField: "assetDescription",width: 200},
{caption: $translate.instant('BuyDate'), dataField: "buyDate", dataType: "date", format: "yyyy-MM-dd",width: 100}, {caption: $translate.instant('BuyDate'), dataField: "buyDate", dataType: "date", format: "yyyy-MM-dd",width: 100},
{ {
caption: $translate.instant('DepreciationDate2'), caption: $translate.instant('DisposedDate'),
dataField: "depreciationDate", dataField: "disposedDate",
dataType: "date", dataType: "date",
format: "yyyy-MM-dd", format: "yyyy-MM-dd",
width: 100 width: 100
......
...@@ -1013,6 +1013,24 @@ debugger; ...@@ -1013,6 +1013,24 @@ debugger;
} }
} }
}); });
if ('export' == $scope.evenType) {
var xhr = new XMLHttpRequest();
xhr.onload = function (e) {
var arraybuffer = xhr.response;
exportToExcel(arraybuffer, vatSessionService.project.name + '-' + vatSessionService.month + '-纳税申报.xlsx');
$('#busy-indicator-container').hide();
};
xhr.open("POST", apiInterceptor.webApiHostUrl + '/citReport/exportReportData/' + vatSessionService.project.id + '/' + 0, true);
xhr.setRequestHeader("Authorization", apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken());
xhr.setRequestHeader("Content-Type", 'application/json;charset=UTF-8');
xhr.responseType = "arraybuffer";
xhr.send(JSON.stringify({
reportIds: reportIds
}));
return;
}
if ('upload' == $scope.evenType) { if ('upload' == $scope.evenType) {
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.onload = function (e) { xhr.onload = function (e) {
...@@ -1105,6 +1123,105 @@ debugger; ...@@ -1105,6 +1123,105 @@ debugger;
return; return;
}; };
var exportToExcel = function (data, filename) {
var defer = $q.defer();
// var octetStreamMime = 'application/vnd.ms-excel';
var success = false;
// Get the headers
// headers = headers();
// Get the filename from the x-filename header or default to "download.bin"
// var filename = decodeURI(headers['x-file-name']) + defaultFileName;
// Determine the content type from the header or default to "application/octet-stream"
// var contentType = headers['content-type'] || octetStreamMime;
try {
// Try using msSaveBlob if supported
//console.log("Trying saveBlob method ...");
var blob = new Blob([data], {type: "arraybuffer"});
if (navigator.msSaveBlob)
navigator.msSaveBlob(blob, filename);
else {
// Try using other saveBlob implementations, if available
var saveBlob = navigator.webkitSaveBlob || navigator.mozSaveBlob || navigator.saveBlob;
if (saveBlob === undefined) throw "Not supported";
saveBlob(blob, filename);
}
//console.log("saveBlob succeeded");
success = true;
} catch (ex) {
$log.debug("saveBlob method failed with the following exception:");
$log.debug(ex);
}
if (!success) {
// Get the blob url creator
var urlCreator = window.URL || window.webkitURL || window.mozURL || window.msURL;
if (urlCreator) {
// Try to use a download link
var link = document.createElement('a');
if ('download' in link) {
// Try to simulate a click
try {
// Prepare a blob URL
//console.log("Trying download link method with simulated click ...");
var blobdownload = new Blob([data], {type: "arraybuffer"});
var urldownload = urlCreator.createObjectURL(blobdownload);
link.setAttribute('href', urldownload);
// Set the download attribute (Supported in Chrome 14+ / Firefox 20+)
link.setAttribute("download", filename);
// Simulate clicking the download link
var event = document.createEvent('MouseEvents');
event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
link.dispatchEvent(event);
//console.log("Download link method with simulated click succeeded");
success = true;
} catch (ex) {
$log.debug("Download link method with simulated click failed with the following exception:");
$log.debug(ex);
$q.reject();
}
}
if (!success) {
// Fallback to window.location method
try {
// Prepare a blob URL
// Use application/octet-stream when using window.location to force download
//console.log("Trying download link method with window.location ...");
var blobsuccess = new Blob([data], {type: "arraybuffer"});
var urlsuccess = urlCreator.createObjectURL(blobsuccess);
window.location = urlsuccess;
//console.log("Download link method with window.location succeeded");
success = true;
} catch (ex) {
//console.log("Download link method with window.location failed with the following exception:");
$log.debug(ex);
$q.reject();
}
}
}
}
if (!success) {
// Fallback to window.open method
$log.debug("No methods worked for saving the arraybuffer, using last resort window.open");
window.open(httpPath, '_blank', '');
}
//Delete the file
// deleteFile(encodeURI(filename));
defer.resolve('success');
return defer.promise;
};
var timeOutCount = 0; var timeOutCount = 0;
function timeOutExportSpread(exportReportData) { function timeOutExportSpread(exportReportData) {
......
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