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
666ddb63
Commit
666ddb63
authored
Jul 21, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编写指挥接口
parent
fac1ca15
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
201 additions
and
32 deletions
+201
-32
LinkageUnitZhDto.java
...oin/amos/boot/module/common/api/dto/LinkageUnitZhDto.java
+47
-0
LinkageUnitMapper.java
...amos/boot/module/common/api/mapper/LinkageUnitMapper.java
+15
-0
ILinkageUnitService.java
...s/boot/module/common/api/service/ILinkageUnitService.java
+12
-0
FireTeamMapper.xml
...e-common-api/src/main/resources/mapper/FireTeamMapper.xml
+5
-4
LinkageUnitMapper.xml
...ommon-api/src/main/resources/mapper/LinkageUnitMapper.xml
+32
-0
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+0
-18
WaterResourceMapper.xml
...mon-api/src/main/resources/mapper/WaterResourceMapper.xml
+2
-2
AlertStageEnums.java
...ejoin/amos/boot/module/jcs/api/enums/AlertStageEnums.java
+1
-0
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+67
-7
LinkageUnitServiceImpl.java
...odule/common/biz/service/impl/LinkageUnitServiceImpl.java
+20
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/LinkageUnitZhDto.java
0 → 100644
View file @
666ddb63
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 联动单位
*
* @author system_generator
* @date 2021-07-16
*/
@Data
@ApiModel
(
value
=
"LinkageUnitZhDto"
,
description
=
"指挥联动单位"
)
public
class
LinkageUnitZhDto
{
@ApiModelProperty
(
value
=
"主键ID"
)
protected
Long
sequenceNbr
;
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
unitName
;
@ApiModelProperty
(
value
=
"地址"
)
private
String
address
;
@ApiModelProperty
(
value
=
"经度"
)
private
Double
longitude
;
@ApiModelProperty
(
value
=
"纬度"
)
private
Double
latitude
;
@ApiModelProperty
(
value
=
"战备人数量"
)
private
int
userNum
;
@ApiModelProperty
(
value
=
"战备车辆数量"
)
private
int
carNum
;
@ApiModelProperty
(
value
=
"距离灾情点距离 单位 米"
)
private
Double
distance
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/LinkageUnitMapper.java
View file @
666ddb63
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.common.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.entity.LinkageUnit
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -28,4 +32,15 @@ public interface LinkageUnitMapper extends BaseMapper<LinkageUnit> {
@Param
(
"groupCode"
)
String
groupCode
,
@Param
(
"sequenceNbr"
)
Long
sequenceNbr
);
/**
* * @param null
* @return
* <PRE>
* author tw
* date 2021/7/20
* </PRE>
*/
List
<
LinkageUnitZhDto
>
listLinkageUnitZhDto
(
@Param
(
"pageNum"
)
int
pageNum
,
@Param
(
"pageSize"
)
int
pageSize
,
@Param
(
"par"
)
RequestData
par
);
Integer
listLinkageUnitZhDtoCount
(
@Param
(
"par"
)
RequestData
par
);
}
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 @
666ddb63
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
service
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
java.util.List
;
/**
* 联动单位接口类
*
...
...
@@ -9,4 +15,10 @@ package com.yeejoin.amos.boot.module.common.api.service;
*/
public
interface
ILinkageUnitService
{
List
<
LinkageUnitZhDto
>
listLinkageUnitZhDto
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
);
Integer
listLinkageUnitZhDtoCount
(
RequestData
par
);
LinkageUnitDto
queryOne
(
Long
sequenceNbr
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FireTeamMapper.xml
View file @
666ddb63
...
...
@@ -99,8 +99,8 @@
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
FROM cb_fire_team a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if
test=
'par.typeCode!=null'
>
and a.type_code
= #{par.typeCode}
<if
test=
'par.typeCode!=null
and par.typeCode!=""
'
>
and a.type_code
in (#{par.typeCode})
</if>
<if
test=
'par.distance!=null'
>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<
= #{par.distance}
...
...
@@ -113,8 +113,9 @@
COUNT(a.sequence_nbr) num
FROM cb_fire_team a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if
test=
'par.typeCode!=null'
>
and a.type_code= #{par.typeCode}
<if
test=
'par.typeCode!=null and par.typeCode!=""'
>
and a.type_code in (#{par.typeCode})
</if>
<if
test=
'par.distance!=null'
>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<
= #{par.distance}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/LinkageUnitMapper.xml
View file @
666ddb63
...
...
@@ -25,4 +25,36 @@
and lu.sequence_nbr = #{sequenceNbr}
and is_delete = #{isDelete}
</select>
<select
id=
"listLinkageUnitZhDto"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto"
>
select
a.sequence_nbr sequenceNbr,
a.unit_name unitName,
a.address,
a.latitude,
a.longitude,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
FROM cb_linkage_unit a
where a.longitude is not null and a.latitude is not null
<if
test=
'par.distance!=null'
>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<
=
#{par.distance}
</if>
ORDER BY distance limit #{pageNum},#{pageSize}
</select>
<select
id=
"listLinkageUnitZhDtoCount"
resultType=
"Integer"
>
select
COUNT(a.sequence_nbr) num
FROM cb_linkage_unit a
where a.longitude is not null and a.latitude is not null
<if
test=
'par.distance!=null'
>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<
=
#{par.distance}
</if>
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
666ddb63
...
...
@@ -243,22 +243,4 @@
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/WaterResourceMapper.xml
View file @
666ddb63
...
...
@@ -78,7 +78,7 @@
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
FROM cb_water_resource a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if
test=
'par.resourceType!=null'
>
<if
test=
'par.resourceType!=null
and par.resourceType!=""
'
>
and a.resource_type= #{par.resourceType}
</if>
<if
test=
'par.distance!=null'
>
...
...
@@ -93,7 +93,7 @@
COUNT(a.sequence_nbr) num
FROM cb_water_resource a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if
test=
'par.resourceType!=null'
>
<if
test=
'par.resourceType!=null
and par.resourceType!=""
'
>
and a.resource_type= #{par.resourceType}
</if>
<if
test=
'par.distance!=null'
>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/enums/AlertStageEnums.java
View file @
666ddb63
...
...
@@ -39,6 +39,7 @@ public enum AlertStageEnums {
DQZD
(
"115"
,
"地区消防救援支队"
),
ZZZD
(
"116"
,
"企(事)业单位专职消防救援支队"
),
YWDD
(
"117"
,
"企(事)业单位义务消防救援大队"
),
YLJY
(
"830"
,
"企(事)业单位医疗救援队(站)"
),
JKDD
(
"118"
,
"企(事)业单位监控大队"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
666ddb63
...
...
@@ -8,10 +8,7 @@ import com.yeejoin.amos.boot.module.command.api.dao.SeismometeorologyDtoDao;
import
com.yeejoin.amos.boot.module.command.api.dto.SeismometeorologyDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.common.api.service.IFireStationService
;
import
com.yeejoin.amos.boot.module.common.api.service.IFireTeamService
;
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService
;
import
com.yeejoin.amos.boot.module.common.api.service.IWaterResourceService
;
import
com.yeejoin.amos.boot.module.common.api.service.*
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService
;
...
...
@@ -58,7 +55,8 @@ public class CommandController extends BaseController {
SeismometeorologyDtoDao
seismometeorologyDtoDao
;
@Autowired
IOrgUsrService
iOrgUsrService
;
@Autowired
ILinkageUnitService
iLinkageUnitService
;
/**
* 警情列表
*
...
...
@@ -74,7 +72,7 @@ public class CommandController extends BaseController {
/**
*
微型消防站列表
分页查询
*
保卫目标
分页查询
*
* @return
*/
...
...
@@ -89,6 +87,27 @@ public class CommandController extends BaseController {
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
/**
* * @param null
* @return
* <PRE>
* author tw
* date 2021/7/21
* </PRE>
* 保卫目标详情
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"ZDDW/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"保卫目标详情"
,
notes
=
"保卫目标详情"
)
public
ResponseModel
<
OrgUsrFormDto
>
selectZDDWById
(
@PathVariable
Long
id
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
selectCompanyById
(
id
));
}
/**
* 微型消防站列表分页查询
*
...
...
@@ -183,6 +202,38 @@ public class CommandController extends BaseController {
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
/**
* 联动力量列表分页查询
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"linkageForce/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"联动力量列表分页查询"
,
notes
=
"联动力量列表分页查询"
)
public
ResponseModel
<
IPage
<
LinkageUnitZhDto
>>
linkageForcelistPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
Page
<
LinkageUnitZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
LinkageUnitZhDto
>
list
=
iLinkageUnitService
.
listLinkageUnitZhDto
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iLinkageUnitService
.
listLinkageUnitZhDtoCount
(
par
);
pageBean
.
setRecords
(
list
);
pageBean
.
setTotal
(
num
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
/**
* * @param null
* @return
* <PRE>
* author tw
* date 2021/7/21
* </PRE>
* 联动单位详情
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"linkageForce/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个联动单位"
,
notes
=
"根据sequenceNbr查询单个联动单位"
)
public
ResponseModel
<
LinkageUnitDto
>
selectlinkageForceOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
iLinkageUnitService
.
queryOne
(
sequenceNbr
));
}
/**
...
...
@@ -194,7 +245,9 @@ public class CommandController extends BaseController {
@GetMapping
(
value
=
"ZQ/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"执勤实力列表分页查询"
,
notes
=
"执勤实力列表分页查询"
)
public
ResponseModel
<
IPage
<
FireTeamZhDto
>>
ZQlistPage
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
par
.
setTypeCode
(
AlertStageEnums
.
ZZZD
.
getCode
());
if
(
par
.
getTypeCode
()==
null
){
par
.
setTypeCode
(
AlertStageEnums
.
ZZZD
.
getCode
()+
","
+
AlertStageEnums
.
YLJY
.
getCode
());
}
Page
<
FireTeamZhDto
>
pageBean
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
FireTeamZhDto
>
list
=
iFireTeamService
.
getFireTeamList
(
pageNum
,
pageSize
,
par
);
Integer
num
=
iFireTeamService
.
getFireTeamListCount
(
par
);
...
...
@@ -291,4 +344,10 @@ public class CommandController extends BaseController {
}
return
ResponseHelper
.
buildResponse
(
li
);
}
}
\ No newline at end of file
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 @
666ddb63
...
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.common.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.entity.LinkageUnit
;
...
...
@@ -80,7 +82,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
return
model
;
}
@Override
public
LinkageUnitDto
queryOne
(
Long
sequenceNbr
)
{
boolean
isDelete
=
false
;
String
groupCode
=
getGroupCode
();
...
...
@@ -126,4 +128,20 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
}
return
sb
.
toString
();
}
@Override
public
List
<
LinkageUnitZhDto
>
listLinkageUnitZhDto
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
par
)
{
if
(
null
==
pageNum
||
null
==
pageSize
)
{
pageNum
=
1
;
pageSize
=
Integer
.
MAX_VALUE
;
}
else
{
pageNum
=
(
pageNum
-
1
)
*
pageSize
;
}
return
linkageUnitMapper
.
listLinkageUnitZhDto
(
pageNum
,
pageSize
,
par
);
}
@Override
public
Integer
listLinkageUnitZhDtoCount
(
RequestData
par
)
{
return
linkageUnitMapper
.
listLinkageUnitZhDtoCount
(
par
);
}
}
\ 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