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
7988ef72
Commit
7988ef72
authored
Jun 04, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] translate listAllProjectList api logic
parent
18a0e9cf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
7 deletions
+89
-7
ProjectController.java
...n/java/pwc/taxtech/atms/controller/ProjectController.java
+18
-6
UserController.java
...main/java/pwc/taxtech/atms/controller/UserController.java
+1
-1
ProjectMapper.java
...api/src/main/java/pwc/taxtech/atms/dao/ProjectMapper.java
+61
-0
ProjectYearParam.java
.../java/pwc/taxtech/atms/dto/taxadmin/ProjectYearParam.java
+7
-0
ProjectService.java
...rc/main/java/pwc/taxtech/atms/service/ProjectService.java
+2
-0
ProjectServiceImpl.java
...ava/pwc/taxtech/atms/service/impl/ProjectServiceImpl.java
+0
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ProjectController.java
View file @
7988ef72
...
...
@@ -7,6 +7,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -20,7 +21,9 @@ import pwc.taxtech.atms.service.ProjectService;
@RequestMapping
(
"/api/v1/project"
)
public
class
ProjectController
{
/** @see PwC.Tax.Tech.Atms.WebApi\Controllers\ProjectController.cs */
/**
* @see PwC.Tax.Tech.Atms.WebApi\Controllers\ProjectController.cs
*/
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ProjectController
.
class
);
...
...
@@ -29,23 +32,32 @@ public class ProjectController {
@ApiOperation
(
value
=
"listService"
,
notes
=
"Get service list"
)
@RequestMapping
(
value
=
"listService"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
ServiceTypeDto
>
getServiceList
()
{
public
@ResponseBody
List
<
ServiceTypeDto
>
getServiceList
()
{
logger
.
info
(
"/api/v1/project/listService"
);
return
projectService
.
getServiceList
();
}
@ApiOperation
(
value
=
"getProjectClientList"
,
notes
=
"Get project Client list"
)
@RequestMapping
(
value
=
"getProjectClientList"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
ProjectClientDto
>
getProjectClientList
()
{
public
@ResponseBody
List
<
ProjectClientDto
>
getProjectClientList
()
{
logger
.
info
(
"/api/v1/project/getProjectClientList"
);
return
projectService
.
getProjectClientList
();
}
@ApiOperation
(
value
=
"getProject"
,
notes
=
"Get Project"
)
@ApiOperation
(
value
=
"getProject"
,
notes
=
"Get Project"
)
@RequestMapping
(
value
=
"getProject"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
ProjectDisplayDto
>
GetProjectByID
(
String
projectID
)
{
public
@ResponseBody
List
<
ProjectDisplayDto
>
GetProjectByID
(
String
projectID
)
{
return
projectService
.
getProjectByID
(
projectID
);
}
@ApiOperation
(
value
=
"getAllProjectList"
,
notes
=
"Get All List"
)
@RequestMapping
(
value
=
"getAllProjectList"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
ProjectDisplayDto
>
getAllProjectList
(
String
orgID
,
String
serviceID
,
Integer
projectYear
)
{
logger
.
info
(
"/api/v1/project/getAllProjectList with orgID {} serviceID {}"
,
orgID
,
serviceID
);
return
projectService
.
getAllProjectList
(
orgID
,
serviceID
==
null
?
""
:
serviceID
,
projectYear
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/UserController.java
View file @
7988ef72
...
...
@@ -226,7 +226,7 @@ public class UserController {
@SuppressWarnings
(
"rawtypes"
)
@ApiOperation
(
value
=
"查询用户信息"
,
notes
=
"税务运营管理平台>增值税申报"
)
@RequestMapping
(
value
=
"getUserByName"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
OperationResult
Dto
getUserByName
(
public
@ResponseBody
User
Dto
getUserByName
(
@RequestBody
UserDto
userParam
)
{
return
userRoleService
.
GetUserByUserName
(
userParam
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/dao/ProjectMapper.java
View file @
7988ef72
package
pwc
.
taxtech
.
atms
.
dao
;
import
java.util.Dictionary
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -161,4 +162,63 @@ public interface ProjectMapper extends MyMapper {
"</script>"
)
List
<
ProjectDisplayDto
>
getProjectList
(
@Param
(
"orgID"
)
String
orgID
,
@Param
(
"serverID"
)
String
serviceID
,
@Param
(
"projectYear"
)
Integer
projectYear
);
@Select
(
"SELECT "
+
" p.PeriodId, p.Status "
+
"FROM "
+
" ProjectStatusManage p "
+
"WHERE "
+
" p.DbName = #{dbName} "
+
"ORDER BY PeriodId , Status"
)
Dictionary
<
Integer
,
Integer
>
getProjectSatusListByDbName
(
String
dbName
);
@Select
(
"<script>"
+
"SELECT "
+
" now() AS CreateTime, "
+
" TRUE AS IsActive, "
+
" org.ID AS OrganizationID, "
+
" org.Name AS Name, "
+
" org.Code AS Code, "
+
" UUID() AS ID, "
+
" org.IndustryID AS IndustryID, "
+
" 0 AS Year, "
+
" org.RegionID AS RegionID, "
+
" 0 AS RuleType, "
+
" st.ID AS ServiceTypeID, "
+
" reg.ShortName AS RegionName, "
+
" now() AS UpdateTime, "
+
" st.Name AS ServiceTypeName, "
+
" org.Name AS OrganizationName, "
+
" ind.Name AS IndustryName, "
+
" ostg.TemplateGroupID AS TemplateGroupID, "
+
" '' AS TemplateGroupName, "
+
" org.ClientCode AS ClientCode, "
+
" '' AS DbName, "
+
" FALSE AS HaveCreateProject, "
+
" ea.EnterpriseAccountSetID AS EnterpriseAccountSetID, "
+
" 1 AS StartPeriod, "
+
" 12 AS EndPeriod, "
+
" ea.EffectiveDate AS EffectiveDate, "
+
" ea.ExpiredDate AS ExpiredDate "
+
"FROM "
+
" Organization org "
+
" JOIN "
+
" EnterpriseAccountSetOrg ea ON org.ID = ea.OrganizationID "
+
" JOIN "
+
" OrganizationServiceTemplateGroup ostg ON org.ID = ostg.OrganizationID "
+
" JOIN "
+
" ServiceType st ON ostg.ServiceTypeID = st.ID "
+
" JOIN "
+
" Industry ind ON org.IndustryID = ind.ID "
+
" JOIN "
+
" Region reg ON org.RegionID = reg.ID "
+
"WHERE "
+
" 1=1"
+
" <if test=\"orgID != null and orgID !='' \">AND org.ID=#{orgID}</if>"
+
" AND org.IsActive = 1 "
+
" AND st.IsActive = 1 "
+
" <if test=\"serviceID != null and serviceID !='' \">AND ostg.ServiceTypeID=#{serviceID}</if>"
+
"ORDER BY ea.EffectiveDate,org.Code"
+
"</script>"
)
List
<
ProjectDisplayDto
>
getProjectFromEnterpriseAccountSetOrg
(
@Param
(
"orgID"
)
String
orgID
,
@Param
(
"serviceID"
)
String
serviceID
);
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/dto/taxadmin/ProjectYearParam.java
0 → 100644
View file @
7988ef72
package
pwc
.
taxtech
.
atms
.
dto
.
taxadmin
;
public
class
ProjectYearParam
{
public
int
endMonth
;
public
int
startMonth
;
public
int
year
;
}
atms-api/src/main/java/pwc/taxtech/atms/service/ProjectService.java
View file @
7988ef72
...
...
@@ -36,6 +36,8 @@ public interface ProjectService {
List
<
ProjectDisplayDto
>
getProjectByID
(
String
projectID
);
List
<
ProjectDisplayDto
>
getAllProjectList
(
String
orgID
,
String
s
,
Integer
projectYear
);
// Map<Integer, Integer> getProjectAllStatus(String dbName);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ProjectServiceImpl.java
View file @
7988ef72
This diff is collapsed.
Click to expand it.
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