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
c8da209c
Commit
c8da209c
authored
Dec 07, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
abd18c67
fd5dd490
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
982 additions
and
150 deletions
+982
-150
KnowledgebaseFeignClient.java
...oot/module/common/api/feign/KnowledgebaseFeignClient.java
+31
-0
ControllerDto.java
...m/yeejoin/amos/boot/module/jcs/api/dto/ControllerDto.java
+35
-21
ControllerLogDto.java
...eejoin/amos/boot/module/jcs/api/dto/ControllerLogDto.java
+50
-0
Controller.java
...m/yeejoin/amos/boot/module/jcs/api/entity/Controller.java
+32
-29
ControllerLog.java
...eejoin/amos/boot/module/jcs/api/entity/ControllerLog.java
+55
-0
AlertStageEnums.java
...ejoin/amos/boot/module/jcs/api/enums/AlertStageEnums.java
+6
-0
ControllerGroupEnum.java
...n/amos/boot/module/jcs/api/enums/ControllerGroupEnum.java
+30
-0
ControllerTypeEnum.java
...in/amos/boot/module/jcs/api/enums/ControllerTypeEnum.java
+13
-16
ControllerLogMapper.java
.../amos/boot/module/jcs/api/mapper/ControllerLogMapper.java
+19
-0
ControllerMapper.java
...oin/amos/boot/module/jcs/api/mapper/ControllerMapper.java
+5
-1
IControllerEquipService.java
.../boot/module/jcs/api/service/IControllerEquipService.java
+9
-0
IControllerLogService.java
...os/boot/module/jcs/api/service/IControllerLogService.java
+12
-0
IControllerService.java
.../amos/boot/module/jcs/api/service/IControllerService.java
+11
-0
ControllerLogMapper.xml
...jcs-api/src/main/resources/mapper/ControllerLogMapper.xml
+20
-0
ControllerMapper.xml
...le-jcs-api/src/main/resources/mapper/ControllerMapper.xml
+14
-0
LatentDangerState.java
...oin/amos/latentdanger/common/enums/LatentDangerState.java
+1
-1
FireStationServiceImpl.java
...odule/common/biz/service/impl/FireStationServiceImpl.java
+12
-4
RealTimeSpeechTranscriberListener.java
...cs/biz/audioToText/RealTimeSpeechTranscriberListener.java
+0
-6
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+41
-28
ControllerController.java
.../boot/module/jcs/biz/controller/ControllerController.java
+85
-0
ControllerEquipController.java
.../module/jcs/biz/controller/ControllerEquipController.java
+44
-0
ControllerLogController.java
...ot/module/jcs/biz/controller/ControllerLogController.java
+135
-0
PowerTransferController.java
...ot/module/jcs/biz/controller/PowerTransferController.java
+0
-2
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+0
-0
ControllerEquipServiceImpl.java
...dule/jcs/biz/service/impl/ControllerEquipServiceImpl.java
+46
-5
ControllerLogServiceImpl.java
...module/jcs/biz/service/impl/ControllerLogServiceImpl.java
+50
-0
ControllerServiceImpl.java
...ot/module/jcs/biz/service/impl/ControllerServiceImpl.java
+0
-0
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+3
-1
PowerTransferServiceImpl.java
...module/jcs/biz/service/impl/PowerTransferServiceImpl.java
+0
-0
DocContentResource.java
...oin/amos/knowledgebase/controller/DocContentResource.java
+29
-16
TagInstanceResource.java
...in/amos/knowledgebase/controller/TagInstanceResource.java
+37
-2
TagValueResource.java
...ejoin/amos/knowledgebase/controller/TagValueResource.java
+24
-3
DocContentService.java
...in/amos/knowledgebase/face/service/DocContentService.java
+16
-0
TagInstanceService.java
...n/amos/knowledgebase/face/service/TagInstanceService.java
+24
-9
TagValueService.java
...join/amos/knowledgebase/face/service/TagValueService.java
+14
-0
BeanDtoVoUtils.java
...eejoin/amos/boot/module/tzs/biz/utils/BeanDtoVoUtils.java
+29
-0
EquipmentController.java
...ot/module/tzs/flc/biz/controller/EquipmentController.java
+4
-4
application.properties
...boot-system-jcs/src/main/resources/application.properties
+2
-0
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+36
-0
KnowledgebaseApplication.java
.../main/java/com/yeejoin/amos/KnowledgebaseApplication.java
+6
-0
application-dev.properties
...owledgebase/src/main/resources/application-dev.properties
+1
-1
AppNslClient.java
...h/src/main/java/com/yeejoin/amos/speech/AppNslClient.java
+1
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/KnowledgebaseFeignClient.java
0 → 100644
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
feign
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
@FeignClient
(
name
=
"${Knowledgebase.fegin.name}"
,
path
=
"knowledgebase"
,
configuration
=
{
MultipartSupportConfig
.
class
})
public
interface
KnowledgebaseFeignClient
{
@RequestMapping
(
value
=
"/v1/tagvalue/getAll/tegartValue"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Object
>
getAllTegartValue
(
@RequestParam
String
value
)
;
@RequestMapping
(
value
=
"/v1/taginstance/find/{id}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Object
>
findById
(
@PathVariable
(
"id"
)
Long
id
);
@RequestMapping
(
value
=
"/v1/doccontent/getSimpleDetail/{sequenceNbr}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Object
>
getSimpleDetail
(
@PathVariable
(
value
=
"sequenceNbr"
)
String
sequenceNbr
);
@RequestMapping
(
value
=
"/v1/taginstance/targetSeq/{id}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Object
>
queryListByTargetSeq
(
@PathVariable
(
"id"
)
Long
id
);
@RequestMapping
(
value
=
"/v1/tagvalue/getOne/"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Object
>
queryByInstance
(
@RequestParam
Long
id
)
;
@RequestMapping
(
value
=
"/v1/taginstance/getTarget/byName"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Object
>
queryListByTagName
(
@RequestParam
String
name
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/ControllerDto.java
View file @
c8da209c
...
...
@@ -3,13 +3,13 @@ package com.yeejoin.amos.boot.module.jcs.api.dto;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerTypeEnum
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
*
* <pre>
* 联动控制器
* </pre>
...
...
@@ -24,37 +24,51 @@ public class ControllerDto extends BaseDto {
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
/**
* 控制站
*/
* 控制站
*/
@ApiModelProperty
(
value
=
"控制站"
)
private
String
station
;
/**
* ip
*/
/**
* ip
*/
@ApiModelProperty
(
value
=
"ip"
)
private
String
ip
;
/**
* 端口
*/
/**
* 端口
*/
@ApiModelProperty
(
value
=
"端口"
)
private
Integer
port
;
/**
* 控制器名称
*/
/**
* 控制器名称
*/
@ApiModelProperty
(
value
=
"控制器名称"
)
private
String
name
;
/**
* 控制器类别
*/
/**
* 控制器类别
*/
@ApiModelProperty
(
value
=
"控制器类别"
)
private
String
type
;
/**
* 状态
*/
/**
* 控制器类别枚举
*/
@ApiModelProperty
(
value
=
"控制器类别"
)
private
ControllerTypeEnum
typeEnum
;
/**
* 控制器类别名称
*/
@ApiModelProperty
(
value
=
"控制器类别名称"
)
private
String
typeDescription
;
/**
* 状态
*/
@ApiModelProperty
(
value
=
"状态"
)
private
String
state
;
/**
* 关联的消防队伍ID
*/
@ApiModelProperty
(
value
=
"关联的消防队伍ID"
)
private
String
fireTeamSeq
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/ControllerLogDto.java
0 → 100644
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* @author system_generator
* @date 2021-12-03
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"ControllerLogDto"
)
public
class
ControllerLogDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"控制站ID"
)
private
Long
controllerSeq
;
@ApiModelProperty
(
value
=
"控制站名称"
)
private
Long
controllerName
;
@ApiModelProperty
(
value
=
"装备ID"
)
private
Long
equipSeq
;
@ApiModelProperty
(
value
=
"装备名称"
)
private
Long
equipName
;
@ApiModelProperty
(
value
=
"变更后状态"
)
private
String
state
;
@ApiModelProperty
(
value
=
"变更后状态描述"
)
private
Long
stateDescription
;
@ApiModelProperty
(
value
=
"变更人ID"
)
private
String
executeUserSeq
;
@ApiModelProperty
(
value
=
"变更人姓名"
)
private
String
executeUserName
;
@ApiModelProperty
(
value
=
"变更时间"
)
private
Date
executeDate
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/Controller.java
View file @
c8da209c
...
...
@@ -8,7 +8,6 @@ import lombok.EqualsAndHashCode;
import
lombok.experimental.Accessors
;
/**
*
* <pre>
* 联动控制器
* </pre>
...
...
@@ -22,39 +21,43 @@ import lombok.experimental.Accessors;
@TableName
(
"jc_controller"
)
public
class
Controller
extends
BaseEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
*
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* 控制站
*/
@TableField
(
"station"
)
/**
* 控制站
*/
@TableField
(
"station"
)
private
String
station
;
/**
* ip
*/
@TableField
(
"c_ip"
)
/**
* ip
*/
@TableField
(
"c_ip"
)
private
String
ip
;
/**
* 端口
*/
@TableField
(
"c_port"
)
/**
* 端口
*/
@TableField
(
"c_port"
)
private
Integer
port
;
/**
* 控制器名称
*/
@TableField
(
"c_name"
)
/**
* 控制器名称
*/
@TableField
(
"c_name"
)
private
String
name
;
/**
* 控制器类别
*/
@TableField
(
"type"
)
/**
* 控制器类别
*/
@TableField
(
"type"
)
private
String
type
;
/**
* 状态
*/
@TableField
(
"c_state"
)
/**
* 状态
*/
@TableField
(
"c_state"
)
private
String
state
;
/**
* 关联的消防队伍ID
*/
@TableField
(
value
=
"fire_team_seq"
)
private
String
fireTeamSeq
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/ControllerLog.java
0 → 100644
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
* @author system_generator
* @date 2021-12-03
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"jc_controller_log"
)
public
class
ControllerLog
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 控制站ID
*/
@TableField
(
"controller_seq"
)
private
Long
controllerSeq
;
/**
* 装备ID
*/
@TableField
(
"equip_seq"
)
private
Long
equipSeq
;
/**
* 变更后状态
*/
@TableField
(
"state"
)
private
String
state
;
/**
* 变更人ID
*/
@TableField
(
"execute_user_seq"
)
private
Long
executeUserSeq
;
/**
* 变更时间
*/
@TableField
(
"execute_date"
)
private
Date
executeDate
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/enums/AlertStageEnums.java
View file @
c8da209c
...
...
@@ -52,6 +52,12 @@ public enum AlertStageEnums {
fireBrigade
(
"fireBrigade"
,
"岗位名称,规则配置"
),
airportUnit
(
"airportUnit"
,
"人员职务规则配置"
),
flag
(
"flag"
,
"值班单位"
),
keySiteExcle
(
"keySiteExcle"
,
"重点部位"
),
救援预案警情类型
(
"0"
,
"救援预案警情类型"
),
责任单位
(
"1"
,
"责任单位"
),
重点部位名称
(
"2"
,
"重点部位名称"
),
航空器救援子类
(
"3"
,
"航空器救援子类"
),
aircraftRescueSub
(
"aircraftRescueSub"
,
"航空器救援子类"
),
JKDD
(
"6"
,
"企(事)业单位监控大队"
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/enums/ControllerGroupEnum.java
0 → 100644
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* <pre>
* 联动控制器大队枚举
* </pre>
*
* @author gwb
* @version $Id: ControllerTypeEnum.java, v 0.1 2021年8月20日 上午10:21:44 gwb Exp $
*/
@AllArgsConstructor
@Getter
public
enum
ControllerGroupEnum
{
ONE
(
"一大队"
,
1
,
1
),
TWO
(
"二大队"
,
3
,
2
),
THREE
(
"三大队"
,
2
,
3
);
private
final
String
name
;
private
final
int
type
;
private
final
int
order
;
public
static
ControllerGroupEnum
getEnum
(
int
type
)
{
for
(
ControllerGroupEnum
status
:
ControllerGroupEnum
.
values
())
{
if
(
status
.
getType
()
==
type
)
{
return
status
;
}
}
return
null
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/enums/ControllerTypeEnum.java
View file @
c8da209c
...
...
@@ -4,7 +4,6 @@ import lombok.AllArgsConstructor;
import
lombok.Getter
;
/**
*
* <pre>
* 联动控制器类型枚举
* </pre>
...
...
@@ -16,12 +15,13 @@ import lombok.Getter;
@AllArgsConstructor
public
enum
ControllerTypeEnum
{
BELL
(
"1"
,
"警铃"
),
BROADCAST
(
"2"
,
"广播"
),
DOOR
(
"3"
,
"车库门"
);
BELL
(
"1"
,
"警铃"
,
1
),
BROADCAST
(
"2"
,
"广播"
,
2
),
DOOR
(
"3"
,
"车库门"
,
3
);
private
String
code
;
private
String
name
;
private
int
sort
;
public
String
getCode
()
{
...
...
@@ -39,16 +39,13 @@ public enum ControllerTypeEnum {
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
static
ControllerTypeEnum
getEnum
(
String
code
)
{
for
(
ControllerTypeEnum
status
:
ControllerTypeEnum
.
values
())
{
if
(
status
.
getCode
().
equals
(
code
))
{
return
status
;
}
}
return
null
;
}
public
static
ControllerTypeEnum
getEnum
(
String
code
)
{
for
(
ControllerTypeEnum
status
:
ControllerTypeEnum
.
values
())
{
if
(
status
.
getCode
().
equals
(
code
))
{
return
status
;
}
}
return
null
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/ControllerLogMapper.java
0 → 100644
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.ControllerLog
;
import
java.util.List
;
import
java.util.Map
;
/**
* Mapper 接口
*
* @author system_generator
* @date 2021-12-03
*/
public
interface
ControllerLogMapper
extends
BaseMapper
<
ControllerLog
>
{
List
<
Map
<
String
,
Object
>>
selectToday
();
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/ControllerMapper.java
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ControllerDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Controller
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
*
* <pre>
* 联动控制器 Mapper 接口
* </pre>
...
...
@@ -14,4 +17,5 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.Controller;
*/
public
interface
ControllerMapper
extends
BaseMapper
<
Controller
>
{
public
List
<
ControllerDto
>
getCurrentStationController
(
@Param
(
"sequenceNbr"
)
Long
sequenceNbr
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IControllerEquipService.java
0 → 100644
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
/**
* 接口类
*
* @author system_generator
* @date 2021-12-03
*/
public
interface
IControllerEquipService
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IControllerLogService.java
0 → 100644
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
/**
* 接口类
*
* @author system_generator
* @date 2021-12-03
*/
public
interface
IControllerLogService
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IControllerService.java
0 → 100644
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
/**
* 接口类
*
* @author system_generator
* @date 2021-12-03
*/
public
interface
IControllerService
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/ControllerLogMapper.xml
0 → 100644
View file @
c8da209c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jcs.api.mapper.ControllerLogMapper"
>
<select
id=
"selectToday"
resultType=
"java.util.HashMap"
>
SELECT
a.sequence_nbr as sequenceNbr,
a.state,
DATE_FORMAT(a.execute_date, '%Y-%m-%d %H:%i:%s') as executeDate,
b.station,
b.type
FROM
jc_controller_log a
LEFT JOIN jc_controller b ON a.controller_seq = b.sequence_nbr
WHERE
TO_DAYS( a.execute_date ) = TO_DAYS( NOW( ) )
ORDER BY a.execute_date DESC
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/ControllerMapper.xml
0 → 100644
View file @
c8da209c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jcs.api.mapper.ControllerMapper"
>
<select
id=
"getCurrentStationController"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.ControllerDto"
>
SELECT
*
FROM
jc_controller
WHERE
station = ( SELECT station FROM jc_controller WHERE sequence_nbr = #{sequenceNbr} )
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-latentdanger-api/src/main/java/com/yeejoin/amos/latentdanger/common/enums/LatentDangerState.java
View file @
c8da209c
...
...
@@ -45,7 +45,7 @@ public interface LatentDangerState {
/**
* 检查组长确认
*/
检查组长确认
(
"检查组长确认"
,
"leaderConfirm"
,
"secondConfirm"
,
"onSiteConfirm"
,
"1"
,
""
),
检查组长确认
(
"检查组长确认"
,
"leaderConfirm"
,
"secondConfirm"
,
"onSiteConfirm"
,
"1"
,
"
auditRecordPage
"
),
/**
* 隐患二次审核确认
*/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FireStationServiceImpl.java
View file @
c8da209c
...
...
@@ -116,8 +116,12 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
if
(
model
.
getAddress
()
!=
null
)
{
JSONObject
address
=
WaterResourceServiceImpl
.
getLongLatFromAddress
(
model
.
getAddress
());
model
.
setAddress
(
address
.
getString
(
BizConstant
.
ADDRESS
));
model
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
model
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
if
(!
"0"
.
equals
(
address
.
getString
(
BizConstant
.
LONGITUDE
)))
{
model
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
}
if
(!
"0"
.
equals
(
address
.
getString
(
BizConstant
.
LATITUDE
)))
{
model
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
}
}
}
FireStation
entity
=
this
.
prepareEntity
(
model
);
...
...
@@ -139,8 +143,12 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
if
(
model
.
getAddress
()
!=
null
)
{
JSONObject
address
=
WaterResourceServiceImpl
.
getLongLatFromAddress
(
model
.
getAddress
());
model
.
setAddress
(
address
.
getString
(
BizConstant
.
ADDRESS
));
model
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
model
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
if
(!
"0"
.
equals
(
address
.
getString
(
BizConstant
.
LONGITUDE
)))
{
model
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
}
if
(!
"0"
.
equals
(
address
.
getString
(
BizConstant
.
LATITUDE
)))
{
model
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
}
}
FireStation
entity
=
this
.
prepareEntity
(
model
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/audioToText/RealTimeSpeechTranscriberListener.java
View file @
c8da209c
...
...
@@ -66,9 +66,6 @@ public class RealTimeSpeechTranscriberListener extends SpeechTranscriberListener
@Override
public
void
onTranscriberStart
(
SpeechTranscriberResponse
response
)
{
logger
.
warn
(
"服务端准备好了进行识别"
);
logger
.
warn
(
"task_id: "
+
response
.
getTaskId
()
+
", name: "
+
response
.
getName
()
+
", status: "
+
response
.
getStatus
());
}
/**
...
...
@@ -77,9 +74,6 @@ public class RealTimeSpeechTranscriberListener extends SpeechTranscriberListener
@Override
public
void
onSentenceBegin
(
SpeechTranscriberResponse
response
)
{
logger
.
warn
(
"服务端检测到了一句话的开始"
);
logger
.
warn
(
"task_id: "
+
response
.
getTaskId
()
+
", name: "
+
response
.
getName
()
+
", status: "
+
response
.
getStatus
());
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
java.lang.reflect.Field
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.component.event.RestEventTrigger
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -25,36 +54,9 @@ import com.yeejoin.amos.boot.module.jcs.api.enums.AlertStatusEnum;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.ESAlertCalledService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.component.event.RestEventTrigger
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.lang.reflect.Field
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
...
...
@@ -515,4 +517,14 @@ public class AlertCalledController extends BaseController {
public
ResponseModel
<
Object
>
getLocationLike
(
@RequestParam
(
required
=
false
)
String
locationt
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getLocationLike
(
locationt
));
}
/**
* 警情预案匹配
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/police/situation/match"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"警情预案匹配"
,
notes
=
"警情预案匹配"
)
public
ResponseModel
<
Object
>
toCompletePoliceSituationMatch
(
@RequestParam
Long
id
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
toCompletePoliceSituationMatch
(
id
));
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ControllerController.java
0 → 100644
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ControllerDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Controller
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.ControllerLog
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerGroupEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.ControllerEquipServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.ControllerLogServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.ControllerServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
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
java.util.*
;
/**
* 联动控制器
*
* @author system_generator
* @date 2021-12-03
*/
@RestController
@Api
(
tags
=
"Api"
)
@RequestMapping
(
value
=
"/controller"
)
public
class
ControllerController
extends
BaseController
{
@Autowired
ControllerServiceImpl
controllerServiceImpl
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新联动控制器状态"
,
notes
=
"更新联动控制器状态"
)
@PostMapping
(
value
=
"/updateControllerState"
)
public
ResponseModel
<
Object
>
updateControllerState
(
@RequestBody
Controller
[]
controllers
)
{
return
ResponseHelper
.
buildResponse
(
controllerServiceImpl
.
changeControllerState
(
controllers
));
}
/**
* 列表全部数据查询
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
Object
>
selectForList
()
{
List
<
Controller
>
controllerList
=
controllerServiceImpl
.
list
();
List
<
Map
<
String
,
Object
>>
controllerStations
=
new
ArrayList
<>();
//分类联动控制站点
HashSet
<
Integer
>
controllerStation
=
new
HashSet
<>();
controllerList
.
forEach
(
controller
->
controllerStation
.
add
(
Integer
.
valueOf
(
controller
.
getStation
())));
controllerStation
.
forEach
(
station
->
{
ArrayList
<
ControllerDto
>
controllerDtos
=
new
ArrayList
<>();
controllerList
.
forEach
(
controller
->
{
if
(
station
.
equals
(
Integer
.
valueOf
(
controller
.
getStation
())))
{
ControllerDto
controllerDto
=
new
ControllerDto
();
ControllerTypeEnum
anEnum
=
ControllerTypeEnum
.
getEnum
(
controller
.
getType
());
BeanUtils
.
copyProperties
(
controller
,
controllerDto
);
controllerDto
.
setTypeEnum
(
anEnum
);
controllerDto
.
setTypeDescription
(
anEnum
.
getName
());
controllerDtos
.
add
(
controllerDto
);
}
});
//类型排序
controllerDtos
.
sort
(
Comparator
.
comparingInt
(
o
->
o
.
getTypeEnum
().
getSort
()));
HashMap
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"groupEnum"
,
ControllerGroupEnum
.
getEnum
(
station
));
result
.
put
(
"groupName"
,
Objects
.
requireNonNull
(
ControllerGroupEnum
.
getEnum
(
station
)).
getName
());
result
.
put
(
"controllers"
,
controllerDtos
);
controllerStations
.
add
(
result
);
});
//大队排序
controllerStations
.
sort
(
Comparator
.
comparingInt
(
o
->
((
ControllerGroupEnum
)
o
.
get
(
"groupEnum"
)).
getOrder
()));
return
ResponseHelper
.
buildResponse
(
controllerStations
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ControllerEquipController.java
0 → 100644
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ControllerEquipDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.ControllerEquip
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.ControllerEquipServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
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
java.util.List
;
/**
* 控制器设备
*
* @author system_generator
* @date 2021-12-03
*/
@RestController
@Api
(
tags
=
"Api"
)
@RequestMapping
(
value
=
"/controller-equip"
)
public
class
ControllerEquipController
extends
BaseController
{
@Autowired
ControllerEquipServiceImpl
controllerEquipServiceImpl
;
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
ControllerEquip
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
controllerEquipServiceImpl
.
list
());
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ControllerLogController.java
0 → 100644
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ControllerLogDto
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerGroupEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.ControllerLogServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
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
java.util.List
;
import
java.util.Map
;
/**
* 联动控制日志记录
*
* @author system_generator
* @date 2021-12-03
*/
@RestController
@Api
(
tags
=
"Api"
)
@RequestMapping
(
value
=
"/controller-log"
)
public
class
ControllerLogController
extends
BaseController
{
@Autowired
ControllerLogServiceImpl
controllerLogServiceImpl
;
/**
* 新增
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
ControllerLogDto
>
save
(
@RequestBody
ControllerLogDto
model
)
{
model
=
controllerLogServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
ControllerLogDto
>
updateBySequenceNbrControllerLog
(
@RequestBody
ControllerLogDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
controllerLogServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除"
,
notes
=
"根据sequenceNbr删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
controllerLogServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
ControllerLogDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
controllerLogServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 获取今天的记录
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取今天的记录"
,
notes
=
"获取今天的记录"
)
@GetMapping
(
value
=
"/selectToday"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectToday
()
{
List
<
Map
<
String
,
Object
>>
controllerLogDtos
=
controllerLogServiceImpl
.
selectToday
();
controllerLogDtos
.
forEach
(
item
->
{
item
.
put
(
"station"
,
ControllerGroupEnum
.
getEnum
(
Integer
.
parseInt
(
item
.
get
(
"station"
).
toString
())).
getName
());
item
.
put
(
"type"
,
ControllerTypeEnum
.
getEnum
(
item
.
get
(
"type"
).
toString
()).
getName
());
});
return
ResponseHelper
.
buildResponse
(
controllerLogDtos
);
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
Page
<
ControllerLogDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
ControllerLogDto
>
page
=
new
Page
<
ControllerLogDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
controllerLogServiceImpl
.
queryForControllerLogPage
(
page
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
ControllerLogDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
controllerLogServiceImpl
.
queryForControllerLogList
());
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/PowerTransferController.java
View file @
c8da209c
...
...
@@ -177,10 +177,8 @@ public class PowerTransferController extends BaseController {
AgencyUserModel
userInfo
=
getUserInfo
();
powerTransferDto
.
setTaskSenderId
(
Long
.
parseLong
(
userInfo
.
getUserId
()));
powerTransferDto
.
setTaskSenderName
(
userInfo
.
getRealName
());
String
companyName
=
getSelectedOrgInfo
().
getCompany
().
getCompanyName
();
powerTransferDto
.
setCompanyName
(
companyName
);
boolean
save
=
powerTransferService
.
createPowerTransfer
(
powerTransferDto
);
return
ResponseHelper
.
buildResponse
(
save
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
c8da209c
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ControllerEquipServiceImpl.java
View file @
c8da209c
...
...
@@ -3,6 +3,12 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.common.api.feign.JcsControlServerClient
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Controller
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IControllerEquipService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -11,7 +17,6 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.ControllerEquip;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.ControllerEquipMapper
;
/**
*
* <pre>
* 控制器设备 服务实现类
* </pre>
...
...
@@ -20,10 +25,46 @@ import com.yeejoin.amos.boot.module.jcs.api.mapper.ControllerEquipMapper;
* @version $Id: ControllerEquipServiceImpl.java, v 0.1 2021年8月20日 上午10:16:33 gwb Exp $
*/
@Service
public
class
ControllerEquipServiceImpl
extends
BaseService
<
ControllerEquipDto
,
ControllerEquip
,
ControllerEquipMapper
>
{
public
List
<
ControllerEquipDto
>
queryAllForList
()
{
public
class
ControllerEquipServiceImpl
extends
BaseService
<
ControllerEquipDto
,
ControllerEquip
,
ControllerEquipMapper
>
implements
IControllerEquipService
{
@Autowired
JcsControlServerClient
jcsControlServerClient
;
public
List
<
ControllerEquipDto
>
queryAllForList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
* 改变警铃状态 0关闭,1开启
*/
@Async
public
void
changeBell
(
Controller
controller
,
String
type
)
{
if
(
controller
==
null
)
return
;
List
<
ControllerEquip
>
list
=
getControllerEquips
(
controller
);
list
.
forEach
(
controllerEquip
->
jcsControlServerClient
.
sendBellAction
(
controllerEquip
.
getNum
(),
type
));
}
/**
* 改变广播状态 0关闭,1开启
*/
@Async
public
void
changeBroadcast
(
Controller
controller
,
String
type
)
{
if
(
controller
==
null
)
return
;
List
<
ControllerEquip
>
list
=
getControllerEquips
(
controller
);
list
.
forEach
(
controllerEquip
->
jcsControlServerClient
.
sendFileAction
(
controllerEquip
.
getNum
(),
""
));
}
/**
* 改变车库门状态 0关闭,1开启
*/
@Async
public
void
changeDoor
(
Controller
controller
,
String
type
)
{
if
(
controller
==
null
)
return
;
List
<
ControllerEquip
>
list
=
getControllerEquips
(
controller
);
list
.
forEach
(
controllerEquip
->
jcsControlServerClient
.
writeStateAction
(
controller
.
getIp
(),
controller
.
getPort
(),
Integer
.
parseInt
(
controllerEquip
.
getNum
()),
type
));
}
private
List
<
ControllerEquip
>
getControllerEquips
(
Controller
controller
)
{
LambdaQueryWrapper
<
ControllerEquip
>
wrapper
=
new
LambdaQueryWrapper
<
ControllerEquip
>().
eq
(
ControllerEquip:
:
getControllerSeq
,
controller
.
getSequenceNbr
());
return
list
(
wrapper
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ControllerLogServiceImpl.java
0 → 100644
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Controller
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.ControllerLog
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.ControllerLogMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IControllerLogService
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ControllerLogDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 服务实现类
*
* @author system_generator
* @date 2021-12-03
*/
@Service
public
class
ControllerLogServiceImpl
extends
BaseService
<
ControllerLogDto
,
ControllerLog
,
ControllerLogMapper
>
implements
IControllerLogService
{
@Autowired
ControllerLogMapper
controllerLogMapper
;
/**
* 获取今天的记录
*/
public
List
<
Map
<
String
,
Object
>>
selectToday
()
{
return
controllerLogMapper
.
selectToday
();
}
/**
* 分页查询
*/
public
Page
<
ControllerLogDto
>
queryForControllerLogPage
(
Page
<
ControllerLogDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
ControllerLogDto
>
queryForControllerLogList
()
{
return
this
.
queryForList
(
""
,
false
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ControllerServiceImpl.java
View file @
c8da209c
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
c8da209c
...
...
@@ -1480,7 +1480,9 @@ public class ExcelServiceImpl {
list
.
add
(
row
.
getAndIncrement
());
list
.
add
(
o
.
getFireTeamName
()
+
"@"
+
o
.
getFireTeamId
());
list
.
add
(
o
.
getName
()
+
"@"
+
o
.
getSequenceNbr
());
list
.
add
(
o
.
getJobTitle
()
+
"@"
+
o
.
getJobTitleCode
());
if
(!
ValidationUtil
.
isEmpty
(
o
.
getJobTitle
()))
{
list
.
add
(
o
.
getJobTitle
()
+
"@"
+
o
.
getJobTitleCode
());
}
data
.
add
(
list
);
});
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/PowerTransferServiceImpl.java
View file @
c8da209c
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/controller/DocContentResource.java
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
knowledgebase
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.knowledgebase.face.enumeration.DynamicsFunctional
;
import
com.yeejoin.amos.knowledgebase.face.model.KnowledgeDocContentModel
;
import
com.yeejoin.amos.knowledgebase.face.orm.entity.KnowledgeDocContent
;
import
com.yeejoin.amos.knowledgebase.face.service.DocContentService
;
import
com.yeejoin.amos.knowledgebase.face.service.DocLibraryService
;
import
com.yeejoin.amos.knowledgebase.face.service.DynamicsOptionService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.DateUtil
;
import
org.typroject.tyboot.core.foundation.utils.StringUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -22,10 +22,16 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.knowledgebase.face.enumeration.DynamicsFunctional
;
import
com.yeejoin.amos.knowledgebase.face.model.KnowledgeDocContentModel
;
import
com.yeejoin.amos.knowledgebase.face.orm.entity.KnowledgeDocContent
;
import
com.yeejoin.amos.knowledgebase.face.service.DocContentService
;
import
com.yeejoin.amos.knowledgebase.face.service.DocLibraryService
;
import
com.yeejoin.amos.knowledgebase.face.service.DynamicsOptionService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* <p>
...
...
@@ -221,5 +227,12 @@ public class DocContentResource {
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
docContentService
.
queryLikeOrDis
(
sequenceNbr
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取简单的预案信息"
)
@RequestMapping
(
value
=
"/getSimpleDetail/{sequenceNbr}"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getSimpleDetail
(
@PathVariable
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
docContentService
.
getSimpleDetail
(
sequenceNbr
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/controller/TagInstanceResource.java
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
knowledgebase
.
controller
;
import
com.yeejoin.amos.knowledgebase.face.service.TagInstanceService
;
import
io.swagger.annotations.Api
;
import
java.util.List
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
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
org.typroject.tyboot.core.restful.doc.TycloudResource
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.yeejoin.amos.knowledgebase.face.model.KnowledgeTagInstanceModel
;
import
com.yeejoin.amos.knowledgebase.face.orm.entity.KnowledgeTagInstance
;
import
com.yeejoin.amos.knowledgebase.face.service.TagInstanceService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* <p>
...
...
@@ -27,4 +41,25 @@ public class TagInstanceResource {
private
final
Logger
logger
=
LogManager
.
getLogger
(
TagInstanceResource
.
class
);
@Autowired
private
TagInstanceService
tagInstanceService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据主键查询实例标签"
)
@RequestMapping
(
value
=
"find/{id}"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
KnowledgeTagInstance
>
findById
(
@PathVariable
(
"id"
)
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
tagInstanceService
.
findById
(
id
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据targetSeq查询实例标签"
)
@RequestMapping
(
value
=
"targetSeq/{id}"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
List
<
KnowledgeTagInstanceModel
>>
queryListByTargetSeq
(
@PathVariable
(
"id"
)
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
tagInstanceService
.
queryListByTargetSeq
(
id
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据targetSeq查询实例标签"
)
@RequestMapping
(
value
=
"getTarget/byName"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
List
<
KnowledgeTagInstanceModel
>>
queryListByTagName
(
@RequestParam
String
name
)
{
return
ResponseHelper
.
buildResponse
(
tagInstanceService
.
queryListByTagName
(
name
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/controller/TagValueResource.java
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
knowledgebase
.
controller
;
import
com.yeejoin.amos.knowledgebase.face.service.TagValueService
;
import
io.swagger.annotations.Api
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
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
org.typroject.tyboot.core.restful.doc.TycloudResource
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.yeejoin.amos.knowledgebase.face.service.TagValueService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* <p>
...
...
@@ -27,5 +36,17 @@ public class TagValueResource {
private
final
Logger
logger
=
LogManager
.
getLogger
(
TagValueResource
.
class
);
@Autowired
private
TagValueService
tagValueService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取所有当前系统的值标签的实例值"
)
@RequestMapping
(
value
=
"/getAll/tegartValue"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
Object
>
getAllTegartValue
(
@RequestParam
String
value
)
{
return
ResponseHelper
.
buildResponse
(
tagValueService
.
getAllTegartValue
(
value
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取所有当前系统的值标签的实例值"
)
@RequestMapping
(
value
=
"/getOne/"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
Object
>
queryByInstance
(
@RequestParam
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
tagValueService
.
queryByInstance
(
id
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/DocContentService.java
View file @
c8da209c
...
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.knowledgebase.face.feign.RemoteData;
import
com.yeejoin.amos.knowledgebase.face.model.*
;
import
com.yeejoin.amos.knowledgebase.face.orm.dao.DocContentMapper
;
import
com.yeejoin.amos.knowledgebase.face.orm.entity.KnowledgeDocContent
;
import
com.yeejoin.amos.knowledgebase.face.orm.entity.KnowledgeTagValue
;
import
com.yeejoin.amos.knowledgebase.face.util.Constants
;
import
com.yeejoin.amos.knowledgebase.face.util.DocSortUtil
;
import
com.yeejoin.amos.knowledgebase.face.util.QuoteCountFlushTiming
;
...
...
@@ -657,4 +658,19 @@ public class DocContentService extends BaseService<KnowledgeDocContentModel, Kno
private
List
<
KnowledgeDocContentModel
>
queryListByCategorySeqList
(
@Condition
(
Operator
.
in
)
List
<
Long
>
directoryId
)
{
return
this
.
queryForList
(
null
,
false
,
directoryId
);
}
public
List
<
Map
<
String
,
Object
>>
getSimpleDetail
(
String
sequenceNbrs
)
{
String
[]
idStrings
=
sequenceNbrs
.
split
(
","
);
List
<
String
>
idListString
=
Arrays
.
asList
(
idStrings
);
List
<
Long
>
idList
=
new
ArrayList
<
Long
>();
idListString
.
stream
().
forEach
(
i
->{
idList
.
add
(
Long
.
parseLong
(
i
));
});
QueryWrapper
<
KnowledgeDocContent
>
wrapper
=
new
QueryWrapper
<
KnowledgeDocContent
>();
wrapper
.
eq
(
"DOC_STATUS"
,
"PUBLISHED"
);
wrapper
.
in
(
"SEQUENCE_NBR"
,
idList
);
wrapper
.
select
(
"SEQUENCE_NBR"
,
"DOC_TITLE"
,
"REC_DATE"
);
return
this
.
baseMapper
.
selectMaps
(
wrapper
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/TagInstanceService.java
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
knowledgebase
.
face
.
service
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.yeejoin.amos.knowledgebase.face.model.KnowledgeDynamicsValueModel
;
import
com.yeejoin.amos.knowledgebase.face.model.KnowledgeTagInstanceModel
;
import
com.yeejoin.amos.knowledgebase.face.model.KnowledgeTagModel
;
import
com.yeejoin.amos.knowledgebase.face.model.KnowledgeTagValueModel
;
import
com.yeejoin.amos.knowledgebase.face.orm.dao.TagInstanceMapper
;
import
com.yeejoin.amos.knowledgebase.face.orm.entity.KnowledgeTagInstance
;
import
com.yeejoin.amos.knowledgebase.face.util.Constants
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
@@ -19,7 +15,14 @@ import org.typroject.tyboot.core.rdbms.annotation.Condition;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.*
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.yeejoin.amos.knowledgebase.face.model.KnowledgeDynamicsValueModel
;
import
com.yeejoin.amos.knowledgebase.face.model.KnowledgeTagInstanceModel
;
import
com.yeejoin.amos.knowledgebase.face.model.KnowledgeTagModel
;
import
com.yeejoin.amos.knowledgebase.face.model.KnowledgeTagValueModel
;
import
com.yeejoin.amos.knowledgebase.face.orm.dao.TagInstanceMapper
;
import
com.yeejoin.amos.knowledgebase.face.orm.entity.KnowledgeTagInstance
;
import
com.yeejoin.amos.knowledgebase.face.util.Constants
;
/**
...
...
@@ -152,4 +155,16 @@ public class TagInstanceService extends BaseService<KnowledgeTagInstanceModel, K
public
List
<
KnowledgeTagInstanceModel
>
queryListByTargetSeqs
(
@Condition
(
Operator
.
in
)
Collection
<
Long
>
targetSeq
)
{
return
this
.
queryForList
(
null
,
false
,
targetSeq
);
}
public
KnowledgeTagInstance
findById
(
Long
id
)
{
return
this
.
baseMapper
.
selectById
(
id
);
}
public
List
<
KnowledgeTagInstanceModel
>
queryListByTagName
(
String
tagName
)
{
// TODO Auto-generated method stub
return
this
.
queryForList
(
null
,
false
,
tagName
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/TagValueService.java
View file @
c8da209c
package
com
.
yeejoin
.
amos
.
knowledgebase
.
face
.
service
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.List
;
...
...
@@ -12,10 +13,14 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.knowledgebase.face.model.KnowledgeTagValueModel
;
import
com.yeejoin.amos.knowledgebase.face.orm.dao.TagValueMapper
;
import
com.yeejoin.amos.knowledgebase.face.orm.entity.KnowledgeTagValue
;
import
net.bytebuddy.asm.Advice.This
;
/**
* <p>
...
...
@@ -66,4 +71,13 @@ public class TagValueService extends BaseService<KnowledgeTagValueModel, Knowled
public
List
<
KnowledgeTagValueModel
>
queryTagValuesByDocIds
(
Collection
<
Long
>
docSeqList
)
{
return
Bean
.
toModels
(
this
.
getBaseMapper
().
queryTagValuesByDocIds
(
docSeqList
),
KnowledgeTagValueModel
.
class
);
}
public
List
<
KnowledgeTagValue
>
getAllTegartValue
(
String
value
)
{
String
[]
strings
=
value
.
split
(
","
);
QueryWrapper
<
KnowledgeTagValue
>
wrapper
=
new
QueryWrapper
<
KnowledgeTagValue
>();
wrapper
.
eq
(
"AGENCY_CODE"
,
RequestContext
.
getAgencyCode
());
wrapper
.
in
(
"TAG_VALUE"
,
Arrays
.
asList
(
strings
));
return
this
.
baseMapper
.
selectList
(
wrapper
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/utils/BeanDtoVoUtils.java
View file @
c8da209c
...
...
@@ -6,8 +6,11 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto;
import
com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.MaintenanceUnit
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.Equipment
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.enums.EquipmentStatusEnum
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -274,4 +277,29 @@ public class BeanDtoVoUtils {
}
});
}
/**
* 将设备实体类转换为Vo
*
* @param page 原分页对象
* @return 转换后的分页对象
*/
public
static
IPage
<
EquipmentDto
>
equipmentIPageDto
(
IPage
<
Equipment
>
page
)
{
return
page
.
convert
(
item
->
{
try
{
EquipmentDto
target
=
new
EquipmentDto
();
// 把原对象数据拷贝到新对象
BeanUtils
.
copyProperties
(
item
,
target
);
if
(
EquipmentStatusEnum
.
未安装
.
getCode
().
equals
(
item
.
getStatus
()))
{
target
.
setStatus
(
EquipmentStatusEnum
.
未安装
.
getName
());
}
else
if
(
EquipmentStatusEnum
.
已安装
.
getCode
().
equals
(
item
.
getStatus
()))
{
target
.
setStatus
(
EquipmentStatusEnum
.
已安装
.
getName
());
}
return
target
;
}
catch
(
Exception
e
)
{
return
null
;
}
});
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/EquipmentController.java
View file @
c8da209c
...
...
@@ -132,7 +132,7 @@ public class EquipmentController extends BaseController {
page
=
equipmentServiceImpl
.
page
(
pageBean
,
equipmentQueryWrapper
);
int
num
=
equipmentServiceImpl
.
count
(
equipmentQueryWrapper
);
pageBean
.
setTotal
(
num
);
IPage
<
EquipmentDto
>
equipmentDtoIPager
=
BeanDtoVoUtils
.
iPageVoStream
(
page
,
EquipmentDto
.
class
);
IPage
<
EquipmentDto
>
equipmentDtoIPager
=
BeanDtoVoUtils
.
equipmentIPageDto
(
page
);
return
ResponseHelper
.
buildResponse
(
equipmentDtoIPager
);
}
...
...
@@ -163,12 +163,12 @@ public class EquipmentController extends BaseController {
if
(!
ValidationUtil
.
isEmpty
(
equipmentDto
.
getName
()))
{
// 设备名称
queryWrapper
.
like
(
"name"
,
equipmentDto
.
getName
());
}
if
(!
ValidationUtil
.
isEmpty
(
equipmentDto
.
getTypeId
()))
{
// 设备种类
queryWrapper
.
eq
(
"type_id"
,
equipmentDto
.
getTypeId
());
}
if
(!
ValidationUtil
.
isEmpty
(
equipmentDto
.
getCategoryId
()))
{
// 设备类别
queryWrapper
.
eq
(
"category_id"
,
equipmentDto
.
getCategoryId
());
}
if
(!
ValidationUtil
.
isEmpty
(
equipmentDto
.
getTypeId
()))
{
// 设备种类
queryWrapper
.
eq
(
"type_id"
,
equipmentDto
.
getTypeId
());
}
if
(!
ValidationUtil
.
isEmpty
(
equipmentDto
.
getVarietyId
()))
{
// 设备品种
queryWrapper
.
eq
(
"variety_id"
,
equipmentDto
.
getVarietyId
());
}
...
...
amos-boot-system-jcs/src/main/resources/application.properties
View file @
c8da209c
...
...
@@ -79,6 +79,8 @@ equip.fegin.name=AMOS-EQUIPMANAGE
## 设备联动服务(车库门、广播、警铃)
control.fegin.name
=
JCS-API-CONTROL
Knowledgebase.fegin.name
=
AMOS-API-KNOWLEDGEBASE
## 故障报修流程
failure.work.flow.processDefinitionKey
=
malfunction_repair
#设置文件上传的大小限制
...
...
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
c8da209c
...
...
@@ -2322,5 +2322,41 @@
</sql>
</changeSet>
<changeSet
author=
"hll"
id=
"2021-12-06-hll-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"jc_controller_log"
/>
</not>
</preConditions>
<comment>
create table jc_controller_log
</comment>
<sql>
CREATE TABLE `jc_controller_log` (
`sequence_nbr` bigint(22) NOT NULL,
`controller_seq` bigint(22) NOT NULL COMMENT '控制站ID',
`equip_seq` bigint(22) DEFAULT NULL COMMENT '装备ID',
`state` varchar(2) DEFAULT NULL COMMENT '变更后状态',
`execute_user_seq` bigint(22) DEFAULT NULL COMMENT '变更人ID',
`execute_date` datetime DEFAULT NULL COMMENT '变更时间',
`rec_user_name` varchar(15) CHARACTER SET utf8 DEFAULT NULL COMMENT '操作人名称',
`rec_user_id` varchar(19) CHARACTER SET utf8 DEFAULT NULL COMMENT '操作人员',
`rec_date` datetime DEFAULT NULL COMMENT '创建时间',
`is_delete` bit(1) DEFAULT b'0' COMMENT '是否删除',
PRIMARY KEY (`sequence_nbr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
</sql>
</changeSet>
<changeSet
author=
"hll"
id=
"2021-12-06-hll-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"jc_controller"
columnName=
"fire_team_seq"
/>
</not>
</preConditions>
<comment>
jc_controller add fire_team_seq
</comment>
<sql>
alter table `jc_controller` add column `fire_team_seq` varchar(22) DEFAULT NULL COMMENT '关联的消防队伍ID';
</sql>
</changeSet>
</databaseChangeLog>
amos-boot-system-knowledgebase/src/main/java/com/yeejoin/amos/KnowledgebaseApplication.java
View file @
c8da209c
...
...
@@ -9,6 +9,9 @@ import org.slf4j.LoggerFactory;
import
org.springframework.boot.WebApplicationType
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
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.core.env.Environment
;
import
org.springframework.scheduling.annotation.EnableAsync
;
...
...
@@ -20,6 +23,9 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
*/
@EnableScheduling
@EnableFeignClients
@EnableDiscoveryClient
@EnableEurekaClient
@EnableAsync
@MapperScan
({
"com.yeejoin.amos.knowledgebase.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
...
...
amos-boot-system-knowledgebase/src/main/resources/application-dev.properties
View file @
c8da209c
##开发环境配置文件
# jdbc_config
spring.datasource.url
=
jdbc:mysql://
localhost:3306/safety-knowledge-3.0.0
?characterEncoding=utf8&serverTimezone=Asia/Shanghai
spring.datasource.url
=
jdbc:mysql://
172.16.6.60:3306/knowledge_base
?characterEncoding=utf8&serverTimezone=Asia/Shanghai
spring.datasource.username
=
root
spring.datasource.password
=
root_123
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
...
...
amos-boot-utils/amos-boot-utils-speech/src/main/java/com/yeejoin/amos/speech/AppNslClient.java
View file @
c8da209c
...
...
@@ -71,7 +71,7 @@ class AppNslClientToken {
/**
* 获取访问Token,包含token和过期时间(2021-11-30测试Token过期时间为18天)
*
集成项目中,token放到缓存中,
避免多次获取可能导致已进行的任务token失效
* 避免多次获取可能导致已进行的任务token失效
*
* @return token 访问token
*/
...
...
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