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
0a050f4a
Commit
0a050f4a
authored
Oct 09, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEL] delete organization structrue service interface
parent
819be5cb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
48 deletions
+22
-48
OrganizationStructureController.java
...tech/atms/controller/OrganizationStructureController.java
+14
-14
OrganizationStructureService.java
...wc/taxtech/atms/service/OrganizationStructureService.java
+0
-18
OrganizationStructureServiceImpl.java
...h/atms/service/impl/OrganizationStructureServiceImpl.java
+8
-16
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/OrganizationStructureController.java
View file @
0a050f4a
package
pwc
.
taxtech
.
atms
.
controller
;
import
java.util.List
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -11,15 +10,13 @@ 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
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
pwc.taxtech.atms.dto.IdModel
;
import
pwc.taxtech.atms.dto.OrganizationStructureDto
;
import
pwc.taxtech.atms.dto.OrganizationStructureInputDto
;
import
pwc.taxtech.atms.service.OrganizationStructureService
;
import
pwc.taxtech.atms.service.impl.OrganizationStructureServiceImpl
;
import
java.util.List
;
/** @see PwC.Tax.Tech.Atms.WebApi.Controllers.OrganizationStructureController.cs */
@RestController
@RequestMapping
(
"/api/v1/organizationstructure"
)
public
class
OrganizationStructureController
{
...
...
@@ -27,18 +24,19 @@ public class OrganizationStructureController {
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
OrganizationStructureController
.
class
);
@Autowired
private
OrganizationStructureService
organizationStructureService
;
private
OrganizationStructureService
Impl
organizationStructureService
;
@ApiOperation
(
value
=
"主数据机构层级查询"
)
@RequestMapping
(
value
=
"/getlist"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
OrganizationStructureDto
>
getOrganizationStructures
()
{
public
@ResponseBody
List
<
OrganizationStructureDto
>
getOrganizationStructures
()
{
logger
.
debug
(
"OrganizationStructureController /getlist"
);
return
organizationStructureService
.
getOrganizationStructures
();
}
@ApiOperation
(
value
=
"主数据机构层级增加"
)
// @ApiImplicitParam(name = "organizationStructureDtoList", value = "organizationStructureDto List", required = true, dataType = "List<OrganizationStructureDto>")
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
public
void
addOrganizationStructures
(
@RequestBody
List
<
OrganizationStructureInputDto
>
organizationStructureDtoList
)
{
logger
.
debug
(
"OrganizationStructureController /add"
);
organizationStructureService
.
addOrganizationStructures
(
organizationStructureDtoList
);
...
...
@@ -46,8 +44,9 @@ public class OrganizationStructureController {
@ApiOperation
(
value
=
"主数据机构层级删除"
)
@ApiImplicitParam
(
name
=
"idModel"
,
value
=
"idModel"
,
required
=
true
,
dataType
=
"IdModel"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
Integer
deleteOrganizationStructure
(
@RequestBody
IdModel
idModel
)
{
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
Integer
deleteOrganizationStructure
(
@RequestBody
IdModel
idModel
)
{
logger
.
debug
(
"OrganizationStructureController /delete"
);
return
organizationStructureService
.
deleteOrganizationStructure
(
idModel
);
}
...
...
@@ -55,7 +54,8 @@ public class OrganizationStructureController {
@ApiOperation
(
value
=
"主数据机构层级修改"
)
// @ApiImplicitParam(name = "organizationStructureDtoList", value = "organizationStructureDto List", required = true, dataType = "List<OrganizationStructureDto>")
@RequestMapping
(
method
=
RequestMethod
.
PUT
)
public
@ResponseBody
Boolean
updateOrganizationStructure
(
@RequestBody
List
<
OrganizationStructureInputDto
>
organizationStructureDtoList
)
{
public
@ResponseBody
Boolean
updateOrganizationStructure
(
@RequestBody
List
<
OrganizationStructureInputDto
>
organizationStructureDtoList
)
{
logger
.
debug
(
"OrganizationStructureController update"
);
return
organizationStructureService
.
updateOrganizationStructures
(
organizationStructureDtoList
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/OrganizationStructureService.java
deleted
100644 → 0
View file @
819be5cb
package
pwc
.
taxtech
.
atms
.
service
;
import
java.util.List
;
import
pwc.taxtech.atms.dto.IdModel
;
import
pwc.taxtech.atms.dto.OrganizationStructureDto
;
import
pwc.taxtech.atms.dto.OrganizationStructureInputDto
;
public
interface
OrganizationStructureService
{
List
<
OrganizationStructureDto
>
getOrganizationStructures
();
void
addOrganizationStructures
(
List
<
OrganizationStructureInputDto
>
organizationStructureList
);
Integer
deleteOrganizationStructure
(
IdModel
idModel
);
Boolean
updateOrganizationStructures
(
List
<
OrganizationStructureInputDto
>
organizationStructureDtoList
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationStructureServiceImpl.java
View file @
0a050f4a
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
com.alibaba.fastjson.JSON
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
com.alibaba.fastjson.JSON
;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
pwc.taxtech.atms.common.AuthUserHelper
;
import
pwc.taxtech.atms.common.CommonConstants
;
import
pwc.taxtech.atms.common.CommonUtils
;
...
...
@@ -27,13 +20,16 @@ import pwc.taxtech.atms.dto.OrganizationStructureInputDto;
import
pwc.taxtech.atms.dto.UpdateLogParams
;
import
pwc.taxtech.atms.entity.OrganizationStructure
;
import
pwc.taxtech.atms.entity.OrganizationStructureExample
;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
pwc.taxtech.atms.service.OperationLogService
;
import
pwc.taxtech.atms.service.OrganizationService
;
import
pwc.taxtech.atms.service.OrganizationStructureService
;
/** @see PwC.Tax.Tech.Atms.Admin.Application.Services.Impl.OrganizationStructureService.cs */
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
@Service
public
class
OrganizationStructureServiceImpl
implements
OrganizationStructureService
{
public
class
OrganizationStructureServiceImpl
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
OrganizationStructureServiceImpl
.
class
);
...
...
@@ -49,7 +45,6 @@ public class OrganizationStructureServiceImpl implements OrganizationStructureSe
@Autowired
private
AuthUserHelper
authUserHelper
;
@Override
public
List
<
OrganizationStructureDto
>
getOrganizationStructures
()
{
logger
.
debug
(
"OrganizationStructureService getOrganizationStructures"
);
OrganizationStructureExample
organizationStructureExample
=
new
OrganizationStructureExample
();
...
...
@@ -59,7 +54,6 @@ public class OrganizationStructureServiceImpl implements OrganizationStructureSe
return
rotateOrganizationStructureList
(
organizationStructureList
);
}
@Override
public
void
addOrganizationStructures
(
List
<
OrganizationStructureInputDto
>
organizationStructureDtoList
)
{
logger
.
debug
(
"OrganizationStructureService addOrganizationStructure"
);
logger
.
debug
(
"organization structure to add: {}"
,
JSON
.
toJSONString
(
organizationStructureDtoList
,
true
));
...
...
@@ -93,7 +87,6 @@ public class OrganizationStructureServiceImpl implements OrganizationStructureSe
operationLogDto
.
setLogType
(
OperateLogType
.
OperationLogBasicData
.
value
());
}
@Override
public
Integer
deleteOrganizationStructure
(
IdModel
idModel
)
{
logger
.
debug
(
"OrganizationStructureService deleteOrganizationStructure"
);
logger
.
debug
(
"organization structure to delete, id: {}"
,
JSON
.
toJSONString
(
idModel
,
true
));
...
...
@@ -118,7 +111,6 @@ public class OrganizationStructureServiceImpl implements OrganizationStructureSe
return
result
;
}
@Override
public
Boolean
updateOrganizationStructures
(
List
<
OrganizationStructureInputDto
>
organizationStructureDtoList
)
{
logger
.
debug
(
"OrganizationStructureService updateOrganizationStructures"
);
logger
.
debug
(
"organization structure to update: {}"
,
JSON
.
toJSONString
(
organizationStructureDtoList
,
true
));
...
...
@@ -159,7 +151,7 @@ public class OrganizationStructureServiceImpl implements OrganizationStructureSe
organizationStructureMapper
.
updateByPrimaryKey
(
organizationStructure
);
//add operation log
if
(
isStatusChangeOperation
)
{
if
(
isStatusChangeOperation
)
{
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
updateLogParams
.
setOperationObject
(
originOrganizationStructure
.
getName
());
updateLogParams
.
setOriginalState
(
originOrganizationStructure
);
...
...
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