Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3aa9f0c1
authored
Jul 27, 2021
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
去掉车型限制
1 parent
ad0f27c2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
42 deletions
src/main/java/cn/com/glsx/admin/modules/model/param/TrialDriveReportSearch.java
src/main/java/cn/com/glsx/admin/modules/service/TrialDriveReportService.java
src/main/resources/mapper/TrialDriveReportMapper.xml
src/main/java/cn/com/glsx/admin/modules/model/param/TrialDriveReportSearch.java
View file @
3aa9f0c
...
...
@@ -5,25 +5,12 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
import
java.util.Set
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@Accessors
(
chain
=
true
)
public
class
TrialDriveReportSearch
extends
Page
{
/**
* 组织下用户的Id
*/
private
Set
<
Long
>
userIdList
;
/**
* 限制展示的车辆
*/
private
List
<
String
>
splitList
;
/**
* sn 号
*/
private
String
sn
;
...
...
@@ -42,4 +29,5 @@ public class TrialDriveReportSearch extends Page {
* 特约店代码 |特约店名称
*/
private
String
keywords
;
}
src/main/java/cn/com/glsx/admin/modules/service/TrialDriveReportService.java
View file @
3aa9f0c
...
...
@@ -5,14 +5,12 @@ import cn.com.glsx.admin.modules.model.export.TrialDriveReportExport;
import
cn.com.glsx.admin.modules.model.param.TrialDriveReportSearch
;
import
cn.com.glsx.admin.modules.utils.DateUtil
;
import
com.glsx.plat.common.utils.StringUtils
;
import
com.glsx.plat.context.utils.PropertiesUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -29,11 +27,6 @@ public class TrialDriveReportService {
private
TrialDriveReportMapper
trialDriveReportMapper
;
public
List
<
TrialDriveReportExport
>
search
(
TrialDriveReportSearch
search
)
{
String
needToShowVehicleTypeList
=
PropertiesUtils
.
getProperty
(
"glsx.effectivetestdrive.needtoshow"
);
String
[]
splitArr
=
needToShowVehicleTypeList
.
split
(
","
);
List
<
String
>
splitList
=
Arrays
.
asList
(
splitArr
);
search
.
setSplitList
(
splitList
);
return
trialDriveReportMapper
.
getTestDrivePageList
(
search
);
}
...
...
@@ -51,12 +44,7 @@ public class TrialDriveReportService {
excelHashMap
.
put
(
drivePageExcel
.
getShopCode
()
+
drivePageExcel
.
getSn
(),
drivePageExcel
);
}
// 需要展示的车型
String
needToShowVehicleTypeList
=
PropertiesUtils
.
getProperty
(
"glsx.effectivetestdrive.needtoshow"
);
String
[]
splitArr
=
needToShowVehicleTypeList
.
split
(
","
);
List
<
String
>
splitList
=
Arrays
.
asList
(
splitArr
);
for
(
TrialDriveReportExport
drivePageExcel
:
testDrivePageList
)
{
search
.
setSplitList
(
splitList
);
search
.
setSn
(
drivePageExcel
.
getSn
());
List
<
TrialDriveReportExport
>
testDriveDataOneList
=
trialDriveReportMapper
.
getEffectiveTestDriveData
(
search
);
log
.
info
(
"testDriveDataOneList 的长度是"
+
testDriveDataOneList
.
size
());
...
...
@@ -206,12 +194,7 @@ public class TrialDriveReportService {
excelHashMap
.
put
(
drivePageExcel
.
getShopCode
()
+
drivePageExcel
.
getSn
(),
drivePageExcel
);
}
// 需要展示的车型
String
needToShowVehicleTypeList
=
PropertiesUtils
.
getProperty
(
"glsx.effectivetestdrive.needtoshow"
);
String
[]
splitArr
=
needToShowVehicleTypeList
.
split
(
","
);
List
<
String
>
splitList
=
Arrays
.
asList
(
splitArr
);
for
(
TrialDriveReportExport
drivePageExcel
:
testDrivePageList
)
{
search
.
setSplitList
(
splitList
);
search
.
setSn
(
drivePageExcel
.
getSn
());
List
<
TrialDriveReportExport
>
testDriveDataOneList
=
trialDriveReportMapper
.
getEffectiveTestDriveData
(
search
);
//将每一个查询的对象进行填充
...
...
src/main/resources/mapper/TrialDriveReportMapper.xml
View file @
3aa9f0c
...
...
@@ -44,12 +44,6 @@
or tu.username like '%${keywords}%'
)
</if>
<if
test=
"splitList != null"
>
and tv.model_name IN
<foreach
collection=
"splitList"
item=
"vehicleTypeName"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{vehicleTypeName}
</foreach>
</if>
order by tu.account
</select>
...
...
@@ -91,12 +85,6 @@
<if
test=
"sn !=null and sn != ''"
>
and tefdd.sn = #{sn,jdbcType=VARCHAR}
</if>
<if
test=
"splitList != null"
>
and tv.model_name IN
<foreach
collection=
"splitList"
item=
"vehicleTypeName"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{vehicleTypeName}
</foreach>
</if>
</where>
GROUP BY tefdd.sn,tefdd.fence_id,statDate order by tu.account) tall GROUP BY tall.shopCode, tall.sn,
tall.statDate ORDER BY tall.shopCode
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment