Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
耿迪迪
gassafety
Commits
be3a3961
Commit
be3a3961
authored
Sep 23, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改样式问题
parent
e3c36b7b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
10 deletions
+42
-10
TDeviceInfoMapper.java
...main/java/com/zehong/system/mapper/TDeviceInfoMapper.java
+3
-1
TDeviceInfoServiceImpl.java
...om/zehong/system/service/impl/TDeviceInfoServiceImpl.java
+15
-2
TDeviceInfoMapper.xml
...em/src/main/resources/mapper/system/TDeviceInfoMapper.xml
+24
-7
No files found.
gassafety-system/src/main/java/com/zehong/system/mapper/TDeviceInfoMapper.java
View file @
be3a3961
...
...
@@ -80,5 +80,7 @@ public interface TDeviceInfoMapper
/**
* 工单设备进程
*/
List
<
Map
<
String
,
Object
>>
selectdevicefeed
(
@Param
(
"orderId"
)
String
orderId
,
@Param
(
"ids"
)
List
<
Integer
>
ids
);
List
<
Map
<
String
,
Object
>>
selectdevicefeed
(
@Param
(
"orderId"
)
String
orderId
,
@Param
(
"ids"
)
List
<
Integer
>
ids
,
@Param
(
"ids2"
)
List
<
Integer
>
ids2
);
}
gassafety-system/src/main/java/com/zehong/system/service/impl/TDeviceInfoServiceImpl.java
View file @
be3a3961
package
com
.
zehong
.
system
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageInfo
;
import
com.zehong.common.utils.PageInfoUtil
;
import
com.zehong.system.domain.TDeviceInfo
;
...
...
@@ -104,6 +105,7 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
public
List
<
Map
<
String
,
Object
>>
devicefeed
(
Map
<
String
,
Object
>
param
)
{
List
<
Integer
>
ids
=
new
ArrayList
<>();
List
<
Integer
>
ids2
=
new
ArrayList
<>();
List
<
Map
<
Object
,
Object
>>
deviceList
=
(
List
<
Map
<
Object
,
Object
>>)
param
.
get
(
"key1"
);
List
<
Map
<
Object
,
Object
>>
pipeList
=
(
List
<
Map
<
Object
,
Object
>>)
param
.
get
(
"key2"
);
String
orderId
=
(
String
)
param
.
get
(
"orderId"
);
...
...
@@ -114,10 +116,21 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
}
if
(
pipeList
.
size
()
!=
0
){
for
(
Map
<
Object
,
Object
>
temp
:
pipeList
){
ids
.
add
((
Integer
)
temp
.
get
(
"pipeId"
));
ids2
.
add
((
Integer
)
temp
.
get
(
"pipeId"
));
}
}
List
<
Map
<
String
,
Object
>>
list
=
tDeviceInfoMapper
.
selectdevicefeed
(
orderId
,
ids
,
ids2
);
for
(
Map
<
String
,
Object
>
map:
list
){
if
((
long
)
map
.
get
(
"type"
)==
1
){
//List<String[]> listgps =
String
str
=
(
String
)
map
.
get
(
"longitude"
);
String
[]
strgps
=
str
.
split
(
","
);
map
.
put
(
"longitude"
,
strgps
[
0
].
substring
(
3
,
strgps
[
0
].
length
()
-
1
));
map
.
put
(
"latitude"
,
strgps
[
1
].
substring
(
1
,
strgps
[
1
].
length
()
-
2
));
System
.
out
.
println
(
"============================="
+
map
.
get
(
"longitude"
)+
","
+
map
.
get
(
"latitude"
));
//JSONObject jo = JSONObject.parseObject(str);
}
}
List
<
Map
<
String
,
Object
>>
list
=
tDeviceInfoMapper
.
selectdevicefeed
(
orderId
,
ids
);
return
list
;
}
/**
...
...
gassafety-system/src/main/resources/mapper/system/TDeviceInfoMapper.xml
View file @
be3a3961
...
...
@@ -142,13 +142,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<select
id=
"selectdevicefeed"
resultType=
"java.util.HashMap"
>
SELECT d.device_id AS id,device_name AS label,IF(f.feedback_id IS NULL,"未反馈","已反馈") as feed FROM t_device_info d
<if
test=
"ids.size!=0"
>
SELECT d.device_id AS id,device_name AS label,IF(f.feedback_id IS NULL,"未反馈","已反馈") as feed,
d.longitude,d.latitude,0 as type
FROM t_device_info d
LEFT JOIN t_order_feedback f ON (d.device_id = f.`device_id` AND f.`order_id`=#{orderId} )
where d.device_id in
<foreach
collection=
"ids"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
group by d.device_id
ORDER BY f.feedback_id DESC
</if>
<if
test=
"ids2.size!=0 and ids.size!=0"
>
UNION ALL
</if>
<if
test=
"ids2.size!=0"
>
SELECT p.pipe_id AS id,p.pipe_name AS label,IF(f.feedback_id IS NULL,"未反馈","已反馈") as feed,
p.coordinates as longitude,'' as latitude,1 as type
FROM t_pipe p
LEFT JOIN t_order_feedback f ON (p.pipe_id = f.`device_id` AND f.`order_id`=#{orderId} )
where p.pipe_id in
<foreach
collection=
"ids2"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
group by p.pipe_id
</if>
</select>
</mapper>
\ No newline at end of file
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