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
d28dd2cc
Commit
d28dd2cc
authored
Mar 31, 2019
by
kevin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_mysql' of
http://code.tech.tax.asia.pwcinternal.com/root/atms
into dev_mysql
parents
e60b519b
aa1a4474
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
107 additions
and
26 deletions
+107
-26
POIUtil.java
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
+10
-0
EnumImportType.java
.../java/pwc/taxtech/atms/constant/enums/EnumImportType.java
+2
-1
RevenueTypeResult.java
...va/pwc/taxtech/atms/dto/revenuconf/RevenueTypeResult.java
+6
-0
CurrentPeriodBo.java
...ain/java/pwc/taxtech/atms/dto/vatdto/CurrentPeriodBo.java
+1
-1
RevenueConfService.java
...ava/pwc/taxtech/atms/service/impl/RevenueConfService.java
+1
-0
RevenueTypeMappingService.java
.../taxtech/atms/service/impl/RevenueTypeMappingService.java
+1
-0
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+5
-4
BB.java
...wc/taxtech/atms/vat/service/impl/report/functions/BB.java
+3
-4
RevenueMapping.xlsx
...rc/main/resources/Document/DataImport/RevenueMapping.xlsx
+0
-0
PeriodCellDataExtendsMapper.xml
...tech/atms/vat/dao/extends/PeriodCellDataExtendsMapper.xml
+1
-1
constant.js
atms-web/src/main/webapp/app/common/utils/constant.js
+2
-1
extract-financial-data.ctrl.js
...ion/extract-financial-data/extract-financial-data.ctrl.js
+5
-0
extract-financial-data.html
...action/extract-financial-data/extract-financial-data.html
+5
-3
vat-revenue-conf-mapping.ctrl.js
...vat-revenue-conf-mapping/vat-revenue-conf-mapping.ctrl.js
+59
-7
vat-revenue-conf-mapping.html
...rt/vat-revenue-conf-mapping/vat-revenue-conf-mapping.html
+3
-3
vat-revenue-config.ctrl.js
.../dataImport/vat-revenue-config/vat-revenue-config.ctrl.js
+2
-0
vat-revenue-config.html
...app/dataImport/vat-revenue-config/vat-revenue-config.html
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
View file @
d28dd2cc
package
pwc
.
taxtech
.
atms
.
common
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.ss.util.CellRangeAddress
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Optional
;
public
class
POIUtil
{
...
...
@@ -88,6 +91,13 @@ public class POIUtil {
}
public
static
void
cloneSheetAndStyle
(
Sheet
sheet
,
Sheet
targetSheet
,
Workbook
tWorkbook
)
{
//设置合并单元格
List
<
CellRangeAddress
>
merges
=
sheet
.
getMergedRegions
();
if
(
CollectionUtils
.
isNotEmpty
(
merges
)){
for
(
CellRangeAddress
merge
:
merges
){
targetSheet
.
addMergedRegion
(
merge
);
}
}
for
(
int
r
=
sheet
.
getFirstRowNum
();
r
<=
sheet
.
getLastRowNum
();
r
++)
{
Row
row
=
sheet
.
getRow
(
r
);
if
(
null
==
row
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumImportType.java
View file @
d28dd2cc
...
...
@@ -12,7 +12,8 @@ public enum EnumImportType {
CertifiedInvoicesList
(
8
),
InvoiceRecord
(
9
),
ExtractFinancialData
(
10
),
ExtractInvoiceData
(
11
)
ExtractInvoiceData
(
11
),
RevenueMapping
(
12
)
;
private
Integer
code
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/revenuconf/RevenueTypeResult.java
View file @
d28dd2cc
package
pwc
.
taxtech
.
atms
.
dto
.
revenuconf
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
pwc.taxtech.atms.common.util.PwCIdSerialize
;
import
pwc.taxtech.atms.constant.enums.RevenueConfEnum
;
import
pwc.taxtech.atms.vat.entity.RevenueTypeMapping
;
public
class
RevenueTypeResult
extends
RevenueTypeMapping
{
@JsonSerialize
(
using
=
PwCIdSerialize
.
class
)
private
String
id
;
public
String
getStatusStr
()
{
return
RevenueConfEnum
.
Status
.
MAPPING
.
get
(
this
.
getStatus
());
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/CurrentPeriodBo.java
View file @
d28dd2cc
...
...
@@ -14,7 +14,7 @@ public class CurrentPeriodBo {
}
public
CurrentPeriodBo
fixedCurYear
(
int
curYear
)
{
this
.
curYear
=
+
curYear
;
this
.
curYear
+=
curYear
;
return
this
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RevenueConfService.java
View file @
d28dd2cc
...
...
@@ -41,6 +41,7 @@ public class RevenueConfService extends BaseService {
Page
page
=
PageHelper
.
startPage
(
param
.
getPageInfo
().
getPageIndex
(),
param
.
getPageInfo
().
getPageSize
());
RevenueConfigExample
example
=
new
RevenueConfigExample
();
example
.
createCriteria
().
andOrgIdIn
(
orgDtoList
.
stream
().
map
(
OrgSelectDto:
:
getId
).
collect
(
Collectors
.
toList
()));
example
.
setOrderByClause
(
"org_id"
);
PageInfo
<
RevenueConfResult
>
pageInfo
=
new
PageInfo
<>(
revenueConfigMapper
.
selectByExample
(
example
).
stream
()
.
map
(
o
->
beanUtil
.
copyProperties
(
o
,
new
RevenueConfResult
())).
collect
(
Collectors
.
toList
()));
pageInfo
.
setTotal
(
page
.
getTotal
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RevenueTypeMappingService.java
View file @
d28dd2cc
...
...
@@ -53,6 +53,7 @@ public class RevenueTypeMappingService extends BaseService {
Page
page
=
PageHelper
.
startPage
(
param
.
getPageInfo
().
getPageIndex
(),
param
.
getPageInfo
().
getPageSize
());
RevenueTypeMappingExample
example
=
new
RevenueTypeMappingExample
();
example
.
createCriteria
().
andOrgIdIn
(
orgDtoList
.
stream
().
map
(
OrgSelectDto:
:
getId
).
collect
(
Collectors
.
toList
()));
example
.
setOrderByClause
(
"org_id"
);
PageInfo
<
RevenueTypeResult
>
pageInfo
=
new
PageInfo
<>(
typeMappingMapper
.
selectByExample
(
example
).
stream
()
.
map
(
o
->
beanUtil
.
copyProperties
(
o
,
new
RevenueTypeResult
())).
collect
(
Collectors
.
toList
()));
pageInfo
.
setTotal
(
page
.
getTotal
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
d28dd2cc
...
...
@@ -1813,10 +1813,11 @@ public class ReportServiceImpl extends BaseService {
cellData
.
setFormulaExp
(
data
.
getKeyinData
());
periodCellDataMapper
.
updateByPrimaryKeySelective
(
cellData
);
}
else
if
(
data
.
getAmount
()
!=
null
&&
cellData
.
getData
()
!=
data
.
getAmount
().
toString
())
{
cellData
.
setData
(
data
.
getAmount
().
toString
());
if
(
StringUtils
.
isEmpty
(
cellData
.
getFormulaExp
()))
cellData
.
setFormulaExp
(
data
.
getAmount
().
toString
());
periodCellDataMapper
.
updateByPrimaryKeySelective
(
cellData
);
//TODO Eddie确认逻辑
// cellData.setData(data.getAmount().toString());
// if (StringUtils.isEmpty(cellData.getFormulaExp()))
// cellData.setFormulaExp(data.getAmount().toString());
// periodCellDataMapper.updateByPrimaryKeySelective(cellData);
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/BB.java
View file @
d28dd2cc
...
...
@@ -8,7 +8,6 @@ import org.apache.poi.ss.formula.eval.ValueEval;
import
org.apache.poi.ss.formula.functions.FreeRefFunction
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
pwc.taxtech.atms.common.util.MyAsserts
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType
;
import
pwc.taxtech.atms.dpo.CellTemplatePerGroupDto
;
import
pwc.taxtech.atms.dto.vatdto.BBParasBo
;
...
...
@@ -112,9 +111,9 @@ public class BB extends FunctionBase implements FreeRefFunction {
return
cellValue
;
}
PeriodCellData
cellData
=
null
;
String
projectId
=
agent
.
getPastProjectId
(
curPeriod
.
getCurYear
(),
formulaContext
.
getOrganizationId
());
MyAsserts
.
assertNotEmpty
(
projectId
,
Exceptions
.
PROJECT_EMPTY
);
//
String projectId = agent.getPastProjectId(curPeriod.getCurYear(),
//
formulaContext.getOrganizationId());
//
MyAsserts.assertNotEmpty(projectId, Exceptions.PROJECT_EMPTY);
cellData
=
agent
.
getCellData
(
cellTemplateData
.
getReportTemplateId
(),
cellTemplateData
.
getCellTemplateId
(),
curPeriod
.
getCurPeriod
(),
project
==
null
?
formulaContext
.
getProjectId
():
project
.
getId
());
List
<
PeriodDataSource
>
dss
=
agent
.
queryManualDataSource
(
Long
.
parseLong
(
cellTemplateData
.
getCellTemplateId
()),
...
...
atms-api/src/main/resources/Document/DataImport/RevenueMapping.xlsx
0 → 100644
View file @
d28dd2cc
File added
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/PeriodCellDataExtendsMapper.xml
View file @
d28dd2cc
...
...
@@ -113,7 +113,7 @@
<select
id =
"selectReportData"
resultType=
"pwc.taxtech.atms.dpo.AnalysisSalesValueDto"
>
select cell_template.row_index as rowIndex,
cell_template.column_index as columnIndex,
concat(CONVERT(cell_data.data, decimal(18,
4
)) + if(data_source.amount is null, 0, data_source.amount)) as data
concat(CONVERT(cell_data.data, decimal(18,
2
)) + if(data_source.amount is null, 0, data_source.amount)) as data
from period_cell_data cell_data
left join period_cell_template cell_template
on cell_data.cell_template_id = cell_template.cell_template_id
...
...
atms-web/src/main/webapp/app/common/utils/constant.js
View file @
d28dd2cc
...
...
@@ -1545,7 +1545,8 @@ constant.importFileType = {
certifiedInvoicesList
:
8
,
invoiceRecord
:
9
,
ExtractFinancialData
:
10
,
ExtractInvoiceData
:
11
ExtractInvoiceData
:
11
,
RevenueMapping
:
12
};
constant
.
citImportFileType
=
{
...
...
atms-web/src/main/webapp/app/dataImport/data-extraction/extract-financial-data/extract-financial-data.ctrl.js
View file @
d28dd2cc
...
...
@@ -106,6 +106,11 @@
//导入事件
var
callFinancialApi
=
function
()
{
if
(
!
$scope
.
formParam
||
!
$scope
.
formParam
.
orgIds
||
!
$scope
.
formParam
.
dataTypes
||
!
$scope
.
formParam
.
period
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
'PleaseSelectAtLeastOneItem'
));
return
;
}
dataImportService
.
callExtractFinancialData
(
$scope
.
formParam
).
success
(
function
(
data
)
{
if
(
data
)
{
getFinancialDataStatus
();
...
...
atms-web/src/main/webapp/app/dataImport/data-extraction/extract-financial-data/extract-financial-data.html
View file @
d28dd2cc
...
...
@@ -20,15 +20,17 @@
<div
dx-date-box=
"dateBoxStart"
></div>
</div>
<label
class=
"col-sm-1 control-label"
>
{{'SelectedDataType' | translate}}:
</label>
<div
class=
"col-sm-
3
"
>
<div
class=
"col-sm-
2
"
>
<div
dx-tag-box=
"selectTypeOptions"
></div>
</div>
<div
class=
"col-sm-
1
"
>
<div
class=
"col-sm-
2
"
>
<button
type=
"button"
atms-permission
permission-control-type=
"ngIf"
permission-code=
"{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
class=
"btn btn-vat-primary"
translate=
"ImportBtn"
translate=
"ImportBtn"
style=
"min-width: 50px;"
ng-click=
"callFinancialApi()"
></button>
<button
type=
"button"
class=
"btn btn-vat-primary"
translate=
"Refresh"
ng-click=
"refreshConfigGrid()"
style=
"min-width: 50px;"
></button>
</div>
</div>
...
...
atms-web/src/main/webapp/app/dataImport/vat-revenue-conf-mapping/vat-revenue-conf-mapping.ctrl.js
View file @
d28dd2cc
vatModule
.
controller
(
'VatRevenueConfMappingController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'$interval'
,
'dxDataGridService'
,
'$http'
,
'apiConfig'
,
'Upload'
,
'apiInterceptor'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
$interval
,
dxDataGridService
,
$http
,
apiConfig
,
Upload
,
apiInterceptor
)
{
'$interval'
,
'dxDataGridService'
,
'$http'
,
'apiConfig'
,
'Upload'
,
'apiInterceptor'
,
'templateService'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
$interval
,
dxDataGridService
,
$http
,
apiConfig
,
Upload
,
apiInterceptor
,
templateService
)
{
'use strict'
;
//表格配置
...
...
@@ -33,7 +34,7 @@
}).
appendTo
(
container
);
$
(
'<i class="fa fa-trash" style="cursor: pointer;margin-left: 5px;"></i>'
)
.
on
(
'click'
,
function
()
{
$scope
.
editConfig
(
options
.
data
);
$scope
.
delConfig
([
options
.
data
.
id
]
);
}).
appendTo
(
container
);
}
catch
(
e
)
{
...
...
@@ -48,7 +49,11 @@
mode
:
'multiple'
,
showCheckBoxesMode
:
'always'
,
allowSelectAll
:
true
}
},
onSelectionChanged
:
function
(
data
)
{
$scope
.
selectedItems
=
data
.
selectedRowsData
;
$scope
.
selectedRecourdCount
=
data
.
selectedRowsData
.
length
;
},
});
//刷新页面
...
...
@@ -71,9 +76,25 @@
$
(
$scope
.
revenueConfAddDiv
).
modal
(
'show'
);
};
//删除配置
$scope
.
delConfig
=
function
()
{
SweetAlert
.
info
(
'del'
);
$scope
.
batchDelConfig
=
function
()
{
if
(
!!
$scope
.
selectedRecourdCount
)
{
$scope
.
delConfig
(
_
.
map
(
$scope
.
selectedItems
,
function
(
item
){
return
item
.
id
;
}));
}
else
{
SweetAlert
.
warning
(
$translate
.
instant
(
'PleaseSelectAtLeastOneItem'
));
}
};
///删除配置
$scope
.
delConfig
=
function
(
idList
)
{
$http
.
post
(
'/revenueConfMapping/del'
,
idList
,
apiConfig
.
createVat
())
.
success
(
function
(
res
)
{
if
(
res
&&
0
===
res
.
code
)
{
SweetAlert
.
success
(
$translate
.
instant
(
'RevenueDelSuccess'
));
$scope
.
refreshConfigGrid
();
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
})
};
//添加配置
...
...
@@ -85,6 +106,7 @@
SweetAlert
.
success
(
$translate
.
instant
(
'RevenueAddSuccess'
));
$scope
.
refreshConfigGrid
();
$
(
$scope
.
revenueConfAddDiv
).
modal
(
'hide'
);
$scope
.
cancelModal
();
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
...
...
@@ -96,6 +118,7 @@
SweetAlert
.
success
(
$translate
.
instant
(
'RevenueAddSuccess'
));
$scope
.
refreshConfigGrid
();
$
(
$scope
.
revenueConfAddDiv
).
modal
(
'hide'
);
$scope
.
cancelModal
();
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
...
...
@@ -182,6 +205,35 @@
});
};
$scope
.
downloadTemplate
=
function
()
{
templateService
.
downloadTemplate
(
constant
.
importFileType
.
RevenueMapping
).
success
(
function
(
data
,
status
,
headers
)
{
var
octetStreamMime
=
'application/octet-stream'
;
var
contentType
=
headers
(
'content-type'
)
||
octetStreamMime
;
if
(
window
.
navigator
.
msSaveBlob
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
navigator
.
msSaveBlob
(
blob
,
"开票记录与收入类型映射模板"
);
}
else
{
var
urlCreator
=
window
.
URL
||
window
.
webkitURL
||
window
.
mozURL
||
window
.
msURL
;
if
(
urlCreator
)
{
var
a
=
document
.
createElement
(
'a'
);
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
var
url
=
urlCreator
.
createObjectURL
(
blob
);
a
.
href
=
url
;
a
.
target
=
'_blank'
;
a
.
download
=
"开票记录与收入类型映射模板.xlsx"
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
}
}
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
(
function
initialize
()
{
...
...
atms-web/src/main/webapp/app/dataImport/vat-revenue-conf-mapping/vat-revenue-conf-mapping.html
View file @
d28dd2cc
...
...
@@ -5,16 +5,16 @@
</div>
<div
id=
"tab_total"
>
<form
class=
"form-inline"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
style=
"margin-top: 5px;"
>
<button
type=
"button"
class=
"btn btn-secondary"
ng-click=
"addConfig()"
>
{{'RevenueAddBtn' | translate }}
</button>
<button
type=
"button"
class=
"btn btn-third"
ng-click=
"
d
elConfig()"
>
{{'RevenueDelBtn' | translate }}
</button>
<button
type=
"button"
class=
"btn btn-third"
ng-click=
"
batchD
elConfig()"
>
{{'RevenueDelBtn' | translate }}
</button>
<label
class=
"control-label"
>
文件:
</label>
<input
class=
"form-control"
type=
"text"
name=
"fileName"
ng-model=
"uploadFile.file.name"
readonly
placeholder=
""
/>
<button
type=
"button"
type=
"file"
ngf-select
ng-model=
"uploadFile.file"
accept=
".xls,.xlsx"
class=
"btn btn-secondary browse"
>
{{'SelectFile' | translate }}
</button>
<button
type=
"button"
class=
"btn btn-secondary"
translate=
"CoverImportBtn"
ng-click=
"upload()"
></button>
<button
type=
"button"
class=
"btn btn-secondary"
translate=
"AddImportBtn"
ng-click=
"upload()"
></button>
<button
type=
"button"
class=
"btn btn-in-grid inline-div"
ng-click=
"down
EntepriseAccount
Template()"
><i
<button
type=
"button"
class=
"btn btn-in-grid inline-div"
ng-click=
"down
load
Template()"
><i
class=
"fa fa-download"
aria-hidden=
"true"
></i>
下载模板
</button>
</div>
...
...
atms-web/src/main/webapp/app/dataImport/vat-revenue-config/vat-revenue-config.ctrl.js
View file @
d28dd2cc
...
...
@@ -108,6 +108,7 @@
SweetAlert
.
success
(
$translate
.
instant
(
'RevenueAddSuccess'
));
$scope
.
refreshConfigGrid
();
$
(
$scope
.
revenueConfAddDiv
).
modal
(
'hide'
);
$scope
.
cancelModal
();
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
...
...
@@ -119,6 +120,7 @@
SweetAlert
.
success
(
$translate
.
instant
(
'RevenueAddSuccess'
));
$scope
.
refreshConfigGrid
();
$
(
$scope
.
revenueConfAddDiv
).
modal
(
'hide'
);
$scope
.
cancelModal
();
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
...
...
atms-web/src/main/webapp/app/dataImport/vat-revenue-config/vat-revenue-config.html
View file @
d28dd2cc
...
...
@@ -5,7 +5,7 @@
</div>
<div
id=
"tab_total"
>
<form
class=
"form-inline"
>
<div
class=
"form-group"
><div
class=
"import-wrapper"
>
<div
class=
"form-group"
style=
"margin-top: 5px;"
><div
class=
"import-wrapper"
>
<button
type=
"button"
class=
"btn btn-primary"
ng-click=
"addConfig()"
>
{{'RevenueAddBtn' | translate }}
</button>
<button
type=
"button"
class=
"btn btn-third"
ng-click=
"batchDelConfig()"
>
{{'RevenueDelBtn' | translate }}
</button>
</div></div>
...
...
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