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
b969d369
Commit
b969d369
authored
Nov 16, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交直流中心相关查询接口
parent
680ae113
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
284 additions
and
21 deletions
+284
-21
WaterResourceMapper.java
...os/boot/module/common/api/mapper/WaterResourceMapper.java
+2
-0
WaterResourceMapper.xml
...mon-api/src/main/resources/mapper/WaterResourceMapper.xml
+40
-0
EquipmentSpecificAlarm.java
...oin/equipmanage/common/entity/EquipmentSpecificAlarm.java
+14
-1
EquipmentSpecificAlarmLog.java
.../equipmanage/common/entity/EquipmentSpecificAlarmLog.java
+8
-0
EquipmentSpecificIndex.java
...oin/equipmanage/common/entity/EquipmentSpecificIndex.java
+12
-0
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+38
-0
DCenterController.java
...com/yeejoin/equipmanage/controller/DCenterController.java
+31
-4
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+0
-10
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+2
-0
IEquipmentSpecificSerivce.java
...eejoin/equipmanage/service/IEquipmentSpecificSerivce.java
+2
-0
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+40
-1
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+4
-4
EquipmentController.java
...s/boot/module/jcs/biz/controller/EquipmentController.java
+7
-0
EquipmentServiceImpl.java
...oot/module/jcs/biz/service/impl/EquipmentServiceImpl.java
+11
-0
equipmentCode.json
...t-system-equip/src/main/resources/json/equipmentCode.json
+15
-0
EquipmentSpecificIndexMapper.xml
...rc/main/resources/mapper/EquipmentSpecificIndexMapper.xml
+3
-1
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+40
-0
equipmentWaterCode.json
...ystem-jcs/src/main/resources/json/equipmentWaterCode.json
+15
-0
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/mapper/WaterResourceMapper.java
View file @
b969d369
...
@@ -49,4 +49,6 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
...
@@ -49,4 +49,6 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
List
<
Map
<
String
,
Object
>>
getWaterTypeByBizOrgCode
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getWaterTypeByBizOrgCode
(
String
bizOrgCode
);
Page
<
WaterResourceDto
>
pageByDefect
(
Page
<
WaterResourceDto
>
page
,
@Param
(
"nameOrCode"
)
String
nameOrCode
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"systemName"
)
String
systemName
);
Page
<
WaterResourceDto
>
pageByDefect
(
Page
<
WaterResourceDto
>
page
,
@Param
(
"nameOrCode"
)
String
nameOrCode
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
,
@Param
(
"systemName"
)
String
systemName
);
Map
<
String
,
Object
>
getWaterResourceInfoList
(
@Param
(
"map"
)
Map
<
String
,
Object
>
map
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/WaterResourceMapper.xml
View file @
b969d369
...
@@ -193,4 +193,44 @@
...
@@ -193,4 +193,44 @@
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and biz_org_code like concat( #{bizOrgCode}, '%')
</if>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
and biz_org_code like concat( #{bizOrgCode}, '%')
</if>
order by cb_water_resource.rec_date desc
order by cb_water_resource.rec_date desc
</select>
</select>
<select
id=
"getWaterResourceInfoList"
resultType=
"java.util.Map"
>
SELECT
(
SELECT
COUNT(DISTINCT cwr.sequence_nbr)
FROM
cb_water_resource cwr
WHERE
cwr.is_delete = 1
AND cwr.resource_type = #{map.fireHydrant}
<if
test=
"map.bizOrgCode != null and map.bizOrgCode != ''"
>
AND cwr.biz_org_code = #{map.bizOrgCode}
</if>
) AS fireHydrant,
(
SELECT
COUNT(DISTINCT cwr.sequence_nbr)
FROM
cb_water_resource cwr
WHERE
cwr.is_delete = 1
AND cwr.resource_type = #{map.firePool}
<if
test=
"map.bizOrgCode != null and map.bizOrgCode != ''"
>
AND cwr.biz_org_code = #{map.bizOrgCode}
</if>
) AS firePool,
(
SELECT
COUNT(DISTINCT cwr.sequence_nbr)
FROM
cb_water_resource cwr
WHERE
cwr.is_delete = 1
AND cwr.resource_type = #{map.fireWaterTank}
<if
test=
"map.bizOrgCode != null and map.bizOrgCode != ''"
>
AND cwr.biz_org_code = #{map.bizOrgCode}
</if>
) AS fireWaterTank
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecificAlarm.java
View file @
b969d369
...
@@ -202,4 +202,16 @@ public class EquipmentSpecificAlarm extends BaseEntity {
...
@@ -202,4 +202,16 @@ public class EquipmentSpecificAlarm extends BaseEntity {
@TableField
(
value
=
"emergency_level_describe"
)
@TableField
(
value
=
"emergency_level_describe"
)
private
String
emergencyLevelDescribe
;
private
String
emergencyLevelDescribe
;
}
/**
* 机构/部门名称
*/
@TableField
(
exist
=
false
)
private
String
bizOrgName
;
/**
* 机构编码
*/
@TableField
(
exist
=
false
)
private
String
bizOrgCode
;
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecificAlarmLog.java
View file @
b969d369
...
@@ -226,4 +226,12 @@ public class EquipmentSpecificAlarmLog extends BaseEntity {
...
@@ -226,4 +226,12 @@ public class EquipmentSpecificAlarmLog extends BaseEntity {
@TableField
(
value
=
"defect_batch_id"
)
@TableField
(
value
=
"defect_batch_id"
)
private
String
defectBatchId
;
private
String
defectBatchId
;
@ApiModelProperty
(
value
=
"机构/部门名称"
)
@TableField
(
value
=
"biz_org_name"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"机构编码"
)
@TableField
(
value
=
"biz_org_code"
)
private
String
bizOrgCode
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/EquipmentSpecificIndex.java
View file @
b969d369
...
@@ -150,4 +150,16 @@ public class EquipmentSpecificIndex extends BaseEntity {
...
@@ -150,4 +150,16 @@ public class EquipmentSpecificIndex extends BaseEntity {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
Integer
isTrend
;
private
Integer
isTrend
;
/**
* 机构/部门名称
*/
@TableField
(
exist
=
false
)
private
String
bizOrgName
;
/**
* 机构编码
*/
@TableField
(
exist
=
false
)
private
String
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 @
b969d369
...
@@ -21,9 +21,11 @@ import com.yeejoin.amos.boot.module.common.api.enums.WaterResourceTypeEnum;
...
@@ -21,9 +21,11 @@ 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.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.mapper.WaterResourceMapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.WaterResourceMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IWaterResourceService
;
import
com.yeejoin.amos.boot.module.common.api.service.IWaterResourceService
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
...
@@ -32,6 +34,8 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -32,6 +34,8 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Iterator
;
...
@@ -69,6 +73,9 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
...
@@ -69,6 +73,9 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
@Autowired
@Autowired
EquipFeignClient
equipFeignClient
;
EquipFeignClient
equipFeignClient
;
@Value
(
"classpath:/json/equipmentWaterCode.json"
)
private
org
.
springframework
.
core
.
io
.
Resource
equipmentWaterCode
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -510,4 +517,35 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
...
@@ -510,4 +517,35 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
}
}
return
list
;
return
list
;
}
}
public
List
<
Map
<
String
,
Object
>>
getWaterResourceInfoList
(
String
bizOrgCode
)
{
String
json
=
null
;
try
{
json
=
IOUtils
.
toString
(
equipmentWaterCode
.
getInputStream
(),
java
.
lang
.
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
List
<
Map
>
mapList
=
JSONObject
.
parseArray
(
json
,
Map
.
class
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
mapList
.
forEach
(
x
->
map
.
put
(
String
.
valueOf
(
x
.
get
(
"name"
)),
x
.
get
(
"type"
)));
map
.
put
(
"bizOrgCode"
,
bizOrgCode
);
Map
<
String
,
Object
>
result
=
waterResourceMapper
.
getWaterResourceInfoList
(
map
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
result
.
keySet
().
forEach
(
x
->
{
Map
<
String
,
Object
>
tempMap
=
new
HashMap
<>();
if
(
"fireHydrant"
.
equals
(
String
.
valueOf
(
x
)))
{
tempMap
.
put
(
"name"
,
"消火栓"
);
tempMap
.
put
(
"total"
,
result
.
get
(
"fireHydrant"
));
}
else
if
(
"firePool"
.
equals
(
String
.
valueOf
(
x
)))
{
tempMap
.
put
(
"name"
,
"消防水池"
);
tempMap
.
put
(
"total"
,
result
.
get
(
"firePool"
));
}
else
{
tempMap
.
put
(
"name"
,
"消防水箱"
);
tempMap
.
put
(
"total"
,
result
.
get
(
"fireWaterTank"
));
}
tempMap
.
put
(
"code"
,
x
);
list
.
add
(
tempMap
);
});
return
list
;
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/DCenterController.java
View file @
b969d369
...
@@ -3,15 +3,14 @@ package com.yeejoin.equipmanage.controller;
...
@@ -3,15 +3,14 @@ package com.yeejoin.equipmanage.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.equipmanage.common.utils.*
;
import
com.yeejoin.equipmanage.common.utils.*
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -36,6 +35,12 @@ public class DCenterController extends AbstractBaseController {
...
@@ -36,6 +35,12 @@ public class DCenterController extends AbstractBaseController {
@Autowired
@Autowired
IEquipmentSpecificAlarmService
iEquipmentSpecificAlarmService
;
IEquipmentSpecificAlarmService
iEquipmentSpecificAlarmService
;
@Autowired
IFireFightingSystemService
fireFightingSystemService
;
@Autowired
IEquipmentSpecificSerivce
specificService
;
/**
/**
* 直流中心告警列表分页,用于直流中心大数据查询分页,不建议再扩展联表查询
* 直流中心告警列表分页,用于直流中心大数据查询分页,不建议再扩展联表查询
*
*
...
@@ -59,4 +64,26 @@ public class DCenterController extends AbstractBaseController {
...
@@ -59,4 +64,26 @@ public class DCenterController extends AbstractBaseController {
}
}
/**
* 获取消防系统总体运行情况
* @throws Exception
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取消防系统告警状态信息"
,
notes
=
"获取消防系统告警状态信息"
)
@GetMapping
(
value
=
"/system/running/info"
)
public
ResponseModel
getSystemRunningInfoList
()
throws
Exception
{
return
CommonResponseUtil
.
success
(
fireFightingSystemService
.
getSystemRunningInfoList
());
}
/**
* 获取消防设备数量
* @throws Exception
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取消防设备数量"
,
notes
=
"获取消防设备数量"
)
@GetMapping
(
value
=
"/equip/info"
)
public
ResponseModel
getEquipmentStatisticsInfo
(
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
)
throws
Exception
{
return
CommonResponseUtil
.
success
(
specificService
.
getEquipmentStatisticsInfo
(
bizOrgCode
));
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
b969d369
...
@@ -903,14 +903,4 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -903,14 +903,4 @@ public class FireFightingSystemController extends AbstractBaseController {
return
fireFightingSystemService
.
getSystemAlarmInfoList
(
startDate
,
endDate
);
return
fireFightingSystemService
.
getSystemAlarmInfoList
(
startDate
,
endDate
);
}
}
/**
* 获取消防系统总体运行情况
* @throws Exception
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取消防系统告警状态信息"
,
notes
=
"获取消防系统告警状态信息"
)
@GetMapping
(
value
=
"/running/info"
)
public
Object
getSystemRunningInfoList
()
throws
Exception
{
return
fireFightingSystemService
.
getSystemRunningInfoList
();
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
b969d369
...
@@ -238,4 +238,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
...
@@ -238,4 +238,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
Map
<
String
,
Object
>
getPaomoSysInfo
();
Map
<
String
,
Object
>
getPaomoSysInfo
();
Map
<
String
,
Object
>
getWaterSysInfo
();
Map
<
String
,
Object
>
getWaterSysInfo
();
Map
<
String
,
Object
>
getEquipmentStatisticsInfo
(
@Param
(
"map"
)
Map
<
String
,
Object
>
map
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentSpecificSerivce.java
View file @
b969d369
...
@@ -244,4 +244,6 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
...
@@ -244,4 +244,6 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
Map
<
String
,
Object
>
getPaomoSysInfo
(
String
startDate
,
String
endDate
);
Map
<
String
,
Object
>
getPaomoSysInfo
(
String
startDate
,
String
endDate
);
Map
<
String
,
Object
>
getWaterSysInfo
(
String
startDate
,
String
endDate
);
Map
<
String
,
Object
>
getWaterSysInfo
(
String
startDate
,
String
endDate
);
List
<
Map
<
String
,
Object
>>
getEquipmentStatisticsInfo
(
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
b969d369
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
package
com
.
yeejoin
.
equipmanage
.
service
.
impl
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
...
@@ -15,11 +17,13 @@ import com.yeejoin.equipmanage.mapper.*;
...
@@ -15,11 +17,13 @@ import com.yeejoin.equipmanage.mapper.*;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.service.*
;
import
org.apache.catalina.util.IOTools
;
import
org.apache.catalina.util.IOTools
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.core.io.Resource
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -217,6 +221,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -217,6 +221,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Value
(
"${window.vedioFormat}"
)
@Value
(
"${window.vedioFormat}"
)
String
vedioFormat
;
String
vedioFormat
;
@Value
(
"classpath:/json/equipmentCode.json"
)
private
Resource
equipmentCode
;
private
final
String
injection
=
"{\n"
+
private
final
String
injection
=
"{\n"
+
"\n"
+
"\n"
+
...
@@ -487,7 +494,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -487,7 +494,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
List
<
EquipmentSpecificAlarm
>
alarms
=
equipmentSpecificAlarmService
.
getBaseMapper
().
selectList
(
queryWrapper
);
List
<
EquipmentSpecificAlarm
>
alarms
=
equipmentSpecificAlarmService
.
getBaseMapper
().
selectList
(
queryWrapper
);
if
(
0
<
alarms
.
size
())
{
if
(
0
<
alarms
.
size
())
{
alarms
.
stream
().
map
(
x
->
x
.
setLocation
(
equipmentSpecific
.
getPosition
()
+
" "
alarms
.
stream
().
map
(
x
->
x
.
setLocation
(
equipmentSpecific
.
getPosition
()
+
" "
+
null
==
equipmentSpecific
.
getStockDetail
().
getDescription
()
?
""
:
equipmentSpecific
.
getStockDetail
().
getDescription
(
))).
collect
(
Collectors
.
toList
());
+
(
null
==
equipmentSpecific
.
getStockDetail
().
getDescription
()
?
""
:
equipmentSpecific
.
getStockDetail
().
getDescription
()
))).
collect
(
Collectors
.
toList
());
equipmentSpecificAlarmService
.
updateBatchById
(
alarms
);
equipmentSpecificAlarmService
.
updateBatchById
(
alarms
);
}
}
}
}
...
@@ -1929,4 +1936,36 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
...
@@ -1929,4 +1936,36 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
public
Map
<
String
,
Object
>
getWaterSysInfo
(
String
startDate
,
String
endDate
)
{
public
Map
<
String
,
Object
>
getWaterSysInfo
(
String
startDate
,
String
endDate
)
{
return
equipmentSpecificMapper
.
getWaterSysInfo
();
return
equipmentSpecificMapper
.
getWaterSysInfo
();
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
getEquipmentStatisticsInfo
(
String
bizOrgCode
)
{
String
json
=
null
;
try
{
json
=
IOUtils
.
toString
(
equipmentCode
.
getInputStream
(),
java
.
lang
.
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
List
<
Map
>
mapList
=
JSONObject
.
parseArray
(
json
,
Map
.
class
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
mapList
.
forEach
(
x
->
map
.
put
(
String
.
valueOf
(
x
.
get
(
"name"
)),
x
.
get
(
"code"
)));
map
.
put
(
"bizOrgCode"
,
bizOrgCode
);
Map
<
String
,
Object
>
result
=
equipmentSpecificMapper
.
getEquipmentStatisticsInfo
(
map
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
result
.
keySet
().
forEach
(
x
->
{
Map
<
String
,
Object
>
tempMap
=
new
HashMap
<>();
if
(
"extinguisher"
.
equals
(
String
.
valueOf
(
x
)))
{
tempMap
.
put
(
"name"
,
"灭火器"
);
tempMap
.
put
(
"total"
,
result
.
get
(
"extinguisher"
));
}
else
if
(
"car"
.
equals
(
String
.
valueOf
(
x
)))
{
tempMap
.
put
(
"name"
,
"消防车"
);
tempMap
.
put
(
"total"
,
result
.
get
(
"car"
));
}
else
{
tempMap
.
put
(
"name"
,
"泡沫罐"
);
tempMap
.
put
(
"total"
,
result
.
get
(
"foamtank"
));
}
tempMap
.
put
(
"code"
,
x
);
list
.
add
(
tempMap
);
});
return
list
;
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
b969d369
...
@@ -2055,19 +2055,19 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -2055,19 +2055,19 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
if
(
SystemTypeEnum
.
fireWaterSys
.
getCode
().
equals
(
String
.
valueOf
(
x
.
get
(
"systemTypeCode"
))))
{
if
(
SystemTypeEnum
.
fireWaterSys
.
getCode
().
equals
(
String
.
valueOf
(
x
.
get
(
"systemTypeCode"
))))
{
resultMap
.
put
(
"name"
,
SystemTypeEnum
.
fireWaterSys
.
getDesc
());
resultMap
.
put
(
"name"
,
SystemTypeEnum
.
fireWaterSys
.
getDesc
());
resultMap
.
put
(
"total"
,
x
.
get
(
"sys
Total
Num"
));
resultMap
.
put
(
"total"
,
x
.
get
(
"sysNum"
));
resultMap
.
put
(
"alarmNum"
,
alarmNumMap
.
get
(
"waterSysNum"
));
resultMap
.
put
(
"alarmNum"
,
alarmNumMap
.
get
(
"waterSysNum"
));
}
else
if
(
SystemTypeEnum
.
fireCAFSSys
.
getCode
().
equals
(
String
.
valueOf
(
x
.
get
(
"systemTypeCode"
))))
{
}
else
if
(
SystemTypeEnum
.
fireCAFSSys
.
getCode
().
equals
(
String
.
valueOf
(
x
.
get
(
"systemTypeCode"
))))
{
resultMap
.
put
(
"name"
,
SystemTypeEnum
.
fireCAFSSys
.
getDesc
());
resultMap
.
put
(
"name"
,
SystemTypeEnum
.
fireCAFSSys
.
getDesc
());
resultMap
.
put
(
"total"
,
x
.
get
(
"sys
Total
Num"
));
resultMap
.
put
(
"total"
,
x
.
get
(
"sysNum"
));
resultMap
.
put
(
"alarmNum"
,
alarmNumMap
.
get
(
"cafsSysNum"
));
resultMap
.
put
(
"alarmNum"
,
alarmNumMap
.
get
(
"cafsSysNum"
));
}
else
if
(
SystemTypeEnum
.
fireAlarmSys
.
getCode
().
equals
(
String
.
valueOf
(
x
.
get
(
"systemTypeCode"
))))
{
}
else
if
(
SystemTypeEnum
.
fireAlarmSys
.
getCode
().
equals
(
String
.
valueOf
(
x
.
get
(
"systemTypeCode"
))))
{
resultMap
.
put
(
"name"
,
SystemTypeEnum
.
fireAlarmSys
.
getDesc
());
resultMap
.
put
(
"name"
,
SystemTypeEnum
.
fireAlarmSys
.
getDesc
());
resultMap
.
put
(
"total"
,
x
.
get
(
"sys
Total
Num"
));
resultMap
.
put
(
"total"
,
x
.
get
(
"sysNum"
));
resultMap
.
put
(
"alarmNum"
,
alarmNumMap
.
get
(
"fireAlarmSysNum"
));
resultMap
.
put
(
"alarmNum"
,
alarmNumMap
.
get
(
"fireAlarmSysNum"
));
}
else
{
}
else
{
resultMap
.
put
(
"name"
,
SystemTypeEnum
.
fireONLSys
.
getDesc
());
resultMap
.
put
(
"name"
,
SystemTypeEnum
.
fireONLSys
.
getDesc
());
resultMap
.
put
(
"total"
,
x
.
get
(
"sys
Total
Num"
));
resultMap
.
put
(
"total"
,
x
.
get
(
"sysNum"
));
resultMap
.
put
(
"alarmNum"
,
alarmNumMap
.
get
(
"onlSysNum"
));
resultMap
.
put
(
"alarmNum"
,
alarmNumMap
.
get
(
"onlSysNum"
));
}
}
resultList
.
add
(
resultMap
);
resultList
.
add
(
resultMap
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/EquipmentController.java
View file @
b969d369
...
@@ -61,4 +61,11 @@ public class EquipmentController extends BaseController {
...
@@ -61,4 +61,11 @@ public class EquipmentController extends BaseController {
public
ResponseModel
<
Long
>
getMaintenanceId
(
@RequestParam
()
String
userId
)
{
public
ResponseModel
<
Long
>
getMaintenanceId
(
@RequestParam
()
String
userId
)
{
return
ResponseHelper
.
buildResponse
(
equipmentService
.
getMaintenanceId
(
userId
));
return
ResponseHelper
.
buildResponse
(
equipmentService
.
getMaintenanceId
(
userId
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/water/resource"
)
@ApiOperation
(
value
=
"查询人员绑定维保单位id"
)
public
ResponseModel
getWaterResourceList
(
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
)
{
return
ResponseHelper
.
buildResponse
(
equipmentService
.
getWaterResourceInfoList
(
bizOrgCode
));
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/EquipmentServiceImpl.java
View file @
b969d369
...
@@ -13,7 +13,10 @@ import com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany;
...
@@ -13,7 +13,10 @@ import com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.mapper.MaintenanceCompanyMapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.MaintenanceCompanyMapper
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
org.apache.commons.io.IOUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StopWatch
;
import
org.springframework.util.StopWatch
;
...
@@ -21,6 +24,9 @@ import org.typroject.tyboot.core.foundation.context.RequestContext;
...
@@ -21,6 +24,9 @@ import org.typroject.tyboot.core.foundation.context.RequestContext;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -42,6 +48,7 @@ public class EquipmentServiceImpl {
...
@@ -42,6 +48,7 @@ public class EquipmentServiceImpl {
@Autowired
@Autowired
private
RedisUtils
redisUtils
;
private
RedisUtils
redisUtils
;
public
List
<
MenuFrom
>
getFireSystemList
()
{
public
List
<
MenuFrom
>
getFireSystemList
()
{
// 导出模板增加权限
// 导出模板增加权限
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
...
@@ -134,4 +141,8 @@ public class EquipmentServiceImpl {
...
@@ -134,4 +141,8 @@ public class EquipmentServiceImpl {
return
null
;
return
null
;
}
}
}
}
public
List
<
Map
<
String
,
Object
>>
getWaterResourceInfoList
(
String
bizOrgCode
){
return
waterResourceServiceImpl
.
getWaterResourceInfoList
(
bizOrgCode
);
}
}
}
amos-boot-system-equip/src/main/resources/json/equipmentCode.json
0 → 100644
View file @
b969d369
[
{
"code"
:
"3104"
,
"name"
:
"extinguisher"
},
{
"code"
:
"92031900"
,
"name"
:
"car"
},
{
"code"
:
"210"
,
"name"
:
"foamtank"
}
]
\ No newline at end of file
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificIndexMapper.xml
View file @
b969d369
...
@@ -62,7 +62,9 @@
...
@@ -62,7 +62,9 @@
wesi.emergency_level as emergencyLevel,
wesi.emergency_level as emergencyLevel,
wesi.emergency_level_describe as emergencyLevelDescribe,
wesi.emergency_level_describe as emergencyLevelDescribe,
TRIM(CONCAT_WS(' ',wes.position,sd.description)) AS location,
TRIM(CONCAT_WS(' ',wes.position,sd.description)) AS location,
sd.warehouse_structure_id AS buildId
sd.warehouse_structure_id AS buildId,
wes.biz_org_name AS bizOrgName,
wes.biz_org_code AS bizOrgCode
FROM
FROM
wl_equipment_specific_index AS wesi
wl_equipment_specific_index AS wesi
LEFT JOIN wl_equipment_specific AS wes
LEFT JOIN wl_equipment_specific AS wes
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
b969d369
...
@@ -1970,4 +1970,43 @@
...
@@ -1970,4 +1970,43 @@
ORDER BY
ORDER BY
`c`.`click_date`
`c`.`click_date`
</select>
</select>
<select
id=
"getEquipmentStatisticsInfo"
resultType=
"java.util.Map"
>
SELECT
(
SELECT
COUNT(DISTINCT wes.id)
FROM
`wl_equipment_specific` wes
LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id
WHERE
wed.`code` LIKE CONCAT(#{map.extinguisher},'%')
<if
test=
"map.bizOrgCode != null and map.bizOrgCode != ''"
>
AND wes.biz_org_code = #{map.bizOrgCode}
</if>
) AS 'extinguisher',
(
SELECT
COUNT(DISTINCT wes.id)
FROM
`wl_equipment_specific` wes
LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id
WHERE
wed.`code` LIKE CONCAT(#{map.car},'%')
<if
test=
"map.bizOrgCode != null and map.bizOrgCode != ''"
>
AND wes.biz_org_code = #{map.bizOrgCode}
</if>
) AS 'car',
(
SELECT
COUNT(DISTINCT c.id)
FROM
`wl_car` c
LEFT JOIN wl_equipment we ON we.id = c.equipment_id
WHERE
we.`code` LIKE CONCAT(#{map.foamtank},'%')
<if
test=
"map.bizOrgCode != null and map.bizOrgCode != ''"
>
AND c.biz_org_code = #{map.bizOrgCode}
</if>
) AS 'foamtank'
</select>
</mapper>
</mapper>
\ No newline at end of file
amos-boot-system-jcs/src/main/resources/json/equipmentWaterCode.json
0 → 100644
View file @
b969d369
[
{
"type"
:
"hydrant"
,
"name"
:
"fireHydrant"
},
{
"type"
:
"pool"
,
"name"
:
"firePool"
},
{
"type"
:
"waterTank"
,
"name"
:
"fireWaterTank"
}
]
\ 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