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 f66e78b3
authored
Dec 29, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
报表添加数据共享功能
1 parent
bbaa685d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
83 additions
and
47 deletions
src/main/java/cn/com/glsx/admin/modules/model/param/CommonTearDownSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/JourneyDailySearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/JourneyDetailSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/JudgmentSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/OfflineSearch.java
src/main/java/cn/com/glsx/admin/modules/service/DeviceActiveService.java
src/main/java/cn/com/glsx/admin/modules/service/JourneyService.java
src/main/java/cn/com/glsx/admin/modules/service/JudgmentService.java
src/main/java/cn/com/glsx/admin/modules/service/OfflineService.java
src/main/java/cn/com/glsx/admin/modules/service/TearDownAlarmSevice.java
src/main/resources/mapper/VehicleMapper.xml
src/main/java/cn/com/glsx/admin/modules/model/param/CommonTearDownSearch.java
View file @
f66e78b
...
@@ -11,7 +11,7 @@ import lombok.Data;
...
@@ -11,7 +11,7 @@ import lombok.Data;
* @version 1.0
* @version 1.0
*/
*/
@Data
@Data
public
class
CommonTearDownSearch
extends
Page
{
public
class
CommonTearDownSearch
extends
BasicSearch
{
/**
/**
* 报警开始时间
* 报警开始时间
*/
*/
...
@@ -25,7 +25,7 @@ public class CommonTearDownSearch extends Page {
...
@@ -25,7 +25,7 @@ public class CommonTearDownSearch extends Page {
/**
/**
* 车辆归属组织Id
* 车辆归属组织Id
*/
*/
private
Integer
orgId
;
private
Long
orgId
;
/**
/**
* 设备|工单号|车架号|姓名
* 设备|工单号|车架号|姓名
...
...
src/main/java/cn/com/glsx/admin/modules/model/param/JourneyDailySearch.java
View file @
f66e78b
...
@@ -10,12 +10,12 @@ import lombok.Data;
...
@@ -10,12 +10,12 @@ import lombok.Data;
* @date 2021/12/27 16:30
* @date 2021/12/27 16:30
*/
*/
@Data
@Data
public
class
JourneyDailySearch
{
public
class
JourneyDailySearch
extends
BasicSearch
{
/**
/**
* 组织Id
* 组织Id
*/
*/
private
Integer
orgId
;
private
Long
orgId
;
/**
/**
* 工单号|车架号|姓名|设备号
* 工单号|车架号|姓名|设备号
...
...
src/main/java/cn/com/glsx/admin/modules/model/param/JourneyDetailSearch.java
View file @
f66e78b
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
import
cn.hutool.db.Page
;
import
com.glsx.plat.common.utils.StringUtils
;
import
com.glsx.plat.common.utils.StringUtils
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -10,7 +9,7 @@ import lombok.Data;
...
@@ -10,7 +9,7 @@ import lombok.Data;
* @author yll
* @author yll
*/
*/
@Data
@Data
public
class
JourneyDetailSearch
extends
Page
{
public
class
JourneyDetailSearch
extends
BasicSearch
{
/**
/**
* 行程开始时间
* 行程开始时间
*/
*/
...
@@ -24,7 +23,7 @@ public class JourneyDetailSearch extends Page {
...
@@ -24,7 +23,7 @@ public class JourneyDetailSearch extends Page {
/**
/**
* 组织Id
* 组织Id
*/
*/
private
Integer
orgId
;
private
Long
orgId
;
/**
/**
* 设备号
* 设备号
...
...
src/main/java/cn/com/glsx/admin/modules/model/param/JudgmentSearch.java
View file @
f66e78b
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
import
cn.hutool.db.Page
;
import
com.glsx.plat.common.utils.StringUtils
;
import
com.glsx.plat.common.utils.StringUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -11,7 +10,7 @@ import lombok.Data;
...
@@ -11,7 +10,7 @@ import lombok.Data;
*/
*/
@Data
@Data
@ApiModel
(
"大数据研判报表查询类"
)
@ApiModel
(
"大数据研判报表查询类"
)
public
class
JudgmentSearch
extends
Page
{
public
class
JudgmentSearch
extends
BasicSearch
{
/**
/**
* 查询开始时间
* 查询开始时间
...
@@ -41,7 +40,7 @@ public class JudgmentSearch extends Page {
...
@@ -41,7 +40,7 @@ public class JudgmentSearch extends Page {
* 车辆归属 组织Id
* 车辆归属 组织Id
*/
*/
@ApiModelProperty
(
name
=
"车辆归属"
,
notes
=
"组织Id"
)
@ApiModelProperty
(
name
=
"车辆归属"
,
notes
=
"组织Id"
)
private
Integer
orgId
;
private
Long
orgId
;
/**
/**
* 工单号|车架号|姓名|设备号
* 工单号|车架号|姓名|设备号
...
...
src/main/java/cn/com/glsx/admin/modules/model/param/OfflineSearch.java
View file @
f66e78b
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
import
cn.hutool.db.Page
;
import
com.glsx.plat.common.utils.StringUtils
;
import
com.glsx.plat.common.utils.StringUtils
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -11,7 +10,7 @@ import lombok.Data;
...
@@ -11,7 +10,7 @@ import lombok.Data;
* @date 2021/12/20 16:52
* @date 2021/12/20 16:52
*/
*/
@Data
@Data
public
class
OfflineSearch
extends
Page
{
public
class
OfflineSearch
extends
BasicSearch
{
/**
/**
* 离线开始时间
* 离线开始时间
*/
*/
...
@@ -50,7 +49,7 @@ public class OfflineSearch extends Page {
...
@@ -50,7 +49,7 @@ public class OfflineSearch extends Page {
/**
/**
* 车辆归属组织Id
* 车辆归属组织Id
*/
*/
private
Integer
orgId
;
private
Long
orgId
;
/**
/**
* 工单号|车架号|姓名
* 工单号|车架号|姓名
...
...
src/main/java/cn/com/glsx/admin/modules/service/DeviceActiveService.java
View file @
f66e78b
...
@@ -64,11 +64,15 @@ public class DeviceActiveService {
...
@@ -64,11 +64,15 @@ public class DeviceActiveService {
/**
/**
* 导出设备激活列表
* 导出设备激活列表
*
*
* @param
deviceActiveS
earch 导出实体
* @param
s
earch 导出实体
* @return
* @return
*/
*/
public
List
<
DeviceActiveExprot
>
exportDeviceActiveList
(
DeviceActiveSearch
deviceActiveSearch
)
{
public
List
<
DeviceActiveExprot
>
exportDeviceActiveList
(
DeviceActiveSearch
search
)
{
List
<
DeviceActiveExprot
>
deviceActiveList
=
vehicleMapper
.
getBaseDeviceActiveListWithAuth
(
deviceActiveSearch
);
if
(
search
.
getOrgId
()
!=
null
)
{
search
.
setCheckedOrgIds
(
Lists
.
newArrayList
(
search
.
getOrgId
()));
userApiService
.
setCheckedOrgUsers
(
search
);
}
List
<
DeviceActiveExprot
>
deviceActiveList
=
vehicleMapper
.
getBaseDeviceActiveListWithAuth
(
search
);
getDeviceActiveData
(
deviceActiveList
);
getDeviceActiveData
(
deviceActiveList
);
// 数字类型转换为字符串类型
// 数字类型转换为字符串类型
deviceActiveList
.
forEach
(
deviceActiveExprot
->
{
deviceActiveList
.
forEach
(
deviceActiveExprot
->
{
...
...
src/main/java/cn/com/glsx/admin/modules/service/JourneyService.java
View file @
f66e78b
...
@@ -88,6 +88,10 @@ public class JourneyService {
...
@@ -88,6 +88,10 @@ public class JourneyService {
*/
*/
public
List
<
JourneyDetailExport
>
findJourneyDetailList
(
JourneyDetailSearch
journeyDetailSearch
)
{
public
List
<
JourneyDetailExport
>
findJourneyDetailList
(
JourneyDetailSearch
journeyDetailSearch
)
{
List
<
JourneyDetailExport
>
journeyDetailList
=
Lists
.
newArrayList
();
List
<
JourneyDetailExport
>
journeyDetailList
=
Lists
.
newArrayList
();
if
(
journeyDetailSearch
.
getOrgId
()
!=
null
)
{
journeyDetailSearch
.
setCheckedOrgIds
(
Lists
.
newArrayList
(
journeyDetailSearch
.
getOrgId
()));
userApiService
.
setCheckedOrgUsers
(
journeyDetailSearch
);
}
List
<
JourneyDetailExport
>
journeyDetailExportList
=
vehicleMapper
.
findJourneyDetailList
(
journeyDetailSearch
);
List
<
JourneyDetailExport
>
journeyDetailExportList
=
vehicleMapper
.
findJourneyDetailList
(
journeyDetailSearch
);
log
.
info
(
"journeyDetailExportList size()大小==="
+
journeyDetailExportList
.
size
());
log
.
info
(
"journeyDetailExportList size()大小==="
+
journeyDetailExportList
.
size
());
getDeviceDetailMileage
(
journeyDetailList
,
journeyDetailExportList
,
journeyDetailSearch
);
getDeviceDetailMileage
(
journeyDetailList
,
journeyDetailExportList
,
journeyDetailSearch
);
...
@@ -120,6 +124,10 @@ public class JourneyService {
...
@@ -120,6 +124,10 @@ public class JourneyService {
List
<
String
>
collectDateList
=
dateList
.
stream
().
map
(
stringList
->
stringList
.
get
(
0
)).
collect
(
Collectors
.
toList
());
List
<
String
>
collectDateList
=
dateList
.
stream
().
map
(
stringList
->
stringList
.
get
(
0
)).
collect
(
Collectors
.
toList
());
List
<
List
<
String
>>
allDataList
=
Lists
.
newArrayList
();
List
<
List
<
String
>>
allDataList
=
Lists
.
newArrayList
();
//获取所有有效试驾设备和车架号的集合
//获取所有有效试驾设备和车架号的集合
if
(
search
.
getOrgId
()
!=
null
)
{
search
.
setCheckedOrgIds
(
Lists
.
newArrayList
(
search
.
getOrgId
()));
userApiService
.
setCheckedOrgUsers
(
search
);
}
List
<
JourneyDailyExport
>
journeyDailyExportList
=
vehicleMapper
.
findJourneyDailyList
(
search
);
List
<
JourneyDailyExport
>
journeyDailyExportList
=
vehicleMapper
.
findJourneyDailyList
(
search
);
// 查询并封装设备对应的里程日期和里程数
// 查询并封装设备对应的里程日期和里程数
for
(
JourneyDailyExport
journeyDailyExport
:
journeyDailyExportList
)
{
for
(
JourneyDailyExport
journeyDailyExport
:
journeyDailyExportList
)
{
...
...
src/main/java/cn/com/glsx/admin/modules/service/JudgmentService.java
View file @
f66e78b
...
@@ -38,6 +38,9 @@ public class JudgmentService {
...
@@ -38,6 +38,9 @@ public class JudgmentService {
@Autowired
@Autowired
private
RemoteGpsBsService
remoteGpsBsService
;
private
RemoteGpsBsService
remoteGpsBsService
;
@Autowired
private
UserApiService
userApiService
;
/**
/**
* 查询大数据研判数据列表
* 查询大数据研判数据列表
*
*
...
@@ -45,6 +48,10 @@ public class JudgmentService {
...
@@ -45,6 +48,10 @@ public class JudgmentService {
* @return
* @return
*/
*/
public
PageInfo
findJudgmentList
(
JudgmentSearch
judgmentSearch
)
{
public
PageInfo
findJudgmentList
(
JudgmentSearch
judgmentSearch
)
{
if
(
judgmentSearch
.
getOrgId
()
!=
null
)
{
judgmentSearch
.
setCheckedOrgIds
(
Lists
.
newArrayList
(
judgmentSearch
.
getOrgId
()));
userApiService
.
setCheckedOrgUsers
(
judgmentSearch
);
}
List
<
JudgmentExport
>
judgmentList
=
vehicleMapper
.
findJudgmentList
(
judgmentSearch
);
List
<
JudgmentExport
>
judgmentList
=
vehicleMapper
.
findJudgmentList
(
judgmentSearch
);
if
(
CollectionUtil
.
isEmpty
(
judgmentList
))
{
if
(
CollectionUtil
.
isEmpty
(
judgmentList
))
{
return
new
PageInfo
<>();
return
new
PageInfo
<>();
...
@@ -83,6 +90,10 @@ public class JudgmentService {
...
@@ -83,6 +90,10 @@ public class JudgmentService {
}
}
public
List
<
JudgmentExport
>
exportJudgmentList
(
JudgmentSearch
judgmentSearch
)
{
public
List
<
JudgmentExport
>
exportJudgmentList
(
JudgmentSearch
judgmentSearch
)
{
if
(
judgmentSearch
.
getOrgId
()
!=
null
)
{
judgmentSearch
.
setCheckedOrgIds
(
Lists
.
newArrayList
(
judgmentSearch
.
getOrgId
()));
userApiService
.
setCheckedOrgUsers
(
judgmentSearch
);
}
List
<
JudgmentExport
>
judgmentList
=
vehicleMapper
.
findJudgmentList
(
judgmentSearch
);
List
<
JudgmentExport
>
judgmentList
=
vehicleMapper
.
findJudgmentList
(
judgmentSearch
);
if
(
ObjectUtil
.
isNull
(
judgmentList
))
{
if
(
ObjectUtil
.
isNull
(
judgmentList
))
{
return
null
;
return
null
;
...
...
src/main/java/cn/com/glsx/admin/modules/service/OfflineService.java
View file @
f66e78b
...
@@ -11,6 +11,7 @@ import cn.com.glsx.devicemonitor.api.dto.response.GpsLocation;
...
@@ -11,6 +11,7 @@ import cn.com.glsx.devicemonitor.api.dto.response.GpsLocation;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.glsx.plat.common.utils.StringUtils
;
import
com.glsx.plat.common.utils.StringUtils
;
import
com.google.common.collect.Lists
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.time.DateUtils
;
import
org.apache.commons.lang.time.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -35,6 +36,9 @@ public class OfflineService {
...
@@ -35,6 +36,9 @@ public class OfflineService {
@Autowired
@Autowired
private
RemoteGpsBsService
remoteGpsBsService
;
private
RemoteGpsBsService
remoteGpsBsService
;
@Autowired
private
UserApiService
userApiService
;
/**
/**
* 查询离线报警数据
* 查询离线报警数据
*
*
...
@@ -51,6 +55,10 @@ public class OfflineService {
...
@@ -51,6 +55,10 @@ public class OfflineService {
offlineSearch
.
setDeviceType
(
Integer
.
parseInt
(
deviceTypeAndSource
.
split
(
"-"
)[
0
]));
offlineSearch
.
setDeviceType
(
Integer
.
parseInt
(
deviceTypeAndSource
.
split
(
"-"
)[
0
]));
offlineSearch
.
setSource
(
Integer
.
parseInt
(
deviceTypeAndSource
.
split
(
"-"
)[
1
]));
offlineSearch
.
setSource
(
Integer
.
parseInt
(
deviceTypeAndSource
.
split
(
"-"
)[
1
]));
}
}
if
(
offlineSearch
.
getOrgId
()
!=
null
)
{
offlineSearch
.
setCheckedOrgIds
(
Lists
.
newArrayList
(
offlineSearch
.
getOrgId
()));
userApiService
.
setCheckedOrgUsers
(
offlineSearch
);
}
List
<
OfflineExport
>
offlineList
=
vehicleMapper
.
findOfflineList
(
offlineSearch
);
List
<
OfflineExport
>
offlineList
=
vehicleMapper
.
findOfflineList
(
offlineSearch
);
if
(
CollectionUtil
.
isNotEmpty
(
offlineList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
offlineList
))
{
offlineList
.
forEach
(
offlineExport
->
{
offlineList
.
forEach
(
offlineExport
->
{
...
@@ -83,6 +91,10 @@ public class OfflineService {
...
@@ -83,6 +91,10 @@ public class OfflineService {
offlineSearch
.
setDeviceType
(
Integer
.
parseInt
(
deviceTypeAndSource
.
split
(
"-"
)[
0
]));
offlineSearch
.
setDeviceType
(
Integer
.
parseInt
(
deviceTypeAndSource
.
split
(
"-"
)[
0
]));
offlineSearch
.
setSource
(
Integer
.
parseInt
(
deviceTypeAndSource
.
split
(
"-"
)[
1
]));
offlineSearch
.
setSource
(
Integer
.
parseInt
(
deviceTypeAndSource
.
split
(
"-"
)[
1
]));
}
}
if
(
offlineSearch
.
getOrgId
()
!=
null
)
{
offlineSearch
.
setCheckedOrgIds
(
Lists
.
newArrayList
(
offlineSearch
.
getOrgId
()));
userApiService
.
setCheckedOrgUsers
(
offlineSearch
);
}
List
<
OfflineExport
>
offlineList
=
vehicleMapper
.
findOfflineList
(
offlineSearch
);
List
<
OfflineExport
>
offlineList
=
vehicleMapper
.
findOfflineList
(
offlineSearch
);
if
(
CollectionUtil
.
isNotEmpty
(
offlineList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
offlineList
))
{
offlineList
.
forEach
(
offlineExport
->
{
offlineList
.
forEach
(
offlineExport
->
{
...
...
src/main/java/cn/com/glsx/admin/modules/service/TearDownAlarmSevice.java
View file @
f66e78b
...
@@ -54,6 +54,9 @@ public class TearDownAlarmSevice {
...
@@ -54,6 +54,9 @@ public class TearDownAlarmSevice {
@Autowired
@Autowired
private
RemoteGpsBsService
remoteGpsBsService
;
private
RemoteGpsBsService
remoteGpsBsService
;
@Autowired
private
UserApiService
userApiService
;
/**
/**
* 查询拆除报警数据
* 查询拆除报警数据
*
*
...
@@ -165,9 +168,13 @@ public class TearDownAlarmSevice {
...
@@ -165,9 +168,13 @@ public class TearDownAlarmSevice {
return
modelExportList
;
return
modelExportList
;
}
}
public
PageInfo
searchCommonTearDownAlarmList
(
CommonTearDownSearch
commonTearDownSearch
)
{
public
PageInfo
searchCommonTearDownAlarmList
(
CommonTearDownSearch
search
)
{
if
(
search
.
getOrgId
()
!=
null
)
{
search
.
setCheckedOrgIds
(
Lists
.
newArrayList
(
search
.
getOrgId
()));
userApiService
.
setCheckedOrgUsers
(
search
);
}
// 在数据库查询车辆和特约店车辆信息
// 在数据库查询车辆和特约店车辆信息
List
<
CommonTearDownModelExport
>
commonTearDownAlarmExportList
=
vehicleMapper
.
searchCommonTearDownAlarmList
(
commonTearDownS
earch
);
List
<
CommonTearDownModelExport
>
commonTearDownAlarmExportList
=
vehicleMapper
.
searchCommonTearDownAlarmList
(
s
earch
);
if
(
CollectionUtils
.
isEmpty
(
commonTearDownAlarmExportList
))
{
if
(
CollectionUtils
.
isEmpty
(
commonTearDownAlarmExportList
))
{
return
new
PageInfo
<>();
return
new
PageInfo
<>();
}
}
...
@@ -176,11 +183,11 @@ public class TearDownAlarmSevice {
...
@@ -176,11 +183,11 @@ public class TearDownAlarmSevice {
CommonAlarmBo
commonAlarmBo
=
new
CommonAlarmBo
();
CommonAlarmBo
commonAlarmBo
=
new
CommonAlarmBo
();
Set
<
String
>
sns
=
commonTearDownAlarmExportList
.
stream
().
map
(
CommonTearDownModelExport:
:
getSn
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
sns
=
commonTearDownAlarmExportList
.
stream
().
map
(
CommonTearDownModelExport:
:
getSn
).
collect
(
Collectors
.
toSet
());
commonAlarmBo
.
setSnList
(
sns
);
commonAlarmBo
.
setSnList
(
sns
);
commonAlarmBo
.
setAlarmStartTime
(
commonTearDownS
earch
.
getAlarmStartTime
());
commonAlarmBo
.
setAlarmStartTime
(
s
earch
.
getAlarmStartTime
());
commonAlarmBo
.
setAlarmEndTime
(
commonTearDownS
earch
.
getAlarmEndTime
());
commonAlarmBo
.
setAlarmEndTime
(
s
earch
.
getAlarmEndTime
());
commonAlarmBo
.
setPageNumber
(
commonTearDownS
earch
.
getPageNumber
());
commonAlarmBo
.
setPageNumber
(
s
earch
.
getPageNumber
());
commonAlarmBo
.
setPageSize
(
commonTearDownS
earch
.
getPageSize
());
commonAlarmBo
.
setPageSize
(
s
earch
.
getPageSize
());
Integer
alarmStatus
=
commonTearDownS
earch
.
getAlarmStatus
();
Integer
alarmStatus
=
s
earch
.
getAlarmStatus
();
if
(
ObjectUtil
.
isNotEmpty
(
alarmStatus
)
&&
alarmStatus
==
1
)
{
if
(
ObjectUtil
.
isNotEmpty
(
alarmStatus
)
&&
alarmStatus
==
1
)
{
// 设置防拆报警生效查询状态
// 设置防拆报警生效查询状态
commonAlarmBo
.
setDelflag
(
0
);
commonAlarmBo
.
setDelflag
(
0
);
...
@@ -225,17 +232,21 @@ public class TearDownAlarmSevice {
...
@@ -225,17 +232,21 @@ public class TearDownAlarmSevice {
return
commonAlarmDataPage
;
return
commonAlarmDataPage
;
}
}
public
List
<
CommonTearDownModelExport
>
commonExport
(
CommonTearDownSearch
commonTearDownSearch
)
{
public
List
<
CommonTearDownModelExport
>
commonExport
(
CommonTearDownSearch
search
)
{
if
(
search
.
getOrgId
()
!=
null
)
{
search
.
setCheckedOrgIds
(
Lists
.
newArrayList
(
search
.
getOrgId
()));
userApiService
.
setCheckedOrgUsers
(
search
);
}
// 在数据库查询车辆和特约店车辆信息
// 在数据库查询车辆和特约店车辆信息
List
<
CommonTearDownModelExport
>
commonTearDownAlarmExportList
=
vehicleMapper
.
searchCommonTearDownAlarmList
(
commonTearDownS
earch
);
List
<
CommonTearDownModelExport
>
commonTearDownAlarmExportList
=
vehicleMapper
.
searchCommonTearDownAlarmList
(
s
earch
);
CommonAlarmBo
commonAlarmBo
=
new
CommonAlarmBo
();
CommonAlarmBo
commonAlarmBo
=
new
CommonAlarmBo
();
List
<
String
>
sns
=
commonTearDownAlarmExportList
.
stream
().
map
(
CommonTearDownModelExport:
:
getSn
).
collect
(
Collectors
.
toList
());
List
<
String
>
sns
=
commonTearDownAlarmExportList
.
stream
().
map
(
CommonTearDownModelExport:
:
getSn
).
collect
(
Collectors
.
toList
());
commonAlarmBo
.
setSnList
(
sns
);
commonAlarmBo
.
setSnList
(
sns
);
commonAlarmBo
.
setAlarmStartTime
(
commonTearDownS
earch
.
getAlarmStartTime
());
commonAlarmBo
.
setAlarmStartTime
(
s
earch
.
getAlarmStartTime
());
commonAlarmBo
.
setAlarmEndTime
(
commonTearDownS
earch
.
getAlarmEndTime
());
commonAlarmBo
.
setAlarmEndTime
(
s
earch
.
getAlarmEndTime
());
commonAlarmBo
.
setPageNumber
(
commonTearDownS
earch
.
getPageNumber
());
commonAlarmBo
.
setPageNumber
(
s
earch
.
getPageNumber
());
commonAlarmBo
.
setPageSize
(
commonTearDownS
earch
.
getPageSize
());
commonAlarmBo
.
setPageSize
(
s
earch
.
getPageSize
());
Integer
alarmStatus
=
commonTearDownS
earch
.
getAlarmStatus
();
Integer
alarmStatus
=
s
earch
.
getAlarmStatus
();
if
(
ObjectUtil
.
isNotEmpty
(
alarmStatus
)
&&
alarmStatus
==
0
)
{
if
(
ObjectUtil
.
isNotEmpty
(
alarmStatus
)
&&
alarmStatus
==
0
)
{
commonAlarmBo
.
setDelflag
(
2
);
commonAlarmBo
.
setDelflag
(
2
);
}
else
if
(
ObjectUtil
.
isNotEmpty
(
alarmStatus
)
&&
alarmStatus
==
1
)
{
}
else
if
(
ObjectUtil
.
isNotEmpty
(
alarmStatus
)
&&
alarmStatus
==
1
)
{
...
...
src/main/resources/mapper/VehicleMapper.xml
View file @
f66e78b
...
@@ -546,9 +546,6 @@
...
@@ -546,9 +546,6 @@
<if
test=
"endTime != null and endTime != ''"
>
<if
test=
"endTime != null and endTime != ''"
>
and tvd.created_date
<
= #{endTime}
and tvd.created_date
<
= #{endTime}
</if>
</if>
<if
test=
"orgId != null "
>
and tu.id = #{orgId}
</if>
<if
test=
"keywords != null and keywords !=''"
>
<if
test=
"keywords != null and keywords !=''"
>
and(
and(
td.sn like '%${keywords}%'
td.sn like '%${keywords}%'
...
@@ -630,12 +627,11 @@
...
@@ -630,12 +627,11 @@
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_device td on td.sn =tvd.sn
left join t_device td on td.sn =tvd.sn
left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0
left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0
left join t_user tu on tu.id = tv.created_by and tu.del_flag = 0
where tv.del_flag = 0
where tv.del_flag = 0
and tvd.bind_status = 1
and tvd.bind_status = 1
and tvd.del_flag = 0
and tvd.del_flag = 0
<if
test=
"
orgId != null
"
>
<if
test=
"
checkedUserIdsStr != null and checkedUserIdsStr !=''
"
>
and
tu.id = #{orgId}
and
find_in_set(tv.created_by,#{checkedUserIdsStr})
</if>
</if>
<if
test=
"keywords != null and keywords !=''"
>
<if
test=
"keywords != null and keywords !=''"
>
and(
and(
...
@@ -655,7 +651,6 @@
...
@@ -655,7 +651,6 @@
from t_vehicle tv
from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0
left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0
left join t_user tu on tu.id = tv.created_by and tu.del_flag = 0
where tv.del_flag = 0
where tv.del_flag = 0
and tvd.bind_status = 1
and tvd.bind_status = 1
and tvd.del_flag = 0
and tvd.del_flag = 0
...
@@ -704,8 +699,8 @@
...
@@ -704,8 +699,8 @@
<if
test=
"activeEndTime != null and activeEndTime != ''"
>
<if
test=
"activeEndTime != null and activeEndTime != ''"
>
and tvd.created_date
<
= #{activeEndTime}
and tvd.created_date
<
= #{activeEndTime}
</if>
</if>
<if
test=
"
orgId != null
"
>
<if
test=
"
checkedUserIdsStr != null and checkedUserIdsStr !=''
"
>
and
tu.id = #{orgId}
and
find_in_set(tv.created_by,#{checkedUserIdsStr})
</if>
</if>
<if
test=
"deviceType != null "
>
<if
test=
"deviceType != null "
>
and td.device_type = #{deviceType}
and td.device_type = #{deviceType}
...
@@ -740,8 +735,8 @@
...
@@ -740,8 +735,8 @@
where tv.del_flag = 0
where tv.del_flag = 0
and tvd.bind_status = 1
and tvd.bind_status = 1
and tvd.del_flag = 0
and tvd.del_flag = 0
<if
test=
"
orgId != null
"
>
<if
test=
"
checkedUserIdsStr != null and checkedUserIdsStr !=''
"
>
and
tu.id = #{orgId}
and
find_in_set(tv.created_by,#{checkedUserIdsStr})
</if>
</if>
<if
test=
"keywords != null and keywords !=''"
>
<if
test=
"keywords != null and keywords !=''"
>
and(
and(
...
@@ -762,12 +757,11 @@
...
@@ -762,12 +757,11 @@
from t_vehicle tv
from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0
left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0
left join t_user tu on tu.id = tv.created_by and tu.del_flag = 0
where tv.del_flag = 0
where tv.del_flag = 0
and tvd.bind_status = 1
and tvd.bind_status = 1
and tvd.del_flag = 0
and tvd.del_flag = 0
<if
test=
"
orgId != null
"
>
<if
test=
"
checkedUserIdsStr != null and checkedUserIdsStr !=''
"
>
and
tu.id = #{orgId}
and
find_in_set(tv.created_by,#{checkedUserIdsStr})
</if>
</if>
<if
test=
"sn != null and sn !=''"
>
<if
test=
"sn != null and sn !=''"
>
and tvd.sn = #{sn}
and tvd.sn = #{sn}
...
@@ -849,12 +843,11 @@
...
@@ -849,12 +843,11 @@
from t_vehicle tv
from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0
left join t_workorder tw on tw.id = tv.workorder_id and tw.del_flag = 0
left join t_user tu on tu.id = tv.created_by and tu.del_flag = 0
where tv.del_flag = 0
where tv.del_flag = 0
and tvd.bind_status = 1
and tvd.bind_status = 1
and tvd.del_flag = 0
and tvd.del_flag = 0
<if
test=
"
orgId != null
"
>
<if
test=
"
checkedUserIdsStr != null and checkedUserIdsStr !=''
"
>
and
tu.id = #{orgId}
and
find_in_set(tv.created_by,#{checkedUserIdsStr})
</if>
</if>
<if
test=
"keywords != null and keywords !=''"
>
<if
test=
"keywords != null and keywords !=''"
>
and(
and(
...
...
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