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
d7b80989
Commit
d7b80989
authored
Sep 22, 2021
by
jianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BASE
parent
193119a5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
1 deletion
+48
-1
TDeviceInfoController.java
...m/zehong/web/controller/device/TDeviceInfoController.java
+5
-0
TDeviceInfoMapper.java
...main/java/com/zehong/system/mapper/TDeviceInfoMapper.java
+7
-0
ITDeviceInfoService.java
...n/java/com/zehong/system/service/ITDeviceInfoService.java
+6
-0
TDeviceInfoServiceImpl.java
...om/zehong/system/service/impl/TDeviceInfoServiceImpl.java
+20
-1
TDeviceInfoMapper.xml
...em/src/main/resources/mapper/system/TDeviceInfoMapper.xml
+10
-0
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/device/TDeviceInfoController.java
View file @
d7b80989
...
...
@@ -148,4 +148,9 @@ public class TDeviceInfoController extends BaseController
List
<
Map
<
Object
,
Object
>>
list
=
tDeviceInfoService
.
countDeviceByType
();
return
AjaxResult
.
success
(
list
);
}
@PutMapping
(
"/devicefeed"
)
public
AjaxResult
devicefeed
(
@RequestBody
Map
<
String
,
Object
>
param
)
{
return
AjaxResult
.
success
(
tDeviceInfoService
.
devicefeed
(
param
));
}
}
gassafety-system/src/main/java/com/zehong/system/mapper/TDeviceInfoMapper.java
View file @
d7b80989
...
...
@@ -4,6 +4,8 @@ import java.util.List;
import
java.util.Map
;
import
com.zehong.system.domain.TDeviceInfo
;
import
org.apache.commons.math3.analysis.function.Add
;
import
org.apache.ibatis.annotations.Param
;
/**
* 设备信息Mapper接口
...
...
@@ -74,4 +76,9 @@ public interface TDeviceInfoMapper
* @return 结果
*/
public
int
deleteTDeviceInfoByIds
(
int
[]
deviceIds
);
/**
* 工单设备进程
*/
List
<
Map
<
String
,
Object
>>
selectdevicefeed
(
@Param
(
"orderId"
)
String
orderId
,
@Param
(
"ids"
)
List
<
Integer
>
ids
);
}
gassafety-system/src/main/java/com/zehong/system/service/ITDeviceInfoService.java
View file @
d7b80989
...
...
@@ -92,4 +92,10 @@ public interface ITDeviceInfoService
* @return 结果
*/
public
int
deleteTDeviceInfoById
(
int
deviceId
);
/**
*
* @return
*/
public
List
<
Map
<
String
,
Object
>>
devicefeed
(
Map
<
String
,
Object
>
param
);
}
gassafety-system/src/main/java/com/zehong/system/service/impl/TDeviceInfoServiceImpl.java
View file @
d7b80989
...
...
@@ -100,7 +100,26 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
return
pageVo
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
devicefeed
(
Map
<
String
,
Object
>
param
)
{
List
<
Integer
>
ids
=
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"
);
if
(
deviceList
.
size
()
!=
0
)
{
for
(
Map
<
Object
,
Object
>
temp
:
deviceList
)
{
ids
.
add
((
Integer
)
temp
.
get
(
"deviceId"
));
}
}
if
(
pipeList
.
size
()
!=
0
){
for
(
Map
<
Object
,
Object
>
temp
:
pipeList
){
ids
.
add
((
Integer
)
temp
.
get
(
"pipeId"
));
}
}
List
<
Map
<
String
,
Object
>>
list
=
tDeviceInfoMapper
.
selectdevicefeed
(
orderId
,
ids
);
return
list
;
}
/**
* 构建前端所需要下拉树结构
*
...
...
gassafety-system/src/main/resources/mapper/system/TDeviceInfoMapper.xml
View file @
d7b80989
...
...
@@ -141,4 +141,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{deviceId}
</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
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
</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