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
a90665b8
Commit
a90665b8
authored
Jun 07, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] ] add project info isProjectImportData impl
parent
88969d81
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
0 deletions
+94
-0
ProjectInfoController.java
...va/pwc/taxtech/atms/controller/ProjectInfoController.java
+36
-0
ProjectInfoService.java
...ain/java/pwc/taxtech/atms/service/ProjectInfoService.java
+9
-0
ProjectInfoServiceImpl.java
...pwc/taxtech/atms/service/impl/ProjectInfoServiceImpl.java
+49
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ProjectInfoController.java
0 → 100644
View file @
a90665b8
package
pwc
.
taxtech
.
atms
.
controller
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.service.ProjectInfoService
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/api/v1/ProjectInfo"
)
public
class
ProjectInfoController
{
@Autowired
private
ProjectInfoService
projectInfoService
;
@ApiOperation
(
value
=
"isProjectImportedData"
,
notes
=
""
)
@RequestMapping
(
value
=
"isProjectImportedData/{projectId}/{serviceType}/{importTypeId}"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
OperationResultDto
<
Boolean
>
isProjectImportedData
(
@PathVariable
String
projectId
,
@PathVariable
Integer
serviceType
,
@PathVariable
Integer
importTypeId
)
{
return
projectInfoService
.
isProjectImportedData
(
projectId
,
serviceType
,
importTypeId
);
}
@ApiOperation
(
value
=
"isProjectImportedData"
,
notes
=
""
)
@RequestMapping
(
value
=
"isProjectImportedData/{projectId}/{importTypeId}"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
OperationResultDto
<
Boolean
>
isProjectImportedData
(
@PathVariable
String
projectId
,
@PathVariable
Integer
importTypeId
)
{
return
projectInfoService
.
isProjectImportedData
(
projectId
,
importTypeId
);
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/service/ProjectInfoService.java
0 → 100644
View file @
a90665b8
package
pwc
.
taxtech
.
atms
.
service
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
public
interface
ProjectInfoService
{
OperationResultDto
<
Boolean
>
isProjectImportedData
(
String
projectId
,
Integer
serviceType
,
Integer
importTypeId
);
OperationResultDto
<
Boolean
>
isProjectImportedData
(
String
projectId
,
Integer
importTypeId
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ProjectInfoServiceImpl.java
0 → 100644
View file @
a90665b8
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
org.apache.log4j.lf5.LogLevel
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.dao.PeriodInfoMapper
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.entitiy.PeriodInfo
;
import
pwc.taxtech.atms.entitiy.PeriodInfoExample
;
import
pwc.taxtech.atms.service.ProjectInfoService
;
import
sun.rmi.runtime.Log
;
import
java.util.List
;
@Service
public
class
ProjectInfoServiceImpl
implements
ProjectInfoService
{
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
ProjectServiceImpl
.
class
);
@Autowired
private
PeriodInfoMapper
periodInfoMapper
;
@Override
public
OperationResultDto
<
Boolean
>
isProjectImportedData
(
String
projectId
,
Integer
serviceType
,
Integer
importTypeId
)
{
try
{
PeriodInfoExample
example
=
new
PeriodInfoExample
();
PeriodInfoExample
.
Criteria
criteria
=
example
.
createCriteria
().
andProjectIDEqualTo
(
projectId
).
andImportTypeEqualTo
(
importTypeId
);
if
(
serviceType
!=
null
)
criteria
.
andServiceTypeEqualTo
(
serviceType
);
List
<
PeriodInfo
>
piList
=
periodInfoMapper
.
selectByExample
(
example
);
OperationResultDto
<
Boolean
>
ord
=
new
OperationResultDto
<>();
ord
.
setResult
(
piList
!=
null
&
!
piList
.
isEmpty
());
ord
.
setData
(
ord
.
getResult
());
return
ord
;
}
catch
(
Exception
e
)
{
LOGGER
.
warn
(
"IsProjectImportedData method error"
,
e
);
OperationResultDto
<
Boolean
>
ord
=
new
OperationResultDto
<>();
ord
.
setResult
(
false
);
ord
.
setData
(
false
);
return
ord
;
}
}
@Override
public
OperationResultDto
<
Boolean
>
isProjectImportedData
(
String
projectId
,
Integer
importTypeId
)
{
return
isProjectImportedData
(
projectId
,
importTypeId
);
}
}
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