Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
Overview
Overview
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
王衍超
cloud-fb
Commits
a5982574
Commit
a5982574
authored
Mar 26, 2021
by
高晓磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
摄像头关联摄像头账号表
parent
335254ea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
26 deletions
+37
-26
CameraInfoDaoImpl.java
...va/com/xyst/dinas/biz/internal/dao/CameraInfoDaoImpl.java
+10
-1
StationDaoImpl.java
.../java/com/xyst/dinas/biz/internal/dao/StationDaoImpl.java
+2
-1
CameraInfoController.java
...ain/java/com/xyst/dinas/biz/web/CameraInfoController.java
+4
-4
CameraInfo.jmx
...ain/resources/com/xyst/dinas/biz/datamodel/CameraInfo.jmx
+12
-10
CameraInfo.hbm.xml
...st.dinas.biz/src/main/resources/config/CameraInfo.hbm.xml
+9
-10
No files found.
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/internal/dao/CameraInfoDaoImpl.java
View file @
a5982574
...
...
@@ -2,6 +2,7 @@ package com.xyst.dinas.biz.internal.dao;
import
com.beecode.amino.core.Amino
;
import
com.beecode.bap.attachment.common.Page
;
import
com.beecode.bap.org.BapOrgConstants
;
import
com.beecode.bcp.core.context.AminoContextHolder
;
import
com.beecode.bcp.type.KClass
;
import
com.beecode.bcp.type.KObject
;
...
...
@@ -56,7 +57,7 @@ public class CameraInfoDaoImpl extends AbstractBaseDao implements CameraInfoDao,
detachedCriteria
.
add
(
Restrictions
.
eq
(
"del"
,
false
));
detachedCriteria
.
add
(
Restrictions
.
eq
(
"regionalCompany.id"
,
currentLoginRegionalCompany
.
getUuid
(
"id"
)));
if
(
null
!=
stationId
){
detachedCriteria
.
add
(
Restrictions
.
eq
(
"
stationI
d"
,
stationId
));
detachedCriteria
.
add
(
Restrictions
.
eq
(
"
regionalStation.i
d"
,
stationId
));
}
if
(
null
!=
watershedId
){
detachedCriteria
.
add
(
Restrictions
.
eq
(
"watershedId"
,
watershedId
));
...
...
@@ -89,6 +90,10 @@ public class CameraInfoDaoImpl extends AbstractBaseDao implements CameraInfoDao,
kobject
.
set
(
"creator"
,
id
.
get
(
"creator"
));
kobject
.
set
(
"createTime"
,
id
.
getDate
(
"createTime"
));
kobject
.
set
(
"regionalCompany"
,
currentLoginRegionalCompany
);
Object
cameraAccount
=
template
.
load
(
"com.xyst.dinas.biz.dict.datamodel.CameraAccount"
,
kobject
.
get
(
"cameraAccount"
).
getUuid
(
"id"
));
Object
regionalStation
=
template
.
load
(
"com.xyst.dinas.biz.datamodel.Station"
,
kobject
.
get
(
"regionalStation"
).
getUuid
(
"id"
));
kobject
.
set
(
"cameraAccount"
,
cameraAccount
);
kobject
.
set
(
"regionalStation"
,
regionalStation
);
KObject
staff
=
AminoContextHolder
.
getContext
().
getStaff
();
kobject
.
set
(
"modifyTime"
,
new
Date
());
kobject
.
set
(
"modifier"
,
staff
);
...
...
@@ -102,6 +107,10 @@ public class CameraInfoDaoImpl extends AbstractBaseDao implements CameraInfoDao,
public
UUID
create
(
KObject
object
,
KObject
regionalCompany
)
{
KObject
staff
=
AminoContextHolder
.
getContext
().
getStaff
();
object
.
set
(
"id"
,
UUID
.
randomUUID
());
Object
cameraAccount
=
template
.
load
(
"com.xyst.dinas.biz.dict.datamodel.CameraAccount"
,
object
.
get
(
"cameraAccount"
).
getUuid
(
"id"
));
Object
regionalStation
=
template
.
load
(
"com.xyst.dinas.biz.datamodel.Station"
,
object
.
get
(
"regionalStation"
).
getUuid
(
"id"
));
object
.
set
(
"cameraAccount"
,
cameraAccount
);
object
.
set
(
"regionalStation"
,
regionalStation
);
object
.
set
(
"creator"
,
staff
);
object
.
set
(
"createTime"
,
new
Date
());
object
.
set
(
"del"
,
false
);
...
...
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/internal/dao/StationDaoImpl.java
View file @
a5982574
...
...
@@ -9,7 +9,6 @@ import com.beecode.inz.basis.internal.dao.AbstractBaseDao;
import
com.xyst.dinas.biz.constant.StationConstant
;
import
com.xyst.dinas.biz.dao.DinasTypeDao
;
import
com.xyst.dinas.biz.dao.StationDao
;
import
com.xyst.dinas.biz.service.CameraInfoService
;
import
org.hibernate.criterion.DetachedCriteria
;
import
org.hibernate.criterion.Restrictions
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -42,6 +41,8 @@ public class StationDaoImpl extends AbstractBaseDao implements StationDao, Stat
if
(
null
!=
stationStatus
){
detachedCriteria
.
add
(
Restrictions
.
eq
(
"stationStatus"
,
stationStatus
));
}
KObject
currentLoginRegionalCompany
=
dinasTypeDao
.
getCurrentLoginRegionalCompany
();
detachedCriteria
.
add
(
Restrictions
.
eq
(
"regionalCompany.id"
,
currentLoginRegionalCompany
.
getUuid
(
"id"
)));
int
offset
=
page
.
getPageSize
()
*
(
page
.
getPageNo
()
-
1
);
List
<
KObject
>
list
=
(
List
<
KObject
>)
template
.
findByCriteria
(
detachedCriteria
,
offset
,
page
.
getPageSize
());
page
.
setDatas
(
list
);
...
...
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/web/CameraInfoController.java
View file @
a5982574
...
...
@@ -63,13 +63,13 @@ public class CameraInfoController {
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()!=
1
&&
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()!=
0
){
return
ResponseObj
.
error
(
400
,
"所属对象不正确"
);
}
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()==
0
&&
null
==
kobject
.
get
Uuid
(
"stationI
d"
)){
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()==
0
&&
null
==
kobject
.
get
(
"regionalStation"
).
get
(
"i
d"
)){
return
ResponseObj
.
error
(
400
,
"请选择具体的场站"
);
}
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()==
1
&&
null
==
kobject
.
getUuid
(
"watershedId"
)){
return
ResponseObj
.
error
(
400
,
"请选择具体的流域"
);
}
if
(
null
==
kobject
.
get
Uuid
(
"cameraAccountI
d"
)){
if
(
null
==
kobject
.
get
(
"cameraAccount"
).
get
(
"i
d"
)){
return
ResponseObj
.
error
(
400
,
"请选择集成账号"
);
}
...
...
@@ -103,13 +103,13 @@ public class CameraInfoController {
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()!=
1
&&
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()!=
0
){
return
ResponseObj
.
error
(
400
,
"所属对象不正确"
);
}
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()==
0
&&
null
==
kobject
.
get
Uuid
(
"stationI
d"
)){
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()==
0
&&
null
==
kobject
.
get
(
"regionalStation"
).
get
(
"i
d"
)){
return
ResponseObj
.
error
(
400
,
"请选择具体的场站"
);
}
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()==
1
&&
null
==
kobject
.
getUuid
(
"watershedId"
)){
return
ResponseObj
.
error
(
400
,
"请选择具体的流域"
);
}
if
(
null
==
kobject
.
get
Uuid
(
"cameraAccountI
d"
)){
if
(
null
==
kobject
.
get
(
"cameraAccount"
).
get
(
"i
d"
)){
return
ResponseObj
.
error
(
400
,
"请选择集成账号"
);
}
...
...
backend/xyst.dinas.biz/src/main/resources/com/xyst/dinas/biz/datamodel/CameraInfo.jmx
View file @
a5982574
...
...
@@ -12,6 +12,8 @@
<dependency>
com.beecode.bap.staff.datamodel.Staff
</dependency>
<dependency>
com.beecode.inz.common.datamodel.BaseInfo
</dependency>
<dependency>
com.xyst.dinas.biz.datamodel.Organization
</dependency>
<dependency>
com.xyst.dinas.biz.datamodel.Station
</dependency>
<dependency>
com.xyst.dinas.biz.dict.datamodel.CameraAccount
</dependency>
<dependency>
com.beecode.bap.biztrait.datamodel.BasicBillRequirement
</dependency>
<content>
<m:class>
...
...
@@ -89,7 +91,7 @@
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>
ba9964ac-661e-4816-92f6-2b8bfa70b2df
</m:id>
<m:id>
961b9837-a995-4b4e-8790-2c1a9a2e0ade
</m:id>
<m:name>
isShare
</m:name>
<m:title>
是否分享
</m:title>
<m:type>
boolean
</m:type>
...
...
@@ -102,7 +104,7 @@
<m:type>
bcp.type.constraint.NotNull
</m:type>
</m:annotation>
</m:annotations>
<m:id>
ba9964ac-661e-4816-92f6-2b8bfa70b2df
</m:id>
<m:id>
90b731ef-36e8-45d0-a6a1-bd5d5e9a7e6e
</m:id>
<m:name>
cameraObject
</m:name>
<m:title>
摄像头所属对象
</m:title>
<m:type>
int
</m:type>
...
...
@@ -133,7 +135,7 @@
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>
650ad03e-87d2-11eb-b258-54ee750ba9b2
</m:id>
<m:id>
79474200-7fb2-4e1d-8d36-677bd744c8fb
</m:id>
<m:name>
watershedId
</m:name>
<m:title>
所属流域id
</m:title>
<m:type>
uuid
</m:type>
...
...
@@ -142,10 +144,10 @@
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>
650ad03e-87d2-11eb-b258-54ee750ba9b2
</m:id>
<m:name>
stationId
</m:name>
<m:title>
所属场站
id
</m:title>
<m:type>
uuid
</m:type>
<m:id>
5c95fede-c97e-4047-ab7d-3b2d7f20e524
</m:id>
<m:name>
regionalStation
</m:name>
<m:title>
所属场站
</m:title>
<m:type>
com.xyst.dinas.biz.datamodel.Station
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
...
...
@@ -156,9 +158,9 @@
</m:annotation>
</m:annotations>
<m:id>
0a0bf871-7f98-4fe8-b91e-6813e9794264
</m:id>
<m:name>
cameraAccount
Id
</m:name>
<m:title>
摄像头账号
id
</m:title>
<m:type>
uuid
</m:type>
<m:name>
cameraAccount
</m:name>
<m:title>
摄像头账号
</m:title>
<m:type>
com.xyst.dinas.biz.dict.datamodel.CameraAccount
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
...
...
backend/xyst.dinas.biz/src/main/resources/config/CameraInfo.hbm.xml
View file @
a5982574
...
...
@@ -42,7 +42,7 @@
</property>
<many-to-one
name=
"regionalCompany"
entity-name=
"com.xyst.dinas.biz.datamodel.Organization"
fetch=
"select"
>
<column
name=
"regional_company"
not-null=
"
fals
e"
>
<column
name=
"regional_company"
not-null=
"
tru
e"
>
<comment>
所属组织机构
</comment>
</column>
</many-to-one>
...
...
@@ -108,17 +108,16 @@
</column>
</property>
<
property
name=
"stationId"
type=
"uuid-binary"
not-null=
"false
"
>
<column
name=
"
station_id"
length=
"16"
>
<comment>
场站id
</comment>
<
many-to-one
name=
"regionalStation"
entity-name=
"com.xyst.dinas.biz.datamodel.Station"
fetch=
"select
"
>
<column
name=
"
regional_station"
not-null=
"false"
>
<comment>
所属场站
</comment>
</column>
</property>
<property
name=
"cameraAccountId"
type=
"uuid-binary"
not-null=
"false"
>
<column
name=
"camera_account_id"
length=
"16"
>
<comment>
摄像头账号id
</comment>
</many-to-one>
<many-to-one
name=
"cameraAccount"
entity-name=
"com.xyst.dinas.biz.dict.datamodel.CameraAccount"
fetch=
"select"
>
<column
name=
"camera_account"
not-null=
"true"
>
<comment>
摄像头账号
</comment>
</column>
</
property
>
</
many-to-one
>
<property
name=
"cameraModel"
type=
"nstring"
not-null=
"false"
>
<column
name=
"camera_model"
length=
"300"
>
...
...
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