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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
514 additions
and
230 deletions
+514
-230
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
+23
-18
WaterResourceDto.java
...oin/amos/boot/module/common/api/dto/WaterResourceDto.java
+0
-0
FireTeam.java
.../yeejoin/amos/boot/module/common/api/entity/FireTeam.java
+6
-0
WaterResource.java
...oin/amos/boot/module/common/api/entity/WaterResource.java
+132
-123
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
+1
-1
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
+85
-20
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,32 +11,37 @@ import java.util.List;
*/
@Data
public
class
FireTeamListDto
{
@ApiModelProperty
(
value
=
"机构/部门名称"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"单位名称
"
)
private
String
nam
e
;
@ApiModelProperty
(
value
=
"机构编码
"
)
private
String
bizOrgCod
e
;
@ApiModelProperty
(
value
=
"机构code
"
)
private
String
companyCod
e
;
@ApiModelProperty
(
value
=
"单位名称
"
)
private
String
nam
e
;
@ApiModelProperty
(
value
=
"队伍
code"
)
private
String
type
Code
;
@ApiModelProperty
(
value
=
"机构
code"
)
private
String
company
Code
;
@ApiModelProperty
(
value
=
"父级id
"
)
private
Long
parent
;
@ApiModelProperty
(
value
=
"队伍code
"
)
private
String
typeCode
;
@ApiModelProperty
(
value
=
"树节点类型(1:单位,0:队伍)
"
)
private
String
nodeType
;
@ApiModelProperty
(
value
=
"父级id
"
)
private
Long
parent
;
@ApiModelProperty
(
value
=
"树节点id
"
)
private
Long
nodeId
;
@ApiModelProperty
(
value
=
"树节点类型(1:单位,0:队伍)
"
)
private
String
nodeType
;
@ApiModelProperty
(
value
=
"树节点子节点id集合
"
)
private
List
<
String
>
nodeIds
;
@ApiModelProperty
(
value
=
"树节点id
"
)
private
Long
nodeId
;
@ApiModelProperty
(
value
=
"地址
"
)
private
String
addres
s
;
@ApiModelProperty
(
value
=
"树节点子节点id集合
"
)
private
List
<
String
>
nodeId
s
;
@ApiModelProperty
(
value
=
"所属单位"
)
private
String
company
;
@ApiModelProperty
(
value
=
"地址"
)
private
String
address
;
@ApiModelProperty
(
value
=
"所属单位"
)
private
String
company
;
}
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
This diff is collapsed.
Click to expand it.
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,181 +13,189 @@ 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
)
@TableName
(
"cb_water_resource"
)
public
class
WaterResource
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"机构/部门名称"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"机构编码"
)
private
String
bizOrgCode
;
/**
* 资源名称
*/
/**
* 资源名称
*/
@TableField
(
"name"
)
private
String
name
;
/**
* 地址
*/
private
String
name
;
/**
* 地址
*/
@TableField
(
"address"
)
private
String
address
;
private
String
address
;
/**
* 经纬度坐标
*/
@ApiModelProperty
(
value
=
"经度"
)
private
Double
longitude
;
/**
* 经纬度坐标
*/
@ApiModelProperty
(
value
=
"经度"
)
private
Double
longitude
;
@ApiModelProperty
(
value
=
"纬度"
)
private
Double
latitude
;
@ApiModelProperty
(
value
=
"纬度"
)
private
Double
latitude
;
/**
* 资源类型(消火栓、消防水鹤、天然水源、消防水池)
*/
/**
* 资源类型(消火栓、消防水鹤、天然水源、消防水池)
*/
@TableField
(
"resource_type"
)
private
String
resourceType
;
private
String
resourceType
;
/**
* 资源类型名称(消火栓、消防水鹤、天然水源、消防水池)
*/
@TableField
(
"resource_type_name"
)
private
String
resourceTypeName
;
/**
* 资源类型名称(消火栓、消防水鹤、天然水源、消防水池)
*/
@TableField
(
"resource_type_name"
)
private
String
resourceTypeName
;
/**
* 所在建筑id
*/
/**
* 所在建筑id
*/
@TableField
(
"belong_building_id"
)
private
Long
belongBuildingId
;
private
Long
belongBuildingId
;
/**
* 所在建筑
*/
/**
* 所在建筑
*/
@TableField
(
"belong_building"
)
private
String
belongBuilding
;
private
String
belongBuilding
;
/**
* 所属消防系统id
*/
/**
* 所属消防系统id
*/
@TableField
(
"belong_fighting_system_id"
)
private
Long
belongFightingSystemId
;
private
Long
belongFightingSystemId
;
/**
* 所属消防系统
*/
/**
* 所属消防系统
*/
@TableField
(
"belong_fighting_system"
)
private
String
belongFightingSystem
;
private
String
belongFightingSystem
;
/**
* 管理单位id
*/
/**
* 管理单位id
*/
@TableField
(
"management_unit_id"
)
private
Long
managementUnitId
;
private
Long
managementUnitId
;
/**
* 管理单位
*/
/**
* 管理单位
*/
@TableField
(
"management_unit"
)
private
String
managementUnit
;
private
String
managementUnit
;
/**
* 维保单位id
*/
/**
* 维保单位id
*/
@TableField
(
"maintenance_unit_id"
)
private
Long
maintenanceUnitId
;
private
Long
maintenanceUnitId
;
/**
* 维保单位
*/
/**
* 维保单位
*/
@TableField
(
"maintenance_unit"
)
private
String
maintenanceUnit
;
private
String
maintenanceUnit
;
/**
* 建造日期
*/
/**
* 建造日期
*/
@TableField
(
"build_date"
)
private
Date
buildDate
;
private
Date
buildDate
;
/**
* 启用日期
*/
/**
* 启用日期
*/
@TableField
(
"enable_date"
)
private
Date
enableDate
;
private
Date
enableDate
;
/**
* 方位图
*/
/**
* 方位图
*/
@TableField
(
"orientation_img"
)
private
String
orientationImg
;
private
String
orientationImg
;
/**
* 实景图
*/
/**
* 实景图
*/
@TableField
(
"reality_img"
)
private
String
realityImg
;
private
String
realityImg
;
/**
* 联系人姓名
*/
/**
* 联系人姓名
*/
@TableField
(
"contact_user"
)
private
String
contactUser
;
private
String
contactUser
;
/**
* 联系人电话
*/
/**
* 联系人电话
*/
@TableField
(
"contact_phone"
)
private
String
contactPhone
;
private
String
contactPhone
;
/**
* 是否有物联参数(1有,0没有)
*/
/**
* 是否有物联参数(1有,0没有)
*/
@TableField
(
"is_iot"
)
private
Boolean
isIot
;
private
Boolean
isIot
;
/**
* 消防救援机构_通用唯一识别码
*/
/**
* 消防救援机构_通用唯一识别码
*/
@TableField
(
"rescue_org_code"
)
private
String
rescueOrgCode
;
private
String
rescueOrgCode
;
/**
* 行政区划代码
*/
/**
* 行政区划代码
*/
@TableField
(
"administrative_code"
)
private
String
administrativeCode
;
private
String
administrativeCode
;
/**
* 组织机构代码
*/
/**
* 组织机构代码
*/
@TableField
(
"org_code"
)
private
String
orgCode
;
private
String
orgCode
;
@ApiModelProperty
(
"设施定义"
)
@TableField
(
"equip_id"
)
@TableField
(
"equip_id"
)
private
Long
equipId
;
@ApiModelProperty
(
"设施定义名称"
)
@TableField
(
"equip_name"
)
private
String
equipName
;
@ApiModelProperty
(
"设施分类"
)
@TableField
(
"equip_category_id"
)
private
Long
equipCategoryId
;
@ApiModelProperty
(
"设施分类名称"
)
@TableField
(
"equip_category_name"
)
private
String
equipCategoryName
;
@ApiModelProperty
(
"设施编码"
)
@TableField
(
"equip_code"
)
private
String
equipCode
;
@ApiModelProperty
(
"维保周期"
)
@TableField
(
"maintenance_period"
)
private
String
maintenancePeriod
;
@ApiModelProperty
(
"设施定义名称"
)
@TableField
(
"equip_name"
)
private
String
equipName
;
@ApiModelProperty
(
"设施分类"
)
@TableField
(
"equip_category_id"
)
private
Long
equipCategoryId
;
@ApiModelProperty
(
"设施分类名称"
)
@TableField
(
"equip_category_name"
)
private
String
equipCategoryName
;
@ApiModelProperty
(
"设施分类编码"
)
@TableField
(
"equip_category_code"
)
private
String
equipCategoryCode
;
@ApiModelProperty
(
"设施编码"
)
@TableField
(
"equip_code"
)
private
String
equipCode
;
@ApiModelProperty
(
"维保周期"
)
@TableField
(
"maintenance_period"
)
private
String
maintenancePeriod
;
}
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
;
...
...
@@ -52,6 +61,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
...
...
@@ -502,7 +502,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getAmosId/{amosId}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断关联账户是否已关联"
,
notes
=
"判断关联账户是否已关联"
)
public
ResponseModel
<
Object
>
getAmosId
(
@PathVariable
String
amosId
)
{
public
ResponseModel
<
Object
>
getAmosId
(
@PathVariable
String
amosId
)
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
amosIdExist
(
amosId
));
}
...
...
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
;
/**
* 消防队伍 服务实现类
...
...
@@ -73,6 +68,8 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
/**
* 获取监控大队列表
...
...
@@ -483,5 +480,9 @@ public List<Menu> getFirstTeamToDesignatedDepartment(String dicCode, String type
null
);
// 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
;
/**
* 服务实现类
...
...
@@ -66,7 +70,11 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
WaterResourceMapper
waterResourceMapper
;
@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