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
984f9d3a
Commit
984f9d3a
authored
Nov 15, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台订单接口优化
parent
7504c75f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
17 deletions
+9
-17
BackgroundBaseOrderBiz.java
...a/com/xxfc/platform/order/biz/BackgroundBaseOrderBiz.java
+9
-7
BaseOrderMapper.xml
...rder-server/src/main/resources/mapper/BaseOrderMapper.xml
+0
-10
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BackgroundBaseOrderBiz.java
View file @
984f9d3a
...
...
@@ -45,8 +45,7 @@ public class BackgroundBaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder>
//获取权限公司列表
List
<
BranchCompany
>
branchCompanies
=
vehicleFeign
.
companyAll
(
userDTO
.
getDataAll
(),
userDTO
.
getDataCompany
(),
userDTO
.
getDataZone
());
List
<
Integer
>
companyId
=
branchCompanies
.
stream
().
map
(
BranchCompany:
:
getId
).
collect
(
Collectors
.
toList
());
dto
.
setCompanyIds
(
companyId
);
List
<
Integer
>
companyIds
=
branchCompanies
.
stream
().
map
(
BranchCompany:
:
getId
).
collect
(
Collectors
.
toList
());
//大区搜索
if
(
dto
.
getZoneId
()
!=
null
)
{
if
(
userDTO
.
getDataAll
()
!=
1
&&
!
dto
.
getZoneId
().
equals
(
userDTO
.
getZoneId
()))
{
...
...
@@ -59,15 +58,18 @@ public class BackgroundBaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder>
}
//所属公司筛选
if
(
dto
.
getStartCompanyId
()
!=
null
)
{
if
(
userDTO
.
getDataAll
()
!=
1
&&
!
dto
.
getStartCompanyId
().
equals
(
userDTO
.
getId
()))
{
return
ObjectRestResponse
.
succ
(
new
PageDataVO
<>());
if
(
companyIds
.
size
()
>
0
)
{
if
(
companyIds
.
contains
(
dto
.
getStartCompanyId
()))
{
companyIds
.
clear
();
companyIds
.
add
(
dto
.
getStartCompanyId
());
}
else
{
return
ObjectRestResponse
.
succ
(
new
PageDataVO
<>());
}
}
else
{
ArrayList
<
Integer
>
companyIds
=
new
ArrayList
<>();
companyIds
.
add
(
dto
.
getStartCompanyId
());
dto
.
setCompanyIds
(
companyIds
);
dto
.
setZoneIds
(
null
);
}
}
dto
.
setCompanyIds
(
companyIds
);
if
(
dto
.
getStartTime
()
!=
null
)
{
if
(
dto
.
getEndTime
()
==
null
)
{
dto
.
setEndTime
(
new
Date
().
getTime
());
...
...
xx-order/xx-order-server/src/main/resources/mapper/BaseOrderMapper.xml
View file @
984f9d3a
...
...
@@ -295,21 +295,11 @@
<if
test=
"startTime != null"
>
and o1.start_time between #{startTime} and #{endTime}
</if>
<if
test=
"vehicleIds != null and vehicleIds.size() > 0"
>
AND o1.vehicle_id IN
<foreach
collection=
"vehicleIds"
item=
"vehicleId"
open=
"("
close=
")"
separator=
","
>
#{vehicleId}
</foreach>
</if>
<if
test=
"companyIds != null and companyIds.size > 0"
>
and (o1.start_company_id in
<foreach
collection=
"companyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
or o1.end_company_id in
<foreach
collection=
"companyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
)
</if>
<if
test=
"zoneIds != null and zoneIds.size > 0"
>
...
...
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