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
1f3eed54
Commit
1f3eed54
authored
Aug 27, 2021
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
8f479bf4
09676cd8
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
929 additions
and
35 deletions
+929
-35
WorkflowFeignService.java
.../boot/biz/common/workflow/feign/WorkflowFeignService.java
+1
-1
MetaHandler.java
...in/java/com/yeejoin/amos/boot/biz/config/MetaHandler.java
+10
-7
controller.java.ftl
...iz-common/src/main/resources/template/controller.java.ftl
+1
-1
WaterResourceDto.java
...oin/amos/boot/module/common/api/dto/WaterResourceDto.java
+6
-0
ILinkageUnitService.java
...s/boot/module/common/api/service/ILinkageUnitService.java
+1
-0
WaterResourceMapper.xml
...mon-api/src/main/resources/mapper/WaterResourceMapper.xml
+2
-2
AlertLocationLogDto.java
...oin/amos/boot/module/jcs/api/dto/AlertLocationLogDto.java
+33
-0
RallyPointDto.java
...m/yeejoin/amos/boot/module/jcs/api/dto/RallyPointDto.java
+39
-0
AlertLocationLog.java
...oin/amos/boot/module/jcs/api/entity/AlertLocationLog.java
+43
-0
RallyPoint.java
...m/yeejoin/amos/boot/module/jcs/api/entity/RallyPoint.java
+55
-0
AlertLocationLogMapper.java
...os/boot/module/jcs/api/mapper/AlertLocationLogMapper.java
+14
-0
RallyPointMapper.java
...oin/amos/boot/module/jcs/api/mapper/RallyPointMapper.java
+14
-0
IAlertLocationLogService.java
...boot/module/jcs/api/service/IAlertLocationLogService.java
+12
-0
IRallyPointService.java
.../amos/boot/module/jcs/api/service/IRallyPointService.java
+12
-0
AlertLocationLogMapper.xml
...-api/src/main/resources/mapper/AlertLocationLogMapper.xml
+5
-0
RallyPointMapper.xml
...le-jcs-api/src/main/resources/mapper/RallyPointMapper.xml
+5
-0
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+4
-4
LinkageUnitServiceImpl.java
...odule/common/biz/service/impl/LinkageUnitServiceImpl.java
+1
-0
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+4
-7
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+14
-0
AlertLocationLogController.java
...module/jcs/biz/controller/AlertLocationLogController.java
+116
-0
RallyPointController.java
.../boot/module/jcs/biz/controller/RallyPointController.java
+130
-0
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+35
-0
AlertLocationLogServiceImpl.java
...ule/jcs/biz/service/impl/AlertLocationLogServiceImpl.java
+34
-0
DataSourcesImpl.java
...mos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
+2
-2
RallyPointServiceImpl.java
...ot/module/jcs/biz/service/impl/RallyPointServiceImpl.java
+35
-0
CheckController.java
...amos/supervision/business/controller/CheckController.java
+44
-0
RouteController.java
...amos/supervision/business/controller/RouteController.java
+17
-0
CheckMapper.java
...oin/amos/supervision/business/dao/mapper/CheckMapper.java
+6
-0
RouteMapper.java
...oin/amos/supervision/business/dao/mapper/RouteMapper.java
+2
-0
CheckServiceImpl.java
...s/supervision/business/service/impl/CheckServiceImpl.java
+34
-4
RouteServiceImpl.java
...s/supervision/business/service/impl/RouteServiceImpl.java
+5
-0
ICheckService.java
...mos/supervision/business/service/intfc/ICheckService.java
+7
-0
IRouteService.java
...mos/supervision/business/service/intfc/IRouteService.java
+2
-0
pom.xml
amos-boot-module/amos-boot-module-biz/pom.xml
+6
-0
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+44
-0
application-dev.properties
...supervision/src/main/resources/application-dev.properties
+8
-7
mt-1.0.0.xml
...-supervision/src/main/resources/db/changelog/mt-1.0.0.xml
+49
-0
dbTemplate_check.xml
...rvision/src/main/resources/db/mapper/dbTemplate_check.xml
+63
-0
routeMapper.xml
...-supervision/src/main/resources/db/mapper/routeMapper.xml
+14
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/workflow/feign/WorkflowFeignService.java
View file @
1f3eed54
...
...
@@ -13,7 +13,7 @@ import com.alibaba.fastjson.JSONObject;
import
feign.Response
;
@FeignClient
(
name
=
"AMOS-API-WORKFLOW
-CHENZHAO
"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
@FeignClient
(
name
=
"AMOS-API-WORKFLOW"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
public
interface
WorkflowFeignService
{
/**
* 发起流程
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/config/MetaHandler.java
View file @
1f3eed54
...
...
@@ -14,6 +14,7 @@ import org.springframework.util.ObjectUtils;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.util.Date
;
import
java.util.Map
;
/**
* @author Dell
...
...
@@ -39,10 +40,10 @@ public class MetaHandler implements MetaObjectHandler {
*/
@Override
public
void
insertFill
(
MetaObject
metaObject
)
{
autoFillUser
(
metaObject
);
autoFillUser
(
metaObject
,
metaObject
.
getOriginalObject
()
);
}
private
void
autoFillUser
(
MetaObject
metaObject
)
{
private
void
autoFillUser
(
MetaObject
metaObject
,
Object
entity
)
{
//获取用户信息 以及当前用户登录公司部门,角色
ReginParams
reginParams
=
JSONObject
.
parseObject
(
null
!=
redisUtils
.
get
(
RedisKey
.
buildKey
(
getToken
()))
?
...
...
@@ -54,12 +55,12 @@ public class MetaHandler implements MetaObjectHandler {
if
(
ObjectUtils
.
isEmpty
(
reginParams
)
||
ObjectUtils
.
isEmpty
(
agencyUserModel
)){
return
;
}
Object
entity
=
metaObject
.
getOriginalObject
();
}
//
Object entity = metaObject.getOriginalObject();
if
(
isExistField
(
"recUserId"
,
entity
))
{
this
.
setFieldValByName
(
"recUserId"
,
agencyUserModel
.
getUserId
(),
metaObject
);
}
if
(
isExistField
(
"recUserName"
,
entity
))
{
this
.
setFieldValByName
(
"recUserName"
,
agencyUserModel
.
getUserName
(),
metaObject
);
}
...
...
@@ -71,8 +72,8 @@ public class MetaHandler implements MetaObjectHandler {
Date
currentDate
=
new
Date
();
this
.
setFieldValByName
(
"recDate"
,
currentDate
,
metaObject
);
}
// if (isExistField("companyCode", entity)) {
// this.setFieldValByName("companyCode", reginParams.getDepartment().getOrgCode(), metaObject);
// }
...
...
@@ -102,6 +103,8 @@ public class MetaHandler implements MetaObjectHandler {
*/
@Override
public
void
updateFill
(
MetaObject
metaObject
)
{
Object
updateEntity
=
((
Map
)
metaObject
.
getOriginalObject
()).
get
(
"et"
);
autoFillUser
(
metaObject
,
updateEntity
);
Date
currentDate
=
new
Date
();
this
.
setFieldValByName
(
"updateTime"
,
currentDate
,
metaObject
);
}
...
...
amos-boot-biz-common/src/main/resources/template/controller.java.ftl
View file @
1f3eed54
...
...
@@ -35,7 +35,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
<#
else
>
@
Controller
</#
if
>
@
RequestMapping
(
value
=
"
<#if package.ModuleName??>/${package.ModuleName}</#if>
/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>"
)
@
RequestMapping
(
value
=
"/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>"
)
<#
if
kotlin
>
class
${
table
.
controllerName
}<#
if
superControllerClass
??>
:
${
superControllerClass
}()</#
if
>
<#
else
>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/WaterResourceDto.java
View file @
1f3eed54
...
...
@@ -306,10 +306,16 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"物联参数"
)
private
WaterResourceIotDto
waterResourceIotDto
;
@ApiModelProperty
(
"设施定义id"
)
private
Long
equipId
;
@ApiModelProperty
(
"设施定义名称"
)
@ExcelProperty
(
value
=
"设施定义名称"
,
index
=
44
)
private
String
equipName
;
@ApiModelProperty
(
"设施分类id"
)
private
Long
equipCategoryId
;
@ApiModelProperty
(
"设施分类名称"
)
@ExcelProperty
(
value
=
"设施分类名称"
,
index
=
45
)
private
String
equipCategoryName
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/ILinkageUnitService.java
View file @
1f3eed54
...
...
@@ -50,4 +50,5 @@ public interface ILinkageUnitService {
public
List
<
Menu
>
getEmergencyLinkageUnitCodeGroupBy
(
String
type
,
String
rootName
)
;
List
<
LinkageUnitDto
>
exportToExcel
();
List
<
LinkageUnitDto
>
queryForLinkageUnitList
(
Boolean
isDelete
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/WaterResourceMapper.xml
View file @
1f3eed54
...
...
@@ -110,8 +110,8 @@
when ISNULL(belong_fighting_system) = 0 and LENGTH(trim(belong_fighting_system)) > 0
then belong_fighting_system
else '其他' end) belong_fighting_system,
resource_type,
resource_type_name
equip_id as
resource_type,
equip_name as
resource_type_name
from cb_water_resource
where is_delete = #{isDelete}
</select>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/AlertLocationLogDto.java
0 → 100644
View file @
1f3eed54
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
*
*
* @author system_generator
* @date 2021-08-26
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"AlertLocationLogDto"
,
description
=
""
)
public
class
AlertLocationLogDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"警情id"
)
private
Long
alertId
;
@ApiModelProperty
(
value
=
"经度"
)
private
String
longitude
;
@ApiModelProperty
(
value
=
"纬度"
)
private
String
latitude
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/RallyPointDto.java
0 → 100644
View file @
1f3eed54
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 集结点
*
* @author system_generator
* @date 2021-08-25
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"RallyPointDto"
,
description
=
"集结点"
)
public
class
RallyPointDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"地址"
)
private
String
address
;
@ApiModelProperty
(
value
=
"警情id"
)
private
Long
alertId
;
@ApiModelProperty
(
value
=
"经度"
)
private
String
longitude
;
@ApiModelProperty
(
value
=
"纬度"
)
private
String
latitude
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/AlertLocationLog.java
0 → 100644
View file @
1f3eed54
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.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
*
*
* @author system_generator
* @date 2021-08-26
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"jc_alert_location_log"
)
public
class
AlertLocationLog
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 警情id
*/
@TableField
(
"alert_id"
)
private
Long
alertId
;
/**
* 经度
*/
@TableField
(
"longitude"
)
private
String
longitude
;
/**
* 纬度
*/
@TableField
(
"latitude"
)
private
String
latitude
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/entity/RallyPoint.java
0 → 100644
View file @
1f3eed54
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.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
* 集结点
*
* @author system_generator
* @date 2021-08-25
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"jc_rally_point"
)
public
class
RallyPoint
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 名称
*/
@TableField
(
"name"
)
private
String
name
;
/**
* 地址
*/
@TableField
(
"address"
)
private
String
address
;
/**
* 警情id
*/
@TableField
(
"alert_id"
)
private
Long
alertId
;
/**
* 经度
*/
@TableField
(
"longitude"
)
private
String
longitude
;
/**
* 纬度
*/
@TableField
(
"latitude"
)
private
String
latitude
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertLocationLogMapper.java
0 → 100644
View file @
1f3eed54
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertLocationLog
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* Mapper 接口
*
* @author system_generator
* @date 2021-08-26
*/
public
interface
AlertLocationLogMapper
extends
BaseMapper
<
AlertLocationLog
>
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/RallyPointMapper.java
0 → 100644
View file @
1f3eed54
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.RallyPoint
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 集结点 Mapper 接口
*
* @author system_generator
* @date 2021-08-25
*/
public
interface
RallyPointMapper
extends
BaseMapper
<
RallyPoint
>
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IAlertLocationLogService.java
0 → 100644
View file @
1f3eed54
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
/**
* 接口类
*
* @author system_generator
* @date 2021-08-26
*/
public
interface
IAlertLocationLogService
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IRallyPointService.java
0 → 100644
View file @
1f3eed54
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
/**
* 集结点接口类
*
* @author system_generator
* @date 2021-08-25
*/
public
interface
IRallyPointService
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertLocationLogMapper.xml
0 → 100644
View file @
1f3eed54
<?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.AlertLocationLogMapper"
>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/RallyPointMapper.xml
0 → 100644
View file @
1f3eed54
<?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.RallyPointMapper"
>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
View file @
1f3eed54
...
...
@@ -348,12 +348,12 @@ public class WaterResourceController extends BaseController {
@RequestParam
(
value
=
"size"
)
int
size
,
String
name
,
@RequestParam
(
value
=
"belongBuildingId"
,
required
=
false
)
ArrayList
<
Long
>
belongBuildingId
,
Long
belongFightingSystemId
,
Long
sequenceNbr
,
String
resourceType
)
{
String
classifyId
)
{
Page
<
WaterResourceDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
waterResourceServiceImpl
.
queryForWaterResourcePage
(
page
,
name
,
resourceType
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
));
classifyId
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
));
}
/**
...
...
@@ -384,9 +384,9 @@ public class WaterResourceController extends BaseController {
@GetMapping
(
value
=
"/select_list"
)
public
ResponseModel
<
List
<
WaterResourceDto
>>
selectList
(
String
name
,
Long
sequenceNbr
,
Long
belongFightingSystemId
,
Long
belongBuildingId
,
String
belongBuilding
,
String
resourceType
,
String
classifyId
)
{
String
belongBuilding
,
String
resourceType
)
{
return
ResponseHelper
.
buildResponse
(
waterResourceServiceImpl
.
queryWaterResourceList
(
true
,
name
,
sequenceNbr
,
belongFightingSystemId
,
belongBuildingId
,
belongBuilding
,
resourceType
,
classifyId
));
sequenceNbr
,
belongFightingSystemId
,
belongBuildingId
,
belongBuilding
,
resourceType
));
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/LinkageUnitServiceImpl.java
View file @
1f3eed54
...
...
@@ -111,6 +111,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
/**
* 列表查询 示例
*/
@Override
public
List
<
LinkageUnitDto
>
queryForLinkageUnitList
(
@Condition
(
Operator
.
eq
)
Boolean
isDelete
)
{
return
this
.
queryForList
(
""
,
false
,
isDelete
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/WaterResourceServiceImpl.java
View file @
1f3eed54
...
...
@@ -56,13 +56,11 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
*/
public
Page
<
WaterResourceDto
>
queryForWaterResourcePage
(
Page
<
WaterResourceDto
>
page
,
@Condition
(
Operator
.
like
)
String
name
,
@Condition
(
Operator
.
eq
)
String
resourceType
,
@Condition
(
Operator
.
eq
)
String
equipId
,
@Condition
(
Operator
.
in
)
ArrayList
<
Long
>
belongBuildingId
,
@Condition
(
Operator
.
eq
)
Long
belongFightingSystemId
,
@Condition
(
Operator
.
eq
)
Long
sequenceNbr
)
{
// return this.queryForPage(page, null, false, name, resourceType, belongBuildingId, belongFightingSystemId,
// sequenceNbr, isDelete);
return
this
.
waterResourceMapper
.
getWaterResourcePageByParams
(
page
,
name
,
resourceType
,
belongBuildingId
,
return
this
.
waterResourceMapper
.
getWaterResourcePageByParams
(
page
,
name
,
equipId
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
);
}
...
...
@@ -82,10 +80,9 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
@Condition
(
Operator
.
eq
)
Long
belongFightingSystemId
,
@Condition
(
Operator
.
eq
)
Long
belongBuildingId
,
@Condition
(
Operator
.
like
)
String
belongBuilding
,
@Condition
(
Operator
.
eq
)
String
resourceType
,
@Condition
(
Operator
.
eq
)
String
equipId
)
{
@Condition
(
Operator
.
eq
)
String
resourceType
)
{
return
this
.
queryForList
(
""
,
false
,
isDelete
,
name
,
sequenceNbr
,
belongFightingSystemId
,
belongBuildingId
,
belongBuilding
,
resourceType
,
equipId
);
belongBuilding
,
resourceType
);
}
...
...
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 @
1f3eed54
...
...
@@ -299,4 +299,17 @@ public class AlertCalledController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
controlEquip
());
}
/**
* 警情重新定位
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/reLocate"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"警情重新定位"
,
notes
=
"警情重新定位"
)
public
ResponseModel
<
Boolean
>
reLocateById
(
@RequestParam
String
alertCalled
,
@RequestParam
String
longitude
,
@RequestParam
String
latitude
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
reLocate
(
alertCalled
,
longitude
,
latitude
));
}
}
\ 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/AlertLocationLogController.java
0 → 100644
View file @
1f3eed54
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertLocationLogServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertLocationLogDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
/**
*
*
* @author system_generator
* @date 2021-08-26
*/
@RestController
@Api
(
tags
=
"Api"
)
@RequestMapping
(
value
=
"/alert-location-log"
)
public
class
AlertLocationLogController
extends
BaseController
{
@Autowired
AlertLocationLogServiceImpl
alertLocationLogServiceImpl
;
/**
* 新增
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
AlertLocationLogDto
>
save
(
@RequestBody
AlertLocationLogDto
model
)
{
model
=
alertLocationLogServiceImpl
.
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
<
AlertLocationLogDto
>
updateBySequenceNbrAlertLocationLog
(
@RequestBody
AlertLocationLogDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
alertLocationLogServiceImpl
.
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
(
alertLocationLogServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
AlertLocationLogDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
alertLocationLogServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
Page
<
AlertLocationLogDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
AlertLocationLogDto
>
page
=
new
Page
<
AlertLocationLogDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
alertLocationLogServiceImpl
.
queryForAlertLocationLogPage
(
page
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
AlertLocationLogDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
alertLocationLogServiceImpl
.
queryForAlertLocationLogList
());
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/RallyPointController.java
0 → 100644
View file @
1f3eed54
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.RallyPointDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.RallyPoint
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.RallyPointServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
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
;
/**
* 集结点
*
* @author system_generator
* @date 2021-08-25
*/
@RestController
@Api
(
tags
=
"集结点Api"
)
@RequestMapping
(
value
=
"/rally-point"
)
public
class
RallyPointController
extends
BaseController
{
@Autowired
RallyPointServiceImpl
rallyPointServiceImpl
;
/**
* 新增集结点
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增集结点"
,
notes
=
"新增集结点"
)
public
ResponseModel
<
RallyPointDto
>
save
(
@RequestBody
RallyPointDto
model
)
{
model
=
rallyPointServiceImpl
.
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
<
RallyPoint
>
updateBySequenceNbrRallyPoint
(
@RequestBody
RallyPointDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
RallyPoint
rallyPoint
=
new
RallyPoint
();
BeanUtils
.
copyProperties
(
model
,
rallyPoint
);
rallyPointServiceImpl
.
saveOrUpdate
(
rallyPoint
);
return
ResponseHelper
.
buildResponse
(
rallyPoint
);
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除集结点"
,
notes
=
"根据sequenceNbr删除集结点"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
rallyPointServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个集结点"
,
notes
=
"根据sequenceNbr查询单个集结点"
)
public
ResponseModel
<
RallyPointDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
rallyPointServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"集结点分页查询"
,
notes
=
"集结点分页查询"
)
public
ResponseModel
<
Page
<
RallyPointDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
RallyPointDto
>
page
=
new
Page
<
RallyPointDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
rallyPointServiceImpl
.
queryForRallyPointPage
(
page
));
}
/**
* 根据警情id查询集结点列表
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据警情id查询集结点列表"
,
notes
=
"根据警情id查询集结点列表"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
RallyPointDto
>>
selectForList
(
@RequestParam
String
alertId
)
{
return
ResponseHelper
.
buildResponse
(
rallyPointServiceImpl
.
queryForRallyPointList
(
alertId
));
}
}
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 @
1f3eed54
...
...
@@ -27,6 +27,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerData
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertLocationLog
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Template
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerTypeEnum
;
...
...
@@ -86,6 +87,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
private
ControllerServiceImpl
controllerService
;
@Autowired
private
ControllerEquipServiceImpl
controllerEquipService
;
@Autowired
private
AlertLocationLogServiceImpl
alertLocationLogService
;
@Autowired
private
EmqKeeper
emqKeeper
;
@Value
(
"${mqtt.topic.command.alert.notice}"
)
...
...
@@ -538,4 +543,34 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
return
true
;
}
/**
* 警情重新定位
*
* @param alertId 警情id
* @param longitude 经度
* @param latitude 纬度
* @return
*/
public
Boolean
reLocate
(
String
alertId
,
String
longitude
,
String
latitude
)
{
try
{
// 更新警情主表
AlertCalled
alertCalled
=
this
.
baseMapper
.
selectById
(
alertId
);
alertCalled
.
setCoordinateX
(
Double
.
valueOf
(
longitude
));
alertCalled
.
setCoordinateY
(
Double
.
valueOf
(
latitude
));
this
.
updateById
(
alertCalled
);
// 插入定位日志表
AlertLocationLog
alertLocationLog
=
new
AlertLocationLog
();
alertLocationLog
.
setAlertId
(
Long
.
valueOf
(
alertId
));
alertLocationLog
.
setLongitude
(
longitude
);
alertLocationLog
.
setLatitude
(
latitude
);
alertLocationLogService
.
save
(
alertLocationLog
);
return
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
toString
());
e
.
printStackTrace
();
throw
new
RuntimeException
(
"警情定位失败!"
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertLocationLogServiceImpl.java
0 → 100644
View file @
1f3eed54
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertLocationLog
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.AlertLocationLogMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertLocationLogService
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertLocationLogDto
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
/**
* 服务实现类
*
* @author system_generator
* @date 2021-08-26
*/
@Service
public
class
AlertLocationLogServiceImpl
extends
BaseService
<
AlertLocationLogDto
,
AlertLocationLog
,
AlertLocationLogMapper
>
implements
IAlertLocationLogService
{
/**
* 分页查询
*/
public
Page
<
AlertLocationLogDto
>
queryForAlertLocationLogPage
(
Page
<
AlertLocationLogDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
AlertLocationLogDto
>
queryForAlertLocationLogList
()
{
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/DataSourcesImpl.java
View file @
1f3eed54
...
...
@@ -9,7 +9,7 @@ import javax.annotation.Resource;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.
biz.service.impl.LinkageUnitServiceImpl
;
import
com.yeejoin.amos.boot.module.common.
api.service.ILinkageUnitService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -70,7 +70,7 @@ public class DataSourcesImpl implements DataSources {
private
RestTemplate
restTemplate
;
@Autowired
LinkageUnitServiceImpl
linkageUnitServiceImpl
;
ILinkageUnitService
linkageUnitServiceImpl
;
@Value
(
"${security.systemctl.name}"
)
private
String
systemctl
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/RallyPointServiceImpl.java
0 → 100644
View file @
1f3eed54
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.RallyPointDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.RallyPoint
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.RallyPointMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IRallyPointService
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
/**
* 集结点服务实现类
*
* @author system_generator
* @date 2021-08-25
*/
@Service
public
class
RallyPointServiceImpl
extends
BaseService
<
RallyPointDto
,
RallyPoint
,
RallyPointMapper
>
implements
IRallyPointService
{
/**
* 分页查询
*/
public
Page
<
RallyPointDto
>
queryForRallyPointPage
(
Page
<
RallyPointDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
RallyPointDto
>
queryForRallyPointList
(
String
alertId
)
{
return
this
.
queryForList
(
""
,
false
,
alertId
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/CheckController.java
View file @
1f3eed54
...
...
@@ -73,6 +73,8 @@ import com.yeejoin.amos.supervision.dao.entity.PlanTask;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
@RestController
@RequestMapping
(
value
=
"/api/check"
)
...
...
@@ -603,4 +605,46 @@ public class CheckController extends AbstractBaseController {
@ApiParam
(
value
=
"源ids,逗号分隔"
,
required
=
true
)
@PathVariable
String
...
relationId
)
{
return
CommonResponseUtil
.
success
(
checkService
.
obtainLastCheckRecord
(
relationId
));
}
/**
* 查询计划执行结果信息
*
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询计划执行结果信息"
,
notes
=
"查询计划执行结果信息"
)
@GetMapping
(
value
=
"/page/list"
,
produces
=
"application/json;charset=UTF-8"
)
public
ResponseModel
getPlanExecuteInfo
(
@ApiParam
(
value
=
"计划id"
)
@RequestParam
(
value
=
"planId"
)
Long
planId
,
@ApiParam
(
value
=
"点id"
)
@RequestParam
(
value
=
"pointId"
,
required
=
false
)
Long
pointId
,
@ApiParam
(
value
=
"执行状态"
)
@RequestParam
(
value
=
"executeState"
,
required
=
false
)
String
executeState
,
@ApiParam
(
value
=
"状态"
)
@RequestParam
(
value
=
"status"
,
required
=
false
)
String
status
,
@ApiParam
(
value
=
"单位id"
)
@RequestParam
(
value
=
"companyName"
,
required
=
false
)
String
companyName
,
@ApiParam
(
value
=
"当前页"
)
@RequestParam
(
value
=
"pageNumber"
)
int
pageNumber
,
@ApiParam
(
value
=
"页大小"
)
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"planId"
,
planId
);
map
.
put
(
"pointId"
,
pointId
);
map
.
put
(
"executeState"
,
executeState
);
map
.
put
(
"status"
,
status
);
map
.
put
(
"companyName"
,
companyName
);
CommonPageable
pageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
ResponseHelper
.
buildResponse
(
checkService
.
getPlanExecuteInfo
(
map
,
pageable
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询计划执行状态"
,
notes
=
"查询计划执行状态"
)
@GetMapping
(
value
=
"/search/states"
,
produces
=
"application/json;charset=UTF-8"
)
public
ResponseModel
getPlanExecuteState
()
{
return
ResponseHelper
.
buildResponse
(
checkService
.
getPlanExecuteStates
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询计划执行所有单位"
,
notes
=
"查询计划执行所有单位"
)
@GetMapping
(
value
=
"/search/teams"
,
produces
=
"application/json;charset=UTF-8"
)
public
ResponseModel
getPlanExecuteTeams
()
{
return
ResponseHelper
.
buildResponse
(
checkService
.
getPlanExecuteTeams
());
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/RouteController.java
View file @
1f3eed54
...
...
@@ -40,6 +40,8 @@ import com.yeejoin.amos.supervision.dao.entity.RoutePoint;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
@RestController
@RequestMapping
(
value
=
"/api/route"
)
...
...
@@ -419,4 +421,19 @@ public class RouteController extends AbstractBaseController {
LinkedHashMap
<
String
,
Object
>
routePointIdMap
=
routeService
.
getPointIdByRouteId
(
routeIdList
);
return
CommonResponseUtil
.
success
(
routePointIdMap
);
}
/**
* 根据路线查询点
*
* @param id
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据路线查询点信息"
,
notes
=
"根据路线查询点信息"
)
@GetMapping
(
value
=
"/point/{id}"
,
produces
=
"application/json;charset=UTF-8"
)
public
ResponseModel
queryPointByRouteId
(
@ApiParam
(
value
=
"巡检路线id"
,
required
=
true
)
@PathVariable
(
name
=
"id"
)
long
id
)
{
return
ResponseHelper
.
buildResponse
(
routeService
.
queryPointByRouteId
(
id
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/CheckMapper.java
View file @
1f3eed54
...
...
@@ -277,4 +277,10 @@ public interface CheckMapper extends BaseMapper {
//Map<String, String> queryUserInfoByIds(@Param(value = "userIds") String userIds);
long
getItemCount
(
HashMap
<
String
,
Object
>
params
);
List
<
HashMap
<
String
,
Object
>>
getCheckItems
(
HashMap
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
getPlanExecuteTeams
();
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/RouteMapper.java
View file @
1f3eed54
...
...
@@ -100,4 +100,6 @@ public interface RouteMapper extends BaseMapper {
List
<
HashMap
<
String
,
Object
>>
queryRoutePointItemByCondition
(
RoutePointInputItemRequest
request
);
List
<
Route
>
queryRoutesByOrgCode
(
@Param
(
value
=
"ownerId"
)
String
ownerId
,
@Param
(
"orgCode"
)
String
orgCode
);
List
<
Map
<
String
,
Object
>>
queryPointByRouteId
(
@Param
(
"id"
)
Long
id
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/CheckServiceImpl.java
View file @
1f3eed54
...
...
@@ -23,6 +23,8 @@ import com.yeejoin.amos.supervision.business.service.intfc.IEquipmentHandlerServ
import
com.yeejoin.amos.supervision.business.service.intfc.IPointService
;
import
com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.supervision.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.supervision.common.enums.*
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.util.DateUtil
;
import
com.yeejoin.amos.supervision.core.util.StringUtil
;
import
com.yeejoin.amos.supervision.feign.RemoteSecurityService
;
...
...
@@ -78,10 +80,6 @@ import com.yeejoin.amos.supervision.business.param.CheckRecordParam;
import
com.yeejoin.amos.supervision.business.param.CheckStatisticalParam
;
import
com.yeejoin.amos.supervision.business.util.CheckDetailInputPageParam
;
import
com.yeejoin.amos.supervision.business.util.Toke
;
import
com.yeejoin.amos.supervision.common.enums.CheckStatusEnum
;
import
com.yeejoin.amos.supervision.common.enums.PointLevelEnum
;
import
com.yeejoin.amos.supervision.common.enums.PointStatusEnum
;
import
com.yeejoin.amos.supervision.common.enums.RuleTypeEnum
;
import
com.yeejoin.amos.supervision.core.common.response.AppCheckInputRespone
;
import
com.yeejoin.amos.supervision.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.supervision.core.common.response.CalendarStatusCountRespone
;
...
...
@@ -1152,6 +1150,38 @@ public class CheckServiceImpl implements ICheckService {
}
@Override
public
Page
<
HashMap
<
String
,
Object
>>
getPlanExecuteInfo
(
HashMap
<
String
,
Object
>
map
,
CommonPageable
page
)
{
List
<
HashMap
<
String
,
Object
>>
content
=
org
.
assertj
.
core
.
util
.
Lists
.
newArrayList
();
long
total
=
checkMapper
.
getItemCount
(
map
);
if
(
total
==
0
)
{
return
new
PageImpl
<>(
content
,
page
,
total
);
}
;
map
.
put
(
"status"
,
PlanTaskFinishStatusEnum
.
getValue
(
String
.
valueOf
(
map
.
get
(
"status"
))));
map
.
put
(
"offset"
,
page
.
getOffset
());
map
.
put
(
"pageSize"
,
page
.
getPageSize
());
content
=
checkMapper
.
getCheckItems
(
map
);
content
.
forEach
(
c
->
{
if
(
c
.
containsKey
(
"finishStatus"
))
{
String
finishStatusDesc
=
PlanTaskFinishStatusEnum
.
getName
(
Integer
.
parseInt
(
c
.
get
(
"finishStatus"
).
toString
()));
c
.
put
(
"finishStatus"
,
finishStatusDesc
);
}
});
return
new
PageImpl
<>(
content
,
page
,
total
);
}
@Override
public
List
<
Map
<
String
,
String
>>
getPlanExecuteStates
()
{
return
PlanTaskFinishStatusEnum
.
getEnumList
();
}
@Override
public
List
<
Map
<
String
,
Object
>>
getPlanExecuteTeams
()
{
List
<
Map
<
String
,
Object
>>
list
=
checkMapper
.
getPlanExecuteTeams
();
return
list
;
}
@Override
public
List
<
HashMap
<
String
,
Object
>>
getEquipInputByCheckId
(
CheckDetailInputPageParam
param
)
{
// 如果不传巡检ID,则获取最新一条巡检点对应的巡检记录ID
if
(
param
.
getCheckID
()
==
-
1
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/RouteServiceImpl.java
View file @
1f3eed54
...
...
@@ -422,4 +422,9 @@ public class RouteServiceImpl implements IRouteService {
// TODO Auto-generated method stub
return
routeMapper
.
queryRoutesByOrgCode
(
ownerId
,
orgCode
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryPointByRouteId
(
Long
id
)
{
return
routeMapper
.
queryPointByRouteId
(
id
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/ICheckService.java
View file @
1f3eed54
...
...
@@ -6,6 +6,7 @@ import java.util.Map;
import
com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.supervision.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.exception.YeeException
;
import
org.springframework.data.domain.Page
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -271,4 +272,10 @@ public interface ICheckService {
* @return CheckRecordDto
*/
Map
<
String
,
CheckRecordDto
>
obtainLastCheckRecord
(
String
[]
relationId
);
Page
<
HashMap
<
String
,
Object
>>
getPlanExecuteInfo
(
HashMap
<
String
,
Object
>
map
,
CommonPageable
page
);
List
<
Map
<
String
,
String
>>
getPlanExecuteStates
();
List
<
Map
<
String
,
Object
>>
getPlanExecuteTeams
();
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/IRouteService.java
View file @
1f3eed54
...
...
@@ -204,4 +204,6 @@ public interface IRouteService {
*/
boolean
existRouteName
(
String
orgCode
,
String
name
);
List
<
Map
<
String
,
Object
>>
queryPointByRouteId
(
Long
id
);
}
amos-boot-module/amos-boot-module-biz/pom.xml
View file @
1f3eed54
...
...
@@ -32,6 +32,12 @@
<groupId>
org.springframework
</groupId>
<artifactId>
spring-mock
</artifactId>
<version>
2.0.8
</version>
<exclusions>
<exclusion>
<artifactId>
servlet-api
</artifactId>
<groupId>
javax.servlet
</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
...
...
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
1f3eed54
...
...
@@ -97,5 +97,49 @@
ADD COLUMN maintenance_period VARCHAR ( 10 ) COMMENT '维保周期';
</sql>
</changeSet>
<changeSet
author=
"tb"
id=
"2021-08-27-tb-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"jc_rally_point"
/>
</not>
</preConditions>
<comment>
create table jc_rally_point
</comment>
<sql>
CREATE TABLE `jc_rally_point` (
`sequence_nbr` bigint(30) NOT NULL COMMENT '主键',
`name` varchar(100) DEFAULT NULL COMMENT '名称',
`address` varchar(255) DEFAULT NULL COMMENT '地址',
`alert_id` bigint(30) NOT NULL COMMENT '警情id',
`longitude` varchar(20) NOT NULL COMMENT '经度',
`latitude` varchar(20) NOT NULL COMMENT '纬度',
`rec_user_id` bigint(30) NOT NULL COMMENT '更新用户id',
`rec_user_name` varchar(30) NOT NULL COMMENT '更新用户名称',
`rec_date` datetime NOT NULL COMMENT '更新日期',
`is_delete` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除(1:删除,0:未删除)',
PRIMARY KEY (`sequence_nbr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='集结点';
</sql>
</changeSet>
<changeSet
author=
"tb"
id=
"2021-08-27-tb-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"jc_alert_location_log"
/>
</not>
</preConditions>
<comment>
create table jc_alert_location_log
</comment>
<sql>
CREATE TABLE `jc_alert_location_log` (
`sequence_nbr` bigint(30) NOT NULL COMMENT '主键',
`alert_id` bigint(30) NOT NULL COMMENT '警情id',
`longitude` varchar(30) NOT NULL COMMENT '经度',
`latitude` varchar(30) NOT NULL COMMENT '纬度',
`rec_user_id` bigint(30) NOT NULL COMMENT '更新人员id',
`rec_user_name` varchar(50) NOT NULL COMMENT '更新人员名称',
`rec_date` datetime NOT NULL COMMENT '更新时间',
`is_delete` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除(1: 已删除,0:未删除)',
PRIMARY KEY (`sequence_nbr`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
</sql>
</changeSet>
</databaseChangeLog>
amos-boot-system-supervision/src/main/resources/application-dev.properties
View file @
1f3eed54
...
...
@@ -3,7 +3,7 @@ spring.datasource.url = jdbc:mysql://172.16.11.20:3306/amos-supervision_v1.0?use
spring.datasource.username
=
root
spring.datasource.password
=
root_123
## eureka properties:
eureka.client.serviceUrl.defaultZone
=
http://172.16.1
0.72
:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://172.16.1
1.20
:10001/eureka/
security.password
=
a1234560
security.loginId
=
jc_wjk006
...
...
@@ -12,10 +12,10 @@ security.productApp=STUDIO_APP_MOBILE
security.appKey
=
studio_normalapp_3168830
#redis 配置
spring.redis.database
=
0
spring.redis.host
=
172.16.1
0.85
spring.redis.database
=
1
spring.redis.host
=
172.16.1
1.20
spring.redis.port
=
6379
spring.redis.password
=
amos2019Redis
spring.redis.password
=
1234560
spring.redis.jedis.pool.max-active
=
200
spring.redis.jedis.pool.max-wait
=
-1
spring.redis.jedis.pool.max-idle
=
10
...
...
@@ -45,9 +45,9 @@ linux.img.path = /
## emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}-1
emqx.broker
=
tcp://172.16.1
0.85
:1883
emqx.user-name
=
super
emqx.password
=
a123456
emqx.broker
=
tcp://172.16.1
1.33
:1883
emqx.user-name
=
admin
emqx.password
=
public
emqx.max-inflight
=
1000
file.url
=
http://39.98.45.134:9000/
\ No newline at end of file
amos-boot-system-supervision/src/main/resources/db/changelog/mt-1.0.0.xml
View file @
1f3eed54
...
...
@@ -168,4 +168,52 @@
alter table `p_plan_task_detail` modify column `is_finish` int(11) COMMENT '0-未开始,1-执行中,2-已完成,3-超时漏检(有一个检查项漏检则为漏检)' after `create_date`;
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"1629886127-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_check"
columnName=
"company_id"
/>
</not>
</preConditions>
<comment>
p_check ADD COLUMN company_id
</comment>
<sql>
ALTER TABLE `p_check` ADD COLUMN `company_id` varchar(32) DEFAULT NULL COMMENT '责任单位id' AFTER `dep_name`;
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"1629886127-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_check"
columnName=
"company_name"
/>
</not>
</preConditions>
<comment>
p_check ADD COLUMN company_name
</comment>
<sql>
ALTER TABLE `p_check` ADD COLUMN `company_name` varchar(255) DEFAULT NULL COMMENT '责任单位名称' AFTER `company_id`;
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"1629886127-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_check_input"
columnName=
"safety_danger_num"
/>
</not>
</preConditions>
<comment>
p_check_input ADD COLUMN safety_danger_num
</comment>
<sql>
ALTER TABLE `p_check_input` ADD COLUMN `safety_danger_num` int(11) DEFAULT NULL COMMENT '安全隐患个数' AFTER `danger_handle_state`;
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"1629886127-4"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_check_input"
columnName=
"major_danger_num"
/>
</not>
</preConditions>
<comment>
p_check_input ADD COLUMN major_danger_num
</comment>
<sql>
ALTER TABLE `p_check_input` ADD COLUMN `major_danger_num` int(11) DEFAULT NULL COMMENT '重大隐患个数' AFTER `safety_danger_num`;
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
1f3eed54
...
...
@@ -1894,4 +1894,66 @@
d.date
</select>
<select
id=
"getItemCount"
resultType=
"long"
>
SELECT
count(1)
FROM
p_check pc, p_check_input pci, p_plan_task_detail pptd
WHERE
pc.id = pci.check_id
AND pc.plan_task_detail_id = pptd.id
AND pc.plan_id = #{planId}
<if
test=
"pointId != null and pointId != ''"
>
AND pc.point_id = #{pointId}
</if>
<if
test=
"executeState != null and executeState != ''"
>
AND pptd.is_finish = #{executeState}
</if>
<!-- <if test="status != null and status != ''">-->
<!-- AND pc.point_id = #{status}-->
<!-- </if>-->
<if
test=
"teamId != null and teamId != ''"
>
AND pc.company_id = #{teamId}
</if>
</select>
<select
id=
"getCheckItems"
resultType=
"Map"
>
SELECT
pc.id checkId,
pci.id checkInputId,
pci.input_name itemName,
pptd.is_finish finishStatus,
pci.safety_danger_num safetyNum,
pci.major_danger_num majorNum,
DATE_FORMAT(pc.check_time,'%Y-%m-%d %H:%i:%s') checkTime,
pc.user_name executeName,
pc.company_name companyName
FROM
p_check pc, p_check_input pci, p_plan_task_detail pptd
WHERE
pc.id = pci.check_id
AND pc.plan_task_detail_id = pptd.id
AND pc.plan_id = #{planId}
<if
test=
"pointId != null and pointId != '' and pointId != -1"
>
AND pc.point_id = #{pointId}
</if>
<if
test=
"status != null and status != ''"
>
AND pptd.is_finish = #{status}
</if>
<!-- <if test="status != null and status != ''">-->
<!-- AND pc.point_id = #{status}-->
<!-- </if>-->
<if
test=
"companyName != null and companyName != ''"
>
AND pc.company_name = #{company_name}
</if>
LIMIT limit #{offset},#{pageSize}
</select>
<select
id=
"getPlanExecuteTeams"
resultType=
"Map"
>
SELECT
pc.company_id value,
pc.company_name name
FROM
p_check pc
</select>
</mapper>
\ No newline at end of file
amos-boot-system-supervision/src/main/resources/db/mapper/routeMapper.xml
View file @
1f3eed54
...
...
@@ -345,4 +345,17 @@
and r.owner_id = #{ownerId}
</if>
</select>
<select
id=
"queryPointByRouteId"
resultType=
"map"
>
SELECT
pp.id pointId,
pp.name name
FROM
p_route_point prp
LEFT JOIN p_point pp ON pp.id = prp.point_id
where
prp.route_id = #{id}
ORDER BY
prp.order_no
</select>
</mapper>
\ 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