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 5e207d48
authored
May 29, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
联调提测
1 parent
b95114af
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
39 deletions
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
src/main/java/cn/com/glsx/admin/modules/model/param/TearDownQueryBo.java
src/main/java/cn/com/glsx/admin/modules/model/param/TrialDriveReportSearch.java
src/main/java/cn/com/glsx/admin/modules/service/TearDownAlarmSevice.java
src/main/java/cn/com/glsx/admin/modules/service/TrialDriveReportService.java
src/main/resources/mapper/TrialDriveReportMapper.xml
src/main/resources/mapper/VehicleMapper.xml
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
View file @
5e207d4
...
...
@@ -24,11 +24,11 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
/**
* 获取拆除报警基本信息
*
* @param
searchCondition
* @param
keyWord
* @return
*/
List
<
TearDownModelExport
>
searchTearDownAlarmList
(
@Param
(
"
searchCondition"
)
String
searchCondition
);
List
<
TearDownModelExport
>
searchTearDownAlarmList
(
@Param
(
"
keyWord"
)
String
keyWord
);
/**
* 分页查询试驾车辆列表
...
...
src/main/java/cn/com/glsx/admin/modules/model/param/TearDownQueryBo.java
View file @
5e207d4
...
...
@@ -25,5 +25,5 @@ public class TearDownQueryBo extends Page {
/**
* 特约店编码|店名称|设备号|车型 组合查询条件
*/
private
String
searchCondition
;
private
String
keyWord
;
}
src/main/java/cn/com/glsx/admin/modules/model/param/TrialDriveReportSearch.java
View file @
5e207d4
...
...
@@ -39,12 +39,7 @@ public class TrialDriveReportSearch extends Page {
private
String
month
;
/**
* 特约店代码
* 特约店代码
|特约店名称
*/
private
String
shopCode
;
/**
* 特约店名称
*/
private
String
shopName
;
private
String
keyWord
;
}
src/main/java/cn/com/glsx/admin/modules/service/TearDownAlarmSevice.java
View file @
5e207d4
...
...
@@ -44,7 +44,7 @@ public class TearDownAlarmSevice {
*/
public
PageInfo
searchTearDownAlarmList
(
TearDownQueryBo
tearDownQueryBo
)
{
// 在数据库查询车辆和特约店车辆信息
List
<
TearDownModelExport
>
tearDownModelExportList
=
vehicleMapper
.
searchTearDownAlarmList
(
tearDownQueryBo
.
get
SearchCondition
());
List
<
TearDownModelExport
>
tearDownModelExportList
=
vehicleMapper
.
searchTearDownAlarmList
(
tearDownQueryBo
.
get
KeyWord
());
String
alarmsnStr
=
StringUtils
.
join
(
tearDownModelExportList
.
stream
().
map
(
TearDownModelExport:
:
getSn
).
toArray
(),
","
);
AlarmBo
alarmBo
=
new
AlarmBo
();
alarmBo
.
setSnList
(
alarmsnStr
);
...
...
@@ -96,7 +96,7 @@ public class TearDownAlarmSevice {
*/
public
List
<
TearDownModelExport
>
export
(
TearDownQueryBo
tearDownQueryBo
)
{
// 在数据库查询车辆和特约店车辆信息
List
<
TearDownModelExport
>
tearDownModelExportList
=
vehicleMapper
.
searchTearDownAlarmList
(
tearDownQueryBo
.
get
SearchCondition
());
List
<
TearDownModelExport
>
tearDownModelExportList
=
vehicleMapper
.
searchTearDownAlarmList
(
tearDownQueryBo
.
get
KeyWord
());
String
alarmsnStr
=
StringUtils
.
join
(
tearDownModelExportList
.
stream
().
map
(
TearDownModelExport:
:
getSn
).
toArray
(),
","
);
AlarmBo
alarmBo
=
new
AlarmBo
();
alarmBo
.
setSnList
(
alarmsnStr
);
...
...
src/main/java/cn/com/glsx/admin/modules/service/TrialDriveReportService.java
View file @
5e207d4
...
...
@@ -45,11 +45,6 @@ public class TrialDriveReportService {
}
public
List
<
TrialDriveReportExport
>
listEffectiveTestDriveReportPage
(
TrialDriveReportSearch
search
,
List
<
TrialDriveReportExport
>
testDrivePageList
)
{
String
month
=
search
.
getMonth
();
if
(
StringUtils
.
isNotEmpty
(
month
)
&&
StringUtils
.
isNotBlank
(
month
)
&&
Integer
.
parseInt
(
month
)
<
10
)
{
month
=
(
"0"
).
concat
(
month
);
search
.
setMonth
(
month
);
}
HashMap
<
String
,
TrialDriveReportExport
>
excelHashMap
=
new
HashMap
<>();
// 初始化map中的每个对象
...
...
@@ -199,13 +194,6 @@ public class TrialDriveReportService {
}
public
List
<
TrialDriveReportExport
>
exportEffectiveTestDriveReport
(
TrialDriveReportSearch
search
,
List
<
TrialDriveReportExport
>
testDrivePageList
)
{
//获取查询的月参数
String
month
=
search
.
getMonth
();
if
(
StringUtils
.
isNotEmpty
(
month
)
&&
StringUtils
.
isNotBlank
(
month
)
&&
Integer
.
parseInt
(
month
)
<
10
)
{
month
=
(
"0"
).
concat
(
month
);
search
.
setMonth
(
month
);
}
HashMap
<
String
,
TrialDriveReportExport
>
excelHashMap
=
new
HashMap
<>();
// 初始化map中的每个对象
for
(
TrialDriveReportExport
drivePageExcel
:
testDrivePageList
)
{
...
...
@@ -369,6 +357,7 @@ public class TrialDriveReportService {
* @param excelHashMap 所有数据集合map
*/
private
void
makeDriveData
(
List
<
TrialDriveReportExport
>
testDriveDataOneList
,
HashMap
<
String
,
TrialDriveReportExport
>
excelHashMap
)
{
log
.
info
(
"===== EffectiveTestDriveReport ====start===="
);
// 试驾表格需要展示的车辆类型
HashMap
<
String
,
Integer
>
sumHashMap
=
new
HashMap
<>();
for
(
TrialDriveReportExport
driveDataOne
:
testDriveDataOneList
)
{
...
...
src/main/resources/mapper/TrialDriveReportMapper.xml
View file @
5e207d4
...
...
@@ -38,11 +38,9 @@
left join t_vehicle tv on tv.vin = tefs.vin
where tefs.fence_id = tef.id
and tef.biz_fence_type = 12
<if
test=
"shopCode!=null and shopCode!=''"
>
and tu.account like '%${shopCode}%'
</if>
<if
test=
"shopName!=null and shopName!=''"
>
and tu.username like '%${shopName}%'
<if
test=
"keyWord!=null and keyWord!=''"
>
and tu.account like '%${keyWord}%'
and tu.username like '%${keyWord}%'
</if>
<if
test=
"userIdList != null"
>
and tu.id IN
...
...
@@ -88,11 +86,9 @@
</otherwise>
</choose>
<if
test=
"shopCode !=null and shopCode != ''"
>
and tu.account like '%${shopCode}%'
</if>
<if
test=
"shopName !=null and shopName != ''"
>
and tu.username like '%${shopName}%'
<if
test=
"keyWord !=null and keyWord != ''"
>
and tu.account like '%${keyWord}%'
and tu.username like '%${keyWord}%'
</if>
<if
test=
"sn !=null and sn != ''"
>
and tefdd.sn = #{sn,jdbcType=VARCHAR}
...
...
src/main/resources/mapper/VehicleMapper.xml
View file @
5e207d4
...
...
@@ -139,12 +139,12 @@
left join t_electric_fence_sns tefs on tefs.sn = tvd.sn
left join t_trial_drive_shop ttds on ttds.fence_id = tefs.fence_id
where tv.del_flag = 0 and tvd.bind_status = 1
<if
test=
"
searchCondition != null and searchCondition
!=''"
>
<if
test=
"
keyWord != null and keyWord
!=''"
>
and (
ttds.shop_code like '%${
searchCondition
}%'
or ttds.shop_name like '%${
searchCondition
}%'
or tvd.sn like '%${
searchCondition
}%'
or tv.model_name like '%${
searchCondition
}%'
ttds.shop_code like '%${
keyWord
}%'
or ttds.shop_name like '%${
keyWord
}%'
or tvd.sn like '%${
keyWord
}%'
or tv.model_name like '%${
keyWord
}%'
)
</if>
</select>
...
...
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