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
cea890c8
Commit
cea890c8
authored
Aug 28, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 燃气用户下 增加 安全装置加装信息 开发,并自测。
parent
e56ada59
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
330 additions
and
39 deletions
+330
-39
TDetectorUserController.java
...ong/web/controller/supervise/TDetectorUserController.java
+17
-0
TGasuserSafetyDeviceInfoController.java
...troller/supervise/TGasuserSafetyDeviceInfoController.java
+12
-0
TGasuserSafetyDeviceInfo.java
...va/com/zehong/system/domain/TGasuserSafetyDeviceInfo.java
+4
-4
GasUserAndSafetyDeviceVo.java
...com/zehong/system/domain/vo/GasUserAndSafetyDeviceVo.java
+29
-0
TGasuserSafetyDeviceInfoMapper.java
.../zehong/system/mapper/TGasuserSafetyDeviceInfoMapper.java
+11
-0
ITDetectorUserService.java
...java/com/zehong/system/service/ITDetectorUserService.java
+15
-0
ITGasuserSafetyDeviceInfoService.java
...hong/system/service/ITGasuserSafetyDeviceInfoService.java
+7
-1
TDetectorUserServiceImpl.java
.../zehong/system/service/impl/TDetectorUserServiceImpl.java
+46
-0
TGasuserSafetyDeviceInfoServiceImpl.java
...tem/service/impl/TGasuserSafetyDeviceInfoServiceImpl.java
+10
-0
TGasuserSafetyDeviceInfoMapper.xml
...esources/mapper/system/TGasuserSafetyDeviceInfoMapper.xml
+14
-0
user.js
zh-baseversion-web/src/api/regulation/user.js
+30
-2
index.vue
zh-baseversion-web/src/views/regulation/device/index.vue
+2
-0
index.vue
...eb/src/views/regulation/userManagement/gasUsers/index.vue
+133
-32
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supervise/TDetectorUserController.java
View file @
cea890c8
...
...
@@ -8,7 +8,9 @@ import com.zehong.common.utils.SecurityUtils;
import
com.zehong.common.utils.ServletUtils
;
import
com.zehong.framework.web.service.TokenService
;
import
com.zehong.system.domain.TDetectorUserCount
;
import
com.zehong.system.domain.vo.GasUserAndSafetyDeviceVo
;
import
com.zehong.system.domain.vo.TDetectorUserInspectVo
;
import
org.aspectj.weaver.loadtime.Aj
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -177,6 +179,21 @@ public class TDetectorUserController extends BaseController
return
toAjax
(
tDetectorUserService
.
insertTDetectorUser
(
tDetectorUser
));
}
/**
* 新增燃气用户和安全装置
*/
@PostMapping
(
"/addUserAndSafetyDevice"
)
public
AjaxResult
addUserAndSafetyDevice
(
@RequestBody
GasUserAndSafetyDeviceVo
gasUserAndSafetyDeviceVo
)
{
return
toAjax
(
tDetectorUserService
.
addUserAndSafetyDevice
(
gasUserAndSafetyDeviceVo
));
}
/**
* 修改燃气用户和安全装置
*/
@PostMapping
(
"/updateUserAndSafetyDevice"
)
public
AjaxResult
updateUserAndSafetyDevice
(
@RequestBody
GasUserAndSafetyDeviceVo
gasUserAndSafetyDeviceVo
)
{
return
toAjax
(
tDetectorUserService
.
updateUserAndSafetyDevice
(
gasUserAndSafetyDeviceVo
));
}
/**
* 修改燃气用户
*/
...
...
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supervise/TGasuserSafetyDeviceInfoController.java
View file @
cea890c8
...
...
@@ -2,6 +2,7 @@ package com.zehong.web.controller.supervise;
import
java.util.List
;
import
com.zehong.system.domain.TDetailInfoList
;
import
com.zehong.system.domain.TDeviceInfoS
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -124,4 +125,15 @@ public class TGasuserSafetyDeviceInfoController extends BaseController
public
void
deleteSafetyDeviceInfo
(
@RequestBody
Long
safetyDetailId
){
tGasuserSafetyDeviceInfoService
.
deleteSafetyDeviceInfo
(
safetyDetailId
);
}
/**
* 根据 燃气用户id 查询集合数据
* @param userId i
*/
@GetMapping
(
"/selectSafetyDeviceDetailInfoList/{userId}"
)
public
AjaxResult
selectSafetyDeviceDetailInfoList
(
@PathVariable
(
"userId"
)
Long
userId
){
return
AjaxResult
.
success
(
tGasuserSafetyDeviceInfoService
.
selectSafetyDeviceDetailInfoList
(
userId
));
}
}
zh-baseversion-system/src/main/java/com/zehong/system/domain/TGasuserSafetyDeviceInfo.java
View file @
cea890c8
...
...
@@ -51,8 +51,8 @@ public class TGasuserSafetyDeviceInfo extends BaseEntity
/** 安装位置 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"安装位置"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
deviceInstallPosition
;
@Excel
(
name
=
"安装位置"
)
private
String
deviceInstallPosition
;
/** 负责人 */
@Excel
(
name
=
"负责人"
)
...
...
@@ -138,12 +138,12 @@ public class TGasuserSafetyDeviceInfo extends BaseEntity
{
return
deviceInstallTime
;
}
public
void
setDeviceInstallPosition
(
Date
deviceInstallPosition
)
public
void
setDeviceInstallPosition
(
String
deviceInstallPosition
)
{
this
.
deviceInstallPosition
=
deviceInstallPosition
;
}
public
Date
getDeviceInstallPosition
()
public
String
getDeviceInstallPosition
()
{
return
deviceInstallPosition
;
}
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/vo/GasUserAndSafetyDeviceVo.java
0 → 100644
View file @
cea890c8
package
com
.
zehong
.
system
.
domain
.
vo
;
import
com.zehong.system.domain.TDetectorUser
;
import
com.zehong.system.domain.TGasuserSafetyDeviceInfo
;
import
java.util.List
;
public
class
GasUserAndSafetyDeviceVo
{
private
TDetectorUser
detectorUser
;
private
List
<
TGasuserSafetyDeviceInfo
>
gasuserSafetyDeviceInfoList
;
public
TDetectorUser
getDetectorUser
()
{
return
detectorUser
;
}
public
void
setDetectorUser
(
TDetectorUser
detectorUser
)
{
this
.
detectorUser
=
detectorUser
;
}
public
List
<
TGasuserSafetyDeviceInfo
>
getGasuserSafetyDeviceInfoList
()
{
return
gasuserSafetyDeviceInfoList
;
}
public
void
setGasuserSafetyDeviceInfoList
(
List
<
TGasuserSafetyDeviceInfo
>
gasuserSafetyDeviceInfoList
)
{
this
.
gasuserSafetyDeviceInfoList
=
gasuserSafetyDeviceInfoList
;
}
}
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TGasuserSafetyDeviceInfoMapper.java
View file @
cea890c8
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TGasuserSafetyDeviceInfo
;
import
org.apache.ibatis.annotations.Param
;
/**
* 用户管理-燃气用户-安全装置加装维护Mapper接口
...
...
@@ -74,4 +76,13 @@ public interface TGasuserSafetyDeviceInfoMapper
public
int
deleteSafetyDeviceListInfo
(
Long
[]
gasUserSafetyDeviceIds
);
public
int
deleteSafetyDeviceInfo
(
Long
deviceId
);
List
<
TGasuserSafetyDeviceInfo
>
selectSafetyDeviceDetailInfoList
(
Long
userId
);
/**
* 将关联设备信息与设备进行绑定
* @param gettDeviceInfoS
*/
void
updatetRelationSafetyDeviceInfo
(
@Param
(
"gettDeviceInfoS"
)
List
<
TGasuserSafetyDeviceInfo
>
gettDeviceInfoS
,
@Param
(
"id"
)
Long
id
);
}
zh-baseversion-system/src/main/java/com/zehong/system/service/ITDetectorUserService.java
View file @
cea890c8
...
...
@@ -5,6 +5,7 @@ import java.util.Map;
import
com.zehong.system.domain.TDetectorUser
;
import
com.zehong.system.domain.TDetectorUserCount
;
import
com.zehong.system.domain.vo.GasUserAndSafetyDeviceVo
;
import
com.zehong.system.domain.vo.TDetectorUserInspectVo
;
import
com.zehong.system.domain.vo.TDetectorUserVO
;
import
com.zehong.system.domain.vo.TMassMarksDetectorUserVO
;
...
...
@@ -103,6 +104,20 @@ public interface ITDetectorUserService
*/
public
int
insertTDetectorUser
(
TDetectorUser
tDetectorUser
);
/**
* 新增燃气用户和安全装置
* @param gasUserAndSafetyDeviceVo gas
* @return r
*/
public
int
addUserAndSafetyDevice
(
GasUserAndSafetyDeviceVo
gasUserAndSafetyDeviceVo
);
/**
* 修改燃气用户和安全装置
* @param gasUserAndSafetyDeviceVo gas
* @return r
*/
public
int
updateUserAndSafetyDevice
(
GasUserAndSafetyDeviceVo
gasUserAndSafetyDeviceVo
);
/**
* 修改燃气用户
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/ITGasuserSafetyDeviceInfoService.java
View file @
cea890c8
...
...
@@ -68,10 +68,16 @@ public interface ITGasuserSafetyDeviceInfoService
/**
* 关联设备数据删除接口
* @param deviceId
s
* @param deviceId
*/
void
deleteSafetyDeviceInfo
(
Long
deviceId
);
/**
* 根据 燃气用户id 查询数据
* @param userId
* @return
*/
List
<
TGasuserSafetyDeviceInfo
>
selectSafetyDeviceDetailInfoList
(
Long
userId
);
/**
* 删除用户管理-燃气用户-安全装置加装维护信息
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TDetectorUserServiceImpl.java
View file @
cea890c8
...
...
@@ -8,9 +8,12 @@ import java.util.stream.Collectors;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.system.domain.TDetectorUserCount
;
import
com.zehong.system.domain.TGasuserSafetyDeviceInfo
;
import
com.zehong.system.domain.vo.GasUserAndSafetyDeviceVo
;
import
com.zehong.system.domain.vo.TDetectorUserInspectVo
;
import
com.zehong.system.domain.vo.TDetectorUserVO
;
import
com.zehong.system.mapper.TDeviceInfoMapper
;
import
com.zehong.system.mapper.TGasuserSafetyDeviceInfoMapper
;
import
com.zehong.system.mapper.TSiteStationInfoMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -19,6 +22,8 @@ import com.zehong.system.mapper.TDetectorUserMapper;
import
com.zehong.system.domain.TDetectorUser
;
import
com.zehong.system.service.ITDetectorUserService
;
import
javax.annotation.Resource
;
/**
* 燃气用户Service业务层处理
*
...
...
@@ -35,6 +40,8 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
@Autowired
private
TSiteStationInfoMapper
tSiteStationInfoMapper
;
@Resource
private
TGasuserSafetyDeviceInfoMapper
gasuserSafetyDeviceInfoMapper
;
/**
* 查询探测器用户列表
...
...
@@ -290,6 +297,45 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
return
tDetectorUserMapper
.
insertTDetectorUser
(
tDetectorUser
);
}
/**
* 新增燃气用户 和 安全装置
* @param gasUserAndSafetyDeviceVo gas
* @return r
*/
@Override
public
int
addUserAndSafetyDevice
(
GasUserAndSafetyDeviceVo
gasUserAndSafetyDeviceVo
)
{
TDetectorUser
detectorUser
=
gasUserAndSafetyDeviceVo
.
getDetectorUser
();
tDetectorUserMapper
.
insertTDetectorUser
(
detectorUser
);
List
<
TGasuserSafetyDeviceInfo
>
gasuserSafetyDeviceInfoList
=
gasUserAndSafetyDeviceVo
.
getGasuserSafetyDeviceInfoList
();
if
(
gasuserSafetyDeviceInfoList
!=
null
&&
gasuserSafetyDeviceInfoList
.
size
()
>
0
)
{
for
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
:
gasuserSafetyDeviceInfoList
)
{
tGasuserSafetyDeviceInfo
.
setRelationGasuserId
(
detectorUser
.
getUserId
());
}
gasuserSafetyDeviceInfoMapper
.
updatetRelationSafetyDeviceInfo
(
gasuserSafetyDeviceInfoList
,
detectorUser
.
getUserId
());
}
return
1
;
}
/**
* 修改燃气用户 和 安全装置
* @param gasUserAndSafetyDeviceVo gas
* @return r
*/
@Override
public
int
updateUserAndSafetyDevice
(
GasUserAndSafetyDeviceVo
gasUserAndSafetyDeviceVo
)
{
TDetectorUser
detectorUser
=
gasUserAndSafetyDeviceVo
.
getDetectorUser
();
List
<
TGasuserSafetyDeviceInfo
>
gasuserSafetyDeviceInfoList
=
gasUserAndSafetyDeviceVo
.
getGasuserSafetyDeviceInfoList
();
if
(
gasuserSafetyDeviceInfoList
!=
null
&&
gasuserSafetyDeviceInfoList
.
size
()
>
0
)
{
for
(
TGasuserSafetyDeviceInfo
tGasuserSafetyDeviceInfo
:
gasuserSafetyDeviceInfoList
)
{
tGasuserSafetyDeviceInfo
.
setRelationGasuserId
(
detectorUser
.
getUserId
());
}
gasuserSafetyDeviceInfoMapper
.
updatetRelationSafetyDeviceInfo
(
gasuserSafetyDeviceInfoList
,
detectorUser
.
getUserId
());
}
return
1
;
}
/**
* 修改燃气用户
*
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TGasuserSafetyDeviceInfoServiceImpl.java
View file @
cea890c8
...
...
@@ -109,6 +109,16 @@ public class TGasuserSafetyDeviceInfoServiceImpl implements ITGasuserSafetyDevic
tGasuserSafetyDeviceInfoMapper
.
deleteSafetyDeviceInfo
(
deviceId
);
}
/**
* 根据燃气用户id查询数据
* @param userId u
* @return r
*/
@Override
public
List
<
TGasuserSafetyDeviceInfo
>
selectSafetyDeviceDetailInfoList
(
Long
userId
)
{
return
tGasuserSafetyDeviceInfoMapper
.
selectSafetyDeviceDetailInfoList
(
userId
);
}
/**
* 删除用户管理-燃气用户-安全装置加装维护信息
*
...
...
zh-baseversion-system/src/main/resources/mapper/system/TGasuserSafetyDeviceInfoMapper.xml
View file @
cea890c8
...
...
@@ -130,4 +130,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update
id=
"deleteSafetyDeviceInfo"
>
update t_gasuser_safety_device_info set is_del='1' where f_gasUser_safety_device_id = #{deviceId}
</update>
<select
id=
"selectSafetyDeviceDetailInfoList"
resultMap=
"TGasuserSafetyDeviceInfoResult"
parameterType=
"Long"
>
<include
refid=
"selectTGasuserSafetyDeviceInfoVo"
/>
where f_relation_gasUser_id = #{userId} and is_del='0'
</select>
<!--将关联设备信息与设备进行绑定-->
<update
id=
"updatetRelationSafetyDeviceInfo"
parameterType=
"java.util.List"
>
update t_gasuser_safety_device_info set f_relation_gasUser_id = #{id}
where
f_gasUser_safety_device_id in
<foreach
collection=
"gettDeviceInfoS"
item=
"items"
index=
"key"
open=
"("
separator=
","
close=
")"
>
#{items.gasUserSafetyDeviceId}
</foreach>
</update>
</mapper>
\ No newline at end of file
zh-baseversion-web/src/api/regulation/user.js
View file @
cea890c8
...
...
@@ -87,7 +87,7 @@ export function addSafetyDetailInfo(data) {
// 关联安装加装装置 批量删除
export
function
deleteSafetyDeviceListInfo
(
data
)
{
return
request
({
url
:
'/gasUserSafetyDevice/deleteSafetyDeviceListInfo'
,
url
:
'/gasUserSafetyDevice/
info/
deleteSafetyDeviceListInfo'
,
method
:
'post'
,
data
:
data
})
...
...
@@ -96,8 +96,36 @@ export function deleteSafetyDeviceListInfo(data) {
// 删除关联设备信息
export
function
deleteSafetyDeviceInfo
(
deviceId
)
{
return
request
({
url
:
'/gasUserSafetyDevice/deleteSafetyDeviceInfo'
,
url
:
'/gasUserSafetyDevice/
info/
deleteSafetyDeviceInfo'
,
method
:
'delete'
,
data
:
deviceId
})
}
// 根据燃气用户id 查询 关联 安全装置加装
export
function
selectSafetyDeviceDetailInfo
(
userId
)
{
return
request
({
url
:
'/gasUserSafetyDevice/info/selectSafetyDeviceDetailInfoList/'
+
userId
,
method
:
'get'
})
}
// 新增燃气用户-包含安全装置
export
function
addUserAndSafetyDevice
(
data
)
{
return
request
({
url
:
'/supervise/user/addUserAndSafetyDevice'
,
method
:
'post'
,
data
:
data
})
}
// 修改燃气用户-包含安全装置
export
function
updateUserAndSafetyDevice
(
data
)
{
return
request
({
url
:
'/supervise/user/updateUserAndSafetyDevice'
,
method
:
'post'
,
data
:
data
})
}
\ No newline at end of file
zh-baseversion-web/src/views/regulation/device/index.vue
View file @
cea890c8
...
...
@@ -1029,6 +1029,8 @@ export default {
const
deviceIds
=
this
.
ids
;
const
li
=
this
.
datalist
;
if
(
this
.
form
.
deviceId
!=
null
)
{
console
.
log
(
"this.DetailInfoList = "
+
this
.
DetailInfoList
);
console
.
log
(
"this.datalist = "
+
this
.
datalist
);
//修改
this
.
DetailInfoList
=
this
.
DetailInfoList
.
concat
(
this
.
datalist
)
//添加到数组中 以便下次使用
...
...
zh-baseversion-web/src/views/regulation/userManagement/gasUsers/index.vue
View file @
cea890c8
This diff is collapsed.
Click to expand it.
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