Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
9bc6b75e
Commit
9bc6b75e
authored
Aug 16, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分公司查询bug修复
parent
50f06362
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
+30
-8
BranchCompanyBiz.java
.../java/com/xxfc/platform/vehicle/biz/BranchCompanyBiz.java
+27
-5
BranchCompanyController.java
...m/xxfc/platform/vehicle/rest/BranchCompanyController.java
+3
-3
No files found.
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/BranchCompanyBiz.java
View file @
9bc6b75e
...
...
@@ -13,6 +13,7 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import
com.google.common.collect.Lists
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.constant.RedisKey
;
import
com.xxfc.platform.vehicle.entity.Area
;
import
com.xxfc.platform.vehicle.entity.BranchCompany
;
import
com.xxfc.platform.vehicle.entity.BranchCompanyStockInfo
;
import
com.xxfc.platform.vehicle.entity.SysRegion
;
...
...
@@ -65,6 +66,9 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
@Autowired
UserFeign
userFeign
;
@Autowired
private
AreaBiz
areaBiz
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
...
...
@@ -152,17 +156,35 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
}
public
PageDataVO
<
BranchCompany
>
getAll
(
Integer
page
,
Integer
limit
,
Integer
addrProvince
,
Integer
addrCity
,
Integer
addrTown
,
UserDTO
userDTO
)
{
Integer
addrTown
,
Integer
zoneId
,
UserDTO
userDTO
)
{
Example
example
=
new
Example
(
BranchCompany
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
String
provinceIds
=
""
;
if
(
Objects
.
nonNull
(
zoneId
)){
Area
area
=
areaBiz
.
selectById
(
zoneId
);
provinceIds
=
area
.
getProvinceIds
();
}
if
(
StringUtils
.
isNotEmpty
(
provinceIds
)){
List
<
String
>
provinceIdList
=
Arrays
.
asList
(
provinceIds
.
split
(
","
));
if
(
Objects
.
nonNull
(
addrProvince
)){
if
(
provinceIdList
.
contains
(
String
.
valueOf
(
addrProvince
))){
criteria
.
andEqualTo
(
"addrProvince"
,
addrProvince
);
}
else
{
return
new
PageDataVO
<
BranchCompany
>();
}
}
else
{
criteria
.
andIn
(
"addrProvince"
,
provinceIdList
);
}
}
else
{
if
(
addrProvince
!=
null
)
{
criteria
.
andCondition
(
" addr_province = '"
+
addrProvince
+
"'"
);
criteria
.
andEqualTo
(
"addrProvince"
,
addrProvince
);
}
}
if
(
addrCity
!=
null
)
{
criteria
.
and
Condition
(
" addr_city = '"
+
addrCity
+
"'"
);
criteria
.
and
EqualTo
(
"addrCity"
,
addrCity
);
}
if
(
addrTown
!=
null
)
{
criteria
.
and
Condition
(
" addr_town = '"
+
addrTown
+
"'"
);
criteria
.
and
EqualTo
(
"addrTown"
,
addrTown
);
}
if
(
userDTO
!=
null
&&
DATA_ALL_FALSE
.
equals
(
userDTO
.
getDataAll
()))
{
if
(
StringUtils
.
isNotBlank
(
userDTO
.
getDataZone
()))
{
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/BranchCompanyController.java
View file @
9bc6b75e
...
...
@@ -52,9 +52,9 @@ public class BranchCompanyController extends BaseController<BranchCompanyBiz> {
@RequestMapping
(
value
=
"/page"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
<
PageDataVO
<
BranchCompany
>>
page
(
@RequestParam
Integer
page
,
@RequestParam
Integer
limit
,
@RequestParam
(
required
=
false
)
Integer
addrProvince
,
@RequestParam
(
required
=
false
)
Integer
addrCity
,
@RequestParam
(
required
=
false
)
Integer
addrTown
,
@RequestParam
(
required
=
false
)
String
location
)
{
@RequestParam
(
required
=
false
)
Integer
addrTown
,
@RequestParam
(
required
=
false
)
Integer
zoneId
)
{
UserDTO
userDTO
=
userFeign
.
userinfoByToken
(
userAuthConfig
.
getToken
(
request
)).
getData
();
return
RestResponse
.
data
(
baseBiz
.
getAll
(
page
,
limit
,
addrProvince
,
addrCity
,
addrTown
,
userDTO
));
return
RestResponse
.
data
(
baseBiz
.
getAll
(
page
,
limit
,
addrProvince
,
addrCity
,
addrTown
,
zoneId
,
userDTO
));
}
@IgnoreUserToken
...
...
@@ -62,7 +62,7 @@ public class BranchCompanyController extends BaseController<BranchCompanyBiz> {
public
RestResponse
<
PageDataVO
<
BranchCompany
>>
allPage
(
@RequestParam
Integer
page
,
@RequestParam
Integer
limit
,
@RequestParam
(
required
=
false
)
Integer
addrProvince
,
@RequestParam
(
required
=
false
)
Integer
addrCity
,
@RequestParam
(
required
=
false
)
Integer
addrTown
)
{
return
RestResponse
.
data
(
baseBiz
.
getAll
(
page
,
limit
,
addrProvince
,
addrCity
,
addrTown
,
null
));
return
RestResponse
.
data
(
baseBiz
.
getAll
(
page
,
limit
,
addrProvince
,
addrCity
,
addrTown
,
null
,
null
));
}
@RequestMapping
(
value
=
"/search"
,
method
=
RequestMethod
.
GET
)
...
...
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