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
ff585ba2
Commit
ff585ba2
authored
Jun 05, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] get project status api impl
parent
93353486
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
0 deletions
+64
-0
ProjectStatusManageController.java
...axtech/atms/controller/ProjectStatusManageController.java
+10
-0
ProjectStatusManageService.java
.../pwc/taxtech/atms/service/ProjectStatusManageService.java
+2
-0
ProjectStatusManageServiceImpl.java
...ech/atms/service/impl/ProjectStatusManageServiceImpl.java
+52
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ProjectStatusManageController.java
View file @
ff585ba2
...
...
@@ -32,4 +32,14 @@ public class ProjectStatusManageController {
@PathVariable
(
"status"
)
Integer
status
)
{
return
projectStatusManageService
.
setProjectStatus
(
dbName
,
periodId
,
status
,
identityService
.
getIdentityUser
().
getID
());
}
@ApiOperation
(
value
=
"getProjectStatus"
,
notes
=
""
)
@RequestMapping
(
value
=
{
"getProjectStatus/{dbName}/{projectId}/{periodId}"
},
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@ResponseBody
public
OperationResultDto
<
ProjectStatusManageDto
>
getProjectStatus
(
@PathVariable
String
dbName
,
@PathVariable
String
projectId
,
@PathVariable
Integer
periodId
)
{
return
projectStatusManageService
.
getProjectStatus
(
dbName
,
projectId
,
periodId
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/ProjectStatusManageService.java
View file @
ff585ba2
...
...
@@ -5,4 +5,6 @@ import pwc.taxtech.atms.dto.taxadmin.ProjectStatusManageDto;
public
interface
ProjectStatusManageService
{
OperationResultDto
<
ProjectStatusManageDto
>
setProjectStatus
(
String
dbName
,
Integer
periodId
,
Integer
status
,
String
id
);
OperationResultDto
<
ProjectStatusManageDto
>
getProjectStatus
(
String
dbName
,
String
projectId
,
Integer
periodId
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ProjectStatusManageServiceImpl.java
View file @
ff585ba2
...
...
@@ -7,6 +7,7 @@ import org.springframework.stereotype.Service;
import
pwc.taxtech.atms.dao.ProjectStatusManageMapper
;
import
pwc.taxtech.atms.dto.FieldsMapper
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.taxadmin.ProjectImportSubStatusDto
;
import
pwc.taxtech.atms.dto.taxadmin.ProjectStatusManageDto
;
import
pwc.taxtech.atms.entitiy.ProjectStatusManage
;
import
pwc.taxtech.atms.entitiy.ProjectStatusManageExample
;
...
...
@@ -75,4 +76,55 @@ public class ProjectStatusManageServiceImpl implements ProjectStatusManageServic
return
ord
;
}
}
@Override
public
OperationResultDto
<
ProjectStatusManageDto
>
getProjectStatus
(
String
dbName
,
String
projectId
,
Integer
periodId
)
{
try
{
ProjectStatusManageExample
example
=
new
ProjectStatusManageExample
();
example
.
createCriteria
().
andDbNameEqualTo
(
dbName
).
andPeriodIdEqualTo
(
periodId
);
List
<
ProjectStatusManage
>
psmList
=
projectStatusManageMapper
.
selectByExample
(
example
);
if
(
psmList
!=
null
&&
!
psmList
.
isEmpty
())
{
ProjectStatusManage
first
=
psmList
.
get
(
FIRST_OR_DFAULT
);
ProjectStatusManageDto
dto
=
new
ProjectStatusManageDto
();
try
{
FieldsMapper
.
map
(
first
,
dto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
LOGGER
.
warn
(
"field map some error"
);
}
ProjectImportSubStatusDto
ssd
=
new
ProjectImportSubStatusDto
();
//TODO:should query status from db (neo)
ssd
.
setAdjustImport
(
false
);
ssd
.
setCustomInvoiceImport
(
false
);
ssd
.
setEntryImport
(
false
);
ssd
.
setErpImport
(
false
);
ssd
.
setInputInvoiceImport
(
false
);
ssd
.
setOutputInvoiceImport
(
false
);
ssd
.
setTbImport
(
false
);
ssd
.
setVoucherMapImport
(
false
);
dto
.
setImportSubStatus
(
ssd
);
OperationResultDto
resultDto
=
new
OperationResultDto
();
resultDto
.
setResult
(
true
);
resultDto
.
setResultMsg
(
""
);
resultDto
.
setData
(
dto
);
return
resultDto
;
}
else
{
throw
new
Exception
(
"数据库"
+
dbName
+
"状态信息为NULL"
);
}
}
catch
(
Exception
e
){
OperationResultDto
resultDto
=
new
OperationResultDto
();
resultDto
.
setResult
(
false
);
resultDto
.
setResultMsg
(
e
.
getMessage
());
resultDto
.
setData
(
null
);
return
resultDto
;
}
}
}
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