Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-miniappserver
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 5a46c355
authored
Jul 24, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
返回分享状态
1 parent
ea58414b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
src/main/java/cn/com/glsx/app/modules/model/view/VehicleSharedDTO.java
src/main/java/cn/com/glsx/app/modules/service/VehicleService.java
src/main/resources/mapper/VehicleMapper.xml
src/main/java/cn/com/glsx/app/modules/model/view/VehicleSharedDTO.java
View file @
5a46c35
...
@@ -15,10 +15,14 @@ public class VehicleSharedDTO {
...
@@ -15,10 +15,14 @@ public class VehicleSharedDTO {
private
String
workOrderNo
;
private
String
workOrderNo
;
private
String
sns
;
private
String
sns
;
private
String
sources
;
private
String
sources
;
private
Integer
sharedStatus
;
private
String
permitType
;
private
String
permitType
;
private
List
<
String
>
sharedUserIds
;
@JsonIgnore
@JsonIgnore
private
String
receiverIds
;
private
String
receiverIds
;
private
List
<
String
>
sharedUserIds
;
@JsonIgnore
private
Integer
sharedDiffMin
;
}
}
src/main/java/cn/com/glsx/app/modules/service/VehicleService.java
View file @
5a46c35
...
@@ -14,6 +14,7 @@ import com.github.pagehelper.Page;
...
@@ -14,6 +14,7 @@ import com.github.pagehelper.Page;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.glsx.plat.common.utils.StringUtils
;
import
com.glsx.plat.common.utils.StringUtils
;
import
com.glsx.plat.core.enums.SysConstants
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -45,15 +46,19 @@ public class VehicleService {
...
@@ -45,15 +46,19 @@ public class VehicleService {
Page
page
=
PageHelper
.
startPage
(
search
.
getPageNumber
(),
search
.
getPageSize
());
Page
page
=
PageHelper
.
startPage
(
search
.
getPageNumber
(),
search
.
getPageSize
());
List
<
VehicleSharedDTO
>
list
=
vehicleMapper
.
manageSearch
(
search
);
List
<
VehicleSharedDTO
>
list
=
vehicleMapper
.
manageSearch
(
search
);
list
.
forEach
(
vdd
->
{
list
.
forEach
(
vdd
->
{
//设置被分享人
if
(
StringUtils
.
isNotEmpty
(
vdd
.
getReceiverIds
()))
{
if
(
StringUtils
.
isNotEmpty
(
vdd
.
getReceiverIds
()))
{
vdd
.
setSharedUserIds
(
Arrays
.
asList
(
vdd
.
getReceiverIds
().
split
(
","
)));
vdd
.
setSharedUserIds
(
Arrays
.
asList
(
vdd
.
getReceiverIds
().
split
(
","
)));
}
}
//被分享用户设为只读权限
if
(
UserConstants
.
RolePermitCastType
.
wxShared
.
getCode
().
equals
(
ShieldContextHolder
.
getRolePermissionType
()))
{
if
(
UserConstants
.
RolePermitCastType
.
wxShared
.
getCode
().
equals
(
ShieldContextHolder
.
getRolePermissionType
()))
{
//被分享用户设为只读
vdd
.
setPermitType
(
"r"
);
vdd
.
setPermitType
(
"r"
);
}
}
//如果分享时间<=0,表示分享已失效
if
(
vdd
.
getSharedDiffMin
()
<=
0
)
{
vdd
.
setSharedStatus
(
SysConstants
.
EnableStatus
.
disable
.
getCode
());
}
});
});
return
new
PageInfo
<>(
list
);
return
new
PageInfo
<>(
list
);
}
}
...
...
src/main/resources/mapper/VehicleMapper.xml
View file @
5a46c35
...
@@ -92,6 +92,8 @@
...
@@ -92,6 +92,8 @@
tw.partner_order_no workOrderNo,
tw.partner_order_no workOrderNo,
group_concat(distinct td.sn order by td.source desc) as sns,
group_concat(distinct td.sn order by td.source desc) as sns,
group_concat(distinct td.source order by td.source desc) as sources,
group_concat(distinct td.source order by td.source desc) as sources,
tcusd.enable_status as sharedStatus,
TIMESTAMPDIFF(MINUTE, now(), tcusd.expiration_date) as sharedDiffMin,
tcusd.permit_type as permitType,
tcusd.permit_type as permitType,
group_concat(tvs.receiver_id) as receiverIds
group_concat(tvs.receiver_id) as receiverIds
from t_vehicle tv
from t_vehicle tv
...
...
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