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
cbd872cb
Commit
cbd872cb
authored
Oct 09, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEL] delete business unit service interface
parent
bad48a9d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
43 deletions
+15
-43
BusinessUnitController.java
...a/pwc/taxtech/atms/controller/BusinessUnitController.java
+13
-10
BusinessUnitService.java
...in/java/pwc/taxtech/atms/service/BusinessUnitService.java
+0
-23
BusinessUnitServiceImpl.java
...wc/taxtech/atms/service/impl/BusinessUnitServiceImpl.java
+1
-8
DimensionServiceImpl.java
...a/pwc/taxtech/atms/service/impl/DimensionServiceImpl.java
+1
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/BusinessUnitController.java
View file @
cbd872cb
package
pwc
.
taxtech
.
atms
.
controller
;
package
pwc
.
taxtech
.
atms
.
controller
;
import
java.util.List
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -10,14 +9,15 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -10,14 +9,15 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.ApiOperation
;
import
pwc.taxtech.atms.dto.BusinessUnitDto
;
import
pwc.taxtech.atms.dto.BusinessUnitDto
;
import
pwc.taxtech.atms.dto.BusinessUnitInputDto
;
import
pwc.taxtech.atms.dto.BusinessUnitInputDto
;
import
pwc.taxtech.atms.dto.IdModel
;
import
pwc.taxtech.atms.dto.IdModel
;
import
pwc.taxtech.atms.service.BusinessUnitService
;
import
pwc.taxtech.atms.service.impl.BusinessUnitServiceImpl
;
import
java.util.List
;
/** @see PwC.Tax.Tech.Atms.WebApi\Controllers\BusinessUnitController.cs */
/**
*/
@RestController
@RestController
@RequestMapping
(
"/api/v1/businessunit"
)
@RequestMapping
(
"/api/v1/businessunit"
)
public
class
BusinessUnitController
{
public
class
BusinessUnitController
{
...
@@ -25,11 +25,12 @@ public class BusinessUnitController {
...
@@ -25,11 +25,12 @@ public class BusinessUnitController {
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
BusinessUnitController
.
class
);
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
BusinessUnitController
.
class
);
@Autowired
@Autowired
private
BusinessUnitService
businessUnitService
;
private
BusinessUnitService
Impl
businessUnitService
;
@ApiOperation
(
value
=
"主数据事业部查询"
,
notes
=
"返回所有事业部数据"
)
@ApiOperation
(
value
=
"主数据事业部查询"
,
notes
=
"返回所有事业部数据"
)
@RequestMapping
(
value
=
"/getlist"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getlist"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
BusinessUnitDto
>
getBusinessUnits
()
{
public
@ResponseBody
List
<
BusinessUnitDto
>
getBusinessUnits
()
{
logger
.
debug
(
"BusinessUnitController getBusinessUnits"
);
logger
.
debug
(
"BusinessUnitController getBusinessUnits"
);
return
businessUnitService
.
getBusinessUnits
();
return
businessUnitService
.
getBusinessUnits
();
}
}
...
@@ -43,14 +44,16 @@ public class BusinessUnitController {
...
@@ -43,14 +44,16 @@ public class BusinessUnitController {
@ApiOperation
(
value
=
"主数据事业部删除"
,
notes
=
"根据给定的id删除一条事业部数据"
)
@ApiOperation
(
value
=
"主数据事业部删除"
,
notes
=
"根据给定的id删除一条事业部数据"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
Integer
deleteBusinessUnit
(
@RequestBody
IdModel
idModel
)
{
public
@ResponseBody
Integer
deleteBusinessUnit
(
@RequestBody
IdModel
idModel
)
{
logger
.
debug
(
"BusinessUnitController deleteBusinessUnit"
);
logger
.
debug
(
"BusinessUnitController deleteBusinessUnit"
);
return
businessUnitService
.
deleteBusinessUnit
(
idModel
);
return
businessUnitService
.
deleteBusinessUnit
(
idModel
);
}
}
@ApiOperation
(
value
=
"主数据事业部修改"
,
notes
=
"根据Request Body的信息修改一个或多个事业部数据"
)
@ApiOperation
(
value
=
"主数据事业部修改"
,
notes
=
"根据Request Body的信息修改一个或多个事业部数据"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
)
public
@ResponseBody
Boolean
updateBusinessUnits
(
@RequestBody
List
<
BusinessUnitDto
>
businessUnitDtoList
)
{
public
@ResponseBody
Boolean
updateBusinessUnits
(
@RequestBody
List
<
BusinessUnitDto
>
businessUnitDtoList
)
{
logger
.
debug
(
"BusinessUnitController updateBusinessUnit"
);
logger
.
debug
(
"BusinessUnitController updateBusinessUnit"
);
return
businessUnitService
.
updateBusinessUnits
(
businessUnitDtoList
);
return
businessUnitService
.
updateBusinessUnits
(
businessUnitDtoList
);
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/BusinessUnitService.java
deleted
100644 → 0
View file @
bad48a9d
package
pwc
.
taxtech
.
atms
.
service
;
import
java.util.List
;
import
pwc.taxtech.atms.dto.BusinessUnitDto
;
import
pwc.taxtech.atms.dto.BusinessUnitInputDto
;
import
pwc.taxtech.atms.dto.IdModel
;
import
pwc.taxtech.atms.entity.BusinessUnit
;
public
interface
BusinessUnitService
{
List
<
BusinessUnitDto
>
getBusinessUnits
();
void
addBusinessUnits
(
List
<
BusinessUnitInputDto
>
businessUnitDtoList
);
Integer
deleteBusinessUnit
(
IdModel
idModel
);
Boolean
updateBusinessUnits
(
List
<
BusinessUnitDto
>
businessUnitDtoList
);
List
<
BusinessUnit
>
findByNameAndIsActive
(
String
name
,
Boolean
isActive
);
List
<
BusinessUnit
>
findByIsActiveTrue
();
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/BusinessUnitServiceImpl.java
View file @
cbd872cb
...
@@ -22,7 +22,6 @@ import pwc.taxtech.atms.entity.BusinessUnit;
...
@@ -22,7 +22,6 @@ import pwc.taxtech.atms.entity.BusinessUnit;
import
pwc.taxtech.atms.entity.BusinessUnitExample
;
import
pwc.taxtech.atms.entity.BusinessUnitExample
;
import
pwc.taxtech.atms.entity.BusinessUnitExample.Criteria
;
import
pwc.taxtech.atms.entity.BusinessUnitExample.Criteria
;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
pwc.taxtech.atms.service.BusinessUnitService
;
import
pwc.taxtech.atms.service.OperationLogService
;
import
pwc.taxtech.atms.service.OperationLogService
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -32,7 +31,7 @@ import java.util.List;
...
@@ -32,7 +31,7 @@ import java.util.List;
/**
/**
*/
*/
@Service
@Service
public
class
BusinessUnitServiceImpl
implements
BusinessUnitService
{
public
class
BusinessUnitServiceImpl
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
BusinessUnitServiceImpl
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
BusinessUnitServiceImpl
.
class
);
...
@@ -48,7 +47,6 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
...
@@ -48,7 +47,6 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
@Autowired
@Autowired
private
AuthUserHelper
authUserHelper
;
private
AuthUserHelper
authUserHelper
;
@Override
public
List
<
BusinessUnitDto
>
getBusinessUnits
()
{
public
List
<
BusinessUnitDto
>
getBusinessUnits
()
{
logger
.
debug
(
"BusinessUnitServiceImpl getBusinessUnits"
);
logger
.
debug
(
"BusinessUnitServiceImpl getBusinessUnits"
);
BusinessUnitExample
businessUnitExample
=
new
BusinessUnitExample
();
BusinessUnitExample
businessUnitExample
=
new
BusinessUnitExample
();
...
@@ -58,7 +56,6 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
...
@@ -58,7 +56,6 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
}
}
@Transactional
@Transactional
@Override
public
void
addBusinessUnits
(
List
<
BusinessUnitInputDto
>
businessUnitDtoList
)
{
public
void
addBusinessUnits
(
List
<
BusinessUnitInputDto
>
businessUnitDtoList
)
{
logger
.
debug
(
"BusinessUnitServiceImpl addBusinessUnits"
);
logger
.
debug
(
"BusinessUnitServiceImpl addBusinessUnits"
);
if
(
businessUnitDtoList
.
isEmpty
())
{
if
(
businessUnitDtoList
.
isEmpty
())
{
...
@@ -86,7 +83,6 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
...
@@ -86,7 +83,6 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
}
}
@Transactional
@Transactional
@Override
public
Integer
deleteBusinessUnit
(
IdModel
idModel
)
{
public
Integer
deleteBusinessUnit
(
IdModel
idModel
)
{
logger
.
debug
(
"BusinessUnitServiceImpl deleteBusinessUnit"
);
logger
.
debug
(
"BusinessUnitServiceImpl deleteBusinessUnit"
);
...
@@ -113,7 +109,6 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
...
@@ -113,7 +109,6 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
}
}
@Transactional
@Transactional
@Override
public
Boolean
updateBusinessUnits
(
List
<
BusinessUnitDto
>
businessUnitDtoList
)
{
public
Boolean
updateBusinessUnits
(
List
<
BusinessUnitDto
>
businessUnitDtoList
)
{
logger
.
debug
(
"BusinessUnitServiceImpl updateBusinessUnits"
);
logger
.
debug
(
"BusinessUnitServiceImpl updateBusinessUnits"
);
...
@@ -203,7 +198,6 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
...
@@ -203,7 +198,6 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
return
businessUnit
;
return
businessUnit
;
}
}
@Override
public
List
<
BusinessUnit
>
findByNameAndIsActive
(
String
name
,
Boolean
isActive
)
{
public
List
<
BusinessUnit
>
findByNameAndIsActive
(
String
name
,
Boolean
isActive
)
{
logger
.
debug
(
"This is a method similar to JPA which find business units by name and isActive"
);
logger
.
debug
(
"This is a method similar to JPA which find business units by name and isActive"
);
BusinessUnitExample
example
=
new
BusinessUnitExample
();
BusinessUnitExample
example
=
new
BusinessUnitExample
();
...
@@ -214,7 +208,6 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
...
@@ -214,7 +208,6 @@ public class BusinessUnitServiceImpl implements BusinessUnitService {
return
businessUnitMapper
.
selectByExample
(
example
);
return
businessUnitMapper
.
selectByExample
(
example
);
}
}
@Override
public
List
<
BusinessUnit
>
findByIsActiveTrue
()
{
public
List
<
BusinessUnit
>
findByIsActiveTrue
()
{
BusinessUnitExample
example
=
new
BusinessUnitExample
();
BusinessUnitExample
example
=
new
BusinessUnitExample
();
example
.
createCriteria
().
andIsActiveEqualTo
(
true
);
example
.
createCriteria
().
andIsActiveEqualTo
(
true
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DimensionServiceImpl.java
View file @
cbd872cb
...
@@ -27,7 +27,6 @@ import pwc.taxtech.atms.dto.dimension.DimensionTypeEnum;
...
@@ -27,7 +27,6 @@ import pwc.taxtech.atms.dto.dimension.DimensionTypeEnum;
import
pwc.taxtech.atms.dto.dimension.DimensionValueDto
;
import
pwc.taxtech.atms.dto.dimension.DimensionValueDto
;
import
pwc.taxtech.atms.dto.navtree.DevTreeDto
;
import
pwc.taxtech.atms.dto.navtree.DevTreeDto
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.service.BusinessUnitService
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.Comparator
;
...
@@ -48,7 +47,7 @@ import static java.util.stream.Collectors.toList;
...
@@ -48,7 +47,7 @@ import static java.util.stream.Collectors.toList;
public
class
DimensionServiceImpl
extends
AbstractService
{
public
class
DimensionServiceImpl
extends
AbstractService
{
@Autowired
@Autowired
private
BusinessUnitService
businessUnitService
;
private
BusinessUnitService
Impl
businessUnitService
;
@Autowired
@Autowired
private
StatisticAttributeServiceImpl
statisticAttributeService
;
private
StatisticAttributeServiceImpl
statisticAttributeService
;
...
...
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