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 b07b6a48
authored
May 27, 2021
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
特约店、围栏
1 parent
f4f5c1a3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
5 deletions
src/main/java/cn/com/glsx/admin/modules/model/ElectricFenceDetailsDTO.java
src/main/java/cn/com/glsx/admin/modules/model/TrialDriveShopDTO.java
src/main/java/cn/com/glsx/admin/modules/model/export/TrialDriveShopExport.java
src/main/java/cn/com/glsx/admin/modules/service/ElectricFenceService.java
src/main/java/cn/com/glsx/admin/modules/service/TrialDriveShopService.java
src/main/java/cn/com/glsx/admin/modules/model/ElectricFenceDetailsDTO.java
View file @
b07b6a4
...
@@ -15,14 +15,12 @@ public class ElectricFenceDetailsDTO {
...
@@ -15,14 +15,12 @@ public class ElectricFenceDetailsDTO {
* 栅栏名称
* 栅栏名称
*/
*/
private
String
fenceName
;
private
String
fenceName
;
/**
* 围栏编号
*/
private
String
fenceNo
;
/**
/**
* 业务围栏类型 0警情围栏,1试驾围栏
* 业务围栏类型 0警情围栏,1试驾围栏
*/
*/
private
Integer
bizFenceType
;
private
Integer
bizFenceType
;
/**
/**
* 定位信息类型 1gps,2基站
* 定位信息类型 1gps,2基站
*/
*/
...
...
src/main/java/cn/com/glsx/admin/modules/model/TrialDriveShopDTO.java
View file @
b07b6a4
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
;
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
lombok.Data
;
import
lombok.Data
;
@Data
@Data
...
@@ -49,4 +50,7 @@ public class TrialDriveShopDTO {
...
@@ -49,4 +50,7 @@ public class TrialDriveShopDTO {
*/
*/
private
String
fenceName
;
private
String
fenceName
;
@JsonIgnore
private
Long
creatorId
;
}
}
src/main/java/cn/com/glsx/admin/modules/model/export/TrialDriveShopExport.java
View file @
b07b6a4
...
@@ -2,6 +2,7 @@ package cn.com.glsx.admin.modules.model.export;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.admin.modules.model.export;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
...
@@ -47,4 +48,7 @@ public class TrialDriveShopExport {
...
@@ -47,4 +48,7 @@ public class TrialDriveShopExport {
@ExcelProperty
(
value
=
"围栏半径(米)"
,
index
=
10
)
@ExcelProperty
(
value
=
"围栏半径(米)"
,
index
=
10
)
private
Integer
radius
;
private
Integer
radius
;
@JsonIgnore
private
Long
creatorId
;
}
}
src/main/java/cn/com/glsx/admin/modules/service/ElectricFenceService.java
View file @
b07b6a4
...
@@ -83,12 +83,30 @@ public class ElectricFenceService {
...
@@ -83,12 +83,30 @@ public class ElectricFenceService {
efd
.
setProvince
(
orgList
.
get
(
2
).
getOrgName
());
efd
.
setProvince
(
orgList
.
get
(
2
).
getOrgName
());
efd
.
setCity
(
orgList
.
get
(
3
).
getOrgName
());
efd
.
setCity
(
orgList
.
get
(
3
).
getOrgName
());
}
}
// efd.getBizFenceType();
});
});
return
new
PageInfo
<>(
list
);
return
new
PageInfo
<>(
list
);
}
}
public
List
<
ElectricFenceExport
>
export
(
ElectricFenceSearch
search
)
{
public
List
<
ElectricFenceExport
>
export
(
ElectricFenceSearch
search
)
{
return
electricFenceMapper
.
export
(
search
);
List
<
ElectricFenceExport
>
list
=
electricFenceMapper
.
export
(
search
);
Type
type
=
new
TypeToken
<
List
<
Organization
>>()
{
}.
getType
();
list
.
forEach
(
efd
->
{
R
<
List
<
Organization
>>
listR
=
organizationService
.
getTenantPathsByUserId
(
efd
.
getCreatorId
());
List
<
Organization
>
orgList
=
listR
.
getDataList
(
type
);
if
(
CollectionUtils
.
isNotEmpty
(
orgList
))
{
efd
.
setArea
(
orgList
.
get
(
1
).
getOrgName
());
efd
.
setProvince
(
orgList
.
get
(
2
).
getOrgName
());
efd
.
setCity
(
orgList
.
get
(
3
).
getOrgName
());
}
// efd.getBizFenceType();
});
return
list
;
}
}
/**
/**
...
...
src/main/java/cn/com/glsx/admin/modules/service/TrialDriveShopService.java
View file @
b07b6a4
...
@@ -32,6 +32,7 @@ import org.springframework.beans.BeanUtils;
...
@@ -32,6 +32,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.lang.reflect.Type
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -58,11 +59,38 @@ public class TrialDriveShopService {
...
@@ -58,11 +59,38 @@ public class TrialDriveShopService {
public
PageInfo
<
TrialDriveShopDTO
>
search
(
TrialDriveShopSearch
search
)
{
public
PageInfo
<
TrialDriveShopDTO
>
search
(
TrialDriveShopSearch
search
)
{
Page
page
=
PageHelper
.
startPage
(
search
.
getPageNumber
(),
search
.
getPageSize
());
Page
page
=
PageHelper
.
startPage
(
search
.
getPageNumber
(),
search
.
getPageSize
());
List
<
TrialDriveShopDTO
>
list
=
trialDriveShopMapper
.
search
(
search
);
List
<
TrialDriveShopDTO
>
list
=
trialDriveShopMapper
.
search
(
search
);
Type
type
=
new
TypeToken
<
List
<
Organization
>>()
{
}.
getType
();
list
.
forEach
(
tdsd
->
{
R
<
List
<
Organization
>>
listR
=
organizationService
.
getTenantPathsByUserId
(
tdsd
.
getCreatorId
());
List
<
Organization
>
orgList
=
listR
.
getDataList
(
type
);
if
(
CollectionUtils
.
isNotEmpty
(
orgList
))
{
tdsd
.
setArea
(
orgList
.
get
(
1
).
getOrgName
());
tdsd
.
setProvince
(
orgList
.
get
(
2
).
getOrgName
());
tdsd
.
setCity
(
orgList
.
get
(
3
).
getOrgName
());
}
});
return
new
PageInfo
<>(
list
);
return
new
PageInfo
<>(
list
);
}
}
public
List
<
TrialDriveShopExport
>
export
(
TrialDriveShopSearch
search
)
{
public
List
<
TrialDriveShopExport
>
export
(
TrialDriveShopSearch
search
)
{
List
<
TrialDriveShopExport
>
list
=
trialDriveShopMapper
.
export
(
search
);
List
<
TrialDriveShopExport
>
list
=
trialDriveShopMapper
.
export
(
search
);
Type
type
=
new
TypeToken
<
List
<
Organization
>>()
{
}.
getType
();
list
.
forEach
(
tdsd
->
{
R
<
List
<
Organization
>>
listR
=
organizationService
.
getTenantPathsByUserId
(
tdsd
.
getCreatorId
());
List
<
Organization
>
orgList
=
listR
.
getDataList
(
type
);
if
(
CollectionUtils
.
isNotEmpty
(
orgList
))
{
tdsd
.
setArea
(
orgList
.
get
(
1
).
getOrgName
());
tdsd
.
setProvince
(
orgList
.
get
(
2
).
getOrgName
());
tdsd
.
setCity
(
orgList
.
get
(
3
).
getOrgName
());
}
});
return
list
;
return
list
;
}
}
...
...
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