Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
self-service
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
廖旭伟
self-service
Commits
4cdbd23e
Commit
4cdbd23e
authored
Jun 20, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备管理导入模板
parent
736ebc59
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
42 deletions
+48
-42
common-lib/src/main/java/com/mortals/xhx/feign/device/IDeviceFeign.java
.../main/java/com/mortals/xhx/feign/device/IDeviceFeign.java
+8
-0
sst-manager/pom.xml
sst-manager/pom.xml
+3
-0
sst-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceEntity.java
...ava/com/mortals/xhx/module/device/model/DeviceEntity.java
+14
-1
sst-manager/src/main/java/com/mortals/xhx/module/device/model/vo/DeviceVo.java
...java/com/mortals/xhx/module/device/model/vo/DeviceVo.java
+0
-41
sst-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
...a/com/mortals/xhx/module/device/web/DeviceController.java
+23
-0
No files found.
common-lib/src/main/java/com/mortals/xhx/feign/device/IDeviceFeign.java
View file @
4cdbd23e
...
...
@@ -76,6 +76,9 @@ public interface IDeviceFeign extends IFeign {
*/
@PostMapping
(
value
=
"/notify/downMsg"
)
Rest
<
String
>
downMsg
(
@RequestBody
DeviceNotifyPdu
deviceNotifyPdu
);
@PostMapping
(
value
=
"/device/downloadTemplate"
)
void
downloadTemplate
();
}
...
...
@@ -117,6 +120,11 @@ class DeviceFeignFallbackFactory implements FallbackFactory<IDeviceFeign> {
public
Rest
<
String
>
downMsg
(
DeviceNotifyPdu
deviceNotifyPdu
)
{
return
Rest
.
fail
(
"暂时无法接收第三方平台下发设备消息,请稍后再试!"
);
}
@Override
public
void
downloadTemplate
()
{
}
};
}
}
...
...
sst-manager/pom.xml
View file @
4cdbd23e
...
...
@@ -30,6 +30,9 @@
<profiles.kafka.brokers>
192.168.0.251:9092
</profiles.kafka.brokers>
<profiles.rabbitmq.host>
192.168.0.98
</profiles.rabbitmq.host>
<profiles.rabbitmq.port>
5672
</profiles.rabbitmq.port>
<profiles.rabbitmq.username>
taxi_mq
</profiles.rabbitmq.username>
<profiles.rabbitmq.password>
admin@2020
</profiles.rabbitmq.password>
<profiles.rabbitmq.virtualhost>
/
</profiles.rabbitmq.virtualhost>
<profiles.nacos.server-addr>
192.168.0.252:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
...
...
sst-manager/src/main/java/com/mortals/xhx/module/device/model/DeviceEntity.java
View file @
4cdbd23e
...
...
@@ -20,10 +20,12 @@ public class DeviceEntity extends DeviceVo {
/**
* 设备名称
*/
@Excel
(
name
=
"设备名称"
)
private
String
deviceName
;
/**
* 设备编码,SN码等,默认为MAC地址
*/
@Excel
(
name
=
"设备编码"
)
private
String
deviceCode
;
/**
* 设备的MAC地址
...
...
@@ -40,6 +42,7 @@ public class DeviceEntity extends DeviceVo {
/**
* 站点名称
*/
@Excel
(
name
=
"站点名称"
)
private
String
siteName
;
/**
* 平台系统Id
...
...
@@ -48,6 +51,7 @@ public class DeviceEntity extends DeviceVo {
/**
* 平台系统名称
*/
@Excel
(
name
=
"平台系统名称"
)
private
String
platformName
;
/**
* 产品Id
...
...
@@ -56,6 +60,7 @@ public class DeviceEntity extends DeviceVo {
/**
* 产品名称
*/
@Excel
(
name
=
"产品名称"
)
private
String
productName
;
/**
* 皮肤id
...
...
@@ -76,6 +81,7 @@ public class DeviceEntity extends DeviceVo {
/**
* 设备生产厂商名称
*/
@Excel
(
name
=
"设备生产厂商名称"
)
private
String
deviceFirmname
;
/**
* 设备来源(0.子设备,1.网关设备,2.直连设备)
...
...
@@ -96,10 +102,12 @@ public class DeviceEntity extends DeviceVo {
/**
* 所属楼栋
*/
@Excel
(
name
=
"所属楼栋"
)
private
Integer
deviceInBuilding
;
/**
* 所属楼层
*/
@Excel
(
name
=
"所属楼层"
)
private
Integer
deviceInFloor
;
/**
* 保修期至
...
...
@@ -108,10 +116,12 @@ public class DeviceEntity extends DeviceVo {
/**
* 负责人
*/
@Excel
(
name
=
"负责人"
)
private
String
leadingOfficial
;
/**
* 联系电话
*/
@Excel
(
name
=
"联系电话"
)
private
String
leadingOfficialTelephone
;
/**
* 是否接收异常短(0.否,1.是)
...
...
@@ -168,6 +178,7 @@ public class DeviceEntity extends DeviceVo {
/**
* 设备来源(0.旧设备,1.新设备)
*/
@Excel
(
name
=
"设备来源"
,
readConverterExp
=
"0=旧设备,1=新设备"
)
private
Integer
source
;
/**
* 设备SN码
...
...
@@ -180,6 +191,7 @@ public class DeviceEntity extends DeviceVo {
/**
* 产品编码
*/
@Excel
(
name
=
"产品类型"
)
private
String
productCode
;
/**
* 大厅Id
...
...
@@ -188,6 +200,7 @@ public class DeviceEntity extends DeviceVo {
/**
* 大厅名称
*/
@Excel
(
name
=
"大厅名称"
)
private
String
hallName
;
/**
* 是否显示短信(0.否,1.是)
...
...
@@ -312,4 +325,4 @@ public class DeviceEntity extends DeviceVo {
this
.
showWechatQrCode
=
1
;
}
}
\ No newline at end of file
}
sst-manager/src/main/java/com/mortals/xhx/module/device/model/vo/DeviceVo.java
View file @
4cdbd23e
...
...
@@ -15,46 +15,5 @@ import java.util.List;
*/
@Data
public
class
DeviceVo
extends
BaseEntityLong
{
/**
* 唯一标识
*/
private
String
token
;
/**
* 平台编码
*/
private
String
platformCode
;
/**
* 产品编码
*/
@Excel
(
name
=
"产品类型"
,
cacheDict
=
"productDict"
,
type
=
Excel
.
Type
.
IMPORT
)
private
String
productCode
;
/**
* 是否通知第三方
*/
private
Boolean
switchSend
=
true
;
/**
* 设备图片附件
*/
@Excel
(
name
=
"设备图片"
,
type
=
Excel
.
Type
.
IMPORT
,
cellType
=
Excel
.
ColumnType
.
IMAGE
)
@JSONField
(
deserialize
=
false
,
serialize
=
false
)
@JsonIgnore
private
PictureData
picObj
;
/** 主键ID,主键,自增长列表 */
private
List
<
Long
>
idList
;
/**
* 产品列表
*/
private
List
<
Long
>
productIdList
;
private
List
<
Integer
>
deviceStatusList
;
}
\ No newline at end of file
sst-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
View file @
4cdbd23e
...
...
@@ -11,6 +11,7 @@ import com.mortals.framework.model.PageInfo;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.utils.ReflectUtils
;
import
com.mortals.framework.utils.poi.ExcelUtil
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.pdu.RespData
;
...
...
@@ -396,4 +397,26 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
}
@PostMapping
({
"m/downloadTemplate"
})
public
void
mdownloadTemplate
()
{
try
{
deviceFeign
.
downloadTemplate
();
}
catch
(
Exception
var4
)
{
this
.
doException
(
this
.
request
,
"导出模板异常"
,
new
HashMap
(),
var4
);
}
}
// @PostMapping({"downloadTemplate"})
// public void downloadTemplate() {
// try {
// Class<DeviceEntity> tClass = ReflectUtils.getClassGenricType(this.getClass(), 1);
// ExcelUtil<DeviceEntity, Long> util = new ExcelUtil(tClass);
// byte[] data = util.importTemplateExcel("模板数据");
// this.responseStream(this.response, data, "template.xlsx");
// } catch (Exception var4) {
// this.doException(this.request, "导出模板异常", new HashMap(), var4);
// }
//
// }
}
\ No newline at end of file
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