Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
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-progress
Commits
eea1a2a6
Commit
eea1a2a6
authored
Feb 14, 2022
by
wuqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022-2-14 吴卿华
parent
2343b553
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
262 additions
and
90 deletions
+262
-90
TDeviceInfoController.java
...ehong/web/controller/supervise/TDeviceInfoController.java
+6
-4
TDeviceInfoMapper.java
...main/java/com/zehong/system/mapper/TDeviceInfoMapper.java
+7
-0
ITDeviceInfoService.java
...n/java/com/zehong/system/service/ITDeviceInfoService.java
+7
-0
TDeviceInfoServiceImpl.java
...om/zehong/system/service/impl/TDeviceInfoServiceImpl.java
+10
-0
TDeviceInfoMapper.xml
...em/src/main/resources/mapper/system/TDeviceInfoMapper.xml
+12
-8
index.vue
gassafetyprogress-web/src/views/regulation/device/index.vue
+219
-77
index.vue
gassafetyprogress-web/src/views/regulation/gasuser/index.vue
+1
-1
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/supervise/TDeviceInfoController.java
View file @
eea1a2a6
...
@@ -78,10 +78,12 @@ public class TDeviceInfoController extends BaseController
...
@@ -78,10 +78,12 @@ public class TDeviceInfoController extends BaseController
{
{
//添加设备信息表数据 并且返回新增id
//添加设备信息表数据 并且返回新增id
tDeviceInfoService
.
insertTDeviceInfo
(
listaw
.
gettDeviceInfo
());
tDeviceInfoService
.
insertTDeviceInfo
(
listaw
.
gettDeviceInfo
());
// TDeviceInfo tDeviceInfo = new TDeviceInfo();
//将关联设备信息与设备进行绑定
// //根据企业id查询企业名称
tDeviceInfoService
.
updatetRelationDeviceDetailInfo
(
listaw
.
gettDeviceInfoS
(),
listaw
.
gettDeviceInfo
().
getDeviceId
());
// String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tDeviceInfo.getBeyondEnterpriseId());
TDeviceInfo
tDeviceInfo
=
new
TDeviceInfo
();
// tDeviceInfo.setBeyondEnterpriseName(EnterpriseName);
//根据企业id查询企业名称
String
EnterpriseName
=
tEmployedPeopleInfoService
.
selectEnterpriseName
(
tDeviceInfo
.
getBeyondEnterpriseId
());
tDeviceInfo
.
setBeyondEnterpriseName
(
EnterpriseName
);
}
}
/**
/**
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/TDeviceInfoMapper.java
View file @
eea1a2a6
...
@@ -3,6 +3,7 @@ package com.zehong.system.mapper;
...
@@ -3,6 +3,7 @@ package com.zehong.system.mapper;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TDeviceInfoS
;
import
com.zehong.system.domain.TDeviceInfoS
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* 设备信息Mapper接口
* 设备信息Mapper接口
...
@@ -90,4 +91,10 @@ public interface TDeviceInfoMapper
...
@@ -90,4 +91,10 @@ public interface TDeviceInfoMapper
* @param deviceId
* @param deviceId
*/
*/
void
deleteDetailinfOS
(
int
deviceId
);
void
deleteDetailinfOS
(
int
deviceId
);
/**
* 将关联设备信息与设备进行绑定
* @param gettDeviceInfoS
*/
void
updatetRelationDeviceDetailInfo
(
@Param
(
"gettDeviceInfoS"
)
List
<
TDeviceInfoS
>
gettDeviceInfoS
,
@Param
(
"id"
)
Long
id
);
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/ITDeviceInfoService.java
View file @
eea1a2a6
...
@@ -3,6 +3,7 @@ package com.zehong.system.service;
...
@@ -3,6 +3,7 @@ package com.zehong.system.service;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TDeviceInfoS
;
import
com.zehong.system.domain.TDeviceInfoS
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* 设备信息Service接口
* 设备信息Service接口
...
@@ -90,4 +91,10 @@ public interface ITDeviceInfoService
...
@@ -90,4 +91,10 @@ public interface ITDeviceInfoService
* @param deviceId
* @param deviceId
*/
*/
void
deleteDetailinfOS
(
int
deviceId
);
void
deleteDetailinfOS
(
int
deviceId
);
/**
* 将关联设备信息与设备进行绑定
* @param gettDeviceInfoS
*/
void
updatetRelationDeviceDetailInfo
(
@Param
(
"gettDeviceInfoS"
)
List
<
TDeviceInfoS
>
gettDeviceInfoS
,
@Param
(
"id"
)
Long
id
);
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/TDeviceInfoServiceImpl.java
View file @
eea1a2a6
...
@@ -3,6 +3,7 @@ package com.zehong.system.service.impl;
...
@@ -3,6 +3,7 @@ package com.zehong.system.service.impl;
import
java.util.List
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.system.domain.TDeviceInfoS
;
import
com.zehong.system.domain.TDeviceInfoS
;
import
org.apache.ibatis.annotations.Param
;
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
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
...
@@ -142,4 +143,13 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
...
@@ -142,4 +143,13 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
public
void
deleteDetailinfOS
(
int
deviceId
)
{
public
void
deleteDetailinfOS
(
int
deviceId
)
{
tDeviceInfoMapper
.
deleteDetailinfOS
(
deviceId
);
tDeviceInfoMapper
.
deleteDetailinfOS
(
deviceId
);
}
}
/**
* 将关联设备信息与设备进行绑定
* @param gettDeviceInfoS
*/
@Override
public
void
updatetRelationDeviceDetailInfo
(
@Param
(
"gettDeviceInfoS"
)
List
<
TDeviceInfoS
>
gettDeviceInfoS
,
@Param
(
"id"
)
Long
id
)
{
tDeviceInfoMapper
.
updatetRelationDeviceDetailInfo
(
gettDeviceInfoS
,
id
);
}
}
}
gassafetyprogress-system/src/main/resources/mapper/system/TDeviceInfoMapper.xml
View file @
eea1a2a6
...
@@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -55,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"deviceCode != null and deviceCode != ''"
>
and device_code = #{deviceCode}
</if>
<if
test=
"deviceCode != null and deviceCode != ''"
>
and device_code = #{deviceCode}
</if>
<if
test=
"deviceAddr != null and deviceAddr != ''"
>
and device_addr = #{deviceAddr}
</if>
<if
test=
"deviceAddr != null and deviceAddr != ''"
>
and device_addr = #{deviceAddr}
</if>
</where>
</where>
group by a.device_id desc
</select>
</select>
<select
id=
"selectTDeviceInfoById"
parameterType=
"Long"
resultMap=
"TDeviceInfoResult"
>
<select
id=
"selectTDeviceInfoById"
parameterType=
"Long"
resultMap=
"TDeviceInfoResult"
>
...
@@ -149,14 +150,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -149,14 +150,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</foreach>
</update>
</update>
<!--添加关联设备信息表数据-->
<!-- <insert id="insertDeviceDetailInfo" parameterType="java.util.List">-->
<!-- INSERT INTO t_relation_device_detail_info (relation_device_id,device_name,device_model,device_type,iot_no)-->
<!-- VALUES-->
<!-- <foreach collection="list" item="item" index="key" separator=",">-->
<!-- (#{item.relationDeviceId},#{item.deviceName},#{item.deviceModel},#{item.deviceType},#{item.iotNo})-->
<!-- </foreach>-->
<!-- </insert>-->
<insert
id=
"insertDeviceDetailInfo"
>
<insert
id=
"insertDeviceDetailInfo"
>
INSERT INTO t_relation_device_detail_info (relation_device_id,device_name,device_model,device_type,iot_no,remarks)
INSERT INTO t_relation_device_detail_info (relation_device_id,device_name,device_model,device_type,iot_no,remarks)
...
@@ -193,4 +186,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -193,4 +186,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_relation_device_detail_info set is_del='1' where relation_device_detail_id = #{deviceId}
update t_relation_device_detail_info set is_del='1' where relation_device_detail_id = #{deviceId}
</update>
</update>
<!--将关联设备信息与设备进行绑定-->
<update
id=
"updatetRelationDeviceDetailInfo"
parameterType=
"java.util.List"
>
update t_relation_device_detail_info set relation_device_id = #{id}
where
relation_device_detail_id in
<foreach
collection=
"gettDeviceInfoS"
item=
"items"
index=
"key"
open=
"("
separator=
","
close=
")"
>
#{items.relationDeviceDetailId}
</foreach>
</update>
</mapper>
</mapper>
gassafetyprogress-web/src/views/regulation/device/index.vue
View file @
eea1a2a6
This diff is collapsed.
Click to expand it.
gassafetyprogress-web/src/views/regulation/gasuser/index.vue
View file @
eea1a2a6
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
<!-- 添加或修改燃气用户对话框 -->
<!-- 添加或修改燃气用户对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"
8
0px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"
10
0px"
>
<el-form-item
label=
"用户账号"
prop=
"username"
>
<el-form-item
label=
"用户账号"
prop=
"username"
>
<el-input
v-model=
"form.username"
placeholder=
"请输入用户账号"
/>
<el-input
v-model=
"form.username"
placeholder=
"请输入用户账号"
/>
</el-form-item>
</el-form-item>
...
...
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