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
28295f83
Commit
28295f83
authored
Mar 23, 2021
by
高晓磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
摄像头管理增删改查提交
parent
e1eeb4e1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
906 additions
and
5 deletions
+906
-5
CameraConfiguration.java
...n/java/com/xyst/dinas/biz/config/CameraConfiguration.java
+57
-0
CameraInfoConstant.java
.../java/com/xyst/dinas/biz/constant/CameraInfoConstant.java
+21
-0
CameraInfoDao.java
...z/src/main/java/com/xyst/dinas/biz/dao/CameraInfoDao.java
+23
-0
CameraInfoDaoImpl.java
...va/com/xyst/dinas/biz/internal/dao/CameraInfoDaoImpl.java
+121
-0
CameraInfoServiceImpl.java
...yst/dinas/biz/internal/service/CameraInfoServiceImpl.java
+56
-0
CameraInfoService.java
...in/java/com/xyst/dinas/biz/service/CameraInfoService.java
+21
-0
CameraInfoController.java
...ain/java/com/xyst/dinas/biz/web/CameraInfoController.java
+170
-0
DinasTypeController.java
...main/java/com/xyst/dinas/biz/web/DinasTypeController.java
+2
-2
spring.factories
...st.dinas.biz/src/main/resources/META-INF/spring.factories
+3
-2
CameraInfo.jmx
...ain/resources/com/xyst/dinas/biz/datamodel/CameraInfo.jmx
+277
-0
CameraInfo.hbm.xml
...st.dinas.biz/src/main/resources/config/CameraInfo.hbm.xml
+154
-0
DinasType.hbm.xml
...yst.dinas.biz/src/main/resources/config/DinasType.hbm.xml
+1
-1
No files found.
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/config/CameraConfiguration.java
0 → 100644
View file @
28295f83
package
com
.
xyst
.
dinas
.
biz
.
config
;
import
com.beecode.amino.metadata.runtime.MetadataMech
;
import
com.beecode.bcp.type.KClass
;
import
com.beecode.bcp.type.TypeConstants
;
import
com.xyst.dinas.biz.constant.CameraInfoConstant
;
import
com.xyst.dinas.biz.constant.StationConstant
;
import
com.xyst.dinas.biz.dao.CameraInfoDao
;
import
com.xyst.dinas.biz.dao.PositionDao
;
import
com.xyst.dinas.biz.internal.StationInfoQueryProcessor
;
import
com.xyst.dinas.biz.internal.dao.CameraInfoDaoImpl
;
import
com.xyst.dinas.biz.internal.dao.DinasTypeDaoImpl
;
import
com.xyst.dinas.biz.internal.dao.PositionDaoImpl
;
import
com.xyst.dinas.biz.internal.dao.StationDaoImpl
;
import
com.xyst.dinas.biz.internal.service.CameraInfoServiceImpl
;
import
com.xyst.dinas.biz.internal.service.DinasTypeServiceImpl
;
import
com.xyst.dinas.biz.internal.service.PositionServiceImpl
;
import
com.xyst.dinas.biz.internal.service.StationServiceImpl
;
import
com.xyst.dinas.biz.service.CameraInfoService
;
import
com.xyst.dinas.biz.service.PositionService
;
import
com.xyst.dinas.biz.web.CameraInfoController
;
import
com.xyst.dinas.biz.web.DinasTypeController
;
import
com.xyst.dinas.biz.web.PositionController
;
import
com.xyst.dinas.biz.web.StationController
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.core.io.ClassPathResource
;
public
class
CameraConfiguration
{
@Autowired
@Qualifier
(
TypeConstants
.
CLASS_MECH
)
private
MetadataMech
<
KClass
>
typeMech
;
//DinasTypeDaoImpl相关bean配置
@Bean
public
CameraInfoDao
cameraInfotDao
()
{
return
new
CameraInfoDaoImpl
();
}
@Bean
public
CameraInfoService
cameraInfoService
(){
return
new
CameraInfoServiceImpl
();
}
@Bean
public
CameraInfoController
cameraInfoController
(){
return
new
CameraInfoController
();
}
@Bean
(
CameraInfoConstant
.
ENTITY
)
public
KClass
stationInfoEntity
()
{
return
typeMech
.
createStaticBeanByResource
(
new
ClassPathResource
(
"/com/xyst/dinas/biz/datamodel/CameraInfo.jmx"
,
KClass
.
class
));
}
}
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/constant/CameraInfoConstant.java
0 → 100644
View file @
28295f83
package
com
.
xyst
.
dinas
.
biz
.
constant
;
public
interface
CameraInfoConstant
{
/**
* 业务类型名称
*/
String
BIZ_TYPE
=
"CameraInfo"
;
/**
* 业务类型标题
*/
String
BIZ_TITLE
=
"摄像头信息"
;
/**
* 实体名
*/
String
ENTITY
=
"com.xyst.dinas.biz.datamodel.CameraInfo"
;
}
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/dao/CameraInfoDao.java
0 → 100644
View file @
28295f83
package
com
.
xyst
.
dinas
.
biz
.
dao
;
import
com.beecode.bap.attachment.common.Page
;
import
com.beecode.bcp.type.KObject
;
import
com.beecode.inz.basis.dao.BaseDao
;
import
java.util.List
;
import
java.util.UUID
;
public
interface
CameraInfoDao
extends
BaseDao
{
KObject
load
(
UUID
id
);
Page
<
KObject
>
listCameraInfoPaging
(
Page
<
KObject
>
page
,
UUID
stationId
,
UUID
watershedId
,
String
cameraName
);
UUID
create
(
KObject
kObject
);
void
deleteById
(
UUID
id
);
List
<
KObject
>
getByName
(
String
name
,
UUID
id
);
void
modify
(
KObject
kobject
);
}
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/internal/dao/CameraInfoDaoImpl.java
0 → 100644
View file @
28295f83
package
com
.
xyst
.
dinas
.
biz
.
internal
.
dao
;
import
com.beecode.amino.core.Amino
;
import
com.beecode.bap.attachment.common.Page
;
import
com.beecode.bcp.core.context.AminoContextHolder
;
import
com.beecode.bcp.type.KClass
;
import
com.beecode.bcp.type.KObject
;
import
com.beecode.inz.basis.internal.dao.AbstractBaseDao
;
import
com.xyst.dinas.biz.constant.CameraInfoConstant
;
import
com.xyst.dinas.biz.dao.CameraInfoDao
;
import
org.hibernate.criterion.DetachedCriteria
;
import
org.hibernate.criterion.Restrictions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.orm.hibernate5.HibernateTemplate
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.UUID
;
public
class
CameraInfoDaoImpl
extends
AbstractBaseDao
implements
CameraInfoDao
,
CameraInfoConstant
{
@Autowired
private
HibernateTemplate
template
;
/**
* 抽象方法,需要实现类提供HibernateTemplate
*
* @return
*/
@Override
protected
HibernateTemplate
getHibernateTemplate
()
{
return
template
;
}
/**
* 抽象方法,需要实现类提供当前ModelName
*
* @return
*/
@Override
protected
String
getModelName
()
{
return
null
;
}
@Override
public
KObject
load
(
UUID
id
)
{
return
(
KObject
)
template
.
load
(
ENTITY
,
id
);
}
@Override
public
Page
<
KObject
>
listCameraInfoPaging
(
Page
<
KObject
>
page
,
UUID
stationId
,
UUID
watershedId
,
String
cameraName
)
{
KClass
bean
=
Amino
.
getStaticMetadataContext
().
getBean
(
ENTITY
,
KClass
.
class
);
DetachedCriteria
detachedCriteria
=
DetachedCriteria
.
forEntityName
(
bean
.
getName
());
detachedCriteria
.
add
(
Restrictions
.
eq
(
"del"
,
false
));
if
(
null
!=
stationId
){
detachedCriteria
.
add
(
Restrictions
.
eq
(
"stationId"
,
stationId
));
}
if
(
null
!=
watershedId
){
detachedCriteria
.
add
(
Restrictions
.
eq
(
"watershedId"
,
watershedId
));
}
detachedCriteria
.
add
(
Restrictions
.
like
(
"cameraName"
,
"%"
+
cameraName
+
"%"
));
int
offset
=
page
.
getPageSize
()
*
(
page
.
getPageNo
()
-
1
);
List
<
KObject
>
list
=
(
List
<
KObject
>)
template
.
findByCriteria
(
detachedCriteria
,
offset
,
page
.
getPageSize
());
page
.
setDatas
(
list
);
page
.
setTotal
(
template
.
findByCriteria
(
detachedCriteria
).
size
());
return
page
;
}
@Override
public
List
<
KObject
>
getByName
(
String
name
,
UUID
id
)
{
KClass
bean
=
Amino
.
getStaticMetadataContext
().
getBean
(
ENTITY
,
KClass
.
class
);
DetachedCriteria
detachedCriteria
=
DetachedCriteria
.
forEntityName
(
bean
.
getName
());
detachedCriteria
.
add
(
Restrictions
.
eq
(
"del"
,
false
));
detachedCriteria
.
add
(
Restrictions
.
eq
(
"cameraName"
,
name
));
if
(
id
!=
null
)
{
detachedCriteria
.
add
(
Restrictions
.
ne
(
"id"
,
id
));
}
return
(
List
<
KObject
>)
template
.
findByCriteria
(
detachedCriteria
);
}
@Override
public
void
modify
(
KObject
kobject
)
{
KObject
id
=
load
(
kobject
.
getUuid
(
"id"
));
kobject
.
set
(
"creator"
,
id
.
get
(
"creator"
));
kobject
.
set
(
"createTime"
,
id
.
getDate
(
"createTime"
));
KObject
staff
=
AminoContextHolder
.
getContext
().
getStaff
();
kobject
.
set
(
"modifyTime"
,
new
Date
());
kobject
.
set
(
"modifier"
,
staff
.
getUuid
(
"id"
));
kobject
.
set
(
"del"
,
true
);
template
.
merge
(
kobject
);
}
@Override
public
UUID
create
(
KObject
kObject
)
{
KObject
staff
=
AminoContextHolder
.
getContext
().
getStaff
();
kObject
.
set
(
"department"
,
staff
.
get
(
"department"
));
kObject
.
set
(
"id"
,
UUID
.
randomUUID
());
kObject
.
set
(
"creator"
,
staff
);
kObject
.
set
(
"createTime"
,
new
Date
());
kObject
.
set
(
"del"
,
false
);
kObject
.
validate
();
return
((
UUID
)
template
.
save
(
kObject
));
}
@Override
public
void
deleteById
(
UUID
id
)
{
KObject
staff
=
AminoContextHolder
.
getContext
().
getStaff
();
KObject
kobject
=
(
KObject
)
template
.
load
(
ENTITY
,
id
);
kobject
.
set
(
"modifyTime"
,
new
Date
());
kobject
.
set
(
"modifier"
,
staff
);
kobject
.
set
(
"del"
,
true
);
template
.
update
(
kobject
);
}
}
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/internal/service/CameraInfoServiceImpl.java
0 → 100644
View file @
28295f83
package
com
.
xyst
.
dinas
.
biz
.
internal
.
service
;
import
com.beecode.bap.attachment.common.Page
;
import
com.beecode.bcp.type.KObject
;
import
com.xyst.dinas.biz.dao.CameraInfoDao
;
import
com.xyst.dinas.biz.service.CameraInfoService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.UUID
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
class
CameraInfoServiceImpl
implements
CameraInfoService
{
@Autowired
private
CameraInfoDao
cameraInfoDao
;
@Override
public
Page
<
KObject
>
queryByPaging
(
Page
<
KObject
>
page
,
UUID
stationId
,
UUID
watershedId
,
String
cameraName
)
throws
Exception
{
if
(
page
.
getPageNo
()==
0
||
page
.
getPageSize
()==
0
)
{
throw
new
Exception
(
"pageSize or offset is null"
);
}
return
cameraInfoDao
.
listCameraInfoPaging
(
page
,
stationId
,
watershedId
,
cameraName
);
}
@Override
public
UUID
addCamera
(
KObject
kObject
)
{
return
cameraInfoDao
.
create
(
kObject
);
}
@Override
public
KObject
getById
(
UUID
id
)
{
return
cameraInfoDao
.
load
(
id
);
}
@Override
public
KObject
getByName
(
String
name
,
UUID
id
)
{
List
<
KObject
>
kObjects
=
cameraInfoDao
.
getByName
(
name
,
id
);
if
(
CollectionUtils
.
isEmpty
(
kObjects
)){
return
null
;
}
return
kObjects
.
get
(
0
);
}
@Override
public
void
update
(
KObject
kobject
)
{
cameraInfoDao
.
modify
(
kobject
);
}
@Override
public
void
deleteById
(
UUID
id
)
{
cameraInfoDao
.
deleteById
(
id
);
}
}
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/service/CameraInfoService.java
0 → 100644
View file @
28295f83
package
com
.
xyst
.
dinas
.
biz
.
service
;
import
com.beecode.bap.attachment.common.Page
;
import
com.beecode.bcp.type.KObject
;
import
java.util.UUID
;
public
interface
CameraInfoService
{
Page
<
KObject
>
queryByPaging
(
Page
<
KObject
>
page
,
UUID
stationId
,
UUID
watershedId
,
String
cameraName
)
throws
Exception
;
UUID
addCamera
(
KObject
kObject
);
KObject
getById
(
UUID
id
);
KObject
getByName
(
String
name
,
UUID
id
);
void
update
(
KObject
kobject
);
void
deleteById
(
UUID
id
);
}
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/web/CameraInfoController.java
0 → 100644
View file @
28295f83
package
com
.
xyst
.
dinas
.
biz
.
web
;
import
com.beecode.amino.core.Amino
;
import
com.beecode.bap.attachment.common.Page
;
import
com.beecode.bcp.type.KClass
;
import
com.beecode.bcp.type.KObject
;
import
com.beecode.bcp.type.json.JSONObjectUtils
;
import
com.beecode.inz.basis.team.pojo.ResponseObj
;
import
com.beecode.nlib.utils.StringUtils
;
import
com.xyst.dinas.biz.constant.CameraInfoConstant
;
import
com.xyst.dinas.biz.constant.DinasTypeConstant
;
import
com.xyst.dinas.biz.service.CameraInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.UUID
;
@RestController
()
@RequestMapping
(
value
=
"/biz/cameraInfo"
)
public
class
CameraInfoController
{
@Autowired
private
CameraInfoService
cameraInfoService
;
@RequestMapping
(
value
=
"list/page"
,
method
=
RequestMethod
.
GET
)
public
ResponseObj
getDinasTypeList
(
@RequestParam
(
name
=
"pageNo"
,
required
=
false
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
required
=
false
)
Integer
pageSize
,
@RequestParam
(
name
=
"stationId"
,
required
=
false
)
UUID
stationId
,
@RequestParam
(
name
=
"watershedId"
,
required
=
false
)
UUID
watershedId
,
@RequestParam
(
name
=
"cameraName"
,
required
=
false
)
String
cameraName
)
throws
Exception
{
Page
<
KObject
>
objectPage
=
new
Page
<>();
objectPage
.
setPageNo
(
pageNo
);
objectPage
.
setPageSize
(
pageSize
);
return
ResponseObj
.
success
(
"操作成功"
,
cameraInfoService
.
queryByPaging
(
objectPage
,
stationId
,
watershedId
,
cameraName
));
}
/**
* 新建摄像头
* @param body
* @return ResponseObj
*/
@PostMapping
public
ResponseObj
create
(
@RequestBody
String
body
){
KObject
kobject
=
JSONObjectUtils
.
toObject
(
body
,
Amino
.
getApplicationMetadataContext
().
getBean
(
CameraInfoConstant
.
ENTITY
,
KClass
.
class
));
if
(
StringUtils
.
isEmpty
(
kobject
.
getString
(
"cameraName"
))){
return
ResponseObj
.
error
(
400
,
"摄像头名称不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
kobject
.
getString
(
"brand"
))){
return
ResponseObj
.
error
(
400
,
"摄像头品牌不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
kobject
.
getString
(
"deviceSerial"
))){
return
ResponseObj
.
error
(
400
,
"设备序列号不能为空"
);
}
if
(
null
==
kobject
.
getBigInteger
(
"cameraObject"
)){
return
ResponseObj
.
error
(
400
,
"摄像头所属对象不能为空"
);
}
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()!=
1
&&
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()!=
0
){
return
ResponseObj
.
error
(
400
,
"所属对象不正确"
);
}
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()==
0
&&
null
==
kobject
.
getUuid
(
"stationId"
)){
return
ResponseObj
.
error
(
400
,
"请选择具体的场站"
);
}
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()==
1
&&
null
==
kobject
.
getUuid
(
"watershedId"
)){
return
ResponseObj
.
error
(
400
,
"请选择具体的流域"
);
}
if
(
null
==
kobject
.
getUuid
(
"cameraAccountId"
)){
return
ResponseObj
.
error
(
400
,
"请选择集成账号"
);
}
UUID
id
=
cameraInfoService
.
addCamera
(
kobject
);
return
ResponseObj
.
success
(
"保存成功"
,
id
);
}
/**
* 修改摄像头
* @param body 砂石种类json
* @return
*/
@PutMapping
public
ResponseObj
update
(
@RequestBody
String
body
){
KObject
kobject
=
JSONObjectUtils
.
toObject
(
body
,
Amino
.
getApplicationMetadataContext
().
getBean
(
CameraInfoConstant
.
ENTITY
,
KClass
.
class
));
kobject
.
validate
();
if
(
StringUtils
.
isEmpty
(
kobject
.
getString
(
"cameraName"
))){
return
ResponseObj
.
error
(
400
,
"摄像头名称不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
kobject
.
getString
(
"brand"
))){
return
ResponseObj
.
error
(
400
,
"摄像头品牌不能为空"
);
}
if
(
StringUtils
.
isEmpty
(
kobject
.
getString
(
"deviceSerial"
))){
return
ResponseObj
.
error
(
400
,
"设备序列号不能为空"
);
}
if
(
null
==
kobject
.
getBigInteger
(
"cameraObject"
)){
return
ResponseObj
.
error
(
400
,
"摄像头所属对象不能为空"
);
}
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()!=
1
&&
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()!=
0
){
return
ResponseObj
.
error
(
400
,
"所属对象不正确"
);
}
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()==
0
&&
null
==
kobject
.
getUuid
(
"stationId"
)){
return
ResponseObj
.
error
(
400
,
"请选择具体的场站"
);
}
if
(
kobject
.
getBigInteger
(
"cameraObject"
).
intValue
()==
1
&&
null
==
kobject
.
getUuid
(
"watershedId"
)){
return
ResponseObj
.
error
(
400
,
"请选择具体的流域"
);
}
if
(
null
==
kobject
.
getUuid
(
"cameraAccountId"
)){
return
ResponseObj
.
error
(
400
,
"请选择集成账号"
);
}
if
(
kobject
.
getUuid
(
"id"
)
==
null
){
return
ResponseObj
.
error
(
400
,
"'id' must be not null!"
);
}
cameraInfoService
.
update
(
kobject
);
return
ResponseObj
.
success
(
"修改成功"
);
}
/**
* 根据id获取摄像头信息
* @param id
* @return
*/
@GetMapping
(
"/{id}"
)
public
ResponseObj
<
Object
>
getById
(
@PathVariable
(
"id"
)
UUID
id
){
if
(
id
==
null
){
return
ResponseObj
.
error
(
400
,
"'id' must be not null!"
);
}
KObject
station
=
cameraInfoService
.
getById
(
id
);
return
ResponseObj
.
success
(
"查询成功"
,
station
);
}
/**
* 根据Id删除砂石种类
* @param id
* @return
*/
@DeleteMapping
(
"/{id}"
)
public
ResponseObj
<
Object
>
deleteById
(
@PathVariable
(
"id"
)
UUID
id
){
if
(
id
==
null
){
return
ResponseObj
.
error
(
400
,
"'id' must be not null!"
);
}
cameraInfoService
.
deleteById
(
id
);
return
ResponseObj
.
success
(
"删除成功"
);
}
/**
* 查询是否有重名
* @param name
* @return
*/
@GetMapping
(
"/validateName"
)
public
ResponseObj
validateName
(
@RequestParam
(
"name"
)
String
name
,
@RequestParam
(
"id"
)
UUID
id
){
if
(
StringUtils
.
isEmpty
(
name
)){
return
ResponseObj
.
error
(
400
,
"摄像头名称不能为空"
);
}
KObject
kObject
=
cameraInfoService
.
getByName
(
name
,
id
);
if
(
kObject
!=
null
){
return
ResponseObj
.
error
(
"摄像头种类名称已存在!"
);
}
return
ResponseObj
.
success
();
}
}
backend/xyst.dinas.biz/src/main/java/com/xyst/dinas/biz/web/DinasTypeController.java
View file @
28295f83
...
@@ -80,7 +80,7 @@ public class DinasTypeController {
...
@@ -80,7 +80,7 @@ public class DinasTypeController {
return
ResponseObj
.
error
(
400
,
"'id' must be not null!"
);
return
ResponseObj
.
error
(
400
,
"'id' must be not null!"
);
}
}
KObject
station
=
dinasTypeService
.
getById
(
id
);
KObject
station
=
dinasTypeService
.
getById
(
id
);
return
ResponseObj
.
success
(
"
修改
成功"
,
station
);
return
ResponseObj
.
success
(
"
查询
成功"
,
station
);
}
}
/**
/**
...
@@ -104,7 +104,7 @@ public class DinasTypeController {
...
@@ -104,7 +104,7 @@ public class DinasTypeController {
* @return
* @return
*/
*/
@GetMapping
(
"/validateName"
)
@GetMapping
(
"/validateName"
)
public
ResponseObj
<
Object
>
validateName
(
@RequestParam
(
"name"
)
String
name
,
@RequestParam
(
"id"
)
UUID
id
){
public
ResponseObj
validateName
(
@RequestParam
(
"name"
)
String
name
,
@RequestParam
(
"id"
)
UUID
id
){
if
(
StringUtils
.
isEmpty
(
name
)){
if
(
StringUtils
.
isEmpty
(
name
)){
return
ResponseObj
.
error
(
400
,
"砂石种类名称不能为空"
);
return
ResponseObj
.
error
(
400
,
"砂石种类名称不能为空"
);
}
}
...
...
backend/xyst.dinas.biz/src/main/resources/META-INF/spring.factories
View file @
28295f83
# Auto Configure
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.xyst.dinas.biz.config.StationConfiguration,\
com.xyst.dinas.biz.config.StationConfiguration,\
com.xyst.dinas.biz.config.DinasTypeConfiguration
com.xyst.dinas.biz.config.DinasTypeConfiguration,\
\ No newline at end of file
com.xyst.dinas.biz.config.CameraConfiguration
\ No newline at end of file
backend/xyst.dinas.biz/src/main/resources/com/xyst/dinas/biz/datamodel/CameraInfo.jmx
0 → 100644
View file @
28295f83
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-type"
>
<specification>
1.0
</specification>
<id>
e8249aa2-51af-444b-a3e3-fec7c5c8a12d
</id>
<name>
com.xyst.dinas.biz.datamodel.CameraInfo
</name>
<title>
摄像头管理
</title>
<description>
摄像头管理
</description>
<define>
bcp.type.Class
</define>
<define-version>
1.0
</define-version>
<dependency>
bcp.type.constraint.StringLength
</dependency>
<dependency>
bcp.type.constraint.NotNull
</dependency>
<dependency>
com.beecode.bap.staff.datamodel.Staff
</dependency>
<dependency>
com.beecode.inz.common.datamodel.BaseInfo
</dependency>
<dependency>
com.beecode.bap.department.datamodel.Department
</dependency>
<dependency>
com.beecode.bap.biztrait.datamodel.BasicBillRequirement
</dependency>
<content>
<m:class>
<m:parents>
<m:parent>
com.beecode.inz.common.datamodel.BaseInfo
</m:parent>
<m:parent>
com.beecode.bap.biztrait.datamodel.BasicBillRequirement
</m:parent>
</m:parents>
<m:attributes>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.NotNull
</m:type>
</m:annotation>
</m:annotations>
<m:id>
efc8163c-c3d1-40b2-9482-ecdb27bfe3ca
</m:id>
<m:name>
cameraName
</m:name>
<m:title>
摄像头名称
</m:title>
<m:type>
string
</m:type>
<m:description>
摄像头名称
</m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.NotNull
</m:type>
</m:annotation>
</m:annotations>
<m:id>
d7de9de5-9472-4ea1-af61-43e9cb45d9b8
</m:id>
<m:name>
cameraType
</m:name>
<m:title>
摄像头类型
</m:title>
<m:type>
int
</m:type>
<m:description>
类型,0 枪机、1 球机
</m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.NotNull
</m:type>
</m:annotation>
</m:annotations>
<m:id>
aa7a225d-b739-4e7e-925d-d4fefab61119
</m:id>
<m:name>
cameraAggType
</m:name>
<m:title>
摄像头集成类型
</m:title>
<m:type>
int
</m:type>
<m:description>
集成类型 0 url 1 萤石云 2 视频监控系统
</m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>
101abb90-3bbd-41ca-a2e8-08eca31e0662
</m:id>
<m:name>
channelNo
</m:name>
<m:title>
渠道号
</m:title>
<m:type>
string
</m:type>
<m:description>
渠道号
</m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>
6eb44d47-d6e2-4e4d-80d5-b91bf527c708
</m:id>
<m:name>
videoUrl
</m:name>
<m:title>
视频url
</m:title>
<m:type>
string
</m:type>
<m:description>
视频url
</m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>
3f99a527-2d6e-4c40-b84c-a8b79046b94c
</m:id>
<m:name>
urlType
</m:name>
<m:title>
url类型
</m:title>
<m:type>
int
</m:type>
<m:description>
url类型1、application/x-mpegURL格式(hls|ws|m3u8) 2、rtmp/flv
</m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>
ba9964ac-661e-4816-92f6-2b8bfa70b2df
</m:id>
<m:name>
isShare
</m:name>
<m:title>
是否分享
</m:title>
<m:type>
boolean
</m:type>
<m:description>
0,自己的设备 1,别的账号的分享的设备
</m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.NotNull
</m:type>
</m:annotation>
</m:annotations>
<m:id>
ba9964ac-661e-4816-92f6-2b8bfa70b2df
</m:id>
<m:name>
cameraObject
</m:name>
<m:title>
摄像头所属对象
</m:title>
<m:type>
int
</m:type>
<m:description>
0,场站的摄像头 1,流域的摄像头
</m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.NotNull
</m:type>
</m:annotation>
</m:annotations>
<m:id>
ba9964ac-661e-4816-92f6-2b8bfa70b2df
</m:id>
<m:name>
isValidate
</m:name>
<m:title>
是否加密
</m:title>
<m:type>
boolean
</m:type>
<m:description>
0,不加密 1,加密
</m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>
2b56d674-b574-428a-bc69-2c3274ee2159
</m:id>
<m:name>
department
</m:name>
<m:title>
所属部门
</m:title>
<m:type>
com.beecode.bap.department.datamodel.Department
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>
650ad03e-87d2-11eb-b258-54ee750ba9b2
</m:id>
<m:name>
watershedId
</m:name>
<m:title>
所属流域id
</m:title>
<m:type>
uuid
</m:type>
<m:description></m:description>
<m:default></m:default>
</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:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.NotNull
</m:type>
</m:annotation>
</m:annotations>
<m:id>
0a0bf871-7f98-4fe8-b91e-6813e9794264
</m:id>
<m:name>
cameraAccountId
</m:name>
<m:title>
摄像头账号id
</m:title>
<m:type>
uuid
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.StringLength
</m:type>
<m:value>
300
</m:value>
</m:annotation>
<m:annotation>
<m:type>
bcp.type.constraint.NotNull
</m:type>
</m:annotation>
</m:annotations>
<m:id>
255c8836-2682-4811-b194-e78adad3ecf5
</m:id>
<m:name>
brand
</m:name>
<m:title>
品牌
</m:title>
<m:type>
string
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.StringLength
</m:type>
<m:value>
30
</m:value>
</m:annotation>
</m:annotations>
<m:id>
255c8836-2682-4811-b194-e78adad3ecf5
</m:id>
<m:name>
cameraModel
</m:name>
<m:title>
型号
</m:title>
<m:type>
string
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.StringLength
</m:type>
<m:value>
40
</m:value>
</m:annotation>
</m:annotations>
<m:id>
41c7e3da-c6a8-4e2b-9853-026e44e2f8d9
</m:id>
<m:name>
flowCard
</m:name>
<m:title>
流量卡号
</m:title>
<m:type>
string
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.StringLength
</m:type>
<m:value>
15
</m:value>
</m:annotation>
<m:annotation>
<m:type>
bcp.type.constraint.NotNull
</m:type>
</m:annotation>
</m:annotations>
<m:id>
b825ae5d-601f-4f8b-8266-febde7c64777
</m:id>
<m:name>
deviceSerial
</m:name>
<m:title>
设备序列号
</m:title>
<m:type>
string
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
</m:annotations>
<m:id>
f95dafa0-e064-40dd-8e78-21d645be8633
</m:id>
<m:name>
validateCode
</m:name>
<m:title>
设备验证码、加密密码
</m:title>
<m:type>
string
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
</m:annotations>
<m:id>
9c644205-3cb9-4221-ab6f-32e54a4572de
</m:id>
<m:name>
longitude
</m:name>
<m:title>
经度
</m:title>
<m:type>
string
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
</m:annotations>
<m:id>
d163d52d-7615-4dc3-9f26-ac1122572a05
</m:id>
<m:name>
latitude
</m:name>
<m:title>
纬度
</m:title>
<m:type>
string
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
</m:annotations>
<m:id>
61573f75-8b75-11eb-93b0-00d8610888e2
</m:id>
<m:name>
reason
</m:name>
<m:title>
备注
</m:title>
<m:type>
string
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations></m:annotations>
<m:id>
1be7fc52-3a08-45b7-a987-eb32f68460f3
</m:id>
<m:name>
sortOrder
</m:name>
<m:title>
排序
</m:title>
<m:type>
int
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
</m:attributes>
</m:class>
</content>
</metadata>
backend/xyst.dinas.biz/src/main/resources/config/CameraInfo.hbm.xml
0 → 100644
View file @
28295f83
<?xml version="1.0" encoding="UTF-8"?>
<hibernate-mapping
xmlns=
"http://www.hibernate.org/xsd/hibernate-mapping"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.hibernate.org/xsd/hibernate-mapping
http://www.hibernate.org/xsd/hibernate-mapping/hibernate-mapping-4.0.xsd"
>
<class
entity-name=
"com.xyst.dinas.biz.datamodel.CameraInfo"
table=
"xyst_dinas_biz_camera_info"
optimistic-lock=
"version"
>
<tuplizer
entity-mode=
"dynamic-map"
class=
"com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"
/>
<id
name=
"id"
type=
"uuid-binary"
column=
"id"
length=
"16"
>
<generator
class=
"assigned"
/>
</id>
<version
name=
"version"
type=
"int"
column=
"version"
/>
<property
name=
"createTime"
type=
"timestamp"
not-null=
"false"
>
<column
name=
"create_time"
/>
</property>
<many-to-one
name=
"creator"
entity-name=
"com.beecode.bap.staff.datamodel.Staff"
fetch=
"select"
>
<column
name=
"creator_id"
not-null=
"false"
/>
</many-to-one>
<property
name=
"modifyTime"
type=
"timestamp"
not-null=
"false"
>
<column
name=
"modify_time"
/>
</property>
<many-to-one
name=
"modifier"
entity-name=
"com.beecode.bap.staff.datamodel.Staff"
fetch=
"select"
>
<column
name=
"modifier_id"
not-null=
"false"
/>
</many-to-one>
<property
name=
"del"
type=
"boolean"
not-null=
"false"
>
<column
name=
"del"
default=
"false"
/>
</property>
<property
name=
"discard"
type=
"boolean"
not-null=
"false"
>
<column
name=
"discard"
default=
"false"
/>
</property>
<many-to-one
name=
"department"
entity-name=
"com.beecode.bap.department.datamodel.Department"
fetch=
"select"
>
<column
name=
"department"
not-null=
"false"
>
<comment>
所属部门
</comment>
</column>
</many-to-one>
<property
name=
"cameraName"
type=
"nstring"
not-null=
"true"
>
<column
name=
"camera_name"
default=
"true"
>
<comment>
摄像头名称
</comment>
</column>
</property>
<property
name=
"brand"
type=
"nstring"
not-null=
"false"
>
<column
name=
"brand"
default=
"true"
>
<comment>
品牌
</comment>
</column>
</property>
<property
name=
"cameraType"
type=
"int"
>
<column
name=
"camera_type"
>
<comment>
摄像头类型 0 枪机、1 球机
</comment>
</column>
</property>
<property
name=
"cameraAggType"
type=
"int"
>
<column
name=
"camera_agg_type"
>
<comment>
摄像头集成类型 0 url 1 萤石云 2 视频监控系统
</comment>
</column>
</property>
<property
name=
"urlType"
type=
"int"
>
<column
name=
"url_type"
>
<comment>
url类型 1、application/x-mpegURL格式(hls|ws|m3u8) 2、rtmp/flv
</comment>
</column>
</property>
<property
name=
"isShare"
type=
"boolean"
>
<column
name=
"is_share"
default=
"0"
>
<comment>
是否分享 0,自己的设备 1,别的账号的分享的设备
</comment>
</column>
</property>
<property
name=
"cameraObject"
type=
"int"
>
<column
name=
"camera_object"
>
<comment>
摄像头所属对象 0,场站的摄像头 1,流域的摄像头
</comment>
</column>
</property>
<property
name=
"isValidate"
type=
"boolean"
not-null=
"false"
>
<column
name=
"is_validate"
default=
"false"
>
<comment>
是否加密 0不加密 1加密
</comment>
</column>
</property>
<property
name=
"channelNo"
type=
"nstring"
not-null=
"true"
>
<column
name=
"channel_no"
length=
"2"
default=
"1"
>
<comment>
渠道号
</comment>
</column>
</property>
<property
name=
"videoUrl"
type=
"nstring"
>
<column
name=
"video_url"
length=
"300"
>
<comment>
视频url
</comment>
</column>
</property>
<property
name=
"watershedId"
type=
"uuid-binary"
not-null=
"false"
>
<column
name=
"watershed_id"
length=
"16"
>
<comment>
流域id
</comment>
</column>
</property>
<property
name=
"stationId"
type=
"uuid-binary"
not-null=
"false"
>
<column
name=
"station_id"
length=
"16"
>
<comment>
场站id
</comment>
</column>
</property>
<property
name=
"cameraAccountId"
type=
"uuid-binary"
not-null=
"false"
>
<column
name=
"camera_account_id"
length=
"16"
>
<comment>
摄像头账号id
</comment>
</column>
</property>
<property
name=
"cameraModel"
type=
"nstring"
not-null=
"false"
>
<column
name=
"camera_model"
length=
"300"
>
<comment>
型号
</comment>
</column>
</property>
<property
name=
"flowCard"
type=
"nstring"
not-null=
"false"
>
<column
name=
"flow_card"
length=
"300"
>
<comment>
流量卡号
</comment>
</column>
</property>
<property
name=
"deviceSerial"
type=
"nstring"
not-null=
"false"
>
<column
name=
"device_serial"
length=
"300"
>
<comment>
设备序列号
</comment>
</column>
</property>
<property
name=
"validateCode"
type=
"nstring"
not-null=
"false"
>
<column
name=
"validate_code"
length=
"300"
>
<comment>
设备验证码、加密密码
</comment>
</column>
</property>
<property
name=
"longitude"
type=
"nstring"
not-null=
"false"
>
<column
name=
"longitude"
length=
"30"
>
<comment>
经度
</comment>
</column>
</property>
<property
name=
"latitude"
type=
"nstring"
not-null=
"false"
>
<column
name=
"latitude"
length=
"30"
>
<comment>
纬度
</comment>
</column>
</property>
<property
name=
"reason"
type=
"nstring"
not-null=
"false"
>
<column
name=
"reason"
length=
"300"
>
<comment>
备注
</comment>
</column>
</property>
<property
name=
"sortOrder"
type=
"int"
not-null=
"true"
unique=
"true"
update=
"false"
insert=
"false"
index=
"camera_sort_index"
>
<column
name=
"sort_order"
length=
"10"
>
<comment
>
排序
</comment>
</column>
</property>
</class>
</hibernate-mapping>
\ No newline at end of file
backend/xyst.dinas.biz/src/main/resources/config/DinasType.hbm.xml
View file @
28295f83
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<comment>
砂石种类名称
</comment>
<comment>
砂石种类名称
</comment>
</column>
</column>
</property>
</property>
<property
name=
"dinasIsSell"
type=
"boolean"
not-null=
"true"
>
<property
name=
"dinasIsSell"
type=
"boolean"
>
<column
name=
"dinas_is_sell"
default=
"true"
>
<column
name=
"dinas_is_sell"
default=
"true"
>
<comment>
砂石是否售卖,0不售卖 1还售卖
</comment>
<comment>
砂石是否售卖,0不售卖 1还售卖
</comment>
</column>
</column>
...
...
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