Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-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
赵啸非
device-new-platform
Commits
668ed6e7
Commit
668ed6e7
authored
Feb 28, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加分辨率字典获取
parent
4ec84e3e
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
477 additions
and
92 deletions
+477
-92
common-lib/src/main/java/com/mortals/xhx/common/pdu/DeviceReq.java
...b/src/main/java/com/mortals/xhx/common/pdu/DeviceReq.java
+5
-0
common-lib/src/main/java/com/mortals/xhx/feign/skin/ISkinBaseFeign.java
.../main/java/com/mortals/xhx/feign/skin/ISkinBaseFeign.java
+21
-4
device-manager-ui/admin/public/index.html
device-manager-ui/admin/public/index.html
+5
-5
device-manager-ui/admin/src/router.js
device-manager-ui/admin/src/router.js
+1
-1
device-manager-ui/admin/src/views/device/drawershow.vue
device-manager-ui/admin/src/views/device/drawershow.vue
+9
-0
device-manager-ui/admin/vue.config.js
device-manager-ui/admin/vue.config.js
+0
-8
device-manager/db/add.sql
device-manager/db/add.sql
+4
-1
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+6
-3
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceEntity.java
...ava/com/mortals/xhx/module/device/model/DeviceEntity.java
+21
-64
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceQuery.java
...java/com/mortals/xhx/module/device/model/DeviceQuery.java
+57
-1
device-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
...a/com/mortals/xhx/module/device/web/DeviceController.java
+7
-0
device-manager/src/main/resources/sqlmap/module/device/DeviceMapper.xml
.../src/main/resources/sqlmap/module/device/DeviceMapper.xml
+341
-5
doc/设备管理系统.docx
doc/设备管理系统.docx
+0
-0
No files found.
common-lib/src/main/java/com/mortals/xhx/common/pdu/DeviceReq.java
View file @
668ed6e7
...
...
@@ -135,4 +135,9 @@ public class DeviceReq implements Serializable {
*/
private
String
deviceVersion
;
/**
* 设备分辨率
*/
private
String
resolution
;
}
common-lib/src/main/java/com/mortals/xhx/feign/skin/ISkinBaseFeign.java
View file @
668ed6e7
...
...
@@ -11,8 +11,11 @@ import org.springframework.stereotype.Component;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
java.util.Map
;
/**
* 系统基础皮肤 Feign接口
*
* @author zxfei
* @date 2022-08-01
*/
...
...
@@ -46,7 +49,7 @@ public interface ISkinBaseFeign extends IFeign {
* @return
*/
@GetMapping
(
value
=
"/skin/base/delete"
)
Rest
<
Void
>
delete
(
Long
[]
ids
,
@RequestHeader
(
"Authorization"
)
String
authorization
);
Rest
<
Void
>
delete
(
Long
[]
ids
,
@RequestHeader
(
"Authorization"
)
String
authorization
);
/**
...
...
@@ -56,9 +59,18 @@ public interface ISkinBaseFeign extends IFeign {
* @return
*/
@PostMapping
(
value
=
"/skin/base/save"
)
Rest
<
RespData
<
SkinBasePdu
>>
save
(
@RequestBody
SkinBasePdu
skinBasePdu
,
@RequestHeader
(
"Authorization"
)
String
authorization
);
Rest
<
RespData
<
SkinBasePdu
>>
save
(
@RequestBody
SkinBasePdu
skinBasePdu
,
@RequestHeader
(
"Authorization"
)
String
authorization
);
/**
* 获取字典
*
* @param
* @return
*/
@GetMapping
(
value
=
"/param/dict"
)
Rest
<
Map
<
String
,
String
>>
dict
(
@RequestParam
(
value
=
"first"
)
String
first
,
@RequestParam
(
value
=
"second"
)
String
second
);
}
...
...
@@ -70,12 +82,12 @@ class SkinBaseFeignFallbackFactory implements FallbackFactory<ISkinBaseFeign> {
return
new
ISkinBaseFeign
()
{
@Override
public
Rest
<
RespData
<
List
<
SkinBasePdu
>>>
list
(
SkinBasePdu
skinBasePdu
)
{
return
Rest
.
fail
(
"暂时无法获取系统基础皮肤列表,请稍后再试!"
);
return
Rest
.
fail
(
"暂时无法获取系统基础皮肤列表,请稍后再试!"
);
}
@Override
public
Rest
<
SkinBasePdu
>
info
(
Long
id
)
{
return
Rest
.
fail
(
"暂时无法获取系统基础皮肤详细,请稍后再试!"
);
return
Rest
.
fail
(
"暂时无法获取系统基础皮肤详细,请稍后再试!"
);
}
@Override
...
...
@@ -87,6 +99,11 @@ class SkinBaseFeignFallbackFactory implements FallbackFactory<ISkinBaseFeign> {
public
Rest
<
RespData
<
SkinBasePdu
>>
save
(
SkinBasePdu
skinBasePdu
,
String
authorization
)
{
return
Rest
.
fail
(
"暂时无法保存系统基础皮肤,请稍后再试!"
);
}
@Override
public
Rest
<
Map
<
String
,
String
>>
dict
(
String
first
,
String
second
)
{
return
Rest
.
fail
(
"暂时无法获取字典参数,请稍后再试!"
);
}
};
}
}
...
...
device-manager-ui/admin/public/index.html
View file @
668ed6e7
...
...
@@ -5,11 +5,11 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
/>
<link
rel=
"icon"
href=
"<%= BASE_URL %>sbgl.ico"
/>
<title></title>
<link
<title>
设备管理系统
</title>
<!--
<link
rel="stylesheet"
href="https://unpkg.zhimg.com/element-ui@2.15.5/lib/theme-chalk/index.css"
/>
/>
-->
<style>
@font-face
{
font-family
:
"PangMenZhengDao"
;
...
...
@@ -26,10 +26,10 @@
</noscript>
<div
id=
"app"
></div>
<!-- built files will be auto injected -->
<script
src=
"https://unpkg.zhimg.com/vue@2.6.14/dist/vue.runtime.min.js"
></script>
<!--
<script src="https://unpkg.zhimg.com/vue@2.6.14/dist/vue.runtime.min.js"></script>
<script src="https://unpkg.zhimg.com/vuex@3.6.0/dist/vuex.min.js"></script>
<script src="https://unpkg.zhimg.com/vue-router@3.4.9/dist/vue-router.min.js"></script>
<script src="https://unpkg.zhimg.com/element-ui@2.15.5/lib/index.js"></script>
<script
src=
"https://unpkg.zhimg.com/vue-amap/dist/index.js"
></script>
<script src="https://unpkg.zhimg.com/vue-amap/dist/index.js"></script>
-->
</body>
</html>
device-manager-ui/admin/src/router.js
View file @
668ed6e7
...
...
@@ -9,7 +9,7 @@ NProgress.configure({ showSpinner: false });
Vue
.
use
(
Router
);
const
originalPush
=
Vue
Router
.
prototype
.
push
;
const
originalPush
=
Router
.
prototype
.
push
;
VueRouter
.
prototype
.
push
=
function
push
(
location
,
onResolve
,
onReject
)
{
if
(
onResolve
||
onReject
)
return
originalPush
.
call
(
this
,
location
,
onResolve
,
onReject
);
...
...
device-manager-ui/admin/src/views/device/drawershow.vue
View file @
668ed6e7
...
...
@@ -152,6 +152,15 @@
placeholder=
"请选择启用状态 "
/>
<Field
label=
"设备分辨率"
prop=
"resolution"
v-model=
"form.resolution"
type=
"select"
:enumData=
"dict.resolution"
placeholder=
"请选择设备分辨率"
/>
<Field
label=
"显示短信"
prop=
"showSms"
...
...
device-manager-ui/admin/vue.config.js
View file @
668ed6e7
module
.
exports
=
{
productionSourceMap
:
false
,
assetsDir
:
"
s
"
,
configureWebpack
:
{
externals
:
{
vue
:
"
Vue
"
,
vuex
:
"
Vuex
"
,
"
vue-router
"
:
"
VueRouter
"
,
"
element-ui
"
:
"
ELEMENT
"
,
},
},
lintOnSave
:
false
,
devServer
:
{
inline
:
true
,
...
...
device-manager/db/add.sql
View file @
668ed6e7
...
...
@@ -76,5 +76,8 @@ ALTER TABLE mortals_xhx_role_user ADD COLUMN `createTime` datetime(0) NULL DEFA
ALTER
TABLE
mortals_xhx_idgenerator
ADD
COLUMN
`createTime`
datetime
(
0
)
NULL
DEFAULT
NULL
COMMENT
'创建时间'
;
-- ----------------------------
2024
-
02
-
28
-- ----------------------------
ALTER
TABLE
mortals_xhx_device
ADD
COLUMN
`resolution`
varchar
(
64
)
DEFAULT
''
COMMENT
'设备分辨率'
AFTER
deviceInFloor
;
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
668ed6e7
...
...
@@ -682,7 +682,6 @@ public class DeviceApiController {
});*/
/* DownMsgTask downMsgTask = new DownMsgTask(list, platformService, productService, deviceService, deviceLogService, messageProducer);
sendTaskThreadPool.execute(downMsgTask);*/
deviceService
.
downMsg
(
list
);
}
catch
(
AppException
e
)
{
...
...
@@ -895,6 +894,9 @@ public class DeviceApiController {
deviceEntity
.
setCreateUserId
(
1L
);
deviceEntity
.
setCreateTime
(
new
Date
());
deviceEntity
.
setSwitchSend
(
false
);
if
(!
ObjectUtils
.
isEmpty
(
req
.
getResolution
())){
deviceEntity
.
setResolution
(
req
.
getResolution
());
}
deviceService
.
save
(
deviceEntity
);
}
...
...
@@ -939,9 +941,10 @@ public class DeviceApiController {
deviceEntity
.
setLeadingOfficial
(
req
.
getLeadingOfficial
());
deviceEntity
.
setDeviceInFloor
(
req
.
getDeviceInFloor
());
deviceEntity
.
setDeviceInBuilding
(
req
.
getDeviceInBuilding
());
if
(!
ObjectUtils
.
isEmpty
(
req
.
getResolution
())){
deviceEntity
.
setResolution
(
req
.
getResolution
());
}
deviceService
.
update
(
deviceEntity
);
}
private
void
deviceDel
(
DeviceReq
req
)
throws
AppException
{
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceEntity.java
View file @
668ed6e7
...
...
@@ -9,7 +9,7 @@ import java.util.Date;
* 设备实体对象
*
* @author zxfei
* @date 202
3-05-11
* @date 202
4-02-28
*/
@Data
public
class
DeviceEntity
extends
DeviceVo
{
...
...
@@ -23,7 +23,7 @@ public class DeviceEntity extends DeviceVo {
/**
* 设备编码,SN码等,默认为MAC地址
*/
@Excel
(
name
=
"设备编码"
)
@Excel
(
name
=
"设备编码
,SN码等,默认为MAC地址
"
)
private
String
deviceCode
;
/**
* 设备的MAC地址
...
...
@@ -128,6 +128,7 @@ public class DeviceEntity extends DeviceVo {
/**
* 设备图片
*/
@Excel
(
name
=
"设备图片"
)
private
String
devicePhotoPath
;
/**
* 设备访问ip
...
...
@@ -181,6 +182,7 @@ public class DeviceEntity extends DeviceVo {
/**
* 设备SN码
*/
@Excel
(
name
=
"设备SN码"
)
private
String
deviceSN
;
/**
* 设备版本
...
...
@@ -189,7 +191,6 @@ public class DeviceEntity extends DeviceVo {
/**
* 产品编码
*/
@Excel
(
name
=
"产品类型"
)
private
String
productCode
;
/**
* 大厅Id
...
...
@@ -212,12 +213,14 @@ public class DeviceEntity extends DeviceVo {
* 是否显示小程序二维码(0.否,1.是)
*/
private
Integer
showWechatQrCode
;
/**
* 所属机构
*/
private
String
orgName
;
/**
* 设备分辨率
*/
private
String
resolution
;
@Override
public
int
hashCode
()
{
return
this
.
getId
().
hashCode
();
...
...
@@ -235,99 +238,53 @@ public class DeviceEntity extends DeviceVo {
}
public
void
initAttrValue
(){
this
.
deviceName
=
""
;
this
.
deviceCode
=
""
;
this
.
deviceMac
=
""
;
this
.
siteId
=
0L
;
this
.
siteId
=
null
;
this
.
siteCode
=
""
;
this
.
siteName
=
""
;
this
.
platformId
=
0L
;
this
.
platformId
=
null
;
this
.
platformName
=
""
;
this
.
productId
=
0L
;
this
.
productId
=
null
;
this
.
productName
=
""
;
this
.
skinId
=
0L
;
this
.
skinId
=
null
;
this
.
skinName
=
""
;
this
.
homeUrl
=
""
;
this
.
deviceFirmId
=
0L
;
this
.
deviceFirmId
=
null
;
this
.
deviceFirmname
=
""
;
this
.
deviceSrc
=
2
;
this
.
deviceDataSourceWay
=
0
;
this
.
lon
=
""
;
this
.
lati
=
""
;
this
.
deviceInBuilding
=
1
;
this
.
deviceInFloor
=
1
;
this
.
defectsLiabilityPeriod
=
null
;
this
.
deviceInBuilding
=
0
;
this
.
deviceInFloor
=
0
;
this
.
defectsLiabilityPeriod
=
new
Date
();
this
.
leadingOfficial
=
""
;
this
.
leadingOfficialTelephone
=
""
;
this
.
isReceiveMess
=
0
;
this
.
devicePhotoPath
=
""
;
this
.
ip
=
""
;
this
.
centernum
=
""
;
this
.
port
=
""
;
this
.
deviceTopic
=
""
;
this
.
deviceStatus
=
0
;
this
.
enabled
=
0
;
this
.
deviceAuthCode
=
""
;
this
.
deviceRemark
=
""
;
this
.
onlineTime
=
null
;
this
.
offlineTime
=
null
;
this
.
onlineTime
=
new
Date
();
this
.
offlineTime
=
new
Date
();
this
.
deleted
=
0
;
this
.
source
=
1
;
this
.
deviceSN
=
""
;
this
.
deviceVersion
=
""
;
this
.
productCode
=
""
;
this
.
hallId
=
0L
;
this
.
hallId
=
null
;
this
.
hallName
=
""
;
this
.
showSms
=
1
;
this
.
showPrint
=
1
;
this
.
showWechatQrCode
=
1
;
this
.
orgName
=
""
;
this
.
orgName
=
""
;
this
.
resolution
=
""
;
}
}
\ No newline at end of file
device-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceQuery.java
View file @
668ed6e7
...
...
@@ -7,7 +7,7 @@ import com.mortals.xhx.module.device.model.DeviceEntity;
* 设备查询对象
*
* @author zxfei
* @date 202
3-07-13
* @date 202
4-02-28
*/
public
class
DeviceQuery
extends
DeviceEntity
{
/** 开始 主键ID,主键,自增长 */
...
...
@@ -485,6 +485,11 @@ public class DeviceQuery extends DeviceEntity {
/** 所属机构排除列表 */
private
List
<
String
>
orgNameNotList
;
/** 设备分辨率 */
private
List
<
String
>
resolutionList
;
/** 设备分辨率排除列表 */
private
List
<
String
>
resolutionNotList
;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private
List
<
DeviceQuery
>
orConditionList
;
...
...
@@ -3186,6 +3191,38 @@ public class DeviceQuery extends DeviceEntity {
this
.
orgNameNotList
=
orgNameNotList
;
}
/**
* 获取 设备分辨率
* @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
;
}
/**
* 设置 主键ID,主键,自增长
* @param id
...
...
@@ -4819,6 +4856,25 @@ public class DeviceQuery extends DeviceEntity {
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
;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
View file @
668ed6e7
...
...
@@ -79,6 +79,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
public
ISiteHallFeign
siteHallFeign
;
public
DeviceController
()
{
super
.
setModuleDesc
(
"设备"
);
}
...
...
@@ -108,6 +109,12 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
this
.
addDict
(
model
,
"skinProductCodeMap"
,
skinProductCodeMap
);
}
}
Rest
<
Map
<
String
,
String
>>
restDict
=
skinBaseFeign
.
dict
(
"SkinBase"
,
"imageResolution"
);
if
(
restDict
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
Map
<
String
,
String
>
dict
=
restDict
.
getData
();
this
.
addDict
(
model
,
"resolution"
,
dict
);
}
//siteHallFeign.list(new SiteHallPdu().setSiteId(context.g);)
super
.
init
(
model
,
context
);
}
...
...
device-manager/src/main/resources/sqlmap/module/device/DeviceMapper.xml
View file @
668ed6e7
This diff is collapsed.
Click to expand it.
doc/设备管理系统.docx
View file @
668ed6e7
No preview for this file type
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