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
488b8c42
Commit
488b8c42
authored
Mar 25, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql
parents
d2292a10
ddc6e98b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
224 additions
and
62 deletions
+224
-62
FileTypesController.java
...java/pwc/taxtech/atms/controller/FileTypesController.java
+16
-2
FileTypesServiceImpl.java
...a/pwc/taxtech/atms/service/impl/FileTypesServiceImpl.java
+10
-3
TaxDocumentServiceImpl.java
...pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
+18
-19
conf.properties
atms-api/src/main/resources/conf/conf.properties
+10
-9
conf_profile_dev.properties
atms-api/src/main/resources/conf/conf_profile_dev.properties
+6
-6
conf_profile_staging.properties
...i/src/main/resources/conf/conf_profile_staging.properties
+7
-7
EbsApiServiceImplTest.java
.../pwc/taxtech/atms/service/impl/EbsApiServiceImplTest.java
+78
-4
FileTypes.java
...-dao/src/main/java/pwc/taxtech/atms/entity/FileTypes.java
+1
-1
taxDocumentList.json
...main/webapp/app-resources/i18n/en-us/taxDocumentList.json
+55
-1
taxDocumentList.json
...main/webapp/app-resources/i18n/zh-CN/taxDocumentList.json
+8
-1
doc-manage.ctrl.js
...app/app/admin/infrastructure/docManage/doc-manage.ctrl.js
+2
-1
doc-manage.html
...webapp/app/admin/infrastructure/docManage/doc-manage.html
+12
-7
tax-document-list.ctrl.js
...ocumentManage/tax-document-list/tax-document-list.ctrl.js
+0
-0
tax-document-list.html
...axDocumentManage/tax-document-list/tax-document-list.html
+0
-0
tax-document-list.svc.js
...DocumentManage/tax-document-list/tax-document-list.svc.js
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/FileTypesController.java
View file @
488b8c42
...
...
@@ -39,6 +39,20 @@ public class FileTypesController {
return
returnData
;
}
/**
* 查询档案文件类型列表-可用
* @return
*/
@RequestMapping
(
"/selectEnableList"
)
@ResponseBody
public
ReturnData
selectEnableFileTypesList
(){
List
<
FileTypes
>
fileTypes
=
fileTypesService
.
selectEnableFileTypesList
();
ReturnData
returnData
=
new
ReturnData
();
returnData
.
setItems
(
fileTypes
);
returnData
.
setTotalCount
(
fileTypes
.
size
());
return
returnData
;
}
/**
* 查询档案属性和档案类型给前端下拉选择框
* @return
...
...
@@ -93,10 +107,10 @@ public class FileTypesController {
public
void
exportExcelFile
(
HttpServletResponse
response
){
try
{
Map
<
String
,
String
>
headers
=
new
LinkedHashMap
<>();
headers
.
put
(
"id"
,
"
id
"
);
headers
.
put
(
"id"
,
"
序号
"
);
headers
.
put
(
"file_attr"
,
"档案属性"
);
headers
.
put
(
"file_type"
,
"档案类型"
);
headers
.
put
(
"
file_type
"
,
"必填字段"
);
headers
.
put
(
"
required_field
"
,
"必填字段"
);
headers
.
put
(
"description"
,
"说明"
);
headers
.
put
(
"creator"
,
"办事人"
);
headers
.
put
(
"create_time"
,
"创建时间"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/FileTypesServiceImpl.java
View file @
488b8c42
...
...
@@ -36,6 +36,13 @@ public class FileTypesServiceImpl {
return
fileTypesMapper
.
selectByExample
(
example
);
}
public
List
<
FileTypes
>
selectEnableFileTypesList
()
{
FileTypesExample
example
=
new
FileTypesExample
();
FileTypesExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andStatusEqualTo
(
"1"
);
return
fileTypesMapper
.
selectByExample
(
example
);
}
/**
* 查询档案属性和档案类型给前端下拉选择框
* @return
...
...
@@ -70,7 +77,7 @@ public class FileTypesServiceImpl {
return
false
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"FileTypesServiceImpl addFileTypesList error : "
+
e
.
getMessage
());
//
log.error("FileTypesServiceImpl addFileTypesList error : " + e.getMessage());
return
false
;
}
}
...
...
@@ -93,7 +100,7 @@ public class FileTypesServiceImpl {
return
false
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"FileTypesServiceImpl deleteFileTypes error : "
+
e
.
getMessage
());
//
log.error("FileTypesServiceImpl deleteFileTypes error : " + e.getMessage());
return
false
;
}
}
...
...
@@ -121,7 +128,7 @@ public class FileTypesServiceImpl {
return
false
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"FileTypesServiceImpl editFilesType error : "
+
e
.
getMessage
());
//
log.error("FileTypesServiceImpl editFilesType error : " + e.getMessage());
return
false
;
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
View file @
488b8c42
...
...
@@ -211,7 +211,7 @@ public class TaxDocumentServiceImpl {
return
false
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"TaxDocumentServiceImpl addTaxDocument error : "
+
e
.
getMessage
());
//
log.error("TaxDocumentServiceImpl addTaxDocument error : " + e.getMessage());
return
false
;
}
}
...
...
@@ -234,7 +234,7 @@ public class TaxDocumentServiceImpl {
return
false
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"TaxDocumentServiceImpl deleteTaxDocument error : "
+
e
.
getMessage
());
//
log.error("TaxDocumentServiceImpl deleteTaxDocument error : " + e.getMessage());
return
false
;
}
}
...
...
@@ -267,7 +267,7 @@ public class TaxDocumentServiceImpl {
}
return
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"TaxDocumentServiceImpl batchDelete error : "
+
e
.
getMessage
());
//
log.error("TaxDocumentServiceImpl batchDelete error : " + e.getMessage());
return
false
;
}
}
...
...
@@ -292,7 +292,7 @@ public class TaxDocumentServiceImpl {
return
false
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"TaxDocumentServiceImpl updateTaxDocument error : "
+
e
.
getMessage
());
//
log.error("TaxDocumentServiceImpl updateTaxDocument error : " + e.getMessage());
return
false
;
}
}
...
...
@@ -341,7 +341,7 @@ public class TaxDocumentServiceImpl {
}
return
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"TaxDocumentServiceImpl queryWhetherData error :"
+
e
.
getMessage
());
//
log.error("TaxDocumentServiceImpl queryWhetherData error :" + e.getMessage());
return
false
;
}
}
...
...
@@ -360,8 +360,7 @@ public class TaxDocumentServiceImpl {
//文件名称(带后缀) 文件名前+7位uuid截取码以防文件名相同
String
fileName
=
StringUtils
.
isBlank
(
taxDocument
.
getFileName
())
?
"未知文件(请修改后缀名).xlsx"
:
UUID
.
randomUUID
().
toString
().
substring
(
0
,
6
)
+
"_"
+
taxDocument
.
getFileOriginalName
();
//设置输出流信息
:
taxDocument
.
getFileOriginalName
();
//设置输出流信息
try
{
response
.
setContentType
(
"multipart/form-data"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName="
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
...
...
@@ -398,27 +397,27 @@ public class TaxDocumentServiceImpl {
out
.
write
(
buffer
,
0
,
len
);
}
}
catch
(
IOException
e
)
{
log
.
error
(
"单个附件下载异常:"
+
e
.
getMessage
());
//
log.error("单个附件下载异常:" + e.getMessage());
}
finally
{
if
(
null
!=
out
)
{
try
{
out
.
close
();
}
catch
(
IOException
e
)
{
log
.
error
(
"关闭输出流错误:"
+
e
.
getMessage
());
//
log.error("关闭输出流错误:" + e.getMessage());
}
}
if
(
null
!=
is
)
{
try
{
is
.
close
();
}
catch
(
IOException
e
)
{
log
.
error
(
"关闭输入流错误:"
+
e
.
getMessage
());
//
log.error("关闭输入流错误:" + e.getMessage());
}
}
if
(
null
!=
in
)
{
try
{
in
.
close
();
}
catch
(
IOException
e
)
{
log
.
error
(
"关闭缓存输入流错误:"
+
e
.
getMessage
());
//
log.error("关闭缓存输入流错误:" + e.getMessage());
}
}
}
...
...
@@ -441,20 +440,20 @@ public class TaxDocumentServiceImpl {
downloadTolocal
(
zos
,
ids
);
}
catch
(
IOException
e
)
{
log
.
error
(
"downloadAllFile-xxx下载全部附件失败,ids=[{}],错误信息=[{}]"
,
ids
,
e
);
//
log.error("downloadAllFile-xxx下载全部附件失败,ids=[{}],错误信息=[{}]", ids, e);
}
finally
{
if
(
zos
!=
null
)
{
try
{
zos
.
close
();
}
catch
(
Exception
e2
)
{
log
.
info
(
"关闭输入流时出现错误"
,
e2
);
//
log.info("关闭输入流时出现错误", e2);
}
}
if
(
outputStream
!=
null
)
{
try
{
outputStream
.
close
();
}
catch
(
Exception
e2
)
{
log
.
info
(
"关闭输入流时出现错误"
,
e2
);
//
log.info("关闭输入流时出现错误", e2);
}
}
...
...
@@ -487,7 +486,7 @@ public class TaxDocumentServiceImpl {
//文件名称(带后缀) 文件名前+7位uuid截取码以防文件名相同
String
fileName
=
StringUtils
.
isBlank
(
item
.
getFileName
())
?
"未知文件(请修改后缀名).xlsx"
:
UUID
.
randomUUID
().
toString
().
substring
(
0
,
6
)
+
"_"
+
item
.
getFileName
();
:
item
.
getFileName
();
InputStream
is
=
null
;
BufferedInputStream
in
=
null
;
byte
[]
buffer
=
new
byte
[
1024
];
...
...
@@ -519,27 +518,27 @@ public class TaxDocumentServiceImpl {
zos
.
write
(
buffer
,
0
,
len
);
}
}
catch
(
Exception
e
)
{
log
.
info
(
"xxx--下载全部附件--压缩文件出错"
,
e
);
//
log.info("xxx--下载全部附件--压缩文件出错", e);
}
finally
{
if
(
entry
!=
null
)
{
try
{
zos
.
closeEntry
();
}
catch
(
Exception
e2
)
{
log
.
info
(
"xxx下载全部附件--zip实体关闭失败"
,
e2
);
//
log.info("xxx下载全部附件--zip实体关闭失败", e2);
}
}
if
(
in
!=
null
)
{
try
{
in
.
close
();
}
catch
(
Exception
e2
)
{
log
.
info
(
"xxx下载全部附件--文件输入流关闭失败"
,
e2
);
//
log.info("xxx下载全部附件--文件输入流关闭失败", e2);
}
}
if
(
is
!=
null
)
{
try
{
is
.
close
();
}
catch
(
Exception
e
)
{
log
.
info
(
"xxx下载全部附件--输入缓冲流关闭失败"
,
e
);
//
log.info("xxx下载全部附件--输入缓冲流关闭失败", e);
}
}
...
...
atms-api/src/main/resources/conf/conf.properties
View file @
488b8c42
...
...
@@ -48,25 +48,26 @@ file_upload_post_url=${file_upload_post_url}
file_upload_query_url
=
${file_upload_query_url}
#didi-config
#
是否调用滴滴ticket接口
#
是否调用滴滴ticket接口
check_ticket
=
${check_ticket}
#
滴滴SSO地址
#
滴滴SSO地址
get_user_info_url
=
${get_user_info_url}
#
滴滴备案TMS系统
appId
#
滴滴备案TMS系统app
Id
app_id
=
${app_id}
#
滴滴备案TMS系统
appKey
#
滴滴备案TMS系统app
Key
app_key
=
${app_key}
#cookie
最大时长
#cookie
最大时长
cookie.maxAgeSeconds
=
${cookie.maxAgeSeconds}
#
机构信息同步地址
#
机构信息同步地址
org_sync_url
=
${org_sync_url}
#
机构信息同步
token
#
机构信息同步tok
en
org_sync_token
=
${org_sync_token}
#
滴滴-与主数据接口调用的生成token所需的公钥
#
滴滴-与主数据接口调用的生成token所需的公钥
dd_pubkey
=
${dd_pubkey}
#
滴滴-EBS抽取接口地址
#
滴滴-EBS抽取接口地址
ebs_call_url
=
${ebs_call_url}
#tableau config
tableau_get_ticket
=
${tableau_get_ticket}
tableau_unreturned_tax
=
${tableau_unreturned_tax}
...
...
atms-api/src/main/resources/conf/conf_profile_dev.properties
View file @
488b8c42
...
...
@@ -61,12 +61,12 @@ ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
tableau_get_ticket
=
http://47.94.233.173:16010/trusted?username=%s
tableau_unreturned_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet14?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
sheet8
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
Others
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet19?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet26?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet32?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet
8
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
sheet8
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
sheet8
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
sheet8
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
sheet8
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet
40
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
InternationalOverview
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
Mexico
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
Australia
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
Brazil
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
atms-api/src/main/resources/conf/conf_profile_staging.properties
View file @
488b8c42
...
...
@@ -54,18 +54,18 @@ org_sync_token=174af08f
dd_pubkey
=
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ==
ebs_call_url
=
http://172.20.
201.201
:8020/ebs-proxy-test/dts
ebs_call_url
=
http://172.20.
3.109
:8020/ebs-proxy-test/dts
#tableau config
tableau_get_ticket
=
http://47.94.233.173:16010/trusted?username=%s
tableau_unreturned_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet14?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
sheet8
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
Others
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet19?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet26?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet32?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet
8
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
sheet8
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
sheet8
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
sheet8
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
sheet8
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet
40
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
InternationalOverview
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
Mexico
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
Australia
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/
Brazil
?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
atms-api/src/test/java/pwc/taxtech/atms/service/impl/EbsApiServiceImplTest.java
View file @
488b8c42
...
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.commons.lang3.StringUtils
;
import
org.assertj.core.util.Lists
;
import
org.junit.Test
;
...
...
@@ -26,14 +27,21 @@ import pwc.taxtech.atms.dto.ebsdto.*;
import
pwc.taxtech.atms.dto.organization.DDSyncOrgInfo
;
import
pwc.taxtech.atms.dto.organization.OrgSyncData
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.exception.ServiceException
;
import
pwc.taxtech.atms.security.dd.DtsTokenService
;
import
pwc.taxtech.atms.service.EbsApiService
;
import
sun.misc.BASE64Decoder
;
import
sun.misc.BASE64Encoder
;
import
javax.annotation.Resource
;
import
javax.crypto.Cipher
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.security.KeyFactory
;
import
java.security.PublicKey
;
import
java.security.spec.X509EncodedKeySpec
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.concurrent.*
;
public
class
EbsApiServiceImplTest
extends
CommonIT
{
...
...
@@ -52,6 +60,9 @@ public class EbsApiServiceImplTest extends CommonIT {
@Value
(
"${org_sync_token}"
)
private
String
token
;
@Resource
private
DtsTokenService
dtsTokenService
;
private
static
String
ebsCallUrl
=
"http://172.20.201.201:8020/ebs-proxy-test/dts"
;
private
static
int
corePoolSize
=
15
;
...
...
@@ -698,4 +709,66 @@ public class EbsApiServiceImplTest extends CommonIT {
return
new
Integer
(
1
);
}
}
public
String
encryptInput
(){
BASE64Encoder
base64
=
new
BASE64Encoder
();
BASE64Decoder
base64Decoder
=
new
BASE64Decoder
();
byte
[]
encodeData
;
try
{
byte
[]
publicKey
=
base64Decoder
.
decodeBuffer
(
"MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ=="
);
String
nonce
=
generateNonce
();
String
sDate
=
generateDate
();
long
rNum
=
generateRandomNumber
();
String
inputStr1
=
sDate
+
"@@"
+
"DTS"
+
"@@"
+
nonce
+
rNum
;
byte
[]
data1
=
inputStr1
.
getBytes
();
logger
.
debug
(
"原文:"
+
inputStr1
);
encodeData
=
encryptByPublicKey
(
data1
,
publicKey
);
logger
.
debug
(
"公钥加密后:"
+
base64
.
encode
(
encodeData
));
}
catch
(
Exception
ex
)
{
throw
new
ServiceException
(
"cus"
+
ex
);
}
return
base64
.
encode
(
encodeData
);
}
private
String
generateNonce
()
throws
Exception
{
String
dateTimeString
=
Long
.
toString
(
System
.
currentTimeMillis
());
byte
[]
nonceByte
=
dateTimeString
.
getBytes
();
return
Base64
.
encodeBase64String
(
nonceByte
);
}
private
String
generateDate
()
throws
Exception
{
DateFormat
dateFormatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
dateFormatter
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"UTC"
));
Date
today
=
Calendar
.
getInstance
().
getTime
();
String
created
=
dateFormatter
.
format
(
today
);
return
created
;
}
private
long
generateRandomNumber
()
throws
Exception
{
final
double
d
=
Math
.
random
();
final
long
num
=
(
int
)(
d
*
100000000000000L
);
return
num
;
}
private
static
byte
[]
encryptByPublicKey
(
byte
[]
data
,
byte
[]
key
)
throws
Exception
{
X509EncodedKeySpec
x509KeySpec
=
new
X509EncodedKeySpec
(
key
);
KeyFactory
keyFactory
=
KeyFactory
.
getInstance
(
"RSA"
);
PublicKey
publicKey
=
keyFactory
.
generatePublic
(
x509KeySpec
);
Cipher
cipher
=
Cipher
.
getInstance
(
keyFactory
.
getAlgorithm
());
cipher
.
init
(
Cipher
.
ENCRYPT_MODE
,
publicKey
);
return
cipher
.
doFinal
(
data
);
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"--------------"
);
System
.
out
.
println
(
new
EbsApiServiceImplTest
().
encryptInput
());
}
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/entity/FileTypes.java
View file @
488b8c42
...
...
@@ -69,7 +69,7 @@ public class FileTypes implements Serializable {
* 必填字段(转换后)
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column file_types.
file_type
* This field corresponds to the database column file_types.
required_field
*
* @mbg.generated
*/
...
...
atms-web/src/main/webapp/app-resources/i18n/en-us/taxDocumentList.json
View file @
488b8c42
{
"DocumentAttr"
:
"DocumentAttr"
,
"DocumentType"
:
"DocumentType"
,
"DocumentName"
:
"DocumentName"
,
"BusinessLine"
:
"BusinessLine"
,
"CorporationName"
:
"CorporationName"
,
"AvailabilityDate"
:
"AvailabilityDate"
,
"Duration"
:
"Duration"
,
"DueDate"
:
"DueDate"
,
"TaxType"
:
"TaxType"
,
"EntityIndex"
:
"EntityIndex"
,
"EntityStorageLocation"
:
"EntityStorageLocation"
,
"EntityCustodian"
:
"EntityCustodian"
,
"ApprovalStatus"
:
"ApprovalStatus"
,
"ApprovalPass"
:
"ApprovalPass"
,
"ApprovalReject"
:
"ApprovalReject"
,
"ApprovalStandby"
:
"ApprovalStandby"
,
"UploadDate"
:
"UploadDate"
,
"Creator"
:
"Creator"
,
"Remarks"
:
"Remarks"
,
"MoreFields"
:
"MoreFields"
,
"LessFields"
:
"LessFields"
,
"Search"
:
"Search"
,
"Reset"
:
"Reset"
,
"Preview"
:
"Preview"
,
"DelRecord"
:
"DelRecord"
,
"CreateRecord"
:
"CreateRecord"
,
"ExportTable"
:
"ExportTable"
,
"DownloadAttachment"
:
"DownloadAttachment"
,
"Log"
:
"Log"
,
"MultiUpload"
:
"MultiUpload"
,
"MultiUploadFailList"
:
"MultiUploadFailList"
,
"UnFile"
:
"UnFile"
,
"UnRecord"
:
"UnRecord"
,
"UnReadFile"
:
"UnReadFile"
,
"NeedLoadUp"
:
"NeedLoadUp"
,
"UploadLimit"
:
"UploadLimit"
,
"FailUpload"
:
"FailUpload"
,
"NeedChecked"
:
"NeedChecked"
,
"Deleted"
:
"Deleted"
,
"Uploaded"
:
"Uploaded"
,
"Edited"
:
"Edited"
,
"Created"
:
"Created"
,
"CoverConfirm"
:
"CoverConfirm"
,
"NoData"
:
"NoData"
,
"PleaseSelected"
:
"PleaseSelected"
,
"PleaseType"
:
"PleaseType"
,
"EntityStorageDescription"
:
"EntityStorageDescription"
,
"multiUpload"
:
"multiUpload"
,
"UploadAttach"
:
"UploadAttach"
,
"Edit"
:
"Edit"
,
"DocumentPath"
:
"DocumentPath"
,
"PreviewFile"
:
"PreviewFile"
,
"UploadSuccessCount"
:
"UploadSuccessCount"
,
"UploadFailCount"
:
"UploadFailCount"
}
\ No newline at end of file
atms-web/src/main/webapp/app-resources/i18n/zh-CN/taxDocumentList.json
View file @
488b8c42
...
...
@@ -12,6 +12,9 @@
"EntityStorageLocation"
:
"实物存放地点"
,
"EntityCustodian"
:
"保管人"
,
"ApprovalStatus"
:
"审批状态"
,
"ApprovalPass"
:
"审批通过"
,
"ApprovalReject"
:
"拒绝审批"
,
"ApprovalStandby"
:
"待审批"
,
"UploadDate"
:
"上传日期"
,
"Creator"
:
"创建人"
,
"Remarks"
:
"档案备注"
,
...
...
@@ -26,6 +29,7 @@
"DownloadAttachment"
:
"下载附件"
,
"Log"
:
"日志"
,
"MultiUpload"
:
"批量上传"
,
"MultiUploadFailList"
:
"批量上传失败列表"
,
"UnFile"
:
"未支持的文件类型"
,
"UnRecord"
:
"当前记录没有附件信息"
,
"UnReadFile"
:
"文件内有不规则内容,无法读取,暂不支持预览"
,
...
...
@@ -46,5 +50,7 @@
"UploadAttach"
:
"上传附件"
,
"Edit"
:
"编辑"
,
"DocumentPath"
:
"档案路径"
,
"PreviewFile"
:
"预览文件"
"PreviewFile"
:
"预览文件"
,
"UploadSuccessCount"
:
"个档案上传成功"
,
"UploadFailCount"
:
"个档案上传失败"
}
\ No newline at end of file
atms-web/src/main/webapp/app/admin/infrastructure/docManage/doc-manage.ctrl.js
View file @
488b8c42
...
...
@@ -296,7 +296,8 @@
// 默认status为1
if
(
uploadModel
.
status
===
undefined
||
uploadModel
.
status
===
null
)
uploadModel
.
status
=
1
;
||
uploadModel
.
status
===
null
||
uploadModel
.
status
===
""
)
uploadModel
.
status
=
1
;
$scope
.
queryStatusType
(
uploadModel
);
docManageService
.
addFileType
(
uploadModel
).
then
(
function
(
data
)
{
...
...
atms-web/src/main/webapp/app/admin/infrastructure/docManage/doc-manage.html
View file @
488b8c42
...
...
@@ -12,11 +12,13 @@
display
:
none
;
}
.edit-panel-left-part
{
padding-left
:
0
;
padding-right
:
0
;
}
.required-tip
{
color
:
red
;
position
:
absolute
;
left
:
2rem
;
top
:
0.7rem
;
}
</style>
<div
class=
"menu-header"
>
...
...
@@ -73,7 +75,7 @@
</div>
<!--档案属性-->
<div
class=
"form-group"
>
<label
for=
"DocumentAttr"
class=
"col-sm-3 control-label"
>
<label
for=
"DocumentAttr"
class=
"col-sm-3 control-label
edit-panel-left-part
"
>
<span
class=
"required-tip"
>
*
</span>
<span
translate=
"DocumentAttr"
></span>
</label>
...
...
@@ -91,7 +93,7 @@
<!--档案类型-->
<div
class=
"form-group"
>
<label
for=
"DocumentType"
class=
"col-sm-3 control-label"
>
<label
for=
"DocumentType"
class=
"col-sm-3 control-label
edit-panel-left-part
"
>
<span
class=
"required-tip"
>
*
</span>
<span
translate=
"DocumentType"
></span>
</label>
...
...
@@ -121,7 +123,7 @@
<!--必填字段-->
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
<label
class=
"col-sm-3 control-label
edit-panel-left-part
"
>
<span
class=
"required-tip"
>
*
</span>
<span
translate=
"RequiredFields"
></span>
</label>
...
...
@@ -156,7 +158,10 @@
<label
class=
"col-sm-5 DM-state-label"
>
<input
type=
"radio"
name=
"editModelState"
value=
1
ng-checked=
"editModel.status == 1 || editModel.status == null || editModel.status == undefined"
ng-checked=
"editModel.status == 1
|| editModel.status == null
|| editModel.status == undefined
|| editModel.status == ''"
ng-model=
"editModel.status"
/>
<span
translate=
"Enable"
></span>
</label>
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
488b8c42
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.html
View file @
488b8c42
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.svc.js
View file @
488b8c42
...
...
@@ -73,7 +73,7 @@ taxDocumentManageModule.factory('taxDocumentListService',
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/taxDoc/batchDelete'
,
params
);
},
getDocumentsAttrAndType
:
function
(
params
){
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/fileTypes/selectList'
,
params
);
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/fileTypes/select
Enable
List'
,
params
);
},
getBusinessList
:
function
(
params
){
return
jqFetch
.
get
(
apiInterceptor
.
webApiHostUrl
+
'/businessunit/getlist'
,
params
);
...
...
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