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
4610f2da
Commit
4610f2da
authored
Mar 16, 2022
by
wuqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022-3-16 吴卿华
parent
67ed2cf8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
TDeviceInfoController.java
...ehong/web/controller/supervise/TDeviceInfoController.java
+4
-2
TSiteStationInfoController.java
.../web/controller/supervise/TSiteStationInfoController.java
+2
-1
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/supervise/TDeviceInfoController.java
View file @
4610f2da
...
...
@@ -12,6 +12,7 @@ import com.zehong.system.service.ITDetectorInfoService;
import
com.zehong.system.service.ITDetectorUserService
;
import
com.zehong.system.service.ITEmployedPeopleInfoService
;
import
com.zehong.web.codeconfig.CodeConFig
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -90,11 +91,12 @@ public class TDeviceInfoController extends BaseController
{
//生成四位随机码
String
code
=
CodeConFig
.
RandomCode
();
listaw
.
gettDeviceInfo
().
setDeviceCode
(
code
);
String
intFlag
=
String
.
valueOf
((
int
)(
Math
.
random
()
*
1000000
));
listaw
.
gettDeviceInfo
().
setDeviceCode
(
intFlag
);
//添加设备信息表数据 并且返回新增id
tDeviceInfoService
.
insertTDeviceInfo
(
listaw
.
gettDeviceInfo
());
if
(
listaw
.
gettDeviceInfoS
()!=
null
){
if
(
CollectionUtils
.
isNotEmpty
(
listaw
.
gettDeviceInfoS
())
){
//将关联设备信息与设备进行绑定
tDeviceInfoService
.
updatetRelationDeviceDetailInfo
(
listaw
.
gettDeviceInfoS
(),
listaw
.
gettDeviceInfo
().
getDeviceId
(),
listaw
.
gettDeviceInfo
().
getRelationDeviceType
());
}
...
...
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/supervise/TSiteStationInfoController.java
View file @
4610f2da
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
com.zehong.system.domain.TTSiteStationInfoList
;
import
com.zehong.system.service.ITDeviceInfoService
;
import
com.zehong.system.service.ITEmployedPeopleInfoService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -88,7 +89,7 @@ public class TSiteStationInfoController extends BaseController {
String
EnterpriseName
=
tEmployedPeopleInfoService
.
selectEnterpriseName
(
tSiteStationInfos
.
gettDeviceInfo
().
getBeyondEnterpriseId
());
tSiteStationInfos
.
gettDeviceInfo
().
setBeyondEnterpriseName
(
EnterpriseName
);
tSiteStationInfoService
.
insertTSiteStationInfo
(
tSiteStationInfos
.
gettDeviceInfo
());
if
(
tSiteStationInfos
.
gettDeviceInfoS
()!=
null
){
if
(
CollectionUtils
.
isNotEmpty
(
tSiteStationInfos
.
gettDeviceInfoS
())
){
//将关联设备信息与设备进行绑定
tDeviceInfoService
.
updatetRelationDeviceDetailInfo
(
tSiteStationInfos
.
gettDeviceInfoS
(),
tSiteStationInfos
.
gettDeviceInfo
().
getSiteStationId
(),
tSiteStationInfos
.
gettDeviceInfo
().
getRelationDeviceType
());
}
...
...
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