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
d1cc0336
Commit
d1cc0336
authored
Dec 27, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交对于消防水源和队伍的升级代码
parent
1a9bb873
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
398 additions
and
108 deletions
+398
-108
DataDictionaryMapper.java
...amos/boot/biz/common/dao/mapper/DataDictionaryMapper.java
+4
-0
DataDictionaryServiceImpl.java
...ot/biz/common/service/impl/DataDictionaryServiceImpl.java
+17
-0
DataDictionaryMapper.xml
...common/src/main/resources/mapper/DataDictionaryMapper.xml
+44
-0
FireTeamCardDto.java
...join/amos/boot/module/common/api/dto/FireTeamCardDto.java
+5
-0
FireTeamListDto.java
...join/amos/boot/module/common/api/dto/FireTeamListDto.java
+5
-0
WaterResourceDto.java
...oin/amos/boot/module/common/api/dto/WaterResourceDto.java
+22
-16
FireTeam.java
.../yeejoin/amos/boot/module/common/api/entity/FireTeam.java
+6
-0
WaterResource.java
...oin/amos/boot/module/common/api/entity/WaterResource.java
+14
-5
EquipFeignClient.java
...n/amos/boot/module/common/api/feign/EquipFeignClient.java
+15
-7
WaterResourceMapper.java
...os/boot/module/common/api/mapper/WaterResourceMapper.java
+5
-2
FireTeamMapper.xml
...e-common-api/src/main/resources/mapper/FireTeamMapper.xml
+6
-3
WaterResourceMapper.xml
...mon-api/src/main/resources/mapper/WaterResourceMapper.xml
+15
-0
FireTeamController.java
...boot/module/common/biz/controller/FireTeamController.java
+37
-2
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+0
-0
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+76
-31
FireTeamServiceImpl.java
...t/module/common/biz/service/impl/FireTeamServiceImpl.java
+7
-6
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+84
-19
FirefightersController.java
...oot/module/jcs/biz/controller/FirefightersController.java
+36
-17
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/dao/mapper/DataDictionaryMapper.java
View file @
d1cc0336
...
...
@@ -28,4 +28,8 @@ public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
* @return
*/
public
DataDictionary
getByCode
(
String
code
,
String
type
);
public
List
<
DataDictionary
>
getFireTeamTypeTree
(
String
bizOrgCode
);
public
List
<
DataDictionary
>
getwaterResourceTypeTree
(
String
bizOrgCode
);
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/impl/DataDictionaryServiceImpl.java
View file @
d1cc0336
...
...
@@ -12,6 +12,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
import
com.yeejoin.amos.boot.biz.common.dto.DataDictionaryDto
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
...
...
@@ -113,4 +114,20 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
wrapper
.
eq
(
DataDictionary:
:
getType
,
type
);
return
this
.
baseMapper
.
selectList
(
wrapper
);
}
public
List
<
Menu
>
getFireTeamTypeTree
(
String
bizOrgCode
)
throws
Exception
{
Menu
root
=
new
Menu
(
null
,
"消防队伍类型"
,
null
,
null
,
0
);
List
<
DataDictionary
>
list
=
dataDictionaryMapper
.
getFireTeamTypeTree
(
bizOrgCode
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
,
null
);
root
.
setChildren
(
menus
);
return
Lists
.
newArrayList
(
root
);
}
public
List
<
DataDictionary
>
getwaterResourceTypeTree
(
String
bizOrgCode
)
throws
Exception
{
List
<
DataDictionary
>
list
=
dataDictionaryMapper
.
getwaterResourceTypeTree
(
bizOrgCode
);
// List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName",
// "getParent", null);
// root.setChildren(menus);
return
list
;
}
}
amos-boot-biz-common/src/main/resources/mapper/DataDictionaryMapper.xml
View file @
d1cc0336
...
...
@@ -57,4 +57,48 @@ GROUP BY
WHERE
cbb.code = #{code} and cbb.is_delete = 0 and cbb.type = #{type}
</select>
<select
id=
"getFireTeamTypeTree"
resultType=
"com.yeejoin.amos.boot.biz.common.entity.DataDictionary"
>
SELECT
cdd.*, case when fire.count is null then 0 else fire.count end as count
FROM
cb_data_dictionary cdd
LEFT JOIN (
SELECT
cf.type_code,
COUNT(cf.sequence_nbr) AS count
FROM
cb_fire_team cf
WHERE
cf.is_delete = 0
<if
test=
'bizOrgCode != null and bizOrgCode!=""'
>
and cf.biz_org_code like CONCAT( #{bizOrgCode},'%')
</if>
GROUP BY
cf.type_code
) fire ON cdd.`code` = fire.type_code
WHERE
cdd.type = 'XFJGLX'
</select>
<select
id=
"getwaterResourceTypeTree"
resultType=
"com.yeejoin.amos.boot.biz.common.entity.DataDictionary"
>
SELECT
cdd.*, case when fire.count is null then 0 else fire.count end as count
FROM
cb_data_dictionary cdd
LEFT JOIN (
SELECT
cf.resource_type,
COUNT(cf.sequence_nbr) AS count
FROM
cb_water_resource cf
WHERE
cf.is_delete = 0
<if
test=
'bizOrgCode != null and bizOrgCode!=""'
>
and cf.biz_org_code like CONCAT( #{bizOrgCode},'%')
</if>
GROUP BY
cf.resource_type
) fire ON cdd.`code` = fire.resource_type
WHERE
cdd.type = 'XFSYLX'
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/FireTeamCardDto.java
View file @
d1cc0336
...
...
@@ -15,6 +15,11 @@ import lombok.Data;
public
class
FireTeamCardDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"机构/部门名称"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"机构编码"
)
private
String
bizOrgCode
;
@ApiModelProperty
(
value
=
"消防队伍图片"
)
private
String
img
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/FireTeamListDto.java
View file @
d1cc0336
...
...
@@ -11,6 +11,11 @@ import java.util.List;
*/
@Data
public
class
FireTeamListDto
{
@ApiModelProperty
(
value
=
"机构/部门名称"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"机构编码"
)
private
String
bizOrgCode
;
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
name
;
...
...
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 @
d1cc0336
...
...
@@ -23,6 +23,12 @@ import java.util.Map;
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"WaterResourceDto"
,
description
=
"水资源"
)
public
class
WaterResourceDto
extends
BaseDto
{
@ExcelIgnore
@ApiModelProperty
(
value
=
"机构/部门名称"
)
private
String
bizOrgName
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"机构编码"
)
private
String
bizOrgCode
;
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -35,12 +41,11 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"地址"
)
private
String
address
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"资源类型(消火栓:hydrant、消防水鹤:crane、天然水源:natural、消防水池:pool)"
)
private
String
resourceType
;
@ExplicitConstraint
(
type
=
"XFSYLX"
,
indexNum
=
2
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExplicitConstraint
(
type
=
"XFSYLX"
,
indexNum
=
2
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExcelProperty
(
value
=
"资源类型"
,
index
=
2
)
@ApiModelProperty
(
value
=
"资源类型名称(消火栓、消防水鹤、天然水源、消防水池)"
)
private
String
resourceTypeName
;
...
...
@@ -109,7 +114,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"联系人姓名"
)
private
String
contactUser
;
@ExcelProperty
(
value
=
"联系人电话"
,
index
=
39
)
@ExcelProperty
(
value
=
"联系人电话"
,
index
=
39
)
@ApiModelProperty
(
value
=
"联系人电话"
)
private
String
contactPhone
;
...
...
@@ -145,7 +150,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"水源可用状态类别代码"
)
private
String
statusCode
;
@ExplicitConstraint
(
type
=
"SYZT"
,
indexNum
=
12
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExplicitConstraint
(
type
=
"SYZT"
,
indexNum
=
12
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExcelProperty
(
value
=
"水源可用状态"
,
index
=
12
)
@ApiModelProperty
(
value
=
"水源可用状态类别名称"
)
private
String
status
;
...
...
@@ -162,7 +167,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"消防给水管网形式类型代码"
)
private
String
pipeTypeCode
;
@ExplicitConstraint
(
type
=
"XFJSGW"
,
indexNum
=
15
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExplicitConstraint
(
type
=
"XFJSGW"
,
indexNum
=
15
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExcelProperty
(
value
=
"消防给水管网形式"
,
index
=
15
)
@ApiModelProperty
(
value
=
"消防给水管网形式"
)
private
String
pipeTypeName
;
...
...
@@ -187,7 +192,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"供水单位名称"
)
private
String
waterSupplyName
;
@ExplicitConstraint
(
type
=
"XHSXTLX"
,
indexNum
=
21
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExplicitConstraint
(
type
=
"XHSXTLX"
,
indexNum
=
21
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExcelProperty
(
value
=
"消火栓系统类型"
,
index
=
21
)
@ApiModelProperty
(
value
=
"消火栓系统类型"
)
private
String
systemType
;
...
...
@@ -208,7 +213,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"道路路口路段简要情况"
)
private
String
roadJunctionInfo
;
@ExplicitConstraint
(
type
=
"XHSFZXS"
,
indexNum
=
24
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExplicitConstraint
(
type
=
"XHSFZXS"
,
indexNum
=
24
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExcelProperty
(
value
=
"消火栓放置形式"
,
index
=
24
)
@ApiModelProperty
(
value
=
"消火栓放置形式"
)
private
String
placeForm
;
...
...
@@ -217,7 +222,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"消火栓放置形式code"
)
private
String
placeFormCode
;
@ExplicitConstraint
(
type
=
"XFSDJK"
,
indexNum
=
25
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExplicitConstraint
(
type
=
"XFSDJK"
,
indexNum
=
25
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExcelProperty
(
value
=
"消防水带接口"
,
index
=
25
)
@ApiModelProperty
(
value
=
"消防水带接口"
)
private
String
hoseConnection
;
...
...
@@ -226,7 +231,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"消防水带接口code"
)
private
String
hoseConnectionCode
;
@ExplicitConstraint
(
type
=
"QSXS"
,
indexNum
=
26
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExplicitConstraint
(
type
=
"QSXS"
,
indexNum
=
26
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExcelProperty
(
value
=
"取水形式"
,
index
=
26
)
@ApiModelProperty
(
value
=
"取水形式"
)
private
String
intakeForm
;
...
...
@@ -235,7 +240,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"水源类型代码"
)
private
String
typeCode
;
@ExplicitConstraint
(
type
=
"TRSYLX"
,
indexNum
=
27
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExplicitConstraint
(
type
=
"TRSYLX"
,
indexNum
=
27
,
sourceClass
=
CommonExplicitConstraint
.
class
)
//
动态下拉内容
@ExcelProperty
(
value
=
"水源类型"
,
index
=
27
)
@ApiModelProperty
(
value
=
"水源类型"
)
private
String
type
;
...
...
@@ -262,13 +267,11 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"有无枯水期"
)
private
Boolean
hasDrySeason
;
@ExplicitConstraint
(
indexNum
=
32
,
source
=
{
"有"
,
"无"
})
//
固定下拉内容
@ExplicitConstraint
(
indexNum
=
32
,
source
=
{
"有"
,
"无"
})
//
固定下拉内容
@ExcelProperty
(
value
=
"有无枯水期"
,
index
=
32
)
@ApiModelProperty
(
value
=
"有无枯水期"
)
private
String
hasDrySeasonType
;
@ExcelProperty
(
value
=
"枯水期跨度简要情况"
,
index
=
33
)
@ApiModelProperty
(
value
=
"枯水期跨度简要情况"
)
private
String
dryPeriodSpan
;
...
...
@@ -302,14 +305,14 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"状态物联编码"
)
private
String
iotStatus
;
//
BUG 2920 管网压力字段冗余 2021-09-18 陈召
//
BUG 2920 管网压力字段冗余 2021-09-18 陈召
@ExcelIgnore
@ApiModelProperty
(
value
=
"管网压力物联编码"
)
private
String
iotPipePressure
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"物联参数"
)
private
Map
<
String
,
Object
>
waterResourceIotDto
;
private
Map
<
String
,
Object
>
waterResourceIotDto
;
@ExcelIgnore
@ApiModelProperty
(
"设施定义id"
)
...
...
@@ -330,6 +333,10 @@ public class WaterResourceDto extends BaseDto {
// @ExcelProperty(value = "设施分类名称", index = 42)
private
String
equipCategoryName
;
@ApiModelProperty
(
"设施分类编码"
)
@ExcelIgnore
private
String
equipCategoryCode
;
@ApiModelProperty
(
"设施编码"
)
@ExcelIgnore
private
String
equipCode
;
...
...
@@ -338,7 +345,6 @@ public class WaterResourceDto extends BaseDto {
@ExcelProperty
(
value
=
"维保周期(月)"
,
index
=
6
)
private
String
maintenancePeriod
;
@ApiModelProperty
(
value
=
"经度"
)
@ExcelProperty
(
value
=
"经度"
,
index
=
40
)
private
Double
longitude
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/FireTeam.java
View file @
d1cc0336
...
...
@@ -28,6 +28,12 @@ public class FireTeam extends BaseEntity {
*/
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"机构/部门名称"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"机构编码"
)
private
String
bizOrgCode
;
@ApiModelProperty
(
value
=
"消防队伍图片"
)
private
String
img
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/WaterResource.java
View file @
d1cc0336
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
entity
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
...
...
@@ -12,11 +13,11 @@ import lombok.experimental.Accessors;
import
java.util.Date
;
/**
*
*
* @author system_generator
* @date 2021-06-29
*/
*
*
* @author system_generator
* @date 2021-06-29
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
...
...
@@ -24,7 +25,11 @@ import java.util.Date;
public
class
WaterResource
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"机构/部门名称"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"机构编码"
)
private
String
bizOrgCode
;
/**
* 资源名称
...
...
@@ -182,6 +187,10 @@ public class WaterResource extends BaseEntity {
@TableField
(
"equip_category_name"
)
private
String
equipCategoryName
;
@ApiModelProperty
(
"设施分类编码"
)
@TableField
(
"equip_category_code"
)
private
String
equipCategoryCode
;
@ApiModelProperty
(
"设施编码"
)
@TableField
(
"equip_code"
)
private
String
equipCode
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/EquipFeignClient.java
View file @
d1cc0336
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
feign
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig
;
import
com.yeejoin.amos.boot.module.common.api.dto.EquipmentIndexDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.PerfQuotaIotDTO
;
import
com.yeejoin.amos.boot.module.common.api.dto.VideoDto
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 装备服务feign
...
...
@@ -349,4 +354,7 @@ public interface EquipFeignClient {
@RequestMapping
(
value
=
"/equipment/list/{typeCode}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
>
getEquipmentList
(
@PathVariable
(
"typeCode"
)
String
typeCode
);
@RequestMapping
(
value
=
"equipment-category/list-tree"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Object
>
list
()
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/WaterResourceMapper.java
View file @
d1cc0336
...
...
@@ -11,6 +11,7 @@ import org.apache.ibatis.annotations.Param;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
/**
* Mapper 接口
...
...
@@ -46,5 +47,7 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
*/
Page
<
WaterResourceDto
>
getWaterResourcePageByParams
(
Page
<
WaterResourceDto
>
page
,
String
name
,
String
resourceType
,
ArrayList
<
Long
>
belongBuildingId
,
Long
belongFightingSystemId
,
Long
sequenceNbr
,
String
equipId
);
}
Long
sequenceNbr
,
String
equipId
,
String
bizOrgCode
);
Map
<
String
,
Object
>
getWaterTypeByBizOrgCode
(
String
bizOrgCode
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FireTeamMapper.xml
View file @
d1cc0336
...
...
@@ -36,7 +36,9 @@
a.NAME,
a.contact_user contactUser,
a.contact_phone contactPhone,
a.address
a.address,
a.biz_org_code as bizOrgCode,
a.biz_org_name as bizOrgName
FROM
cb_fire_team a
WHERE
...
...
@@ -65,6 +67,7 @@
and a.sequence_nbr = #{par.nodeId}
</if>
</if>
<if
test=
'par.bizOrgCode != null'
>
and a.biz_org_code like CONCAT( #{par.bizOrgCode},'%')
</if>
order by a.rec_date desc
</select>
<select
id=
"listFireTeamDto"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto"
>
...
...
@@ -131,6 +134,8 @@
a.name ,
a.contact_user contactUser,
a.contact_phone contactPhone,
a.biz_org_code as bizOrgCode,
a.biz_org_name as bizOrgName
( SELECT count( 1 ) FROM cb_firefighters WHERE fire_team_id = a.sequence_nbr AND is_delete = 0 ) userNum,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
FROM cb_fire_team a
...
...
@@ -197,6 +202,4 @@
AND is_delete = 0
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/WaterResourceMapper.xml
View file @
d1cc0336
...
...
@@ -147,8 +147,23 @@
<if
test=
"belongBuildingId != null and belongBuildingId.size() > 0"
>
and find_in_set(belong_building_id, #{belongBuildingId}) > 0
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and biz_org_code like concat( #{bizOrgCode}, '%')
</if>
order by cb_water_resource.rec_date desc
</select>
<select
id=
"getWaterTypeByBizOrgCode"
resultType=
"map"
>
SELECT
equip_category_code,
COUNT(sequence_nbr) as num
FROM
cb_water_resource
WHERE
is_delete = 0
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND biz_org_code like concat( #{bizOrgCode}, '%')
</if>
GROUP BY
equip_category_code
</select>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-
jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs
/biz/controller/FireTeamController.java
→
amos-boot-module/amos-boot-module-biz/amos-boot-module-
common-biz/src/main/java/com/yeejoin/amos/boot/module/common
/biz/controller/FireTeamController.java
View file @
d1cc0336
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -22,19 +23,27 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireTeamCardDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireTeamListDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireTeamServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireTeamServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -53,6 +62,10 @@ public class FireTeamController extends BaseController {
@Autowired
FireTeamServiceImpl
iFireTeamService
;
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
/**
* 新增消防队伍
*
...
...
@@ -278,4 +291,25 @@ public class FireTeamController extends BaseController {
public
ResponseModel
<
List
<
Menu
>>
getFirstTeamToDesignatedDepartment
(
@RequestParam
String
dicCode
,
@RequestParam
String
typeCode
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iFireTeamService
.
getFirstTeamToDesignatedDepartment
(
dicCode
,
typeCode
));
}
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/companyTreeByUserAndType"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登录人及类型获取公司部门树"
,
notes
=
"根据登录人及类型获取公司部门树"
)
public
ResponseModel
<
List
<
OrgMenuDto
>>
companyTreeByUserAndType
(
@RequestParam
(
required
=
false
)
String
type
)
throws
Exception
{
// 获取登陆人角色
ReginParams
reginParams
=
getSelectedOrgInfo
();
List
<
OrgMenuDto
>
menus
=
iOrgUsrService
.
companyTreeByUserAndType
(
reginParams
,
type
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/typeTree/XFJGLX"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据bizOrgCode的值获取对应的消防队伍树信息,含有队伍下统计数据"
,
notes
=
"根据bizOrgCode的值获取对应的消防队伍树信息,含有队伍下统计数据"
)
public
ResponseModel
<
List
<
Menu
>>
getFireTeamType
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
throws
Exception
{
List
<
Menu
>
list
=
iFireTeamService
.
getFireTeamTypeTree
(
bizOrgCode
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
\ 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/controller/OrgUsrController.java
View file @
d1cc0336
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 @
d1cc0336
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.mysql.cj.x.protobuf.MysqlxDatatypes
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.EnumsUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.entity.*
;
import
com.yeejoin.amos.boot.module.common.api.enums.WaterResourceTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.*
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.beanutils.BeanMap
;
import
org.apache.commons.collections.MapUtils
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.checkerframework.checker.units.qual.K
;
import
org.openxmlformats.schemas.drawingml.x2006.chart.STRadarStyle
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -35,16 +18,57 @@ 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.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.utils.EnumsUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil
;
import
com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.EquipmentIndexDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.PerfQuotaIotDTO
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceCraneDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDyDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceHydrantDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceNaturalDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourcePoolDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceTypeDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResource
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceCrane
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceHydrant
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceIndex
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceNatural
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourcePool
;
import
com.yeejoin.amos.boot.module.common.api.enums.WaterResourceTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceCraneServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceHydrantServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceIndexServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceIotServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceNaturalServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourcePoolServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
...
...
@@ -74,7 +98,8 @@ public class WaterResourceController extends BaseController {
EquipFeignClient
equipFeignClient
;
@Autowired
WaterResourceIndexServiceImpl
waterResourceIndexServiceImpl
;
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
/**
* 新增
*
...
...
@@ -440,14 +465,15 @@ public class WaterResourceController extends BaseController {
@RequestParam
(
value
=
"belongBuildingId"
,
required
=
false
)
ArrayList
<
Long
>
belongBuildingId
,
Long
belongFightingSystemId
,
Long
sequenceNbr
,
String
resourceType
,
String
classifyId
)
{
String
classifyId
,
String
bizOrgCode
)
{
Page
<
WaterResourceDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
/*bug 2913 更换保存方式 存储到公共附件表 chenzhao 2021-10-18 start*/
Page
<
WaterResourceDto
>
waterResourceDtoPage
=
waterResourceServiceImpl
.
queryForWaterResourcePage
(
page
,
name
,
resourceType
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
,
classifyId
);
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
,
classifyId
,
bizOrgCode
);
List
<
WaterResourceDto
>
records
=
waterResourceDtoPage
.
getRecords
();
records
.
forEach
(
i
->{
Map
<
String
,
List
<
AttachmentDto
>>
attachments
=
sourceFileService
.
getAttachments
(
i
.
getSequenceNbr
());
...
...
@@ -515,4 +541,23 @@ public class WaterResourceController extends BaseController {
public
ResponseModel
<
String
>
genQrCode
()
{
return
ResponseHelper
.
buildResponse
(
QRCodeUtil
.
generateQRCode
());
}
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/companyTreeByUserAndType"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登录人及类型获取公司部门树"
,
notes
=
"根据登录人及类型获取公司部门树"
)
public
ResponseModel
<
List
<
OrgMenuDto
>>
companyTreeByUserAndType
(
@RequestParam
(
required
=
false
)
String
type
)
throws
Exception
{
// 获取登陆人角色
ReginParams
reginParams
=
getSelectedOrgInfo
();
List
<
OrgMenuDto
>
menus
=
iOrgUsrService
.
companyTreeByUserAndType
(
reginParams
,
type
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/typeTree/XFSYLX"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据bizOrgCode的值获取对应的消防水源树信息,含有队伍下统计数据"
,
notes
=
"根据bizOrgCode的值获取对应的消防水源树信息,含有队伍下统计数据"
)
public
ResponseModel
<
JSONObject
>
getwaterResourceTypeTree
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
throws
Exception
{
JSONObject
list
=
waterResourceServiceImpl
.
getwaterResourceTypeTree
(
bizOrgCode
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-
jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs
/biz/service/impl/FireTeamServiceImpl.java
→
amos-boot-module/amos-boot-module-biz/amos-boot-module-
common-biz/src/main/java/com/yeejoin/amos/boot/module/common
/biz/service/impl/FireTeamServiceImpl.java
View file @
d1cc0336
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
static
org
.
hamcrest
.
CoreMatchers
.
nullValue
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Collection
;
...
...
@@ -29,7 +27,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.itextpdf.text.pdf.PdfStructTreeController.returnType
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
...
...
@@ -49,8 +46,6 @@ import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IFireTeamService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
/**
* 消防队伍 服务实现类
...
...
@@ -74,6 +69,8 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
/**
* 获取监控大队列表
*
...
...
@@ -484,4 +481,8 @@ public List<Menu> getFirstTeamToDesignatedDepartment(String dicCode, String type
// TODO Auto-generated method stub
}
public
List
<
Menu
>
getFireTeamTypeTree
(
String
bizOrgCode
)
throws
Exception
{
return
iDataDictionaryService
.
getFireTeamTypeTree
(
bizOrgCode
);
}
}
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 @
d1cc0336
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
javax.annotation.Resource
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -7,12 +25,13 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.EnumsUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceCraneDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceHydrantDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceIotDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceNaturalDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourcePoolDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceTypeDto
;
...
...
@@ -21,27 +40,12 @@ import com.yeejoin.amos.boot.module.common.api.entity.WaterResource;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceCrane
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceHydrant
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceIndex
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceIot
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourceNatural
;
import
com.yeejoin.amos.boot.module.common.api.entity.WaterResourcePool
;
import
com.yeejoin.amos.boot.module.common.api.enums.WaterResourceTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.mapper.WaterResourceMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IWaterResourceService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
/**
* 服务实现类
...
...
@@ -67,6 +71,10 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
@Autowired
WaterResourceIndexServiceImpl
waterResourceIndexServiceImpl
;
@Autowired
DataDictionaryServiceImpl
dataDictionaryService
;
@Autowired
EquipFeignClient
equipFeignClient
;
/**
* 分页查询
*/
...
...
@@ -76,9 +84,10 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
@Condition
(
Operator
.
in
)
ArrayList
<
Long
>
belongBuildingId
,
@Condition
(
Operator
.
eq
)
Long
belongFightingSystemId
,
@Condition
(
Operator
.
eq
)
Long
sequenceNbr
,
String
equipId
)
{
String
equipId
,
String
bizOrgCode
)
{
return
this
.
waterResourceMapper
.
getWaterResourcePageByParams
(
page
,
name
,
resourceType
,
belongBuildingId
,
belongFightingSystemId
,
sequenceNbr
,
equipId
);
belongFightingSystemId
,
sequenceNbr
,
equipId
,
bizOrgCode
);
}
/**
...
...
@@ -315,4 +324,60 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
}
return
result
;
}
public
JSONObject
getwaterResourceTypeTree
(
String
bizOrgCode
)
throws
Exception
{
ResponseModel
<
Object
>
response
=
equipFeignClient
.
list
();
if
(
response
.
getStatus
()
!=
200
)
{
return
null
;
}
Object
resultObject
=
response
.
getResult
();
JSONArray
childrenArray
=
null
;
JSONArray
waterTypeDetailArray
=
null
;
JSONObject
waterTypeDetailJson
=
null
;
JSONArray
resultArray
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
resultObject
));
for
(
Object
obj
:
resultArray
)
{
JSONObject
detailJsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
String
codeString
=
detailJsonObject
.
getString
(
"code"
);
if
(
codeString
.
equals
(
"90000000"
))
{
childrenArray
=
detailJsonObject
.
getJSONArray
(
"children"
);
break
;
}
}
if
(
childrenArray
!=
null
&&
childrenArray
.
size
()>
0
)
{
for
(
Object
childObject
:
childrenArray
)
{
JSONObject
detailChildJsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
childObject
));
String
codeStr
=
detailChildJsonObject
.
getString
(
"code"
);
if
(
codeStr
.
equals
(
"93000000"
))
{
waterTypeDetailArray
=
detailChildJsonObject
.
getJSONArray
(
"children"
);
break
;
}
}
}
if
(
waterTypeDetailArray
!=
null
&&
waterTypeDetailArray
.
size
()>
0
)
{
for
(
Object
childObject
:
waterTypeDetailArray
)
{
JSONObject
waterTypeDetail
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
childObject
));
String
codeStr
=
waterTypeDetail
.
getString
(
"code"
);
if
(
codeStr
.
equals
(
"93060000"
))
{
waterTypeDetailJson
=
waterTypeDetail
;
break
;
}
}
}
if
(
waterTypeDetailJson
!=
null
)
{
Map
<
String
,
Object
>
map
=
waterResourceMapper
.
getWaterTypeByBizOrgCode
(
bizOrgCode
);
int
num
=
0
;
JSONArray
waterTypeDetailChildrenArray
=
waterTypeDetailJson
.
getJSONArray
(
"children"
);
for
(
Object
childObject
:
waterTypeDetailChildrenArray
)
{
JSONObject
detail
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
childObject
));
String
codeStr
=
detail
.
getString
(
"code"
);
if
(
map
.
containsKey
(
codeStr
))
{
num
=
num
+
Integer
.
parseInt
(
map
.
get
(
"codeStr"
).
toString
());
detail
.
put
(
"num"
,
map
.
get
(
"codeStr"
));
}
}
waterTypeDetailJson
.
put
(
"num"
,
num
);
}
return
waterTypeDetailJson
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersController.java
View file @
d1cc0336
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -16,29 +36,28 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersInfoDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersZhDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.*
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireTeamServiceImpl
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.common.api.entity.Firefighters
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersContacts
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersContract
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersEducation
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersJacket
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersPost
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersThought
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireTeamServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersContactsServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersContractServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersEducationServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersPostServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersThoughtServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FirefightersJacketServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
/**
* 消防队员
...
...
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