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
c13162f0
Commit
c13162f0
authored
Aug 27, 2021
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of 172.16.10.76:moa/amos-boot-biz into develop
parents
b85b252a
1f3eed54
Show whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
1004 additions
and
65 deletions
+1004
-65
MetaHandler.java
...in/java/com/yeejoin/amos/boot/biz/config/MetaHandler.java
+6
-3
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
AircraftDtos.java
...om/yeejoin/amos/boot/module/jcs/api/dto/AircraftDtos.java
+163
-0
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
FireExpertsController.java
...t/module/common/biz/controller/FireExpertsController.java
+44
-12
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+8
-0
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+4
-4
FailureAuditServiceImpl.java
...dule/common/biz/service/impl/FailureAuditServiceImpl.java
+5
-1
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+7
-4
LinkageUnitServiceImpl.java
...odule/common/biz/service/impl/LinkageUnitServiceImpl.java
+1
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+12
-0
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+4
-7
AircraftController.java
...os/boot/module/jcs/biz/controller/AircraftController.java
+98
-29
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
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+44
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/config/MetaHandler.java
View file @
c13162f0
...
@@ -14,6 +14,7 @@ import org.springframework.util.ObjectUtils;
...
@@ -14,6 +14,7 @@ import org.springframework.util.ObjectUtils;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Map
;
/**
/**
* @author Dell
* @author Dell
...
@@ -39,10 +40,10 @@ public class MetaHandler implements MetaObjectHandler {
...
@@ -39,10 +40,10 @@ public class MetaHandler implements MetaObjectHandler {
*/
*/
@Override
@Override
public
void
insertFill
(
MetaObject
metaObject
)
{
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
=
ReginParams
reginParams
=
JSONObject
.
parseObject
(
null
!=
redisUtils
.
get
(
RedisKey
.
buildKey
(
getToken
()))
?
JSONObject
.
parseObject
(
null
!=
redisUtils
.
get
(
RedisKey
.
buildKey
(
getToken
()))
?
...
@@ -55,7 +56,7 @@ public class MetaHandler implements MetaObjectHandler {
...
@@ -55,7 +56,7 @@ public class MetaHandler implements MetaObjectHandler {
if
(
ObjectUtils
.
isEmpty
(
reginParams
)
||
ObjectUtils
.
isEmpty
(
agencyUserModel
)){
if
(
ObjectUtils
.
isEmpty
(
reginParams
)
||
ObjectUtils
.
isEmpty
(
agencyUserModel
)){
return
;
return
;
}
}
Object
entity
=
metaObject
.
getOriginalObject
();
//
Object entity = metaObject.getOriginalObject();
if
(
isExistField
(
"recUserId"
,
entity
))
{
if
(
isExistField
(
"recUserId"
,
entity
))
{
this
.
setFieldValByName
(
"recUserId"
,
agencyUserModel
.
getUserId
(),
metaObject
);
this
.
setFieldValByName
(
"recUserId"
,
agencyUserModel
.
getUserId
(),
metaObject
);
}
}
...
@@ -102,6 +103,8 @@ public class MetaHandler implements MetaObjectHandler {
...
@@ -102,6 +103,8 @@ public class MetaHandler implements MetaObjectHandler {
*/
*/
@Override
@Override
public
void
updateFill
(
MetaObject
metaObject
)
{
public
void
updateFill
(
MetaObject
metaObject
)
{
Object
updateEntity
=
((
Map
)
metaObject
.
getOriginalObject
()).
get
(
"et"
);
autoFillUser
(
metaObject
,
updateEntity
);
Date
currentDate
=
new
Date
();
Date
currentDate
=
new
Date
();
this
.
setFieldValByName
(
"updateTime"
,
currentDate
,
metaObject
);
this
.
setFieldValByName
(
"updateTime"
,
currentDate
,
metaObject
);
}
}
...
...
amos-boot-biz-common/src/main/resources/template/controller.java.ftl
View file @
c13162f0
...
@@ -35,7 +35,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
...
@@ -35,7 +35,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
<#
else
>
<#
else
>
@
Controller
@
Controller
</#
if
>
</#
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
>
<#
if
kotlin
>
class
${
table
.
controllerName
}<#
if
superControllerClass
??>
:
${
superControllerClass
}()</#
if
>
class
${
table
.
controllerName
}<#
if
superControllerClass
??>
:
${
superControllerClass
}()</#
if
>
<#
else
>
<#
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 @
c13162f0
...
@@ -306,10 +306,16 @@ public class WaterResourceDto extends BaseDto {
...
@@ -306,10 +306,16 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"物联参数"
)
@ApiModelProperty
(
value
=
"物联参数"
)
private
WaterResourceIotDto
waterResourceIotDto
;
private
WaterResourceIotDto
waterResourceIotDto
;
@ApiModelProperty
(
"设施定义id"
)
private
Long
equipId
;
@ApiModelProperty
(
"设施定义名称"
)
@ApiModelProperty
(
"设施定义名称"
)
@ExcelProperty
(
value
=
"设施定义名称"
,
index
=
44
)
@ExcelProperty
(
value
=
"设施定义名称"
,
index
=
44
)
private
String
equipName
;
private
String
equipName
;
@ApiModelProperty
(
"设施分类id"
)
private
Long
equipCategoryId
;
@ApiModelProperty
(
"设施分类名称"
)
@ApiModelProperty
(
"设施分类名称"
)
@ExcelProperty
(
value
=
"设施分类名称"
,
index
=
45
)
@ExcelProperty
(
value
=
"设施分类名称"
,
index
=
45
)
private
String
equipCategoryName
;
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 @
c13162f0
...
@@ -50,4 +50,5 @@ public interface ILinkageUnitService {
...
@@ -50,4 +50,5 @@ public interface ILinkageUnitService {
public
List
<
Menu
>
getEmergencyLinkageUnitCodeGroupBy
(
String
type
,
String
rootName
)
;
public
List
<
Menu
>
getEmergencyLinkageUnitCodeGroupBy
(
String
type
,
String
rootName
)
;
List
<
LinkageUnitDto
>
exportToExcel
();
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 @
c13162f0
...
@@ -110,8 +110,8 @@
...
@@ -110,8 +110,8 @@
when ISNULL(belong_fighting_system) = 0 and LENGTH(trim(belong_fighting_system)) > 0
when ISNULL(belong_fighting_system) = 0 and LENGTH(trim(belong_fighting_system)) > 0
then belong_fighting_system
then belong_fighting_system
else '其他' end) belong_fighting_system,
else '其他' end) belong_fighting_system,
resource_type,
equip_id as
resource_type,
resource_type_name
equip_name as
resource_type_name
from cb_water_resource
from cb_water_resource
where is_delete = #{isDelete}
where is_delete = #{isDelete}
</select>
</select>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/AircraftDtos.java
0 → 100644
View file @
c13162f0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.metadata.BaseRowModel
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
AircraftDtos
extends
BaseRowModel
{
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
@ExcelProperty
(
value
=
"飞机型号"
,
index
=
0
)
@ApiModelProperty
(
value
=
"飞机型号"
)
private
String
aircraftModel
;
@ExcelProperty
(
value
=
"中文全称"
,
index
=
1
)
@ApiModelProperty
(
value
=
"中文全称"
)
private
String
fullName
;
@ExcelProperty
(
value
=
"飞机长度"
,
index
=
2
)
@ApiModelProperty
(
value
=
"飞机长度"
)
private
Double
aircraftLength
;
@ExcelProperty
(
value
=
"机舱长度"
,
index
=
3
)
@ApiModelProperty
(
value
=
"机舱长度"
)
private
Double
cabinLength
;
@ExcelProperty
(
value
=
"尾翼高度"
,
index
=
4
)
@ApiModelProperty
(
value
=
"尾翼高度"
)
private
Double
tailHeight
;
@ExcelProperty
(
value
=
"翼展"
,
index
=
5
)
@ApiModelProperty
(
value
=
"翼展"
)
private
Double
wingspan
;
@ExcelProperty
(
value
=
"机身直径"
,
index
=
6
)
@ApiModelProperty
(
value
=
"机身直径"
)
private
Double
fuselageDiameter
;
@ExcelProperty
(
value
=
"翼展面积"
,
index
=
7
)
@ApiModelProperty
(
value
=
"翼展面积"
)
private
Double
wingspanArea
;
@ExplicitConstraint
(
type
=
"FDJLX"
,
indexNum
=
8
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"发动机类型"
,
index
=
8
)
@ApiModelProperty
(
value
=
"发动机类型"
)
private
String
engineType
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"发动机类型code"
)
private
String
engineTypeCode
;
@ExcelProperty
(
value
=
"发动机数量"
,
index
=
9
)
@ApiModelProperty
(
value
=
"发动机数量"
)
private
Integer
enginesmNum
;
@ExcelProperty
(
value
=
"发动机型号"
,
index
=
10
)
@ApiModelProperty
(
value
=
"发动机型号"
)
private
String
engineModel
;
@ExplicitConstraint
(
type
=
"RYLX"
,
indexNum
=
11
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"燃油类型"
,
index
=
11
)
@ApiModelProperty
(
value
=
"燃油类型"
)
private
String
fuelType
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"燃油类型code"
)
private
String
fuelTypeCode
;
@ExcelProperty
(
value
=
"最大载油量"
,
index
=
12
)
@ApiModelProperty
(
value
=
"最大载油量"
)
private
Double
oilLoadMax
;
@ExcelProperty
(
value
=
"标准燃油"
,
index
=
13
)
@ApiModelProperty
(
value
=
"标准燃油"
)
private
Double
standardFuel
;
@ExcelProperty
(
value
=
"空重"
,
index
=
14
)
@ApiModelProperty
(
value
=
"空重"
)
private
Double
emptyWeight
;
@ExcelProperty
(
value
=
"飞机主要构造材料"
,
index
=
15
)
@ApiModelProperty
(
value
=
"飞机主要构造材料"
)
private
String
structuralMaterial
;
@ExcelProperty
(
value
=
"氧气瓶数量"
,
index
=
16
)
@ApiModelProperty
(
value
=
"氧气瓶数量"
)
private
Integer
oxygenCylinderNum
;
@ExcelProperty
(
value
=
"氧气瓶位置描述"
,
index
=
17
)
@ApiModelProperty
(
value
=
"氧气瓶位置描述"
)
private
String
oxygenCylinderLocation
;
@ExcelProperty
(
value
=
"标准坐席数"
,
index
=
18
)
@ApiModelProperty
(
value
=
"标准坐席数"
)
private
Integer
seatNum
;
@ExcelProperty
(
value
=
"商载(吨)"
,
index
=
19
)
@ApiModelProperty
(
value
=
"商载(吨)"
)
private
Double
commercialLoad
;
@ExcelProperty
(
value
=
"货仓容积(立方米)"
,
index
=
20
)
@ApiModelProperty
(
value
=
"货仓容积(立方米)"
)
private
Double
warehouseVolume
;
@ExcelProperty
(
value
=
"最大起飞总重(吨)"
,
index
=
21
)
@ApiModelProperty
(
value
=
"最大起飞总重(吨)"
)
private
Double
takeoffWeightNum
;
@ExcelProperty
(
value
=
"最大巡航速度(马赫)"
,
index
=
22
)
@ApiModelProperty
(
value
=
"最大巡航速度(马赫)"
)
private
Double
cruiseSpeedNum
;
@ExcelProperty
(
value
=
"航程"
,
index
=
23
)
@ApiModelProperty
(
value
=
"航程"
)
private
Double
voyage
;
@ExcelProperty
(
value
=
"主要设施"
,
index
=
24
)
@ApiModelProperty
(
value
=
"主要设施"
)
private
String
facilitie
;
@ExcelProperty
(
value
=
"主要燃烧物质"
,
index
=
25
)
@ApiModelProperty
(
value
=
"主要燃烧物质"
)
private
String
combustionMaterial
;
@ExcelProperty
(
value
=
"疏散出口及安全通道"
,
index
=
26
)
@ApiModelProperty
(
value
=
"疏散出口及安全通道"
)
private
String
exitPassage
;
@ExcelProperty
(
value
=
"备注"
,
index
=
27
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ExcelProperty
(
value
=
"外观图"
,
index
=
28
)
@ApiModelProperty
(
value
=
"外观图"
)
private
String
appearanceImages
;
@ExcelProperty
(
value
=
"平面图"
,
index
=
29
)
@ApiModelProperty
(
value
=
"平面图"
)
private
String
planeImages
;
@ExcelProperty
(
value
=
"救援图"
,
index
=
30
)
@ApiModelProperty
(
value
=
"救援图"
)
private
String
rescueImages
;
@ExcelProperty
(
value
=
"方位图"
,
index
=
31
)
@ApiModelProperty
(
value
=
"方位图"
)
private
String
positionImages
;
@ExcelProperty
(
value
=
"三维模型"
,
index
=
32
)
@ApiModelProperty
(
value
=
"三维模型"
)
private
String
models
;
@ApiModelProperty
(
value
=
"现场图片"
)
private
List
<
String
>
scenePicture
;
}
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 @
c13162f0
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 @
c13162f0
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 @
c13162f0
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 @
c13162f0
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 @
c13162f0
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 @
c13162f0
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 @
c13162f0
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 @
c13162f0
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 @
c13162f0
<?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 @
c13162f0
<?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/FireExpertsController.java
View file @
c13162f0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -13,20 +16,14 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
...
@@ -13,20 +16,14 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireExperts
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireExperts
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireExpertsServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireExpertsServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.multipart.MultipartFile
;
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.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
@@ -59,8 +56,7 @@ public class FireExpertsController extends BaseController {
...
@@ -59,8 +56,7 @@ public class FireExpertsController extends BaseController {
@Autowired
@Autowired
DataDictionaryServiceImpl
dataDictionaryService
;
DataDictionaryServiceImpl
dataDictionaryService
;
@Autowired
DataDictionaryMapper
dataDictionaryMapper
;
/**
/**
* 新增
* 新增
...
@@ -188,4 +184,40 @@ public class FireExpertsController extends BaseController {
...
@@ -188,4 +184,40 @@ public class FireExpertsController extends BaseController {
// 创建挂在主节点
// 创建挂在主节点
return
ResponseHelper
.
buildResponse
(
menuList
);
return
ResponseHelper
.
buildResponse
(
menuList
);
}
}
/**
*
* 导入航空器信息
*
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/ImportData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"导入消防专家"
,
notes
=
"导入消防专家"
)
public
Boolean
ImportData
(
@RequestPart
MultipartFile
multipartFile
)
{
List
<
FireExperts
>
aircraftList
=
new
ArrayList
<>();
try
{
EasyExcel
.
read
(
multipartFile
.
getInputStream
(),
FireExpertsDto
.
class
,
new
AnalysisEventListener
<
FireExpertsDto
>()
{
// 每读取一行就调用该方法
@Override
public
void
invoke
(
FireExpertsDto
data
,
AnalysisContext
context
)
{
FireExperts
fireExperts
=
new
FireExperts
();
BeanUtils
.
copyProperties
(
data
,
fireExperts
);
aircraftList
.
add
(
fireExperts
);
}
// 全部读取完成就调用该方法
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
System
.
out
.
println
(
"读取完成"
);
}
}).
sheet
().
doRead
();
fireExpertsServiceImpl
.
saveBatch
(
aircraftList
);
return
true
;
}
catch
(
Exception
e
)
{
return
false
;
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
c13162f0
...
@@ -268,6 +268,14 @@ public class OrgUsrController extends BaseController {
...
@@ -268,6 +268,14 @@ public class OrgUsrController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
returnCompanyPerson
(
ids
));
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
returnCompanyPerson
(
ids
));
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/company/person/{amosUserId}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据amosUserId获取单位ID"
,
notes
=
"根据amosUserId获取单位ID"
)
public
ResponseModel
<
String
>
selectPersonId
(
@PathVariable
String
amosUserId
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
getParentId
(
amosUserId
));
}
/**
/**
* 根据id获取单位人员列表
* 根据id获取单位人员列表
*
*
...
...
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 @
c13162f0
...
@@ -348,12 +348,12 @@ public class WaterResourceController extends BaseController {
...
@@ -348,12 +348,12 @@ public class WaterResourceController extends BaseController {
@RequestParam
(
value
=
"size"
)
int
size
,
String
name
,
@RequestParam
(
value
=
"size"
)
int
size
,
String
name
,
@RequestParam
(
value
=
"belongBuildingId"
,
required
=
false
)
ArrayList
<
Long
>
belongBuildingId
,
@RequestParam
(
value
=
"belongBuildingId"
,
required
=
false
)
ArrayList
<
Long
>
belongBuildingId
,
Long
belongFightingSystemId
,
Long
sequenceNbr
,
Long
belongFightingSystemId
,
Long
sequenceNbr
,
String
resourceType
)
{
String
classifyId
)
{
Page
<
WaterResourceDto
>
page
=
new
Page
<>();
Page
<
WaterResourceDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
waterResourceServiceImpl
.
queryForWaterResourcePage
(
page
,
name
,
return
ResponseHelper
.
buildResponse
(
waterResourceServiceImpl
.
queryForWaterResourcePage
(
page
,
name
,
resourceType
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
));
classifyId
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
));
}
}
/**
/**
...
@@ -384,9 +384,9 @@ public class WaterResourceController extends BaseController {
...
@@ -384,9 +384,9 @@ public class WaterResourceController extends BaseController {
@GetMapping
(
value
=
"/select_list"
)
@GetMapping
(
value
=
"/select_list"
)
public
ResponseModel
<
List
<
WaterResourceDto
>>
selectList
(
String
name
,
Long
sequenceNbr
,
public
ResponseModel
<
List
<
WaterResourceDto
>>
selectList
(
String
name
,
Long
sequenceNbr
,
Long
belongFightingSystemId
,
Long
belongBuildingId
,
Long
belongFightingSystemId
,
Long
belongBuildingId
,
String
belongBuilding
,
String
resourceType
,
String
classifyId
)
{
String
belongBuilding
,
String
resourceType
)
{
return
ResponseHelper
.
buildResponse
(
waterResourceServiceImpl
.
queryWaterResourceList
(
true
,
name
,
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/FailureAuditServiceImpl.java
View file @
c13162f0
...
@@ -4,6 +4,7 @@ import java.util.Date;
...
@@ -4,6 +4,7 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -44,6 +45,8 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
...
@@ -44,6 +45,8 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
@Autowired
@Autowired
FailureRepairlogServiceImpl
failureRepairlogService
;
FailureRepairlogServiceImpl
failureRepairlogService
;
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
/**
/**
...
@@ -62,8 +65,9 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
...
@@ -62,8 +65,9 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
int
auditResult
=
0
;
int
auditResult
=
0
;
Boolean
repairResult
=
null
;
Boolean
repairResult
=
null
;
Long
seq
=
Long
.
valueOf
(
iOrgUsrService
.
getParentId
(
userInfo
.
getUserModel
().
getUserId
()));
//根据审核的结果进行业务操作
//根据审核的结果进行业务操作
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
()
&&
userInfo
.
getDepartment
().
getSequenceNbr
()
.
equals
(
failureDetailsDto
.
getBizCode
()))
{
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
()
&&
seq
.
equals
(
failureDetailsDto
.
getBizCode
()))
{
auditResult
=
AuditResultEnum
.
AGREE
.
getCode
();
auditResult
=
AuditResultEnum
.
AGREE
.
getCode
();
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_AUDIT
,
userInfo
,
condition
);
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_AUDIT
,
userInfo
,
condition
);
}
else
if
(
condition
==
(
AuditResultEnum
.
REFUSE
.
getCode
()))
{
}
else
if
(
condition
==
(
AuditResultEnum
.
REFUSE
.
getCode
()))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureDetailsServiceImpl.java
View file @
c13162f0
...
@@ -65,6 +65,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -65,6 +65,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
@Autowired
@Autowired
IFailureRepairlogService
failureRepairlog
;
IFailureRepairlogService
failureRepairlog
;
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
public
static
String
EMERGENCY_COMMAND
=
"应急指挥科"
;
public
static
String
EMERGENCY_COMMAND
=
"应急指挥科"
;
public
static
String
[]
PROCESS_NAME
=
{
"提交报修单"
,
"审核"
,
"维修"
,
"验收"
,
"维修中"
};
public
static
String
[]
PROCESS_NAME
=
{
"提交报修单"
,
"审核"
,
"维修"
,
"验收"
,
"维修中"
};
...
@@ -222,7 +224,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -222,7 +224,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
failureDetailsDto
.
setFailureCode
(
buildOrderNo
());
failureDetailsDto
.
setFailureCode
(
buildOrderNo
());
failureDetailsDto
.
setSubmissionName
(
userInfo
.
getUserModel
().
getRealName
());
failureDetailsDto
.
setSubmissionName
(
userInfo
.
getUserModel
().
getRealName
());
failureDetailsDto
.
setBizCode
(
userInfo
.
getDepartment
().
getSequenceNbr
(
));
failureDetailsDto
.
setBizCode
(
Long
.
valueOf
(
iOrgUsrService
.
getParentId
(
userInfo
.
getUserModel
().
getUserId
())
));
model
=
this
.
createWithModel
(
failureDetailsDto
);
model
=
this
.
createWithModel
(
failureDetailsDto
);
if
(
ObjectUtils
.
isNotEmpty
(
failureDetailsDto
.
getAttachment
()))
{
if
(
ObjectUtils
.
isNotEmpty
(
failureDetailsDto
.
getAttachment
()))
{
...
@@ -234,7 +236,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -234,7 +236,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
Integer
processAuditorId
=
model
.
getSubmissionPid
();
Integer
processAuditorId
=
model
.
getSubmissionPid
();
String
processResult
=
"提交报修单"
;
String
processResult
=
"提交报修单"
;
String
processDepartment
=
userInfo
.
getDepartment
().
getDepartmentName
();
String
processDepartment
=
userInfo
.
getDepartment
().
getDepartmentName
();
Long
departmentId
=
userInfo
.
getDepartment
().
getSequenceNbr
();
Long
departmentId
=
failureDetailsDto
.
getBizCode
();
Date
processTime
=
model
.
getSubmissionTime
();
Date
processTime
=
model
.
getSubmissionTime
();
String
processAuditorName
=
failureDetailsDto
.
getSubmissionName
();
String
processAuditorName
=
failureDetailsDto
.
getSubmissionName
();
repairlog
(
faultId
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
,
processAuditorName
);
repairlog
(
faultId
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
,
processAuditorName
);
...
@@ -266,7 +268,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -266,7 +268,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
Integer
processAuditorId
=
model
.
getSubmissionPid
();
Integer
processAuditorId
=
model
.
getSubmissionPid
();
String
processResult
=
"重新提交报修单"
;
String
processResult
=
"重新提交报修单"
;
String
processDepartment
=
userInfo
.
getDepartment
().
getDepartmentName
();
String
processDepartment
=
userInfo
.
getDepartment
().
getDepartmentName
();
Long
departmentId
=
userInfo
.
getDepartment
().
getSequenceNbr
();
Long
departmentId
=
failureDetailsDto
.
getBizCode
();
Date
processTime
=
model
.
getSubmissionTime
();
Date
processTime
=
model
.
getSubmissionTime
();
String
processAuditorName
=
failureDetailsDto
.
getSubmissionName
();
String
processAuditorName
=
failureDetailsDto
.
getSubmissionName
();
repairlog
(
faultId
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
,
processAuditorName
);
repairlog
(
faultId
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
,
processAuditorName
);
...
@@ -396,6 +398,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -396,6 +398,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
public
Map
<
String
,
Object
>
checkExcuteTaskAuthMap
(
Long
sequenceNbr
,
ReginParams
userInfo
)
{
public
Map
<
String
,
Object
>
checkExcuteTaskAuthMap
(
Long
sequenceNbr
,
ReginParams
userInfo
)
{
// 获取当前登录用户的角色
// 获取当前登录用户的角色
String
currentLoginUserRole
=
userInfo
.
getRole
().
getRoleName
();
String
currentLoginUserRole
=
userInfo
.
getRole
().
getRoleName
();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"checkFlag"
,
false
);
map
.
put
(
"checkFlag"
,
false
);
...
@@ -404,7 +407,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -404,7 +407,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
Long
failureEquipmentId
=
failureDetailsDto
.
getSubmissionBranchId
();
Long
failureEquipmentId
=
failureDetailsDto
.
getSubmissionBranchId
();
FailureDetails
details
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
FailureDetails
details
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
String
procressId
=
details
.
getProcessId
();
String
procressId
=
details
.
getProcessId
();
Long
seq
=
userInfo
.
getDepartment
().
getSequenceNbr
(
);
Long
seq
=
Long
.
valueOf
(
iOrgUsrService
.
getParentId
(
userInfo
.
getUserModel
().
getUserId
())
);
JSONObject
teskObject
=
workflowFeignService
.
getTaskList
(
procressId
);
JSONObject
teskObject
=
workflowFeignService
.
getTaskList
(
procressId
);
if
(
ObjectUtils
.
isNotEmpty
(
teskObject
))
{
if
(
ObjectUtils
.
isNotEmpty
(
teskObject
))
{
JSONArray
taskDetailArray
=
teskObject
.
getJSONArray
(
"data"
);
JSONArray
taskDetailArray
=
teskObject
.
getJSONArray
(
"data"
);
...
...
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 @
c13162f0
...
@@ -111,6 +111,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
...
@@ -111,6 +111,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
/**
/**
* 列表查询 示例
* 列表查询 示例
*/
*/
@Override
public
List
<
LinkageUnitDto
>
queryForLinkageUnitList
(
@Condition
(
Operator
.
eq
)
Boolean
isDelete
)
{
public
List
<
LinkageUnitDto
>
queryForLinkageUnitList
(
@Condition
(
Operator
.
eq
)
Boolean
isDelete
)
{
return
this
.
queryForList
(
""
,
false
,
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/OrgUsrServiceImpl.java
View file @
c13162f0
...
@@ -967,6 +967,18 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -967,6 +967,18 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return
this
.
queryBySeq
(
Long
.
valueOf
(
person
.
getParentId
()));
return
this
.
queryBySeq
(
Long
.
valueOf
(
person
.
getParentId
()));
}
}
public
String
getParentId
(
String
amosOrgId
)
{
List
<
OrgUsrDto
>
orgUsrDtos
=
queryForList
(
""
,
false
,
amosOrgId
);
String
parentId
=
null
;
if
(
orgUsrDtos
.
size
()
>=
1
){
parentId
=
orgUsrDtos
.
get
(
0
).
getParentId
();
}
else
{
return
null
;
}
return
parentId
;
}
public
OrgUsrDto
queryForListByParentIdAndOrgType
(
String
amosOrgId
)
{
public
OrgUsrDto
queryForListByParentIdAndOrgType
(
String
amosOrgId
)
{
return
this
.
queryModelByParams
(
amosOrgId
);
return
this
.
queryModelByParams
(
amosOrgId
);
}
}
...
...
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 @
c13162f0
...
@@ -56,13 +56,11 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
...
@@ -56,13 +56,11 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
*/
*/
public
Page
<
WaterResourceDto
>
queryForWaterResourcePage
(
Page
<
WaterResourceDto
>
page
,
public
Page
<
WaterResourceDto
>
queryForWaterResourcePage
(
Page
<
WaterResourceDto
>
page
,
@Condition
(
Operator
.
like
)
String
name
,
@Condition
(
Operator
.
like
)
String
name
,
@Condition
(
Operator
.
eq
)
String
resourceType
,
@Condition
(
Operator
.
eq
)
String
equipId
,
@Condition
(
Operator
.
in
)
ArrayList
<
Long
>
belongBuildingId
,
@Condition
(
Operator
.
in
)
ArrayList
<
Long
>
belongBuildingId
,
@Condition
(
Operator
.
eq
)
Long
belongFightingSystemId
,
@Condition
(
Operator
.
eq
)
Long
belongFightingSystemId
,
@Condition
(
Operator
.
eq
)
Long
sequenceNbr
)
{
@Condition
(
Operator
.
eq
)
Long
sequenceNbr
)
{
// return this.queryForPage(page, null, false, name, resourceType, belongBuildingId, belongFightingSystemId,
return
this
.
waterResourceMapper
.
getWaterResourcePageByParams
(
page
,
name
,
equipId
,
belongBuildingId
,
// sequenceNbr, isDelete);
return
this
.
waterResourceMapper
.
getWaterResourcePageByParams
(
page
,
name
,
resourceType
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
);
belongFightingSystemId
,
sequenceNbr
);
}
}
...
@@ -82,10 +80,9 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
...
@@ -82,10 +80,9 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
@Condition
(
Operator
.
eq
)
Long
belongFightingSystemId
,
@Condition
(
Operator
.
eq
)
Long
belongFightingSystemId
,
@Condition
(
Operator
.
eq
)
Long
belongBuildingId
,
@Condition
(
Operator
.
eq
)
Long
belongBuildingId
,
@Condition
(
Operator
.
like
)
String
belongBuilding
,
@Condition
(
Operator
.
like
)
String
belongBuilding
,
@Condition
(
Operator
.
eq
)
String
resourceType
,
@Condition
(
Operator
.
eq
)
String
resourceType
)
{
@Condition
(
Operator
.
eq
)
String
equipId
)
{
return
this
.
queryForList
(
""
,
false
,
isDelete
,
name
,
sequenceNbr
,
belongFightingSystemId
,
belongBuildingId
,
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/AircraftController.java
View file @
c13162f0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.metadata.TableStyle
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.ExcelUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.api.feign.IotFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.IotFeignClient
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDtos
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft
;
...
@@ -21,6 +31,9 @@ import io.swagger.annotations.Api;
...
@@ -21,6 +31,9 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.poi.ss.usermodel.IndexedColors
;
import
org.slf4j.Logger
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -33,7 +46,13 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -33,7 +46,13 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.util.*
;
import
java.util.*
;
...
@@ -57,6 +76,7 @@ public class AircraftController extends BaseController {
...
@@ -57,6 +76,7 @@ public class AircraftController extends BaseController {
@Autowired
@Autowired
private
AlertFormValueServiceImpl
iAlertFormValueService
;
private
AlertFormValueServiceImpl
iAlertFormValueService
;
/**
/**
* 新增航空器信息
* 新增航空器信息
*
*
...
@@ -145,9 +165,7 @@ public class AircraftController extends BaseController {
...
@@ -145,9 +165,7 @@ public class AircraftController extends BaseController {
/**
/**
*
* @param
*
* @param 获取航空器型号列表
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -158,41 +176,37 @@ public class AircraftController extends BaseController {
...
@@ -158,41 +176,37 @@ public class AircraftController extends BaseController {
}
}
/**
/**
*
* 获取24小时内的航班号
* 获取24小时内的航班号
*
**/
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getAircraftNum"
)
@GetMapping
(
value
=
"/getAircraftNum"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取24小时内的航班号"
,
notes
=
"获取24小时内的航班号"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取24小时内的航班号"
,
notes
=
"获取24小时内的航班号"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getAircraftNum
()
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getAircraftNum
()
{
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
dataModel
=
iotFeignClient
.
findImgByFileCategory
();
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
dataModel
=
iotFeignClient
.
findImgByFileCategory
();
if
(
dataModel
!=
null
)
{
if
(
dataModel
!=
null
)
{
List
<
Map
<
String
,
Object
>>
listmap
=
dataModel
.
getResult
();
List
<
Map
<
String
,
Object
>>
listmap
=
dataModel
.
getResult
();
return
ResponseHelper
.
buildResponse
(
listmap
);
return
ResponseHelper
.
buildResponse
(
listmap
);
}
}
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
/**
/**
*
* 通过航班号,查询最新的航班信息
* 通过航班号,查询最新的航班信息
*
**/
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getAircraftDetails/{num}"
)
@GetMapping
(
value
=
"/getAircraftDetails/{num}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过航班号,查询最新的航班信息"
,
notes
=
"通过航班号,查询最新的航班信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过航班号,查询最新的航班信息"
,
notes
=
"通过航班号,查询最新的航班信息"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAircraftDetails
(
@PathVariable
String
num
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getAircraftDetails
(
@PathVariable
String
num
)
{
Map
<
String
,
Object
>
map1
=
new
HashedMap
();
Map
<
String
,
Object
>
map1
=
new
HashedMap
();
ResponseModel
<
Map
<
String
,
Object
>>
dataModel
=
iotFeignClient
.
getDynamicFlightInfo
(
num
);
ResponseModel
<
Map
<
String
,
Object
>>
dataModel
=
iotFeignClient
.
getDynamicFlightInfo
(
num
);
if
(
dataModel
!=
null
)
{
if
(
dataModel
!=
null
)
{
Map
<
String
,
Object
>
map
=
dataModel
.
getResult
();
Map
<
String
,
Object
>
map
=
dataModel
.
getResult
();
if
(
map
!=
null
)
{
if
(
map
!=
null
)
{
map1
.
put
(
"aircraftModel"
,
map
.
get
(
"aircraftType"
));
map1
.
put
(
"aircraftModel"
,
map
.
get
(
"aircraftType"
));
map1
.
put
(
"dynamicFlightId"
,
map
.
get
(
"dynamicFlightId"
));
map1
.
put
(
"dynamicFlightId"
,
map
.
get
(
"dynamicFlightId"
));
map1
.
put
(
"landingTime"
,
map
.
get
(
"sta"
));
map1
.
put
(
"landingTime"
,
map
.
get
(
"sta"
));
...
@@ -204,10 +218,8 @@ public class AircraftController extends BaseController {
...
@@ -204,10 +218,8 @@ public class AircraftController extends BaseController {
}
}
/**
/**
*
* 通过航班号,查询最新的航班信息
* 通过航班号,查询最新的航班信息
*
**/
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getAircraftDetailsByAlertId/{id}"
)
@GetMapping
(
value
=
"/getAircraftDetailsByAlertId/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id 查询最新的航班信息"
,
notes
=
"根据灾情id 查询最新的航班信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id 查询最新的航班信息"
,
notes
=
"根据灾情id 查询最新的航班信息"
)
...
@@ -216,22 +228,78 @@ public class AircraftController extends BaseController {
...
@@ -216,22 +228,78 @@ public class AircraftController extends BaseController {
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 警情动态表单数据
// 警情动态表单数据
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
String
num
=
null
;
String
num
=
null
;
if
(
list
!=
null
&&
list
.
size
()>
0
)
{
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
for
(
AlertFormValue
alertFormValue
:
list
)
{
for
(
AlertFormValue
alertFormValue
:
list
)
{
if
(
"flightNumber"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
if
(
"flightNumber"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
num
=
alertFormValue
.
getFieldValue
();
num
=
alertFormValue
.
getFieldValue
();
}
}
}
}
}
}
Map
<
String
,
Object
>
map
=
new
HashedMap
();
Map
<
String
,
Object
>
map
=
new
HashedMap
();
ResponseModel
<
Map
<
String
,
Object
>>
dataModel
=
iotFeignClient
.
findImgByDynamicFlightId
(
num
);
ResponseModel
<
Map
<
String
,
Object
>>
dataModel
=
iotFeignClient
.
findImgByDynamicFlightId
(
num
);
if
(
dataModel
!=
null
)
{
if
(
dataModel
!=
null
)
{
map
=
dataModel
.
getResult
();
map
=
dataModel
.
getResult
();
}
}
return
ResponseHelper
.
buildResponse
(
map
);
return
ResponseHelper
.
buildResponse
(
map
);
}
}
/**
*
* 导出航空器信息
*
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/exportData"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"导出航空器信息"
,
notes
=
"导出航空器信息"
)
public
void
exportData
(
HttpServletResponse
response
)
throws
IOException
{
String
fileName
=
"Aircraft"
;
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
addHeader
(
"Content-Disposition"
,
"attachment;filename="
+
fileName
+
".xlsx"
);
String
sheetName
=
"航空器信息"
;
ExcelWriter
writer
=
new
ExcelWriter
(
response
.
getOutputStream
(),
ExcelTypeEnum
.
XLSX
);
Sheet
sheet
=
new
Sheet
(
1
,
0
,
AircraftDtos
.
class
);
List
<
AircraftDto
>
list
=
aircraftServiceImpl
.
queryAircraftDtoForList
(
false
);
sheet
.
setSheetName
(
sheetName
);
writer
.
write
(
list
,
sheet
);
writer
.
finish
();
}
/**
*
* 导入航空器信息
*
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/ImportData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"导入航空器信息"
,
notes
=
"导入航空器信息"
)
public
Boolean
ImportData
(
@RequestPart
MultipartFile
multipartFile
)
{
List
<
Aircraft
>
aircraftList
=
new
ArrayList
<>();
try
{
// list = ExcelUtil.readFirstSheetExcel(multipartFile, AircraftDto.class, 0);
EasyExcel
.
read
(
multipartFile
.
getInputStream
(),
AircraftDto
.
class
,
new
AnalysisEventListener
<
AircraftDto
>()
{
// 每读取一行就调用该方法
@Override
public
void
invoke
(
AircraftDto
data
,
AnalysisContext
context
)
{
Aircraft
aircraft
=
new
Aircraft
();
BeanUtils
.
copyProperties
(
data
,
aircraft
);
aircraftList
.
add
(
aircraft
);
}
// 全部读取完成就调用该方法
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
System
.
out
.
println
(
"读取完成"
);
}
}).
sheet
().
doRead
();
aircraftServiceImpl
.
saveBatch
(
aircraftList
);
return
true
;
}
catch
(
Exception
e
)
{
return
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/controller/AlertCalledController.java
View file @
c13162f0
...
@@ -299,4 +299,17 @@ public class AlertCalledController extends BaseController {
...
@@ -299,4 +299,17 @@ public class AlertCalledController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
controlEquip
());
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 @
c13162f0
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 @
c13162f0
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 @
c13162f0
...
@@ -27,6 +27,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel;
...
@@ -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.dto.PowerData
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
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.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.entity.Template
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ControllerTypeEnum
;
...
@@ -86,6 +87,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -86,6 +87,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
private
ControllerServiceImpl
controllerService
;
private
ControllerServiceImpl
controllerService
;
@Autowired
@Autowired
private
ControllerEquipServiceImpl
controllerEquipService
;
private
ControllerEquipServiceImpl
controllerEquipService
;
@Autowired
private
AlertLocationLogServiceImpl
alertLocationLogService
;
@Autowired
@Autowired
private
EmqKeeper
emqKeeper
;
private
EmqKeeper
emqKeeper
;
@Value
(
"${mqtt.topic.command.alert.notice}"
)
@Value
(
"${mqtt.topic.command.alert.notice}"
)
...
@@ -538,4 +543,34 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
...
@@ -538,4 +543,34 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
return
true
;
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 @
c13162f0
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 @
c13162f0
...
@@ -9,7 +9,7 @@ import javax.annotation.Resource;
...
@@ -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.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
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.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -70,7 +70,7 @@ public class DataSourcesImpl implements DataSources {
...
@@ -70,7 +70,7 @@ public class DataSourcesImpl implements DataSources {
private
RestTemplate
restTemplate
;
private
RestTemplate
restTemplate
;
@Autowired
@Autowired
LinkageUnitServiceImpl
linkageUnitServiceImpl
;
ILinkageUnitService
linkageUnitServiceImpl
;
@Value
(
"${security.systemctl.name}"
)
@Value
(
"${security.systemctl.name}"
)
private
String
systemctl
;
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 @
c13162f0
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-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
c13162f0
...
@@ -97,5 +97,49 @@
...
@@ -97,5 +97,49 @@
ADD COLUMN maintenance_period VARCHAR ( 10 ) COMMENT '维保周期';
ADD COLUMN maintenance_period VARCHAR ( 10 ) COMMENT '维保周期';
</sql>
</sql>
</changeSet>
</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>
</databaseChangeLog>
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