Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
sample-form-platform
Commits
9cb9bf80
Commit
9cb9bf80
authored
Jan 17, 2024
by
“yiyousong”
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/sample-form-platform
parents
07ef0963
e0b91d10
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
566 additions
and
12 deletions
+566
-12
sample-form-manager/db/add.sql
sample-form-manager/db/add.sql
+7
-0
sample-form-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceEntity.java
...ava/com/mortals/xhx/module/device/model/DeviceEntity.java
+16
-1
sample-form-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceQuery.java
...java/com/mortals/xhx/module/device/model/DeviceQuery.java
+357
-1
sample-form-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
...a/com/mortals/xhx/module/device/web/DeviceController.java
+6
-6
sample-form-manager/src/main/resources/sqlmap/module/device/DeviceMapper.xml
.../src/main/resources/sqlmap/module/device/DeviceMapper.xml
+180
-4
No files found.
sample-form-manager/db/add.sql
View file @
9cb9bf80
...
@@ -58,3 +58,10 @@ PRIMARY KEY (`id`)
...
@@ -58,3 +58,10 @@ PRIMARY KEY (`id`)
ALTER
TABLE
mortals_xhx_device
ALTER
TABLE
mortals_xhx_device
ADD
COLUMN
`belong`
varchar
(
64
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
DEFAULT
NULL
COMMENT
'所属机构'
AFTER
deviceRemark
;
ADD
COLUMN
`belong`
varchar
(
64
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
DEFAULT
NULL
COMMENT
'所属机构'
AFTER
deviceRemark
;
ALTER
TABLE
mortals_xhx_device
ADD
COLUMN
`deviceInBuilding`
tinyint
(
4
)
COMMENT
'所属楼栋'
;
ALTER
TABLE
mortals_xhx_device
ADD
COLUMN
`deviceInFloor`
tinyint
(
4
)
COMMENT
'所属楼层'
;
\ No newline at end of file
sample-form-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceEntity.java
View file @
9cb9bf80
...
@@ -14,7 +14,7 @@ import lombok.Data;
...
@@ -14,7 +14,7 @@ import lombok.Data;
* 设备实体对象
* 设备实体对象
*
*
* @author zxfei
* @author zxfei
* @date 202
3-12-08
* @date 202
4-01-16
*/
*/
@Data
@Data
public
class
DeviceEntity
extends
DeviceVo
{
public
class
DeviceEntity
extends
DeviceVo
{
...
@@ -108,6 +108,18 @@ public class DeviceEntity extends DeviceVo {
...
@@ -108,6 +108,18 @@ public class DeviceEntity extends DeviceVo {
* 所属机构
* 所属机构
*/
*/
private
String
belong
;
private
String
belong
;
/**
* 所属楼栋
*/
private
Integer
deviceInBuilding
;
/**
* 所属楼层
*/
private
Integer
deviceInFloor
;
/**
* 分辨率
*/
private
String
resolution
;
/**
/**
* 最近上线时间
* 最近上线时间
*/
*/
...
@@ -159,6 +171,9 @@ public class DeviceEntity extends DeviceVo {
...
@@ -159,6 +171,9 @@ public class DeviceEntity extends DeviceVo {
this
.
deviceStatus
=
0
;
this
.
deviceStatus
=
0
;
this
.
deviceRemark
=
""
;
this
.
deviceRemark
=
""
;
this
.
belong
=
""
;
this
.
belong
=
""
;
this
.
deviceInBuilding
=
0
;
this
.
deviceInFloor
=
0
;
this
.
resolution
=
""
;
this
.
onlineTime
=
new
Date
();
this
.
onlineTime
=
new
Date
();
this
.
offlineTime
=
new
Date
();
this
.
offlineTime
=
new
Date
();
this
.
source
=
1
;
this
.
source
=
1
;
...
...
sample-form-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceQuery.java
View file @
9cb9bf80
...
@@ -7,7 +7,7 @@ import com.mortals.xhx.module.device.model.DeviceEntity;
...
@@ -7,7 +7,7 @@ import com.mortals.xhx.module.device.model.DeviceEntity;
* 设备查询对象
* 设备查询对象
*
*
* @author zxfei
* @author zxfei
* @date 202
3-12-08
* @date 202
4-01-16
*/
*/
public
class
DeviceQuery
extends
DeviceEntity
{
public
class
DeviceQuery
extends
DeviceEntity
{
/** 开始 主键ID,主键,自增长 */
/** 开始 主键ID,主键,自增长 */
...
@@ -195,6 +195,41 @@ public class DeviceQuery extends DeviceEntity {
...
@@ -195,6 +195,41 @@ public class DeviceQuery extends DeviceEntity {
/** 所属机构排除列表 */
/** 所属机构排除列表 */
private
List
<
String
>
belongNotList
;
private
List
<
String
>
belongNotList
;
/** 开始 所属楼栋 */
private
Integer
deviceInBuildingStart
;
/** 结束 所属楼栋 */
private
Integer
deviceInBuildingEnd
;
/** 增加 所属楼栋 */
private
Integer
deviceInBuildingIncrement
;
/** 所属楼栋列表 */
private
List
<
Integer
>
deviceInBuildingList
;
/** 所属楼栋排除列表 */
private
List
<
Integer
>
deviceInBuildingNotList
;
/** 开始 所属楼层 */
private
Integer
deviceInFloorStart
;
/** 结束 所属楼层 */
private
Integer
deviceInFloorEnd
;
/** 增加 所属楼层 */
private
Integer
deviceInFloorIncrement
;
/** 所属楼层列表 */
private
List
<
Integer
>
deviceInFloorList
;
/** 所属楼层排除列表 */
private
List
<
Integer
>
deviceInFloorNotList
;
/** 分辨率 */
private
List
<
String
>
resolutionList
;
/** 分辨率排除列表 */
private
List
<
String
>
resolutionNotList
;
/** 开始 最近上线时间 */
/** 开始 最近上线时间 */
private
String
onlineTimeStart
;
private
String
onlineTimeStart
;
...
@@ -1351,6 +1386,200 @@ public class DeviceQuery extends DeviceEntity {
...
@@ -1351,6 +1386,200 @@ public class DeviceQuery extends DeviceEntity {
this
.
belongNotList
=
belongNotList
;
this
.
belongNotList
=
belongNotList
;
}
}
/**
* 获取 开始 所属楼栋
* @return deviceInBuildingStart
*/
public
Integer
getDeviceInBuildingStart
(){
return
this
.
deviceInBuildingStart
;
}
/**
* 设置 开始 所属楼栋
* @param deviceInBuildingStart
*/
public
void
setDeviceInBuildingStart
(
Integer
deviceInBuildingStart
){
this
.
deviceInBuildingStart
=
deviceInBuildingStart
;
}
/**
* 获取 结束 所属楼栋
* @return $deviceInBuildingEnd
*/
public
Integer
getDeviceInBuildingEnd
(){
return
this
.
deviceInBuildingEnd
;
}
/**
* 设置 结束 所属楼栋
* @param deviceInBuildingEnd
*/
public
void
setDeviceInBuildingEnd
(
Integer
deviceInBuildingEnd
){
this
.
deviceInBuildingEnd
=
deviceInBuildingEnd
;
}
/**
* 获取 增加 所属楼栋
* @return deviceInBuildingIncrement
*/
public
Integer
getDeviceInBuildingIncrement
(){
return
this
.
deviceInBuildingIncrement
;
}
/**
* 设置 增加 所属楼栋
* @param deviceInBuildingIncrement
*/
public
void
setDeviceInBuildingIncrement
(
Integer
deviceInBuildingIncrement
){
this
.
deviceInBuildingIncrement
=
deviceInBuildingIncrement
;
}
/**
* 获取 所属楼栋
* @return deviceInBuildingList
*/
public
List
<
Integer
>
getDeviceInBuildingList
(){
return
this
.
deviceInBuildingList
;
}
/**
* 设置 所属楼栋
* @param deviceInBuildingList
*/
public
void
setDeviceInBuildingList
(
List
<
Integer
>
deviceInBuildingList
){
this
.
deviceInBuildingList
=
deviceInBuildingList
;
}
/**
* 获取 所属楼栋
* @return deviceInBuildingNotList
*/
public
List
<
Integer
>
getDeviceInBuildingNotList
(){
return
this
.
deviceInBuildingNotList
;
}
/**
* 设置 所属楼栋
* @param deviceInBuildingNotList
*/
public
void
setDeviceInBuildingNotList
(
List
<
Integer
>
deviceInBuildingNotList
){
this
.
deviceInBuildingNotList
=
deviceInBuildingNotList
;
}
/**
* 获取 开始 所属楼层
* @return deviceInFloorStart
*/
public
Integer
getDeviceInFloorStart
(){
return
this
.
deviceInFloorStart
;
}
/**
* 设置 开始 所属楼层
* @param deviceInFloorStart
*/
public
void
setDeviceInFloorStart
(
Integer
deviceInFloorStart
){
this
.
deviceInFloorStart
=
deviceInFloorStart
;
}
/**
* 获取 结束 所属楼层
* @return $deviceInFloorEnd
*/
public
Integer
getDeviceInFloorEnd
(){
return
this
.
deviceInFloorEnd
;
}
/**
* 设置 结束 所属楼层
* @param deviceInFloorEnd
*/
public
void
setDeviceInFloorEnd
(
Integer
deviceInFloorEnd
){
this
.
deviceInFloorEnd
=
deviceInFloorEnd
;
}
/**
* 获取 增加 所属楼层
* @return deviceInFloorIncrement
*/
public
Integer
getDeviceInFloorIncrement
(){
return
this
.
deviceInFloorIncrement
;
}
/**
* 设置 增加 所属楼层
* @param deviceInFloorIncrement
*/
public
void
setDeviceInFloorIncrement
(
Integer
deviceInFloorIncrement
){
this
.
deviceInFloorIncrement
=
deviceInFloorIncrement
;
}
/**
* 获取 所属楼层
* @return deviceInFloorList
*/
public
List
<
Integer
>
getDeviceInFloorList
(){
return
this
.
deviceInFloorList
;
}
/**
* 设置 所属楼层
* @param deviceInFloorList
*/
public
void
setDeviceInFloorList
(
List
<
Integer
>
deviceInFloorList
){
this
.
deviceInFloorList
=
deviceInFloorList
;
}
/**
* 获取 所属楼层
* @return deviceInFloorNotList
*/
public
List
<
Integer
>
getDeviceInFloorNotList
(){
return
this
.
deviceInFloorNotList
;
}
/**
* 设置 所属楼层
* @param deviceInFloorNotList
*/
public
void
setDeviceInFloorNotList
(
List
<
Integer
>
deviceInFloorNotList
){
this
.
deviceInFloorNotList
=
deviceInFloorNotList
;
}
/**
* 获取 分辨率
* @return resolutionList
*/
public
List
<
String
>
getResolutionList
(){
return
this
.
resolutionList
;
}
/**
* 设置 分辨率
* @param resolutionList
*/
public
void
setResolutionList
(
List
<
String
>
resolutionList
){
this
.
resolutionList
=
resolutionList
;
}
/**
* 获取 分辨率
* @return resolutionNotList
*/
public
List
<
String
>
getResolutionNotList
(){
return
this
.
resolutionNotList
;
}
/**
* 设置 分辨率
* @param resolutionNotList
*/
public
void
setResolutionNotList
(
List
<
String
>
resolutionNotList
){
this
.
resolutionNotList
=
resolutionNotList
;
}
/**
/**
* 获取 开始 最近上线时间
* 获取 开始 最近上线时间
* @return onlineTimeStart
* @return onlineTimeStart
...
@@ -2404,6 +2633,133 @@ public class DeviceQuery extends DeviceEntity {
...
@@ -2404,6 +2633,133 @@ public class DeviceQuery extends DeviceEntity {
return
this
;
return
this
;
}
}
/**
* 设置 所属楼栋
* @param deviceInBuilding
*/
public
DeviceQuery
deviceInBuilding
(
Integer
deviceInBuilding
){
setDeviceInBuilding
(
deviceInBuilding
);
return
this
;
}
/**
* 设置 开始 所属楼栋
* @param deviceInBuildingStart
*/
public
DeviceQuery
deviceInBuildingStart
(
Integer
deviceInBuildingStart
){
this
.
deviceInBuildingStart
=
deviceInBuildingStart
;
return
this
;
}
/**
* 设置 结束 所属楼栋
* @param deviceInBuildingEnd
*/
public
DeviceQuery
deviceInBuildingEnd
(
Integer
deviceInBuildingEnd
){
this
.
deviceInBuildingEnd
=
deviceInBuildingEnd
;
return
this
;
}
/**
* 设置 增加 所属楼栋
* @param deviceInBuildingIncrement
*/
public
DeviceQuery
deviceInBuildingIncrement
(
Integer
deviceInBuildingIncrement
){
this
.
deviceInBuildingIncrement
=
deviceInBuildingIncrement
;
return
this
;
}
/**
* 设置 所属楼栋
* @param deviceInBuildingList
*/
public
DeviceQuery
deviceInBuildingList
(
List
<
Integer
>
deviceInBuildingList
){
this
.
deviceInBuildingList
=
deviceInBuildingList
;
return
this
;
}
/**
* 设置 所属楼栋
* @param deviceInBuildingNotList
*/
public
DeviceQuery
deviceInBuildingNotList
(
List
<
Integer
>
deviceInBuildingNotList
){
this
.
deviceInBuildingNotList
=
deviceInBuildingNotList
;
return
this
;
}
/**
* 设置 所属楼层
* @param deviceInFloor
*/
public
DeviceQuery
deviceInFloor
(
Integer
deviceInFloor
){
setDeviceInFloor
(
deviceInFloor
);
return
this
;
}
/**
* 设置 开始 所属楼层
* @param deviceInFloorStart
*/
public
DeviceQuery
deviceInFloorStart
(
Integer
deviceInFloorStart
){
this
.
deviceInFloorStart
=
deviceInFloorStart
;
return
this
;
}
/**
* 设置 结束 所属楼层
* @param deviceInFloorEnd
*/
public
DeviceQuery
deviceInFloorEnd
(
Integer
deviceInFloorEnd
){
this
.
deviceInFloorEnd
=
deviceInFloorEnd
;
return
this
;
}
/**
* 设置 增加 所属楼层
* @param deviceInFloorIncrement
*/
public
DeviceQuery
deviceInFloorIncrement
(
Integer
deviceInFloorIncrement
){
this
.
deviceInFloorIncrement
=
deviceInFloorIncrement
;
return
this
;
}
/**
* 设置 所属楼层
* @param deviceInFloorList
*/
public
DeviceQuery
deviceInFloorList
(
List
<
Integer
>
deviceInFloorList
){
this
.
deviceInFloorList
=
deviceInFloorList
;
return
this
;
}
/**
* 设置 所属楼层
* @param deviceInFloorNotList
*/
public
DeviceQuery
deviceInFloorNotList
(
List
<
Integer
>
deviceInFloorNotList
){
this
.
deviceInFloorNotList
=
deviceInFloorNotList
;
return
this
;
}
/**
* 设置 分辨率
* @param resolution
*/
public
DeviceQuery
resolution
(
String
resolution
){
setResolution
(
resolution
);
return
this
;
}
/**
* 设置 分辨率
* @param resolutionList
*/
public
DeviceQuery
resolutionList
(
List
<
String
>
resolutionList
){
this
.
resolutionList
=
resolutionList
;
return
this
;
}
/**
/**
...
...
sample-form-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
View file @
9cb9bf80
...
@@ -175,7 +175,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
...
@@ -175,7 +175,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
Rest<String> rest = deviceFeign.deviceCall(deviceReq, token);
Rest<String> rest = deviceFeign.deviceCall(deviceReq, token);
log.info("添加结果:{}", JSON.toJSONString(rest));*/
log.info("添加结果:{}", JSON.toJSONString(rest));*/
}
else
{
}
else
{
String
token
=
getToken
();
//
String token = getToken();
DeviceReq
deviceReq
=
new
DeviceReq
();
DeviceReq
deviceReq
=
new
DeviceReq
();
deviceReq
.
setReceiveMethod
(
DeviceMethodEnum
.
UPDATE
.
getValue
());
deviceReq
.
setReceiveMethod
(
DeviceMethodEnum
.
UPDATE
.
getValue
());
/* deviceReq.setDeviceName(entity.getDeviceName());
/* deviceReq.setDeviceName(entity.getDeviceName());
...
@@ -190,7 +190,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
...
@@ -190,7 +190,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
deviceReq
.
setLeadingOfficialTelephone
(
entity
.
getLeadingOfficialTelephone
());
deviceReq
.
setLeadingOfficialTelephone
(
entity
.
getLeadingOfficialTelephone
());
deviceReq
.
setSource
(
1
);
deviceReq
.
setSource
(
1
);
deviceReq
.
setDeviceStatus
(
entity
.
getDeviceStatus
());
deviceReq
.
setDeviceStatus
(
entity
.
getDeviceStatus
());
Rest
<
String
>
rest
=
deviceFeign
.
deviceCall
(
deviceReq
,
token
);
Rest
<
String
>
rest
=
deviceFeign
.
deviceCall
(
deviceReq
);
log
.
info
(
"更新结果:{}"
,
JSON
.
toJSONString
(
rest
));
log
.
info
(
"更新结果:{}"
,
JSON
.
toJSONString
(
rest
));
}
}
...
@@ -200,7 +200,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
...
@@ -200,7 +200,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
@Override
@Override
protected
void
deleteBefore
(
Long
[]
ids
,
Context
context
)
throws
AppException
{
protected
void
deleteBefore
(
Long
[]
ids
,
Context
context
)
throws
AppException
{
super
.
deleteBefore
(
ids
,
context
);
super
.
deleteBefore
(
ids
,
context
);
String
token
=
getToken
();
//
String token = getToken();
DeviceQuery
deviceQuery
=
new
DeviceQuery
();
DeviceQuery
deviceQuery
=
new
DeviceQuery
();
deviceQuery
.
setIdList
(
Arrays
.
asList
(
ids
));
deviceQuery
.
setIdList
(
Arrays
.
asList
(
ids
));
List
<
DeviceEntity
>
deviceEntities
=
this
.
service
.
find
(
deviceQuery
,
context
);
List
<
DeviceEntity
>
deviceEntities
=
this
.
service
.
find
(
deviceQuery
,
context
);
...
@@ -208,18 +208,18 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
...
@@ -208,18 +208,18 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
DeviceReq
deviceReq
=
new
DeviceReq
();
DeviceReq
deviceReq
=
new
DeviceReq
();
deviceReq
.
setReceiveMethod
(
DeviceMethodEnum
.
DEL
.
getValue
());
deviceReq
.
setReceiveMethod
(
DeviceMethodEnum
.
DEL
.
getValue
());
deviceReq
.
setDeviceCode
(
entity
.
getDeviceCode
());
deviceReq
.
setDeviceCode
(
entity
.
getDeviceCode
());
Rest
<
String
>
rest
=
deviceFeign
.
deviceCall
(
deviceReq
,
token
);
Rest
<
String
>
rest
=
deviceFeign
.
deviceCall
(
deviceReq
);
log
.
info
(
"删除结果:{}"
,
JSON
.
toJSONString
(
rest
));
log
.
info
(
"删除结果:{}"
,
JSON
.
toJSONString
(
rest
));
}
}
}
}
private
String
getToken
()
{
/*
private String getToken() {
LoginForm loginForm = new LoginForm();
LoginForm loginForm = new LoginForm();
loginForm.setLoginName(loginName);
loginForm.setLoginName(loginName);
loginForm.setPassword(password);
loginForm.setPassword(password);
Rest<String> rest = deviceFeign.getToken(loginForm);
Rest<String> rest = deviceFeign.getToken(loginForm);
String token = rest.getData();
String token = rest.getData();
return token;
return token;
}
}
*/
}
}
\ No newline at end of file
sample-form-manager/src/main/resources/sqlmap/module/device/DeviceMapper.xml
View file @
9cb9bf80
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