Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
76f36f33
Commit
76f36f33
authored
Apr 21, 2019
by
eddie.woo
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_mysql' into uat_didi
parents
eb2d9409
624c28bc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
238 additions
and
38 deletions
+238
-38
Constant.java
...api/src/main/java/pwc/taxtech/atms/constant/Constant.java
+2
-0
CitDataPreviewController.java
...pwc/taxtech/atms/controller/CitDataPreviewController.java
+9
-0
CitReportController.java
...java/pwc/taxtech/atms/controller/CitReportController.java
+29
-0
AnalysisJobServiceImpl.java
...pwc/taxtech/atms/service/impl/AnalysisJobServiceImpl.java
+13
-5
AnalysisServiceImpl.java
...va/pwc/taxtech/atms/service/impl/AnalysisServiceImpl.java
+9
-3
CitDataPreviewServiceImpl.java
.../taxtech/atms/service/impl/CitDataPreviewServiceImpl.java
+0
-0
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+1
-1
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+0
-0
AnalysisTest.java
...test/java/pwc/taxtech/atms/service/impl/AnalysisTest.java
+1
-0
CitAssetEamMappingExtendsMapper.xml
...tech/atms/dao/extends/CitAssetEamMappingExtendsMapper.xml
+1
-1
cit.json
atms-web/src/main/webapp/app-resources/i18n/en-us/cit.json
+11
-2
app.json
atms-web/src/main/webapp/app-resources/i18n/zh-CN/app.json
+4
-4
cit.json
atms-web/src/main/webapp/app-resources/i18n/zh-CN/cit.json
+12
-7
cit-import-asset-list.ctrl.js
...mport/cit-import-asset-list/cit-import-asset-list.ctrl.js
+1
-0
cit-preview-salaryAdvance-list.ctrl.js
...salaryAdvance-list/cit-preview-salaryAdvance-list.ctrl.js
+18
-7
cit-asset-eam-mapping.ctrl.js
...ction/cit-asset-eam-mapping/cit-asset-eam-mapping.ctrl.js
+2
-2
cit-report-view.ctrl.js
...pp/app/cit/report/cit-report-view/cit-report-view.ctrl.js
+117
-0
import-certified-invoices-list.ctrl.js
...fied-invoices-list/import-certified-invoices-list.ctrl.js
+1
-0
import-cit-trial-balance.ctrl.js
...import-cit-trial-balance/import-cit-trial-balance.ctrl.js
+1
-0
vatExportService.js
...rc/main/webapp/app/common/vatservices/vatExportService.js
+1
-1
vatPreviewService.js
...c/main/webapp/app/common/vatservices/vatPreviewService.js
+5
-5
No files found.
atms-api/src/main/java/pwc/taxtech/atms/constant/Constant.java
View file @
76f36f33
...
...
@@ -179,4 +179,5 @@ public final class Constant {
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/controller/CitDataPreviewController.java
View file @
76f36f33
...
...
@@ -23,6 +23,7 @@ import static javax.servlet.http.HttpServletResponse.SC_OK;
/**
* CIT数据预览功能模块Controller
*
* @author zhikai.z.wei
*/
@RestController
...
...
@@ -34,6 +35,7 @@ public class CitDataPreviewController extends BaseController {
/**
* 日记账合并版数据的获取
*
* @param citJournalAdjustDto
* @return
*/
...
...
@@ -45,12 +47,15 @@ public class CitDataPreviewController extends BaseController {
/**
* 日记账合并版导出
*
* @param paras
* @param response
*/
@RequestMapping
(
value
=
"exportJournalMergeData"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
exportJournalMergeData
(
@RequestBody
CitJournalAdjustDto
paras
,
HttpServletResponse
response
)
{
int
count
=
citDataPreviewService
.
exportJournalMergeData2
(
paras
,
response
);
if
(
count
==
0
)
{
response
.
setStatus
(
SC_NO_CONTENT
);
}
else
{
...
...
@@ -61,6 +66,7 @@ public class CitDataPreviewController extends BaseController {
/**
* 试算平衡表生成版的数据获取
*
* @param citTrialBalanceDto
* @return
*/
...
...
@@ -72,6 +78,7 @@ public class CitDataPreviewController extends BaseController {
/**
* 试算平衡表生成版的导出
*
* @param paras
* @param response
*/
...
...
@@ -108,6 +115,7 @@ public class CitDataPreviewController extends BaseController {
/**
* 试算平衡表Mapping版的数据获取
*
* @param citTrialBalanceDto
* @return
*/
...
...
@@ -120,6 +128,7 @@ public class CitDataPreviewController extends BaseController {
/**
* 试算平衡表Mapping版的导出
*
* @param paras
* @param response
*/
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/CitReportController.java
View file @
76f36f33
...
...
@@ -25,6 +25,7 @@ import pwc.taxtech.atms.vat.service.impl.ReportServiceImpl;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayOutputStream
;
import
java.io.OutputStream
;
import
java.util.List
;
import
java.util.Optional
;
...
...
@@ -251,6 +252,34 @@ public class CitReportController {
return
ResponseEntity
.
ok
(
reportService
.
addCellManualDataSource
(
data
,
from
));
}
@RequestMapping
(
value
=
"exportReportData/{projectId}/{period}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@ResponseBody
public
void
exportReportData
(
HttpServletResponse
response
,
@RequestBody
PeriodReportDataParam
param
,
@PathVariable
(
name
=
"period"
,
required
=
false
)
Integer
period
,
@PathVariable
(
name
=
"projectId"
,
required
=
false
)
String
projectId
)
{
OutputStream
ouputStream
=
null
;
try
{
Workbook
tWorkbook
=
citReportService
.
generateReportData
(
param
.
getReportIds
(),
projectId
,
period
);
response
.
setContentType
(
"multipart/form-data"
);
// response.setHeader("Content-Disposition", "attachment;fileName=" + new String(param.getFileName().getBytes("GB2312"), "ISO-8859-1"));
ouputStream
=
response
.
getOutputStream
();
tWorkbook
.
write
(
ouputStream
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
try
{
if
(
ouputStream
!=
null
)
{
ouputStream
.
close
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
@RequestMapping
(
value
=
"uploadReportData/{projectId}/{period}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@ResponseBody
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AnalysisJobServiceImpl.java
View file @
76f36f33
...
...
@@ -203,12 +203,19 @@ public class AnalysisJobServiceImpl extends BaseService {
String
regionMeg
=
regionMap
.
get
(
o
.
getRegionId
());
List
<
String
>
regionMs
=
Lists
.
newArrayList
();
if
(
StringUtils
.
isNotEmpty
(
regionMeg
))
{
regionMs
=
Arrays
.
asList
(
regionMeg
.
split
(
"
.
"
));
regionMs
=
Arrays
.
asList
(
regionMeg
.
split
(
"
,
"
));
}
if
(!
regionMs
.
isEmpty
())
{
am
.
setProvince
(
regionMs
.
get
(
1
)
!=
null
?
regionMs
.
get
(
1
)
:
""
);
am
.
setCity
(
regionMs
.
get
(
2
)
!=
null
?
regionMs
.
get
(
2
)
:
""
);
am
.
setDistrict
(
regionMs
.
get
(
3
)
!=
null
?
regionMs
.
get
(
4
)
:
""
);
if
(
regionMs
.
size
()
==
4
){
am
.
setProvince
(
regionMs
.
get
(
1
)
!=
null
?
regionMs
.
get
(
1
)
:
""
);
am
.
setCity
(
regionMs
.
get
(
2
)
!=
null
?
regionMs
.
get
(
2
)
:
""
);
am
.
setDistrict
(
regionMs
.
get
(
3
)
!=
null
?
regionMs
.
get
(
3
)
:
""
);
}
else
if
(
regionMs
.
size
()
==
3
){
am
.
setProvince
(
regionMs
.
get
(
1
)
!=
null
?
regionMs
.
get
(
1
)
:
""
);
am
.
setCity
(
regionMs
.
get
(
2
)
!=
null
?
regionMs
.
get
(
2
)
:
""
);
}
else
if
(
regionMs
.
size
()
==
2
){
am
.
setProvince
(
regionMs
.
get
(
1
)
!=
null
?
regionMs
.
get
(
1
)
:
""
);
}
}
am
.
setBusinessLine
(
buMap
.
get
(
o
.
getBusinessUnitId
()));
am
.
setCode
(
o
.
getCode
());
...
...
@@ -223,7 +230,8 @@ public class AnalysisJobServiceImpl extends BaseService {
}
analysisMasterMapper
.
insertSelective
(
am
);
}
catch
(
Exception
e
)
{
logger
.
error
(
String
.
format
(
"公司:[%s]生成机构分析数据失败!"
,
o
.
getName
()),
e
);
e
.
printStackTrace
();
logger
.
error
(
String
.
format
(
"生成机构分析数据失败!"
,
e
.
getMessage
()));
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AnalysisServiceImpl.java
View file @
76f36f33
...
...
@@ -932,7 +932,7 @@ public class AnalysisServiceImpl extends BaseService {
.
andCompanyNameEqualTo
(
getCellValue
(
sheetAt
.
getRow
(
i
).
getCell
(
3
),
false
).
toString
())
.
andPeriodEqualTo
(
period
);
List
<
AnalysisMaster
>
analysisMasters
=
analysisMasterMapper
.
selectByExample
(
example
);
if
(
breakFlag
>
3
)
{
if
(
breakFlag
>
20
)
{
logger
.
info
(
"大于三条数据不匹配,直接停止进程"
);
break
;
}
...
...
@@ -962,8 +962,14 @@ public class AnalysisServiceImpl extends BaseService {
salesList
.
add
(
sales
);
}
}
int
salesInt
=
analysisSalesMapper
.
insertBatch
(
salesList
);
int
taxInt
=
analysisTaxMapper
.
insertBatch
(
taxList
);
int
salesInt
=
0
;
if
(
salesList
.
size
()
!=
0
)
{
salesInt
=
analysisSalesMapper
.
insertBatch
(
salesList
);
}
int
taxInt
=
0
;
if
(
taxList
.
size
()
!=
0
)
{
taxInt
=
analysisTaxMapper
.
insertBatch
(
taxList
);
}
logger
.
info
(
"analysis_salesInt 更新数据条数"
+
salesInt
);
logger
.
info
(
"analysis_tax 更新数据条数"
+
taxInt
);
System
.
out
.
println
(
"数据初始化消耗: "
+
(
System
.
currentTimeMillis
()
-
now
));
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitDataPreviewServiceImpl.java
View file @
76f36f33
This diff is collapsed.
Click to expand it.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
76f36f33
...
...
@@ -1047,7 +1047,7 @@ public class DataImportService extends BaseService {
}
if
(
validateRes
&&
EnumTbImportType
.
CoverImport
.
getCode
().
equals
(
importType
))
{
RedLetterInfoTableExample
redLetterInfoTableExample
=
new
RedLetterInfoTableExample
();
redLetterInfoTableExample
.
createCriteria
().
andSubjectNumEqualTo
(
companyCode
).
and
FillInDateEqualTo
(
rlits
.
get
(
0
).
getFillInDate
());
redLetterInfoTableExample
.
createCriteria
().
andSubjectNumEqualTo
(
companyCode
).
and
PeriodEqualTo
(
rlits
.
get
(
0
).
getPeriod
());
redLetterInfoTableMapper
.
deleteByExample
(
redLetterInfoTableExample
);
}
redLetterInfoTableMapper
.
insertBatch
(
rlits
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
76f36f33
This diff is collapsed.
Click to expand it.
atms-api/src/test/java/pwc/taxtech/atms/service/impl/AnalysisTest.java
View file @
76f36f33
...
...
@@ -10,6 +10,7 @@ import pwc.taxtech.atms.common.util.DateUtils;
import
pwc.taxtech.atms.constant.enums.EnumTbImportType
;
import
pwc.taxtech.atms.entity.Organization
;
import
pwc.taxtech.atms.entity.OrganizationExample
;
import
pwc.taxtech.atms.vat.entity.EbitCellData
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/CitAssetEamMappingExtendsMapper.xml
View file @
76f36f33
...
...
@@ -62,7 +62,7 @@
</choose>
<choose>
<when
test=
"item.disposedDate != null"
>
#{item.disposedDate,jdbcType=TIMESTAMP},
</when>
<otherwise>
CURRENT_TIMESTAMP
,
</otherwise>
<otherwise>
null
,
</otherwise>
</choose>
<choose>
<when
test=
"item.residualRate != null"
>
#{item.residualRate,jdbcType=DECIMAL},
</when>
...
...
atms-web/src/main/webapp/app-resources/i18n/en-us/cit.json
View file @
76f36f33
...
...
@@ -46,7 +46,7 @@
"TotalYearDifferenceAmount"
:
"Total Year Difference Amount:"
,
"AdjustmentValue"
:
"Adjustment Value"
,
"DisposedDate"
:
"Disposed Date"
,
"ResidualRate"
:
"Residual
Rate
"
,
"ResidualRate"
:
"Residual
Amount
"
,
"ResidualValue"
:
"Residual Value"
,
"TaxMonthDepreciationAmount"
:
"Monthly Depreciation Amount(Tax)"
,
"TaxToCurrentYearDepreciationAmount"
:
"Up To Current Year Depreciation Amount(Tax)"
,
...
...
@@ -1158,6 +1158,14 @@
"BeginOfNextYear"
:
"Begin Of Next Year"
,
"PreClassified"
:
"Pre Classified"
,
"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
atms-web/src/main/webapp/app-resources/i18n/zh-CN/app.json
View file @
76f36f33
...
...
@@ -896,11 +896,11 @@
"InternationalDataImport"
:
"国际税数据"
,
"TBEBITForm"
:
"TP EBIT 表格"
,
"ClickEnsureTip"
:
"请点击确定按钮!"
,
"MenuUnreturnedTax"
:
"
未返还税金
分析"
,
"MenuTaxComparison"
:
"
未返还/返还后税金比较
"
,
"MenuUnreturnedTax"
:
"
税负
分析"
,
"MenuTaxComparison"
:
"
返还情况
"
,
"MenuCostAnalysis"
:
"费用分析"
,
"MenuProfitAndLoss"
:
"利润
/亏损
分析"
,
"MenuOtherDomesticData"
:
"
其他国内数据
"
,
"MenuProfitAndLoss"
:
"利润分析"
,
"MenuOtherDomesticData"
:
"
个税分析
"
,
"MenuDocSituation"
:
"档案归档情况"
,
"MenuGlobalOverview"
:
"全球概览"
,
"MenuMexicanTax"
:
"墨西哥税务分析"
,
...
...
atms-web/src/main/webapp/app-resources/i18n/zh-CN/cit.json
View file @
76f36f33
...
...
@@ -46,7 +46,7 @@
"TotalYearDifferenceAmount"
:
"差异额:"
,
"AdjustmentValue"
:
"原值调整值"
,
"DisposedDate"
:
"报废日期"
,
"ResidualRate"
:
"残值
率
"
,
"ResidualRate"
:
"残值
额
"
,
"ResidualValue"
:
"残值"
,
"TaxMonthDepreciationAmount"
:
"每月折旧额(税务)"
,
"TaxToCurrentYearDepreciationAmount"
:
"截止本年累计折旧额(税务)"
,
...
...
@@ -1212,8 +1212,13 @@
"PreClassified"
:
"预提重分类"
,
"AssetType"
:
"资产类型"
,
"TaxGroupName"
:
"税务资产分类"
,
"ImportNotMatch"
:
"导入文件与选择机构或期间不匹配"
}
\ No newline at end of file
"ImportNotMatch"
:
"导入文件与选择机构或期间不匹配"
,
"ProjectDescription"
:
"项目描述"
,
"ProductDescription"
:
"产品描述"
,
"Company"
:
"公司间"
,
"CompanyDescription"
:
"公司间描述"
,
"Segment1"
:
"备用段"
,
"Segment1Description"
:
"备用段描述"
,
"Segment2"
:
"备用段"
,
"Segment2Description"
:
"备用段描述"
}
\ No newline at end of file
atms-web/src/main/webapp/app/cit/import/cit-import-asset-list/cit-import-asset-list.ctrl.js
View file @
76f36f33
...
...
@@ -896,6 +896,7 @@
onValueChanged
:
function
(
data
)
{
$scope
.
citAssetsListDto
.
taxAccountCompare
=
data
.
value
;
$scope
.
taxAccountDifferenceOptions
.
value
=
data
.
value
;
getAssetResultList
(
$scope
.
displayType
-
1
);
}
};
...
...
atms-web/src/main/webapp/app/cit/preview/cit-preview-salaryAdvance-list/cit-preview-salaryAdvance-list.ctrl.js
View file @
76f36f33
...
...
@@ -53,13 +53,24 @@
{
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
(
'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
(
'exchangeRate'
),
dataField
:
"exchangeRate"
,
allowEditing
:
false
,
fixed
:
true
,
width
:
150
},
{
caption
:
$translate
.
instant
(
'ledgerId'
),
dataField
:
"ledgerId"
,
allowEditing
:
false
,
fixed
:
true
,
width
:
150
},
{
caption
:
$translate
.
instant
(
'debitAdvanceGene'
),
dataField
:
"debitAdvanceGene"
,
allowEditing
:
false
,
fixed
:
true
,
width
:
150
},
{
caption
:
$translate
.
instant
(
'creditPrepaidAccounts'
),
dataField
:
"creditPrepaidAccounts"
,
allowEditing
:
false
,
fixed
:
true
,
width
:
150
},
{
caption
:
$translate
.
instant
(
'remark'
),
dataField
:
"remark"
,
allowEditing
:
false
,
fixed
:
true
,
width
:
150
}
{
caption
:
$translate
.
instant
(
'Account'
),
dataField
:
"subjectCode"
,
allowEditing
:
false
,
fixed
:
true
,
width
:
150
},
{
caption
:
$translate
.
instant
(
'AccountDescription'
),
dataField
:
"subjectDescription"
,
allowEditing
:
false
,
fixed
:
true
,
width
:
150
},
{
caption
:
$translate
.
instant
(
'AuxiliarySubject'
),
dataField
:
"auxiliarySubject"
,
allowEditing
:
false
,
fixed
:
true
,
width
:
150
},
{
caption
:
$translate
.
instant
(
'AuxiliarySubjectDescription'
),
dataField
:
"auxiliarySubjectDescription"
,
allowEditing
:
false
,
fixed
:
true
,
width
:
150
},
{
caption
:
$translate
.
instant
(
'RevSearchProfitCenterCode'
),
dataField
:
"profitCenter"
,
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
=
{
...
...
atms-web/src/main/webapp/app/cit/reduction/cit-asset-eam-mapping/cit-asset-eam-mapping.ctrl.js
View file @
76f36f33
...
...
@@ -245,8 +245,8 @@
{
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
(
'D
epreciationDate2
'
),
dataField
:
"d
epreciation
Date"
,
caption
:
$translate
.
instant
(
'D
isposedDate
'
),
dataField
:
"d
isposed
Date"
,
dataType
:
"date"
,
format
:
"yyyy-MM-dd"
,
width
:
100
...
...
atms-web/src/main/webapp/app/cit/report/cit-report-view/cit-report-view.ctrl.js
View file @
76f36f33
...
...
@@ -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
)
{
var
xhr
=
new
XMLHttpRequest
();
xhr
.
onload
=
function
(
e
)
{
...
...
@@ -1105,6 +1123,105 @@ debugger;
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
;
function
timeOutExportSpread
(
exportReportData
)
{
...
...
atms-web/src/main/webapp/app/common/controls/import/import-certified-invoices-list/import-certified-invoices-list.ctrl.js
View file @
76f36f33
...
...
@@ -185,6 +185,7 @@
withCredentials
:
true
}).
then
(
function
(
resp
)
{
var
ret
=
resp
.
data
;
$scope
.
fileName
=
''
;
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
ret
.
result
)
{
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-trial-balance/import-cit-trial-balance.ctrl.js
View file @
76f36f33
...
...
@@ -171,6 +171,7 @@
__RequestVerificationToken
:
token
,
withCredentials
:
true
}).
then
(
function
(
data
)
{
$scope
.
fileName
=
''
;
$
(
'#busy-indicator-container'
).
hide
();
var
resp
=
data
.
data
;
deferred
.
resolve
();
...
...
atms-web/src/main/webapp/app/common/vatservices/vatExportService.js
View file @
76f36f33
...
...
@@ -18,7 +18,7 @@
if
(
noExtendFileName
)
{
filename
=
defaultFileName
+
"_"
+
vatSessionService
.
project
.
name
+
'.xls'
}
else
{
filename
=
defaultFileName
+
"_"
+
decodeURI
(
headers
[
'x-file-name'
]
+
"_"
+
vatSessionService
.
project
.
name
+
'.xls'
)
filename
=
defaultFileName
+
"_"
+
decodeURI
(
headers
[
'x-file-name'
]
).
replace
(
'???'
,
''
).
replace
(
','
,
''
)
+
"_"
+
vatSessionService
.
project
.
name
+
'.xls'
}
...
...
atms-web/src/main/webapp/app/common/vatservices/vatPreviewService.js
View file @
76f36f33
...
...
@@ -195,7 +195,7 @@
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/dataPreview/exportCFData/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'_'
+
vatSessionService
.
year
+
queryParm
.
periodStart
+
'-'
+
vatSessionService
.
year
+
queryParm
.
periodEnd
+
'_'
+
vatSessionService
.
project
.
name
+
'.xlsx'
);
FileSaver
.
saveAs
(
data
,
fileName
+
'_'
+
queryParm
.
periodStart
+
'-'
+
queryParm
.
periodEnd
+
'_'
+
vatSessionService
.
project
.
name
+
'.xlsx'
);
});
},
getPLDataForDisplay
:
function
(
queryParams
)
{
...
...
@@ -224,7 +224,7 @@
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/dataPreview/exportIRData/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'_'
+
vatSessionService
.
year
+
queryParm
.
periodStart
+
'-'
+
vatSessionService
.
year
+
queryParm
.
periodEnd
+
'_'
+
vatSessionService
.
project
.
name
+
'.xlsx'
);
FileSaver
.
saveAs
(
data
,
fileName
+
'_'
+
vatSessionService
.
year
+
(
queryParm
.
periodStart
<
10
?
'0'
+
queryParm
.
periodStart
:
queryParm
.
periodStart
)
+
'-'
+
vatSessionService
.
year
+
(
queryParm
.
periodEnd
<
10
?
'0'
+
queryParm
.
periodEnd
:
queryParm
.
periodEnd
)
+
'_'
+
vatSessionService
.
project
.
name
+
'.xlsx'
);
});
},
getCPRDataForDisplay
:
function
(
queryParams
)
{
...
...
@@ -235,7 +235,7 @@
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/dataPreview/exportCPRData/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'_'
+
vatSessionService
.
year
+
queryParm
.
periodStart
+
'-'
+
vatSessionService
.
year
+
queryParm
.
periodEnd
+
'_'
+
vatSessionService
.
project
.
name
+
'.xlsx'
);
FileSaver
.
saveAs
(
data
,
fileName
+
'_'
+
queryParm
.
periodStart
+
'-'
+
queryParm
.
periodEnd
+
'_'
+
vatSessionService
.
project
.
name
+
'.xlsx'
);
});
},
getRLITDataForDisplay
:
function
(
queryParams
)
{
...
...
@@ -246,7 +246,7 @@
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/dataPreview/exportRLITData/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'_'
+
vatSessionService
.
year
+
queryParm
.
periodStart
+
'-'
+
vatSessionService
.
year
+
queryParm
.
periodEnd
+
'_'
+
vatSessionService
.
project
.
name
+
'.xlsx'
);
FileSaver
.
saveAs
(
data
,
fileName
+
'_'
+
queryParm
.
periodStart
+
'-'
+
queryParm
.
periodEnd
+
'_'
+
vatSessionService
.
project
.
name
+
'.xlsx'
);
});
},
getCILDataForDisplay
:
function
(
queryParams
)
{
...
...
@@ -268,7 +268,7 @@
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/dataPreview/exportIDData/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'_'
+
vatSessionService
.
year
+
queryParm
.
periodStart
+
'-'
+
vatSessionService
.
year
+
queryParm
.
periodEnd
+
'_'
+
vatSessionService
.
project
.
name
+
'.xlsx'
);
FileSaver
.
saveAs
(
data
,
fileName
+
'_'
+
queryParm
.
periodStart
+
'-'
+
queryParm
.
periodEnd
+
'_'
+
vatSessionService
.
project
.
name
+
'.xlsx'
);
});
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment