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
44f8a49e
Commit
44f8a49e
authored
May 31, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add controller delete template method
parent
0325154e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
TemplateController.java
.../java/pwc/taxtech/atms/controller/TemplateController.java
+20
-6
TemplateGroupController.java
.../pwc/taxtech/atms/controller/TemplateGroupController.java
+1
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/TemplateController.java
View file @
44f8a49e
...
...
@@ -8,10 +8,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
pwc.taxtech.atms.common.ApplicationException
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.TemplateDto
;
import
pwc.taxtech.atms.dto.TemplateUniqDto
;
import
pwc.taxtech.atms.dto.UpateNameParam
;
import
pwc.taxtech.atms.common.ftp.FTPClientPool
;
import
pwc.taxtech.atms.dto.*
;
import
pwc.taxtech.atms.service.TemplateService
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -27,6 +25,9 @@ public class TemplateController {
@Autowired
TemplateService
templateService
;
@Autowired
FTPClientPool
ftpClientPool
;
//todo:
//[Route("getTemplateJson")]
// [HttpGet]
...
...
@@ -108,9 +109,22 @@ public class TemplateController {
return
templateService
.
getTemplateUniqList
(
serviceTypeID
,
payTaxType
,
reportType
,
industryIDs
);
}
@RequestMapping
(
value
=
"updateTemplateName"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"updateTemplateName"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
OperationResultDto
<
Object
>
updateTemplateName
(
@RequestBody
UpateNameParam
param
){
OperationResultDto
<
Object
>
updateTemplateName
(
@RequestBody
UpateNameParam
param
)
{
return
templateService
.
updateTemplateName
(
param
);
}
@RequestMapping
(
value
=
"deleteTemplate"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
OperationResultDto
<
String
>
deleteTemplate
(
@RequestBody
DeleteTemplateParam
param
)
{
OperationResultDto
<
String
>
result
=
templateService
.
deleteTemplate
(
param
);
if
(
result
.
getResult
()
&&
StringUtils
.
isNotBlank
(
result
.
getData
()))
{
try
{
ftpClientPool
.
delete
(
result
.
getData
());
}
catch
(
Exception
e
)
{
}
}
return
result
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/TemplateGroupController.java
View file @
44f8a49e
...
...
@@ -53,9 +53,8 @@ public class TemplateGroupController {
List
<
String
>
pathList
=
(
List
<
String
>)
result
.
getData
();
if
(
pathList
!=
null
&&
pathList
.
size
()
>
0
)
{
for
(
String
path:
pathList
){
String
pathAndName
=
path
;
try
{
ftpClientPool
.
delete
(
path
AndName
);
ftpClientPool
.
delete
(
path
);
}
catch
(
Exception
e
){
}
...
...
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