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
cad34ca0
Commit
cad34ca0
authored
Mar 29, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
dcfe14a3
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
153 additions
and
41 deletions
+153
-41
EnumInvoiceType.java
...java/pwc/taxtech/atms/constant/enums/EnumInvoiceType.java
+2
-0
FormulaFormlaBlockDto.java
...va/pwc/taxtech/atms/dto/vatdto/FormulaFormlaBlockDto.java
+60
-0
ReportDataDto.java
.../main/java/pwc/taxtech/atms/dto/vatdto/ReportDataDto.java
+3
-5
CitReportServiceImpl.java
...a/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
+2
-1
ReportFileUploadService.java
...wc/taxtech/atms/service/impl/ReportFileUploadService.java
+17
-6
TaxDocumentServiceImpl.java
...pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
+13
-3
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+3
-1
JXFP.java
.../taxtech/atms/vat/service/impl/report/functions/JXFP.java
+2
-2
conf_profile_dev.properties
atms-api/src/main/resources/conf/conf_profile_dev.properties
+1
-1
taxDocumentList.json
...main/webapp/app-resources/i18n/en-us/taxDocumentList.json
+3
-1
taxDocumentList.json
...main/webapp/app-resources/i18n/zh-CN/taxDocumentList.json
+3
-1
tax-document-list.ctrl.js
...ocumentManage/tax-document-list/tax-document-list.ctrl.js
+44
-20
No files found.
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumInvoiceType.java
View file @
cad34ca0
...
...
@@ -13,6 +13,7 @@ public enum EnumInvoiceType {
private
int
code
;
private
String
name
;
public
static
final
Map
<
Integer
,
String
>
MAPPING
=
new
HashMap
<>();
public
static
final
Map
<
String
,
Integer
>
NAME_MAPPING
=
new
HashMap
<>();
EnumInvoiceType
(
int
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
...
...
@@ -29,6 +30,7 @@ public enum EnumInvoiceType {
static
{
for
(
EnumInvoiceType
invoiceType
:
EnumInvoiceType
.
values
())
{
MAPPING
.
put
(
invoiceType
.
getCode
(),
invoiceType
.
getName
());
NAME_MAPPING
.
put
(
invoiceType
.
getName
(),
invoiceType
.
getCode
());
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/FormulaFormlaBlockDto.java
0 → 100644
View file @
cad34ca0
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
pwc.taxtech.atms.common.util.PwCIdSerialize
;
import
pwc.taxtech.atms.vat.entity.PeriodFormulaBlock
;
public
class
FormulaFormlaBlockDto
extends
PeriodFormulaBlock
{
@JsonSerialize
(
using
=
PwCIdSerialize
.
class
)
private
Long
id
;
@JsonSerialize
(
using
=
PwCIdSerialize
.
class
)
private
Long
reportId
;
@JsonSerialize
(
using
=
PwCIdSerialize
.
class
)
private
Long
cellTemplateId
;
@JsonSerialize
(
using
=
PwCIdSerialize
.
class
)
private
Long
dataSourceId
;
@Override
public
Long
getId
()
{
return
id
;
}
@Override
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
@Override
public
Long
getReportId
()
{
return
reportId
;
}
@Override
public
void
setReportId
(
Long
reportId
)
{
this
.
reportId
=
reportId
;
}
@Override
public
Long
getCellTemplateId
()
{
return
cellTemplateId
;
}
@Override
public
void
setCellTemplateId
(
Long
cellTemplateId
)
{
this
.
cellTemplateId
=
cellTemplateId
;
}
@Override
public
Long
getDataSourceId
()
{
return
dataSourceId
;
}
@Override
public
void
setDataSourceId
(
Long
dataSourceId
)
{
this
.
dataSourceId
=
dataSourceId
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/ReportDataDto.java
View file @
cad34ca0
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
import
pwc.taxtech.atms.vat.entity.PeriodFormulaBlock
;
import
java.util.List
;
public
class
ReportDataDto
{
private
List
<
CellDataDto
>
cellData
;
private
List
<
PeriodFormulaBlock
>
formulaBlocks
;
private
List
<
FormulaFormlaBlockDto
>
formulaBlocks
;
private
List
<
DataSourceDtoExtend
>
manualDataSources
;
private
EbitDataDto
ebitData
;
...
...
@@ -26,11 +24,11 @@ public class ReportDataDto {
this
.
cellData
=
cellData
;
}
public
List
<
PeriodFormulaBlock
>
getFormulaBlocks
()
{
public
List
<
FormulaFormlaBlockDto
>
getFormulaBlocks
()
{
return
this
.
formulaBlocks
;
}
public
void
setFormulaBlocks
(
List
<
PeriodFormulaBlock
>
formulaBlocks
)
{
public
void
setFormulaBlocks
(
List
<
FormulaFormlaBlockDto
>
formulaBlocks
)
{
this
.
formulaBlocks
=
formulaBlocks
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
View file @
cad34ca0
...
...
@@ -883,7 +883,8 @@ public class CitReportServiceImpl extends BaseService {
*/
List
<
PeriodFormulaBlock
>
formulaBlocks
=
periodFormulaBlockMapper
.
selectByExample
(
periodFormulaBlockExample
);
dataDto
.
setFormulaBlocks
(
formulaBlocks
);
dataDto
.
setFormulaBlocks
(
formulaBlocks
.
stream
()
.
map
(
o
->
beanUtil
.
copyProperties
(
o
,
new
FormulaFormlaBlockDto
())).
collect
(
Collectors
.
toList
()));
//todo: 关键字数据源稍后再加
// 获取通过KeyValueDataId关联的数据源,即公式数据源
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ReportFileUploadService.java
View file @
cad34ca0
...
...
@@ -116,11 +116,10 @@ public class ReportFileUploadService extends BaseService {
data
.
setCreator
(
user
.
getUserName
());
data
.
setUid
(
CommonUtils
.
getUUID
());
data
.
setCreateTime
(
new
Date
());
data
.
setReportFileName
(
file
.
getOriginalFilename
());
if
(
StringUtils
.
isBlank
(
data
.
getFileUploadId
()))
{
FileUpload
fileUpload
=
didiFileUploadService
.
uploadFile
(
file
,
file
.
getOriginalFilename
(),
FileUploadEnum
.
BizSource
.
REPORT_UPLOAD
.
name
());
data
.
setFileUploadId
(
fileUpload
.
getUid
());
if
(
StringUtils
.
isBlank
(
data
.
getReportFileName
())){
data
.
setReportFileName
(
file
.
getOriginalFilename
());
}
if
(
StringUtils
.
isBlank
(
data
.
getProjectId
())
&&
StringUtils
.
isNotBlank
(
data
.
getOrgId
())
&&
data
.
getPeriod
()
!=
null
)
{
ProjectExample
projectExample
=
new
ProjectExample
();
String
year
=
String
.
valueOf
(
data
.
getPeriod
()).
substring
(
0
,
4
);
...
...
@@ -131,7 +130,10 @@ public class ReportFileUploadService extends BaseService {
}
else
{
return
;
}
if
(
StringUtils
.
isBlank
(
data
.
getFileUploadId
()))
{
FileUpload
fileUpload
=
didiFileUploadService
.
uploadFile
(
file
,
file
.
getOriginalFilename
(),
FileUploadEnum
.
BizSource
.
REPORT_UPLOAD
.
name
());
data
.
setFileUploadId
(
fileUpload
.
getUid
());
}
}
else
{
Project
project
=
projectMapper
.
selectByPrimaryKey
(
data
.
getProjectId
());
data
.
setOrgId
(
project
.
getOrganizationId
());
...
...
@@ -143,7 +145,7 @@ public class ReportFileUploadService extends BaseService {
taxDocument
.
setEnable
(
"T"
);
taxDocument
.
setOwnTime
(
data
.
getPeriod
());
taxDocument
.
setFileType
(
data
.
getReportType
());
taxDocument
.
setFileName
(
data
.
getReportFileName
());
FileTypesExample
example
=
new
FileTypesExample
();
example
.
createCriteria
().
andFileTypeEqualTo
(
data
.
getReportType
());
List
<
FileTypes
>
dataList
=
fileTypesMapper
.
selectByExample
(
example
);
...
...
@@ -151,6 +153,15 @@ public class ReportFileUploadService extends BaseService {
taxDocument
.
setFileAttr
(
dataList
.
get
(
0
).
getFileAttr
());
taxDocument
.
setFileTypeId
(
dataList
.
get
(
0
).
getId
());
}
//重新命名
String
fileName
=
taxDocument
.
getCompanyName
()+
"_"
+
taxDocument
.
getFileType
()+
"_"
+
taxDocument
.
getOwnTime
();
fileName
+=
file
.
getOriginalFilename
().
substring
(
file
.
getOriginalFilename
().
lastIndexOf
(
"."
));
if
(
StringUtils
.
isBlank
(
data
.
getFileUploadId
()))
{
FileUpload
fileUpload
=
didiFileUploadService
.
uploadFile
(
file
,
fileName
,
FileUploadEnum
.
BizSource
.
REPORT_UPLOAD
.
name
());
data
.
setFileUploadId
(
fileUpload
.
getUid
());
data
.
setReportFileName
(
fileName
);
}
taxDocument
.
setFileName
(
fileName
);
taxDocumentService
.
addTaxDocumentList
(
file
,
taxDocument
);
}
ReportFileUploadExample
example
=
new
ReportFileUploadExample
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
View file @
cad34ca0
...
...
@@ -169,10 +169,15 @@ public class TaxDocumentServiceImpl {
try
{
//上传文件
if
(
StringUtils
.
isBlank
(
taxDocument
.
getFileUploadId
())){
FileUpload
fileUpload
=
didiFileUploadService
.
uploadFile
(
file
,
file
.
getOriginalFilename
(),
FileUploadEnum
.
BizSource
.
RECORD_UPLOAD
.
name
());
taxDocument
.
setFileUploadId
(
fileUpload
.
getUid
());
taxDocument
.
setFilePositionUrl
(
fileUpload
.
getViewHttpUrl
());
if
(
ReportFileUploadEnum
.
ReportType
.
MAPPING
.
containsKey
(
taxDocument
.
getFileType
())){
//重新命名
String
fileName
=
taxDocument
.
getCompanyName
()+
"_"
+
taxDocument
.
getFileType
()+
"_"
+
taxDocument
.
getOwnTime
();
fileName
+=
file
.
getOriginalFilename
().
substring
(
file
.
getOriginalFilename
().
lastIndexOf
(
"."
));
FileUpload
fileUpload
=
didiFileUploadService
.
uploadFile
(
file
,
fileName
,
FileUploadEnum
.
BizSource
.
RECORD_UPLOAD
.
name
());
taxDocument
.
setFileUploadId
(
fileUpload
.
getUid
());
taxDocument
.
setFilePositionUrl
(
fileUpload
.
getViewHttpUrl
());
taxDocument
.
setFileName
(
fileName
);
ReportFileUpload
reportFileUpload
=
new
ReportFileUpload
();
reportFileUpload
.
setOrgId
(
taxDocument
.
getCompanyId
());
reportFileUpload
.
setSourceType
(
ReportFileUploadEnum
.
SuorceType
.
RECORD
.
name
());
...
...
@@ -180,7 +185,12 @@ public class TaxDocumentServiceImpl {
reportFileUpload
.
setPeriod
(
Integer
.
valueOf
(
period
));
reportFileUpload
.
setFileUploadId
(
fileUpload
.
getUid
());
reportFileUpload
.
setReportType
(
taxDocument
.
getFileType
());
reportFileUpload
.
setReportFileName
(
fileName
);
reportFileUploadService
.
saveData
(
file
,
reportFileUpload
);
}
else
{
FileUpload
fileUpload
=
didiFileUploadService
.
uploadFile
(
file
,
file
.
getOriginalFilename
(),
FileUploadEnum
.
BizSource
.
RECORD_UPLOAD
.
name
());
taxDocument
.
setFileUploadId
(
fileUpload
.
getUid
());
taxDocument
.
setFilePositionUrl
(
fileUpload
.
getViewHttpUrl
());
}
}
//设置创建人 创建时间信息 设置年份区分
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
cad34ca0
...
...
@@ -1223,7 +1223,9 @@ public class ReportServiceImpl extends BaseService {
*/
List
<
PeriodFormulaBlock
>
formulaBlocks
=
periodFormulaBlockMapper
.
selectByExample
(
periodFormulaBlockExample
);
dataDto
.
setFormulaBlocks
(
formulaBlocks
);
dataDto
.
setFormulaBlocks
(
formulaBlocks
.
stream
()
.
map
(
o
->
beanUtil
.
copyProperties
(
o
,
new
FormulaFormlaBlockDto
())).
collect
(
Collectors
.
toList
()));
//todo: 关键字数据源稍后再加
// 获取通过KeyValueDataId关联的数据源,即公式数据源
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/JXFP.java
View file @
cad34ca0
...
...
@@ -142,7 +142,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
inputInvoiceDataSourceDto
.
setCertificationDate
(
x
.
getCertifiedDate
());
inputInvoiceDataSourceDto
.
setInvoiceCode
(
x
.
getInvoiceCode
());
inputInvoiceDataSourceDto
.
setInvoiceNumber
(
x
.
getInvoiceNum
());
inputInvoiceDataSourceDto
.
setInvoiceType
(
Integer
.
parseIn
t
(
x
.
getInvoiceType
()));
inputInvoiceDataSourceDto
.
setInvoiceType
(
EnumInvoiceType
.
NAME_MAPPING
.
ge
t
(
x
.
getInvoiceType
()));
inputInvoiceDataSourceDto
.
setPeriod
(
period
);
inputInvoiceDataSourceDto
.
setSellerTaxNumber
(
x
.
getSalesTaxNum
());
inputInvoiceDataSourceDto
.
setName
(
Constant
.
DataSourceName
.
InputDetailInvoiceDataSource
);
...
...
@@ -221,7 +221,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
//// example.or(criteria1);
// }
//发票状态
criteria
.
andInvoice
Type
EqualTo
(
"正常"
);
// 过滤作废状态
criteria
.
andInvoice
Status
EqualTo
(
"正常"
);
// 过滤作废状态
// List<InputInvoice> list = inputInvoiceMapper.selectByExample(example).stream().filter(x -> {
// return x.getRZSQ().endsWith("-" + (period.intValue() > 9 ? period.toString() : "0" + period.toString()));
...
...
atms-api/src/main/resources/conf/conf_profile_dev.properties
View file @
cad34ca0
jdbc_url
=
jdbc:mysql://
10.158.230.16:3306
/tax_admin_didi?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
jdbc_url
=
jdbc:mysql://
47.94.233.173:16000
/tax_admin_didi?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
jdbc_user
=
root
jdbc_password
=
taxadmin2018
#jdbc_password=111111
...
...
atms-web/src/main/webapp/app-resources/i18n/en-us/taxDocumentList.json
View file @
cad34ca0
...
...
@@ -52,5 +52,6 @@
"DocumentPath"
:
"DocumentPath"
,
"PreviewFile"
:
"PreviewFile"
,
"UploadSuccessCount"
:
"UploadSuccessCount"
,
"UploadFailCount"
:
"UploadFailCount"
"UploadFailCount"
:
"UploadFailCount"
,
"DeleteConfirm"
:
"DeleteConfirm"
}
\ No newline at end of file
atms-web/src/main/webapp/app-resources/i18n/zh-CN/taxDocumentList.json
View file @
cad34ca0
...
...
@@ -52,5 +52,6 @@
"DocumentPath"
:
"档案路径"
,
"PreviewFile"
:
"预览文件"
,
"UploadSuccessCount"
:
"个档案上传成功"
,
"UploadFailCount"
:
"个档案上传失败"
"UploadFailCount"
:
"个档案上传失败"
,
"DeleteConfirm"
:
"是否确认删除记录?"
}
\ No newline at end of file
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
cad34ca0
...
...
@@ -9,7 +9,13 @@ taxDocumentManageModule.controller('taxDocumentListController',
$scope
.
queryFieldModel
=
{};
$scope
.
editFieldModel
=
{};
$scope
.
pagingOptions
=
{};
//分页的设置
$scope
.
pagingOptions
=
{
pageIndex
:
1
,
//当前页码
totalItems
:
0
,
//总数据
pageSize
:
10
,
//每页多少条数据
pageSizeString
:
'10'
,
};
$scope
.
localData
=
null
;
$scope
.
loadMainData
=
function
()
{
...
...
@@ -414,11 +420,11 @@ taxDocumentManageModule.controller('taxDocumentListController',
if
(
params
[
key
]
===
undefined
||
params
[
key
]
===
null
)
params
[
key
]
=
""
;
});
params
.
ownTime
=
$scope
.
queryOwnTime
(
params
.
ownTime
,
"int"
);
params
.
effectiveTime
=
$scope
.
getQueryDate
(
params
.
effectiveTime
,
"/"
)
;
params
.
fileTime
=
$scope
.
getQueryDate
(
params
.
fileTime
,
"/"
)
;
params
.
createTime
=
$scope
.
getQueryDate
(
params
.
createTime
,
"/"
)
;
params
.
updateTime
=
$scope
.
getQueryDate
(
params
.
updateTime
,
"/"
)
;
params
.
uploadTime
=
$scope
.
getQueryDate
(
params
.
uploadTime
,
"/"
)
;
params
.
effectiveTime
?
params
.
effectiveTime
=
$scope
.
getQueryDate
(
params
.
effectiveTime
,
"/"
)
:
delete
params
.
effectiveTime
;
params
.
fileTime
?
params
.
fileTime
=
$scope
.
getQueryDate
(
params
.
fileTime
,
"/"
)
:
delete
params
.
fileTime
;
params
.
createTime
?
params
.
createTime
=
$scope
.
getQueryDate
(
params
.
createTime
,
"/"
)
:
delete
params
.
createTime
;
params
.
updateTime
?
params
.
updateTime
=
$scope
.
getQueryDate
(
params
.
updateTime
,
"/"
)
:
delete
params
.
updateTime
;
params
.
uploadTime
?
params
.
uploadTime
=
$scope
.
getQueryDate
(
params
.
uploadTime
,
"/"
)
:
delete
params
.
uploadTime
;
params
.
filePositionUrl
=
encodeURIComponent
(
params
.
filePositionUrl
);
params
.
auditStatus
=
$scope
.
transformAuditStatusToServer
(
params
.
auditStatus
);
taxDocumentListService
.
editRecord
(
params
).
then
(
function
(
data
)
{
...
...
@@ -474,21 +480,39 @@ taxDocumentManageModule.controller('taxDocumentListController',
delIDs
.
push
(
cellId
);
}
});
taxDocumentListService
.
delFileRecordItems
({
"ids"
:
delIDs
}).
then
(
function
(
data
)
{
if
(
data
)
{
SweetAlert
.
swal
({
title
:
$translate
.
instant
(
"Deleted"
),
type
:
"success"
,
confirmButtonText
:
$translate
.
instant
(
'Confirm'
),
closeOnConfirm
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
)
$scope
.
loadMainData
();
if
(
delIDs
.
length
==
0
){
return
;
}
SweetAlert
.
swal
({
title
:
'提示'
,
text
:
$translate
.
instant
(
"DeleteConfirm"
),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
$translate
.
instant
(
'Confirm'
),
cancelButtonText
:
$translate
.
instant
(
'Cancel'
),
closeOnConfirm
:
true
,
closeOnCancel
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
)
{
taxDocumentListService
.
delFileRecordItems
({
"ids"
:
delIDs
}).
then
(
function
(
data
)
{
if
(
data
)
{
SweetAlert
.
swal
({
title
:
$translate
.
instant
(
"Deleted"
),
type
:
"success"
,
confirmButtonText
:
$translate
.
instant
(
'Confirm'
),
closeOnConfirm
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
)
$scope
.
loadMainData
();
});
}
});
}
});
}
})
};
(
function
initialize
()
{
...
...
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