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 b887e2c4
authored
Mar 31, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
围栏工作地址和家庭地址增加区分 只保存在本地 不提交
1 parent
c914ed0e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
5 deletions
src/main/java/cn/com/glsx/admin/common/enums/FakeOfficeReasonEnum.java
src/main/java/cn/com/glsx/admin/modules/entity/FakeOfflineVin.java
src/main/java/cn/com/glsx/admin/modules/multithread/AsyncTasks.java
src/main/java/cn/com/glsx/admin/modules/service/FakeOfflineService.java
src/main/resources/mapper/FakeOfflineVinMapper.xml
src/main/java/cn/com/glsx/admin/common/enums/FakeOfficeReasonEnum.java
View file @
b887e2c
...
@@ -9,7 +9,10 @@ import com.glsx.plat.exception.SystemMessage;
...
@@ -9,7 +9,10 @@ import com.glsx.plat.exception.SystemMessage;
public
enum
FakeOfficeReasonEnum
{
public
enum
FakeOfficeReasonEnum
{
WHITELIST
(
1
,
"纳入离线白名单数据"
),
WHITELIST
(
1
,
"纳入离线白名单数据"
),
SINGLE_OFFLINE
(
2
,
"车辆多设备组合单离线"
),
SINGLE_OFFLINE
(
2
,
"车辆多设备组合单离线"
),
RESIDENCE
(
3
,
"常驻地中【家庭/工作】地址离线"
);
RESIDENCE
(
3
,
"常驻地中【家庭/工作】地址离线"
),
HOME_ADDR
(
4
,
"常驻地中【家庭】地址离线"
),
WORK_ADDR
(
5
,
"常驻地中【工作】地址离线"
),
;
private
final
Integer
code
;
private
final
Integer
code
;
private
final
String
message
;
private
final
String
message
;
...
...
src/main/java/cn/com/glsx/admin/modules/entity/FakeOfflineVin.java
View file @
b887e2c
package
cn
.
com
.
glsx
.
admin
.
modules
.
entity
;
import
com.glsx.plat.mybatis.base.BaseEntity
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
javax.persistence.Table
;
/** * 假性离线车架号数据 * * @author yangll */
@Data
@Accessors
(
chain
=
true
)
@Table
(
name
=
"t_fake_offline_vin"
)
public
class
FakeOfflineVin
extends
BaseEntity
{
/** * 车架号 */
private
String
vin
;
/** * 是否是假性离线车架号, 1表是假性离线车架号, 2表示不是假性离线车架号 */
private
Integer
status
;
/** * 预测家庭地址 */
private
String
homeAddr
;
/** * 预测工作地址 */
private
String
workAddr
;
}
\ No newline at end of file
\ No newline at end of file
package
cn
.
com
.
glsx
.
admin
.
modules
.
entity
;
import
com.glsx.plat.mybatis.base.BaseEntity
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
javax.persistence.Column
;
import
javax.persistence.Table
;
/** * 假性离线车架号数据 * * @author yangll */
@Data
@Accessors
(
chain
=
true
)
@Table
(
name
=
"t_fake_offline_vin"
)
public
class
FakeOfflineVin
extends
BaseEntity
{
/** * 车架号 */
private
String
vin
;
/** * 围栏类型: 1.家庭所在地围栏 2.工作所在地围栏 */
@Column
(
name
=
"merchant_type"
)
private
Integer
merchantType
;
/** * 预测家庭地址 */
@Column
(
name
=
"home_addr"
)
private
String
homeAddr
;
/** * 预测工作地址 */
@Column
(
name
=
"work_addr"
)
private
String
workAddr
;
}
\ No newline at end of file
\ No newline at end of file
...
...
src/main/java/cn/com/glsx/admin/modules/multithread/AsyncTasks.java
View file @
b887e2c
...
@@ -230,7 +230,6 @@ public class AsyncTasks {
...
@@ -230,7 +230,6 @@ public class AsyncTasks {
* @param remoteGpsBsService
* @param remoteGpsBsService
*/
*/
@Async
@Async
@SysLog
(
saveLog
=
false
)
public
void
parseOfficeGpsAndBs
(
List
<
OfflineExport
>
offlineExportList
,
CountDownLatch
countDownLatch
,
RemoteGpsBsService
remoteGpsBsService
)
{
public
void
parseOfficeGpsAndBs
(
List
<
OfflineExport
>
offlineExportList
,
CountDownLatch
countDownLatch
,
RemoteGpsBsService
remoteGpsBsService
)
{
if
(
CollectionUtils
.
isEmpty
(
offlineExportList
))
{
if
(
CollectionUtils
.
isEmpty
(
offlineExportList
))
{
log
.
info
(
"countDownLatch查询数据为空关闭资源"
);
log
.
info
(
"countDownLatch查询数据为空关闭资源"
);
...
...
src/main/java/cn/com/glsx/admin/modules/service/FakeOfflineService.java
View file @
b887e2c
...
@@ -21,6 +21,7 @@ import cn.com.glsx.admin.modules.utils.fileupload.FileUploadUtil;
...
@@ -21,6 +21,7 @@ import cn.com.glsx.admin.modules.utils.fileupload.FileUploadUtil;
import
cn.com.glsx.auth.utils.ShieldContextHolder
;
import
cn.com.glsx.auth.utils.ShieldContextHolder
;
import
cn.com.glsx.devicemonitor.api.dto.response.DeviceStatusModel
;
import
cn.com.glsx.devicemonitor.api.dto.response.DeviceStatusModel
;
import
cn.com.glsx.devicemonitor.api.dto.response.GpsBsData
;
import
cn.com.glsx.devicemonitor.api.dto.response.GpsBsData
;
import
cn.com.glsx.stdinterface.enums.FakeOfficeTypeEnum
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
...
@@ -134,7 +135,6 @@ public class FakeOfflineService extends AbstractCommonService {
...
@@ -134,7 +135,6 @@ public class FakeOfflineService extends AbstractCommonService {
if
(
FakeOfficeReasonEnum
.
WHITELIST
.
getCode
().
equals
(
code
))
{
if
(
FakeOfficeReasonEnum
.
WHITELIST
.
getCode
().
equals
(
code
))
{
fakeOfficeExport
.
setReason
(
FakeOfficeReasonEnum
.
WHITELIST
.
getMessage
());
fakeOfficeExport
.
setReason
(
FakeOfficeReasonEnum
.
WHITELIST
.
getMessage
());
}
else
if
(
FakeOfficeReasonEnum
.
RESIDENCE
.
getCode
().
equals
(
code
))
{
}
else
if
(
FakeOfficeReasonEnum
.
RESIDENCE
.
getCode
().
equals
(
code
))
{
fakeOfficeExport
.
setReason
(
FakeOfficeReasonEnum
.
RESIDENCE
.
getMessage
());
//对于触碰围栏假性离线的设备 封装家庭地址和工作地址
//对于触碰围栏假性离线的设备 封装家庭地址和工作地址
buildPredictAddr
(
fakeOfficeExport
,
vin
);
buildPredictAddr
(
fakeOfficeExport
,
vin
);
}
else
if
(
FakeOfficeReasonEnum
.
SINGLE_OFFLINE
.
getCode
().
equals
(
code
))
{
}
else
if
(
FakeOfficeReasonEnum
.
SINGLE_OFFLINE
.
getCode
().
equals
(
code
))
{
...
@@ -191,8 +191,13 @@ public class FakeOfflineService extends AbstractCommonService {
...
@@ -191,8 +191,13 @@ public class FakeOfflineService extends AbstractCommonService {
private
void
buildPredictAddr
(
FakeOfficeExport
fakeOfficeExport
,
String
vin
)
{
private
void
buildPredictAddr
(
FakeOfficeExport
fakeOfficeExport
,
String
vin
)
{
FakeOfflineVin
fakeOfflineVin
=
fakeOfflineVinMapper
.
getAddrByVin
(
vin
);
FakeOfflineVin
fakeOfflineVin
=
fakeOfflineVinMapper
.
getAddrByVin
(
vin
);
if
(
fakeOfflineVin
!=
null
)
{
if
(
fakeOfflineVin
!=
null
)
{
if
(
FakeOfficeTypeEnum
.
HOME_FENCE
.
getType
().
equals
(
fakeOfflineVin
.
getMerchantType
()))
{
fakeOfficeExport
.
setHomeAddr
(
fakeOfflineVin
.
getHomeAddr
());
fakeOfficeExport
.
setHomeAddr
(
fakeOfflineVin
.
getHomeAddr
());
fakeOfficeExport
.
setReason
(
FakeOfficeReasonEnum
.
HOME_ADDR
.
getMessage
());
}
else
if
(
FakeOfficeTypeEnum
.
WORK_FENCE
.
getType
().
equals
(
fakeOfflineVin
.
getMerchantType
()))
{
fakeOfficeExport
.
setWorkAddr
(
fakeOfflineVin
.
getWorkAddr
());
fakeOfficeExport
.
setWorkAddr
(
fakeOfflineVin
.
getWorkAddr
());
fakeOfficeExport
.
setReason
(
FakeOfficeReasonEnum
.
WORK_ADDR
.
getMessage
());
}
}
}
}
}
...
...
src/main/resources/mapper/FakeOfflineVinMapper.xml
View file @
b887e2c
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<resultMap
id=
"BaseMap"
type=
"cn.com.glsx.admin.modules.entity.FakeOfflineVin"
>
<resultMap
id=
"BaseMap"
type=
"cn.com.glsx.admin.modules.entity.FakeOfflineVin"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"vin"
property=
"vin"
jdbcType=
"VARCHAR"
/>
<result
column=
"vin"
property=
"vin"
jdbcType=
"VARCHAR"
/>
<result
column=
"merchant_type"
property=
"merchantType"
jdbcType=
"TINYINT"
/>
<result
column=
"home_addr"
property=
"homeAddr"
jdbcType=
"VARCHAR"
/>
<result
column=
"home_addr"
property=
"homeAddr"
jdbcType=
"VARCHAR"
/>
<result
column=
"work_addr"
property=
"workAddr"
jdbcType=
"VARCHAR"
/>
<result
column=
"work_addr"
property=
"workAddr"
jdbcType=
"VARCHAR"
/>
<result
column=
"del_flag"
property=
"delFlag"
jdbcType=
"TINYINT"
/>
<result
column=
"del_flag"
property=
"delFlag"
jdbcType=
"TINYINT"
/>
...
@@ -14,7 +15,7 @@
...
@@ -14,7 +15,7 @@
</resultMap>
</resultMap>
<sql
id=
"BaseColumns"
>
<sql
id=
"BaseColumns"
>
id, vin, home_addr, work_addr, del_flag, created_date, created_by, updated_date, updated_by
id, vin,
merchant_type,
home_addr, work_addr, del_flag, created_date, created_by, updated_date, updated_by
</sql>
</sql>
<select
id=
"getFakeOfflineVinByFence"
resultType=
"String"
>
<select
id=
"getFakeOfflineVinByFence"
resultType=
"String"
>
...
...
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