Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
3baf70fc
Commit
3baf70fc
authored
Jun 09, 2022
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改mqtt消息重复
2.新增报表demo
parent
4397dd29
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
141 additions
and
46 deletions
+141
-46
WordTemplateTypeEum.java
...yeejoin/equipmanage/common/enums/WordTemplateTypeEum.java
+9
-2
CarController.java
...ava/com/yeejoin/equipmanage/controller/CarController.java
+22
-22
FireAutoSysManageReportController.java
...pmanage/controller/FireAutoSysManageReportController.java
+69
-0
IFireAutoSysManageReportService.java
.../equipmanage/service/IFireAutoSysManageReportService.java
+19
-0
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+22
-22
FireAutoSysManageReportServiceImpl.java
...nage/service/impl/FireAutoSysManageReportServiceImpl.java
+0
-0
fireAutoSysManageReport.ftl
...-equip/src/main/resources/ftl/fireAutoSysManageReport.ftl
+0
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/enums/WordTemplateTypeEum.java
View file @
3baf70fc
...
...
@@ -6,8 +6,15 @@ package com.yeejoin.equipmanage.common.enums;
*
*/
public
enum
WordTemplateTypeEum
{
resume
(
"简历"
,
"jianli.ftl"
),
firePatrolReport
(
"消防巡查报表"
,
"FirePatrolReport.ftl"
);
/**
* 模板分类
*/
resume
(
"简历"
,
"jianli.ftl"
),
firePatrolReport
(
"消防巡查报表"
,
"FirePatrolReport.ftl"
),
fireAutoSysManageReport
(
"消防自动化综合管理报表"
,
"fireAutoSysManageReport.ftl"
);
private
String
label
;
private
String
templateFile
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/CarController.java
View file @
3baf70fc
...
...
@@ -364,28 +364,28 @@ public class CarController extends AbstractBaseController {
iCarService
.
dataSyncDeletedIds
(
carIds
);
}
String
[]
topics
=
equipmentIotMqttReceiveConfig
.
adapter
.
getTopic
();
boolean
flag
=
false
;
for
(
String
id
:
idStrings
)
{
String
iotCode
=
iCarService
.
getById
(
id
).
getIotCode
();
if
(
StringUtil
.
isNotEmpty
(
iotCode
))
{
String
prefix
=
iotCode
.
substring
(
0
,
8
);
String
suffix
=
iotCode
.
substring
(
8
);
String
oldTopic
=
prefix
+
"/"
+
suffix
+
"/property"
;
for
(
String
topic
:
topics
)
{
if
(
topic
.
equals
(
oldTopic
))
{
flag
=
true
;
break
;
}
}
if
(
flag
)
{
try
{
equipmentIotMqttReceiveConfig
.
adapter
.
removeTopic
(
prefix
+
"/"
+
suffix
+
"/property"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
//
boolean flag = false;
//
for (String id : idStrings) {
//
String iotCode = iCarService.getById(id).getIotCode();
//
if (StringUtil.isNotEmpty(iotCode)) {
//
String prefix = iotCode.substring(0, 8);
//
String suffix = iotCode.substring(8);
//
String oldTopic = prefix + "/" + suffix + "/property";
//
for (String topic : topics) {
//
if (topic.equals(oldTopic)) {
//
flag = true;
//
break;
//
}
//
}
//
if (flag) {
//
try {
//
equipmentIotMqttReceiveConfig.adapter.removeTopic(prefix + "/" + suffix + "/property");
//
} catch (Exception e) {
//
e.printStackTrace();
//
}
//
}
//
}
//
}
CarController
controllerProxy
=
SpringUtils
.
getBean
(
CarController
.
class
);
controllerProxy
.
refreshAllCount
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireAutoSysManageReportController.java
0 → 100644
View file @
3baf70fc
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto
;
import
com.yeejoin.equipmanage.service.IFirePatrolReportService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Date
;
/**
* @author shg
* @date 2022-04-28
*/
@RestController
@Api
(
tags
=
"消防自动化综合管理报表Api"
)
@RequestMapping
(
value
=
"/fire-manage-report"
)
@Slf4j
public
class
FireAutoSysManageReportController
extends
BaseController
{
@Autowired
IFirePatrolReportService
iFirePatrolReportService
;
@ApiOperation
(
value
=
"下载报表"
,
notes
=
"下载报表"
)
@GetMapping
(
value
=
"/download"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
PUBLIC
,
needAuth
=
false
)
public
void
download
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@ApiParam
(
value
=
"换流站编码"
,
required
=
true
)
@RequestParam
String
stationCode
,
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
startDate
,
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
endDate
)
{
iFirePatrolReportService
.
download
(
request
,
response
,
stationCode
,
startDate
,
endDate
);
}
@ApiOperation
(
value
=
"预览报表"
,
notes
=
"预览报表"
)
@GetMapping
(
value
=
"/preview"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
PUBLIC
)
public
String
preview
(
@ApiParam
(
value
=
"换流站编码"
,
required
=
true
)
@RequestParam
String
stationCode
,
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
startDate
,
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
endDate
)
{
return
iFirePatrolReportService
.
preview
(
stationCode
,
startDate
,
endDate
);
}
@SuppressWarnings
(
"unchecked"
)
@ApiOperation
(
value
=
"所有站查询列表"
,
notes
=
"所有站查询列表"
)
@GetMapping
(
value
=
"/allPage"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
PUBLIC
)
public
IPage
<
AnalysisReportLogDto
>
allPage
(
Page
page
,
@RequestParam
Integer
reportType
,
@ApiParam
(
value
=
"开始日期"
)
@RequestParam
(
required
=
false
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
startDate
,
@ApiParam
(
value
=
"结束日期"
)
@RequestParam
(
required
=
false
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
endDate
,
@ApiParam
(
value
=
"换流站编码"
)
@RequestParam
(
required
=
false
)
String
stationCode
)
{
return
iFirePatrolReportService
.
allPage
(
page
,
reportType
,
startDate
,
endDate
,
stationCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireAutoSysManageReportService.java
0 → 100644
View file @
3baf70fc
package
com
.
yeejoin
.
equipmanage
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Date
;
public
interface
IFireAutoSysManageReportService
{
void
download
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
code
,
Date
startDate
,
Date
endDate
);
String
preview
(
String
code
,
Date
startDate
,
Date
endDate
);
IPage
<
AnalysisReportLogDto
>
allPage
(
Page
<
AnalysisReportLogDto
>
page
,
Integer
reportType
,
Date
startDate
,
Date
endDate
,
String
stationCode
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
3baf70fc
...
...
@@ -510,28 +510,28 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
private
static
void
regEquipMqttTopic
(
String
iotCode
,
EquipmentIotMqttReceiveConfig
equipmentIotMqttReceiveConfig
)
{
if
(
StringUtil
.
isNotEmpty
(
iotCode
))
{
String
[]
topics
=
equipmentIotMqttReceiveConfig
.
adapter
.
getTopic
();
if
(
8
<
iotCode
.
length
())
{
String
prefix
=
iotCode
.
substring
(
0
,
8
);
String
suffix
=
iotCode
.
substring
(
8
);
String
newTopic
=
prefix
+
"/"
+
suffix
+
"/property"
;
boolean
flag
=
false
;
for
(
String
topic
:
topics
)
{
if
(
topic
.
equals
(
newTopic
))
{
flag
=
true
;
break
;
}
}
if
(!
flag
)
{
try
{
equipmentIotMqttReceiveConfig
.
adapter
.
addTopic
(
prefix
+
"/"
+
suffix
+
"/property"
,
1
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
//
if (StringUtil.isNotEmpty(iotCode)) {
//
String[] topics = equipmentIotMqttReceiveConfig.adapter.getTopic();
//
if (8 < iotCode.length()) {
//
String prefix = iotCode.substring(0, 8);
//
String suffix = iotCode.substring(8);
//
String newTopic = prefix + "/" + suffix + "/property";
//
boolean flag = false;
//
for (String topic : topics) {
//
if (topic.equals(newTopic)) {
//
flag = true;
//
break;
//
}
//
}
//
if (!flag) {
//
try {
//
equipmentIotMqttReceiveConfig.adapter.addTopic(prefix + "/" + suffix + "/property", 1);
//
} catch (Exception e) {
//
e.printStackTrace();
//
}
//
}
//
}
//
}
}
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireAutoSysManageReportServiceImpl.java
0 → 100644
View file @
3baf70fc
This diff is collapsed.
Click to expand it.
amos-boot-system-equip/src/main/resources/ftl/fireAutoSysManageReport.ftl
0 → 100644
View file @
3baf70fc
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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