Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王浩
zh-baseversion-project
Commits
0b5d307d
Commit
0b5d307d
authored
Sep 07, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 基础信息维护-用户管理-燃气用户 大屏展示数据结构 接口联调
parent
72746377
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
TGasuserSafetyDeviceInfo.java
...va/com/zehong/system/domain/TGasuserSafetyDeviceInfo.java
+2
-0
TDetectorUserVillageSafetyDeviceInfoVo.java
...tem/domain/vo/TDetectorUserVillageSafetyDeviceInfoVo.java
+1
-1
TDetectorUserServiceImpl.java
.../zehong/system/service/impl/TDetectorUserServiceImpl.java
+15
-2
No files found.
zh-baseversion-system/src/main/java/com/zehong/system/domain/TGasuserSafetyDeviceInfo.java
View file @
0b5d307d
...
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
...
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.core.domain.BaseEntity
;
import
com.zehong.common.core.domain.BaseEntity
;
import
org.springframework.format.annotation.DateTimeFormat
;
/**
/**
* 用户管理-燃气用户-安全装置加装维护对象 t_gasuser_safety_device_info
* 用户管理-燃气用户-安全装置加装维护对象 t_gasuser_safety_device_info
...
@@ -45,6 +46,7 @@ public class TGasuserSafetyDeviceInfo extends BaseEntity
...
@@ -45,6 +46,7 @@ public class TGasuserSafetyDeviceInfo extends BaseEntity
private
String
detectionMedium
;
private
String
detectionMedium
;
/** 设备安装时间 */
/** 设备安装时间 */
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
// 入参
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"设备安装时间"
,
width
=
30
,
format
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"设备安装时间"
,
width
=
30
,
format
=
"yyyy-MM-dd"
)
private
Date
deviceInstallTime
;
private
Date
deviceInstallTime
;
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/vo/TDetectorUserVillageSafetyDeviceInfoVo.java
View file @
0b5d307d
...
@@ -95,7 +95,7 @@ public class TDetectorUserVillageSafetyDeviceInfoVo {
...
@@ -95,7 +95,7 @@ public class TDetectorUserVillageSafetyDeviceInfoVo {
/**
/**
* 设备安装时间
* 设备安装时间
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd"
)
private
Date
deviceInstallTime
;
private
Date
deviceInstallTime
;
/**
/**
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TDetectorUserServiceImpl.java
View file @
0b5d307d
...
@@ -4,6 +4,7 @@ import java.lang.reflect.Field;
...
@@ -4,6 +4,7 @@ import java.lang.reflect.Field;
import
java.sql.Connection
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.PreparedStatement
;
import
java.sql.SQLException
;
import
java.sql.SQLException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -247,6 +248,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
...
@@ -247,6 +248,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
private
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
noResidentsUserInit
(
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>
noResidentsUsers
){
private
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
noResidentsUserInit
(
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>
noResidentsUsers
){
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
collect
=
new
HashMap
<>();
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
collect
=
new
HashMap
<>();
SimpleDateFormat
targetFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
// 按照用户类型分组
// 按照用户类型分组
Map
<
String
,
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>>
collectByType
=
noResidentsUsers
.
stream
()
Map
<
String
,
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>>
collectByType
=
noResidentsUsers
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
TDetectorUserVillageSafetyDeviceInfoVo:
:
getUserType
));
.
collect
(
Collectors
.
groupingBy
(
TDetectorUserVillageSafetyDeviceInfoVo:
:
getUserType
));
...
@@ -330,6 +332,12 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
...
@@ -330,6 +332,12 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
safetyDeviceMapItem
.
put
(
"deviceName"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getDeviceName
());
safetyDeviceMapItem
.
put
(
"deviceName"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getDeviceName
());
safetyDeviceMapItem
.
put
(
"detctionMedium"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getDetctionMedium
());
safetyDeviceMapItem
.
put
(
"detctionMedium"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getDetctionMedium
());
safetyDeviceMapItem
.
put
(
"deviceInstallTime"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getDeviceInstallTime
());
safetyDeviceMapItem
.
put
(
"deviceInstallTime"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getDeviceInstallTime
());
if
(
tDetectorUserVillageSafetyDeviceInfoVo
.
getDeviceInstallTime
()
!=
null
)
{
String
format
=
targetFormat
.
format
(
tDetectorUserVillageSafetyDeviceInfoVo
.
getDeviceInstallTime
());
safetyDeviceMapItem
.
put
(
"deviceInstallTime"
,
format
);
}
else
{
safetyDeviceMapItem
.
put
(
"deviceInstallTime"
,
""
);
}
safetyDeviceMapList
.
add
(
safetyDeviceMapItem
);
safetyDeviceMapList
.
add
(
safetyDeviceMapItem
);
}
}
}
}
...
@@ -350,6 +358,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
...
@@ -350,6 +358,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
//返回 userlist
//返回 userlist
List
<
Map
<
String
,
Object
>>
userMapList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
userMapList
=
new
ArrayList
<>();
SimpleDateFormat
targetFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
if
(
residentsUsers
.
size
()
>
0
)
{
if
(
residentsUsers
.
size
()
>
0
)
{
// 如果没关联村的就不展示了
// 如果没关联村的就不展示了
...
@@ -399,7 +408,6 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
...
@@ -399,7 +408,6 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>
safetyDeviceInfoList
=
entry
.
getValue
();
List
<
TDetectorUserVillageSafetyDeviceInfoVo
>
safetyDeviceInfoList
=
entry
.
getValue
();
if
(
safetyDeviceInfoList
.
size
()
>
0
)
{
if
(
safetyDeviceInfoList
.
size
()
>
0
)
{
for
(
TDetectorUserVillageSafetyDeviceInfoVo
tDetectorUserVillageSafetyDeviceInfoVo
:
safetyDeviceInfoList
)
{
for
(
TDetectorUserVillageSafetyDeviceInfoVo
tDetectorUserVillageSafetyDeviceInfoVo
:
safetyDeviceInfoList
)
{
//封装 设备信息
//封装 设备信息
...
@@ -408,7 +416,12 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
...
@@ -408,7 +416,12 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
safetyDeviceMapItem
.
put
(
"iotNo"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getIotNo
());
safetyDeviceMapItem
.
put
(
"iotNo"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getIotNo
());
safetyDeviceMapItem
.
put
(
"deviceName"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getDeviceName
());
safetyDeviceMapItem
.
put
(
"deviceName"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getDeviceName
());
safetyDeviceMapItem
.
put
(
"detctionMedium"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getDetctionMedium
());
safetyDeviceMapItem
.
put
(
"detctionMedium"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getDetctionMedium
());
safetyDeviceMapItem
.
put
(
"deviceInstallTime"
,
tDetectorUserVillageSafetyDeviceInfoVo
.
getDeviceInstallTime
());
if
(
tDetectorUserVillageSafetyDeviceInfoVo
.
getDeviceInstallTime
()
!=
null
)
{
String
format
=
targetFormat
.
format
(
tDetectorUserVillageSafetyDeviceInfoVo
.
getDeviceInstallTime
());
safetyDeviceMapItem
.
put
(
"deviceInstallTime"
,
format
);
}
else
{
safetyDeviceMapItem
.
put
(
"deviceInstallTime"
,
""
);
}
safetyDeviceMapList
.
add
(
safetyDeviceMapItem
);
safetyDeviceMapList
.
add
(
safetyDeviceMapItem
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment