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
5334091c
Commit
5334091c
authored
May 08, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl' into develop_dl
parents
243e58ac
1f71f1a3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
567 additions
and
8 deletions
+567
-8
FireEquipmentSignalLogMapper.xml
...rc/main/resources/mapper/FireEquipmentSignalLogMapper.xml
+1
-1
AlarmController.java
...a/com/yeejoin/equipmanage/controller/AlarmController.java
+57
-1
EmergencyController.java
...m/yeejoin/equipmanage/controller/EmergencyController.java
+4
-2
AlarmExportDto.java
...main/java/com/yeejoin/equipmanage/dto/AlarmExportDto.java
+31
-0
AlarmMapper.java
...main/java/com/yeejoin/equipmanage/mapper/AlarmMapper.java
+5
-0
EmergencyMapper.java
.../java/com/yeejoin/equipmanage/mapper/EmergencyMapper.java
+3
-1
IAlarmService.java
...n/java/com/yeejoin/equipmanage/service/IAlarmService.java
+8
-0
IEmergencyService.java
...va/com/yeejoin/equipmanage/service/IEmergencyService.java
+1
-1
AlarmServiceImpl.java
...om/yeejoin/equipmanage/service/impl/AlarmServiceImpl.java
+40
-0
EmergencyServiceImpl.java
...eejoin/equipmanage/service/impl/EmergencyServiceImpl.java
+2
-2
AlarmMapper.xml
...ot-system-equip/src/main/resources/mapper/AlarmMapper.xml
+31
-0
EmergencyMapper.xml
...ystem-equip/src/main/resources/mapper/EmergencyMapper.xml
+87
-0
pom.xml
amos-boot-utils/amos-boot-utils-adpter/pom.xml
+55
-0
AmosBootUtilsAdpterApplication.java
...java/com/yeejoin/amos/AmosBootUtilsAdpterApplication.java
+53
-0
AdpterController.java
.../com/yeejoin/amos/adpter/controller/AdpterController.java
+45
-0
AdpterService.java
...n/java/com/yeejoin/amos/adpter/service/AdpterService.java
+0
-0
application-dev.properties
...tils-adpter/src/main/resources/application-dev.properties
+33
-0
application.properties
...ot-utils-adpter/src/main/resources/application.properties
+14
-0
logback-dev.xml
...amos-boot-utils-adpter/src/main/resources/logback-dev.xml
+48
-0
logback-qa.xml
.../amos-boot-utils-adpter/src/main/resources/logback-qa.xml
+47
-0
pom.xml
amos-boot-utils/pom.xml
+2
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-ccs-api/src/main/resources/mapper/FireEquipmentSignalLogMapper.xml
View file @
5334091c
...
...
@@ -82,6 +82,6 @@
FROM
asf_fire_equipment_signal_log
WHERE
FIND
_IN_SET(#{mrid,jdbcType=VARCHAR}, system_mrids)
_IN_SET(#{mrid,jdbcType=VARCHAR}, system_mrids)
</select>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/AlarmController.java
View file @
5334091c
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.equipmanage.common.entity.Alarm
;
import
com.yeejoin.equipmanage.common.utils.NameUtils
;
import
com.yeejoin.equipmanage.config.PersonIdentify
;
import
com.yeejoin.equipmanage.service.IAlarmService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
liquibase.pro.packaged.O
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
/**
*
...
...
@@ -32,6 +44,9 @@ public class AlarmController {
@Autowired
IAlarmService
iAlarmService
;
@Autowired
RedisUtils
redisUtils
;
/**
* 新增
*
...
...
@@ -59,7 +74,7 @@ public class AlarmController {
/**
* 修改
*
*
* @return
*/
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
...
...
@@ -128,4 +143,45 @@ public class AlarmController {
page
=
iAlarmService
.
page
(
pageBean
,
alarmQueryWrapper
);
return
page
;
}
/**
* 设备平台告警数量统计,按系统
*
* @return
*/
@PersonIdentify
@RequestMapping
(
value
=
"/totalAlarmNum"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备平台告警数量统计,按系统"
,
notes
=
"设备平台告警数量统计,按系统"
)
public
ResponseModel
<
Object
>
totalAlarmNum
(
String
bizOrgCode
,
String
systemId
)
{
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
}
return
ResponseHelper
.
buildResponse
(
iAlarmService
.
totalNum
(
bizOrgCode
,
systemId
));
}
/**
* 设备告警信息导出
*
* @return
*/
@RequestMapping
(
value
=
"/downList"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"告警信息导出"
,
notes
=
"告警信息导出"
)
public
void
downList
(
HttpServletResponse
response
,
@RequestParam
(
required
=
false
)
List
<
String
>
types
,
@RequestParam
(
required
=
false
)
List
<
String
>
emergencyLevels
,
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
Integer
cleanStatus
,
@RequestParam
(
required
=
false
)
Integer
handleStatus
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
required
=
false
)
String
systemCode
,
@RequestParam
(
required
=
false
)
String
createDate
,
@RequestParam
(
required
=
false
)
String
startDate
,
@RequestParam
(
required
=
false
)
String
endDate
)
{
iAlarmService
.
downList
(
response
,
bizOrgCode
,
systemCode
,
types
,
emergencyLevels
,
name
,
cleanStatus
,
handleStatus
,
createDate
,
startDate
,
endDate
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EmergencyController.java
View file @
5334091c
...
...
@@ -707,7 +707,9 @@ public class EmergencyController extends AbstractBaseController {
@RequestParam
(
required
=
false
)
Integer
handleStatus
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
required
=
false
)
String
systemCode
,
@RequestParam
(
required
=
false
)
String
createDate
@RequestParam
(
required
=
false
)
String
createDate
,
@RequestParam
(
required
=
false
)
String
startDate
,
@RequestParam
(
required
=
false
)
String
endDate
)
{
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
pageNumber
,
pageSize
);
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
...
...
@@ -720,7 +722,7 @@ public class EmergencyController extends AbstractBaseController {
}
}
}
return
CommonResponseUtil
.
success
(
iEmergencyService
.
alarmList
(
page
,
bizOrgCode
,
systemCode
,
types
,
emergencyLevels
,
name
,
cleanStatus
,
handleStatus
,
createDate
));
return
CommonResponseUtil
.
success
(
iEmergencyService
.
alarmList
(
page
,
bizOrgCode
,
systemCode
,
types
,
emergencyLevels
,
name
,
cleanStatus
,
handleStatus
,
createDate
,
startDate
,
endDate
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/dto/AlarmExportDto.java
0 → 100644
View file @
5334091c
package
com
.
yeejoin
.
equipmanage
.
dto
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
lombok.Data
;
@Data
public
class
AlarmExportDto
{
@ExcelProperty
(
value
=
"设备名称"
,
index
=
0
)
private
String
equipmentSpecificName
;
@ExcelProperty
(
value
=
"类型"
,
index
=
1
)
private
String
type
;
@ExcelProperty
(
value
=
"等级"
,
index
=
2
)
private
String
emergencyLevelDescribe
;
@ExcelProperty
(
value
=
"消除状态"
,
index
=
3
)
private
String
cleanStatus
;
@ExcelProperty
(
value
=
"时间"
,
index
=
4
)
private
String
createDate
;
@ExcelProperty
(
value
=
"所在位置"
,
index
=
5
)
private
String
location
;
@ExcelProperty
(
value
=
"告警确认"
,
index
=
6
)
private
String
handleStatus
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/AlarmMapper.java
View file @
5334091c
...
...
@@ -2,6 +2,10 @@ package com.yeejoin.equipmanage.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.equipmanage.common.entity.Alarm
;
import
liquibase.pro.packaged.S
;
import
java.util.List
;
import
java.util.Map
;
/**
* Mapper 接口
...
...
@@ -11,4 +15,5 @@ import com.yeejoin.equipmanage.common.entity.Alarm;
*/
public
interface
AlarmMapper
extends
BaseMapper
<
Alarm
>
{
List
<
Map
<
String
,
String
>>
totalNum
(
String
bizOrgCode
,
String
systemId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EmergencyMapper.java
View file @
5334091c
...
...
@@ -107,7 +107,9 @@ public interface EmergencyMapper extends BaseMapper{
* @param name 设备名称
* @return
*/
Page
<
Map
<
String
,
Object
>>
alarmList
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"systemCode"
)
String
systemCode
,
@Param
(
"types"
)
List
<
String
>
types
,
@Param
(
"emergencyLevels"
)
List
<
String
>
emergencyLevels
,
@Param
(
"name"
)
String
name
,
@Param
(
"cleanStatus"
)
Integer
cleanStatus
,
@Param
(
"handleStatus"
)
Integer
handleStatus
,
@Param
(
"createDate"
)
String
createDate
);
Page
<
Map
<
String
,
Object
>>
alarmList
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"systemCode"
)
String
systemCode
,
@Param
(
"types"
)
List
<
String
>
types
,
@Param
(
"emergencyLevels"
)
List
<
String
>
emergencyLevels
,
@Param
(
"name"
)
String
name
,
@Param
(
"cleanStatus"
)
Integer
cleanStatus
,
@Param
(
"handleStatus"
)
Integer
handleStatus
,
@Param
(
"createDate"
)
String
createDate
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
List
<
Map
<
String
,
Object
>>
alarmListNoPage
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"systemCode"
)
String
systemCode
,
@Param
(
"types"
)
List
<
String
>
types
,
@Param
(
"emergencyLevels"
)
List
<
String
>
emergencyLevels
,
@Param
(
"name"
)
String
name
,
@Param
(
"cleanStatus"
)
Integer
cleanStatus
,
@Param
(
"handleStatus"
)
Integer
handleStatus
,
@Param
(
"createDate"
)
String
createDate
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
IPage
<
EquipTypeImgAmountVO
>
getEmergencyEquipList
(
@Param
(
"page"
)
IPage
page
,
@Param
(
"equipTypeAmountPage"
)
EquipTypeAmountPageDTO
equipTypeAmountPage
,
@Param
(
"list"
)
List
<
String
>
list
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IAlarmService.java
View file @
5334091c
package
com
.
yeejoin
.
equipmanage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.equipmanage.common.entity.Alarm
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
/**
* 服务类
*
...
...
@@ -11,4 +16,7 @@ import com.yeejoin.equipmanage.common.entity.Alarm;
*/
public
interface
IAlarmService
extends
IService
<
Alarm
>
{
List
<
Map
<
String
,
String
>>
totalNum
(
String
bizOrgCode
,
String
systemId
);
void
downList
(
HttpServletResponse
response
,
String
bizOrgCode
,
String
systemCode
,
List
<
String
>
types
,
List
<
String
>
emergencyLevels
,
String
name
,
Integer
cleanStatus
,
Integer
handleStatus
,
String
createDate
,
String
startDate
,
String
endDate
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEmergencyService.java
View file @
5334091c
...
...
@@ -69,7 +69,7 @@ public interface IEmergencyService {
List
<
Map
<
String
,
Object
>>
getPressurePumpDiagnosticAnalysis
(
String
bizOrgCode
);
Page
<
Map
<
String
,
Object
>>
alarmList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
,
String
systemCode
,
List
<
String
>
types
,
List
<
String
>
emergencyLevels
,
String
name
,
Integer
cleanStatus
,
Integer
handleStatus
,
String
createDate
);
Page
<
Map
<
String
,
Object
>>
alarmList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
,
String
systemCode
,
List
<
String
>
types
,
List
<
String
>
emergencyLevels
,
String
name
,
Integer
cleanStatus
,
Integer
handleStatus
,
String
createDate
,
String
startDate
,
String
endDate
);
Map
<
String
,
List
<
PressurePumpCountVo
>>
getPressurePumpDay
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/AlarmServiceImpl.java
View file @
5334091c
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.equipmanage.common.entity.Alarm
;
import
com.yeejoin.equipmanage.common.vo.EquipmentAlarmDownloadVO
;
import
com.yeejoin.equipmanage.dto.AlarmExportDto
;
import
com.yeejoin.equipmanage.mapper.AlarmMapper
;
import
com.yeejoin.equipmanage.mapper.EmergencyMapper
;
import
com.yeejoin.equipmanage.service.IAlarmService
;
import
liquibase.pro.packaged.L
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
/**
* 服务实现类
*
...
...
@@ -15,4 +29,30 @@ import org.springframework.stereotype.Service;
@Service
public
class
AlarmServiceImpl
extends
ServiceImpl
<
AlarmMapper
,
Alarm
>
implements
IAlarmService
{
@Autowired
AlarmMapper
alarmMapper
;
@Autowired
EmergencyMapper
emergencyMapper
;
@Override
public
void
downList
(
HttpServletResponse
response
,
String
bizOrgCode
,
String
systemCode
,
List
<
String
>
types
,
List
<
String
>
emergencyLevels
,
String
name
,
Integer
cleanStatus
,
Integer
handleStatus
,
String
createDate
,
String
startDate
,
String
endDate
)
{
List
<
Map
<
String
,
Object
>>
list
=
emergencyMapper
.
alarmListNoPage
(
bizOrgCode
,
systemCode
,
types
,
emergencyLevels
,
name
,
cleanStatus
,
handleStatus
,
createDate
,
startDate
,
endDate
);
List
<
AlarmExportDto
>
alarmExportDtoList
=
new
ArrayList
<>();
if
(
list
.
size
()
>
0
)
{
for
(
Map
m
:
list
)
{
String
s
=
JSONObject
.
toJSONString
(
m
);
AlarmExportDto
dto
=
JSONObject
.
parseObject
(
s
,
AlarmExportDto
.
class
);
alarmExportDtoList
.
add
(
dto
);
}
ExcelUtil
.
createTemplate
(
response
,
"设备告警信息"
,
"设备告警信息"
,
alarmExportDtoList
,
AlarmExportDto
.
class
,
null
,
false
);
}
}
@Override
public
List
<
Map
<
String
,
String
>>
totalNum
(
String
bizOrgCode
,
String
systemId
)
{
return
alarmMapper
.
totalNum
(
bizOrgCode
,
systemId
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EmergencyServiceImpl.java
View file @
5334091c
...
...
@@ -627,8 +627,8 @@ public class EmergencyServiceImpl implements IEmergencyService {
@Override
public
Page
<
Map
<
String
,
Object
>>
alarmList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
,
String
systemCode
,
List
<
String
>
types
,
List
<
String
>
emergencyLevels
,
String
name
,
Integer
cleanStatus
,
Integer
handleStatus
,
String
createDate
)
{
return
emergencyMapper
.
alarmList
(
page
,
bizOrgCode
,
systemCode
,
types
,
emergencyLevels
,
name
,
cleanStatus
,
handleStatus
,
createDate
);
public
Page
<
Map
<
String
,
Object
>>
alarmList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
bizOrgCode
,
String
systemCode
,
List
<
String
>
types
,
List
<
String
>
emergencyLevels
,
String
name
,
Integer
cleanStatus
,
Integer
handleStatus
,
String
createDate
,
String
startDate
,
String
endDate
)
{
return
emergencyMapper
.
alarmList
(
page
,
bizOrgCode
,
systemCode
,
types
,
emergencyLevels
,
name
,
cleanStatus
,
handleStatus
,
createDate
,
startDate
,
endDate
);
}
//稳压泵定时向缓存中存昨日启动次数任务
...
...
amos-boot-system-equip/src/main/resources/mapper/AlarmMapper.xml
View file @
5334091c
...
...
@@ -2,4 +2,35 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.equipmanage.mapper.AlarmMapper"
>
<select
id=
"totalNum"
resultType=
"java.util.Map"
>
SELECT count(*) num, 'qlgj' as code from wl_equipment_specific_alarm_log a
where a.biz_org_code = #{bizOrgCode}
<if
test=
"systemId != null and systemId !=''"
>
and FIND_IN_SET(#{systemId},a.system_ids)
</if>
UNION ALL
SELECT count(*) num, 'wfggj' as code from wl_equipment_specific_alarm_log a where a.`status` = 1
and a.biz_org_code = #{bizOrgCode}
<if
test=
"systemId != null and systemId !=''"
>
and FIND_IN_SET(#{systemId},a.system_ids)
</if>
UNION ALL
SELECT count(*) num, 'hzgj' as code from wl_equipment_specific_alarm_log a where a.`type` = 'FIREALARM'
and a.biz_org_code = #{bizOrgCode}
<if
test=
"systemId != null and systemId !=''"
>
and FIND_IN_SET(#{systemId},a.system_ids)
</if>
UNION ALL
SELECT count(*) num, 'gzgj' as code from wl_equipment_specific_alarm_log a where a.`type` = 'BREAKDOWN'
and a.biz_org_code = #{bizOrgCode}
<if
test=
"systemId != null and systemId !=''"
>
and FIND_IN_SET(#{systemId},a.system_ids)
</if>
UNION ALL
SELECT count(*) num, 'pbgj' as code from wl_equipment_specific_alarm_log a where a.`type` = 'SHIELD'
and a.biz_org_code = #{bizOrgCode}
<if
test=
"systemId != null and systemId !=''"
>
and FIND_IN_SET(#{systemId},a.system_ids)
</if>
</select>
</mapper>
amos-boot-system-equip/src/main/resources/mapper/EmergencyMapper.xml
View file @
5334091c
...
...
@@ -1422,6 +1422,7 @@
wlesal.equipment_specific_code AS code,
wlesal.equipment_specific_index_key AS fireEquipmentSpecificIndexKey,
wlesal.equipment_specific_index_name AS fireEquipmentSpecificIndexName,
wlesal.emergency_level_color AS emergencyLevelColor,
CASE wlesal.equipment_specific_index_value
WHEN 'true' THEN '是'
WHEN 'false' THEN '否'
...
...
@@ -1453,6 +1454,12 @@
<if
test=
'createDate != null and createDate == "1"'
>
AND wlesal.create_date LIKE CONCAT( DATE_FORMAT( NOW( ), '%Y-%m-%d' ), '%' )
</if>
<if
test=
'startDate != null and startDate == ""'
>
AND wlesal.create_date >= DATE_FORMAT( ${startDate}, '%Y-%m-%d %H:%i:%s' )
</if>
<if
test=
'endDate != null and endDate == ""'
>
AND DATE_FORMAT( ${endDate}, '%Y-%m-%d %H:%i:%s' ) >= wlesal.create_date
</if>
<if
test=
"systemCode != null and systemCode != ''"
>
and fs.code = #{systemCode}
</if>
...
...
@@ -1486,6 +1493,86 @@
wlesal.create_date DESC
</select>
<select
id=
"alarmListNoPage"
resultType=
"java.util.Map"
>
SELECT
wlesal.id,
concat(wlesal.equipment_specific_name, wlesal.equipment_specific_index_name) AS alamContent,
IF (wlesal.confirm_type IS NULL, '未确认', '已确认') handleStatus,
IF (wlesal.clean_time IS NOT NULL, '已消除', '未消除' ) cleanStatus,
wlesal.equipment_index_id AS fireEquipmentIndexId,
wlesal.equipment_specific_code AS code,
wlesal.equipment_specific_index_key AS fireEquipmentSpecificIndexKey,
wlesal.equipment_specific_index_name AS fireEquipmentSpecificIndexName,
CASE wlesal.equipment_specific_index_value
WHEN 'true' THEN '是'
WHEN 'false' THEN '否'
ELSE wlesal.equipment_specific_index_value
END AS fireEquipmentPointValue,
wlesal.type AS typeCode,
(
SELECT
type_name
FROM
wl_signal_classify sc
WHERE
sc.type_code = wlesal.type
LIMIT 1
) AS type,
wlesal.equipment_specific_name AS equipmentSpecificName,
wlesal.location,
date_format(wlesal.create_date, '%Y-%m-%d %H:%i:%s') createDate,
wlesal.emergency_level_describe AS emergencyLevelDescribe,
fs.name AS systemName
FROM
wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment_specific wes ON wes.id = wlesal.equipment_specific_id
LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, wlesal.system_ids )
<where>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and wlesal.biz_org_code like concat(#{bizOrgCode},'%')
</if>
<if
test=
'createDate != null and createDate == "1"'
>
AND wlesal.create_date LIKE CONCAT( DATE_FORMAT( NOW( ), '%Y-%m-%d' ), '%' )
</if>
<if
test=
'startDate != null and startDate == ""'
>
AND wlesal.create_date >= DATE_FORMAT( ${startDate}, '%Y-%m-%d %H:%i:%s' )
</if>
<if
test=
'endDate != null and endDate == ""'
>
AND DATE_FORMAT( ${endDate}, '%Y-%m-%d %H:%i:%s' ) >= wlesal.create_date
</if>
<if
test=
"systemCode != null and systemCode != ''"
>
and fs.code = #{systemCode}
</if>
<if
test=
"name != null and name != ''"
>
and wlesal.equipment_specific_name like concat('%', #{name},'%')
</if>
<if
test=
"cleanStatus != null and cleanStatus != '' and cleanStatus == 2"
>
and wlesal.clean_time IS NULL
</if>
<if
test=
"cleanStatus != null and cleanStatus != '' and cleanStatus == 1"
>
and wlesal.clean_time IS NOT NULL
</if>
<if
test=
"handleStatus != null and handleStatus != '' and handleStatus == 2"
>
and wlesal.confirm_type IS NULL
</if>
<if
test=
"handleStatus != null and handleStatus != '' and handleStatus == 1"
>
and wlesal.confirm_type IS NOT NULL
</if>
<if
test=
"types != null"
>
<foreach
collection=
"types"
index=
"index"
item=
"item"
open=
"and ("
separator=
" OR "
close=
")"
>
wlesal.type = #{item}
</foreach>
</if>
<if
test=
"emergencyLevels != null"
>
<foreach
collection=
"emergencyLevels"
index=
"index"
item=
"item"
open=
"and ("
separator=
" OR "
close=
")"
>
wlesal.emergency_level = #{item}
</foreach>
</if>
</where>
ORDER BY
wlesal.create_date DESC
</select>
<select
id=
"getEmergencyMaterials"
resultType=
"java.util.Map"
>
SELECT
*
...
...
amos-boot-utils/amos-boot-utils-adpter/pom.xml
0 → 100644
View file @
5334091c
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<artifactId>
amos-boot-utils
</artifactId>
<groupId>
com.amosframework.boot
</groupId>
<version>
1.0.0
</version>
</parent>
<artifactId>
amos-boot-utils-adpter
</artifactId>
<properties>
<tyboot.version>
1.1.23-SNAPSHOT
</tyboot.version>
</properties>
<dependencies>
<dependency>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-core
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
net.sf.json-lib
</groupId>
<artifactId>
json-lib
</artifactId>
<version>
2.4
</version>
<classifier>
jdk15
</classifier>
</dependency>
<dependency>
<artifactId>
mysql-connector-java
</artifactId>
<groupId>
mysql
</groupId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
amos-boot-utils/amos-boot-utils-adpter/src/main/java/com/yeejoin/amos/AmosBootUtilsAdpterApplication.java
0 → 100644
View file @
5334091c
package
com
.
yeejoin
.
amos
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.Environment
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
/**
* <pre>
* 服务启动类
* </pre>
*
* @author amos
* @version $Id: AmosBootUtilsAdpterApplication, v 0.1 2024年5月7日 下午4:56:29 amos Exp $
*/
@SpringBootApplication
@EnableConfigurationProperties
@ServletComponentScan
@EnableDiscoveryClient
@EnableFeignClients
@EnableAsync
@EnableEurekaClient
@ComponentScan
({
"org.typroject"
,
"com.yeejoin.amos"
})
public
class
AmosBootUtilsAdpterApplication
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosBootUtilsAdpterApplication
.
class
);
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
AmosBootUtilsAdpterApplication
.
class
,
args
);
Environment
env
=
context
.
getEnvironment
();
String
ip
=
InetAddress
.
getLocalHost
().
getHostAddress
();
String
port
=
env
.
getProperty
(
"server.port"
);
String
path
=
env
.
getProperty
(
"server.servlet.context-path"
);
logger
.
info
(
"\n----------------------------------------------------------\n\t"
+
"Application Amos-Biz-Boot is running! Access URLs:\n\t"
+
"Swagger文档: \thttp://"
+
ip
+
":"
+
port
+
path
+
"/doc.html\n"
+
"----------------------------------------------------------"
);
}
}
amos-boot-utils/amos-boot-utils-adpter/src/main/java/com/yeejoin/amos/adpter/controller/AdpterController.java
0 → 100644
View file @
5334091c
package
com
.
yeejoin
.
amos
.
adpter
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.adpter.service.AdpterService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Map
;
/**
* 同步接口
*
* @author system_generator
* @date 2021-06-29
*/
@RestController
@Slf4j
@Api
(
tags
=
"同步接口Api"
)
@RequestMapping
(
value
=
"/adpter"
)
public
class
AdpterController
{
@Autowired
AdpterService
adpterService
;
/**
* 同步接口Api
*
* @return
*/
@GetMapping
(
value
=
"/tran"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"同步接口Api"
,
notes
=
"同步接口Api"
)
public
Map
<
String
,
String
>
tran
()
{
Map
<
String
,
String
>
handle
=
adpterService
.
handle
();
return
handle
;
}
}
\ No newline at end of file
amos-boot-utils/amos-boot-utils-adpter/src/main/java/com/yeejoin/amos/adpter/service/AdpterService.java
0 → 100644
View file @
5334091c
This diff is collapsed.
Click to expand it.
amos-boot-utils/amos-boot-utils-adpter/src/main/resources/application-dev.properties
0 → 100644
View file @
5334091c
#\u6CE8\u518C\u4E2D\u5FC3\u5730\u5740
#eureka.client.service-url.defaultZone =http://172.16.11.201:10001/eureka/
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
eureka.instance.health-check-url-path
=
/actuator/health
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url-path
=
/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://172.16.11.201:${server.port}${server.servlet.context-path}/swagger-ui.html
#服务实例ip地址,若eureka.instance.prefer-ip-address=false,ip-address设置失效,一般情况不用设置。
#eureka.instance.ip-address= 172.16.3.135
#eureka服务ip配置,可填写固定ip地址
eureka.instance.hostname
=
172.16.11.201
#eureka服务配置的校验账号及密码,配置需和eureka服务后台配置文件中一致
spring.security.user.name
=
admin
spring.security.user.password
=
a1234560
eureka.client.serviceUrl.defaultZone
=
http://${spring.security.user.name}:${spring.security.user.password}@${eureka.instance.hostname}:10001/eureka/
##########eureka配置信息###############
management.health.redis.enabled
=
false
source.jdbc.ip
=
jdbc:mysql://172.16.11.201:3306/dl_amos_common_biz?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
goal.jdbc.ip
=
jdbc:mysql://172.16.11.201:3306/dl_amos_common_biz_20230828?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
source.jdbc.ip.idx
=
jdbc:mysql://172.16.11.201:3306/dl_amos_idx_biz?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
goal.jdbc.ip.idx
=
jdbc:mysql://172.16.11.201:3306/dl_amos_idx_biz_bak?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
source.jdbc.ip.buss
=
jdbc:mysql://172.16.11.201:3306/dl_business?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
goal.jdbc.ip.buss
=
jdbc:mysql://172.16.11.201:3306/dl_business_copy?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
yeejoin.user
=
root
yeejoin.pwd
=
Yeejoin@2020
\ No newline at end of file
amos-boot-utils/amos-boot-utils-adpter/src/main/resources/application.properties
0 → 100644
View file @
5334091c
spring.application.name
=
AMOS-ADPTER
server.servlet.context-path
=
/adpter
server.port
=
8120
spring.profiles.active
=
dev
spring.jackson.time-zone
=
GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.serialization.write-dates-as-timestamps
=
true
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
logging.config
=
classpath:logback-${spring.profiles.active}.xml
\ No newline at end of file
amos-boot-utils/amos-boot-utils-adpter/src/main/resources/logback-dev.xml
0 → 100644
View file @
5334091c
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
>
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property
name=
"LOG_HOME"
value=
"log"
/>
<!-- 按照每天生成日志文件 -->
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_HOME}/jpush.log.%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>
30
</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>
30mb
</MaxFileSize>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger
name=
"com.apache.ibatis"
level=
"DEBUG"
/>
<logger
name=
"org.mybatis"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Connection"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Statement"
level=
"DEBUG"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"DEBUG"
/>
<logger
name=
"org.springframework"
level=
"DEBUG"
/>
<!-- 日志输出级别 -->
<root
level=
"DEBUG"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"STDOUT"
/>
</root>
</configuration>
\ No newline at end of file
amos-boot-utils/amos-boot-utils-adpter/src/main/resources/logback-qa.xml
0 → 100644
View file @
5334091c
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
>
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property
name=
"LOG_HOME"
value=
"log"
/>
<!-- 按照每天生成日志文件 -->
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_HOME}/jpush.%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>
30
</MaxHistory>
<!--按大小分割同一天的-->
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger
name=
"com.apache.ibatis"
level=
"INFO"
/>
<logger
name=
"org.mybatis"
level=
"INFO"
/>
<logger
name=
"java.sql.Connection"
level=
"INFO"
/>
<logger
name=
"java.sql.Statement"
level=
"INFO"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"INFO"
/>
<logger
name=
"com.baomidou.mybatisplus"
level=
"INFO"
/>
<logger
name=
"org.typroject"
level=
"INFO"
/>
<logger
name=
"com.yeejoin.amos"
level=
"INFO"
/>
<logger
name=
"org.springframework"
level=
"INFO"
/>
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
<appender-ref
ref=
"FILE"
/>
</root>
</configuration>
\ No newline at end of file
amos-boot-utils/pom.xml
View file @
5334091c
...
...
@@ -21,5 +21,6 @@
<module>
amos-boot-utils-video
</module>
<module>
amos-boot-utils-speech
</module>
<module>
amos-boot-utils-message
</module>
<module>
amos-boot-utils-adpter
</module>
</modules>
</project>
\ 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