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
80cc8a5d
Commit
80cc8a5d
authored
Aug 09, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新水源接口
parent
8dae380c
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
170 additions
and
3 deletions
+170
-3
DCenterController.java
...com/yeejoin/equipmanage/controller/DCenterController.java
+10
-0
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+2
-0
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+2
-0
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+16
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+1
-3
ControlScreenController.java
...s/patrol/business/controller/ControlScreenController.java
+8
-0
PlanTaskMapper.java
...ejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
+5
-0
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+10
-0
IPlanTaskService.java
.../amos/patrol/business/service/intfc/IPlanTaskService.java
+2
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+35
-0
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+79
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/DCenterController.java
View file @
80cc8a5d
...
@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.controller;
...
@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.equipmanage.common.entity.dto.OrgUsrDto
;
import
com.yeejoin.equipmanage.common.entity.dto.OrgUsrDto
;
import
com.yeejoin.equipmanage.common.entity.publics.CommonResponse
;
import
com.yeejoin.equipmanage.common.utils.*
;
import
com.yeejoin.equipmanage.common.utils.*
;
import
com.yeejoin.equipmanage.config.PersonIdentify
;
import
com.yeejoin.equipmanage.config.PersonIdentify
;
import
com.yeejoin.equipmanage.mapper.FireFightingSystemMapper
;
import
com.yeejoin.equipmanage.mapper.FireFightingSystemMapper
;
...
@@ -204,4 +205,13 @@ public class DCenterController extends AbstractBaseController {
...
@@ -204,4 +205,13 @@ public class DCenterController extends AbstractBaseController {
return
CommonResponseUtil
.
success
(
menus
);
return
CommonResponseUtil
.
success
(
menus
);
}
}
@GetMapping
(
"/water/statics"
)
@ApiOperation
(
value
=
"消防水源信息"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
getFireWaterStatics
()
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
return
CommonResponseUtil
.
success
(
fireFightingSystemService
.
getFireWaterStatics
(
bizOrgCode
));
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
80cc8a5d
...
@@ -680,4 +680,6 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
...
@@ -680,4 +680,6 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Map
<
String
,
Object
>
selectEquipmentSpecificById
(
@Param
(
"id"
)
String
id
);
Map
<
String
,
Object
>
selectEquipmentSpecificById
(
@Param
(
"id"
)
String
id
);
void
updateStatusById
(
@Param
(
"id"
)
String
id
,
@Param
(
"status"
)
String
status
);
void
updateStatusById
(
@Param
(
"id"
)
String
id
,
@Param
(
"status"
)
String
status
);
Map
<
String
,
Object
>
getFireWaterStatics
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
80cc8a5d
...
@@ -317,4 +317,6 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
...
@@ -317,4 +317,6 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
*/
*/
void
resetMorphic
();
void
resetMorphic
();
Map
<
String
,
Object
>
getFireWaterStatics
(
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
80cc8a5d
...
@@ -2456,4 +2456,20 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -2456,4 +2456,20 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
}
}
}
@Override
public
Map
<
String
,
Object
>
getFireWaterStatics
(
String
bizOrgCode
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
fireFightingSystemMapper
.
getFireWaterStatics
(
bizOrgCode
);
map
.
put
(
"total"
,
resultMap
.
get
(
"total"
));
map
.
put
(
"redCode"
,
resultMap
.
get
(
"redCode"
));
map
.
put
(
"yellowCode"
,
resultMap
.
get
(
"yellowCode"
));
BigDecimal
total
=
new
BigDecimal
(
String
.
valueOf
(
resultMap
.
get
(
"total"
)));
BigDecimal
redNum
=
new
BigDecimal
(
String
.
valueOf
(
resultMap
.
get
(
"redCode"
)));
BigDecimal
yellowNum
=
new
BigDecimal
(
String
.
valueOf
(
resultMap
.
get
(
"yellowCode"
)));
BigDecimal
errorNum
=
redNum
.
add
(
yellowNum
);
BigDecimal
ratePercent
=
errorNum
.
divide
(
total
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
map
.
put
(
"ratePercent"
,
ratePercent
);
return
map
;
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
80cc8a5d
...
@@ -47,6 +47,7 @@ import org.typroject.tyboot.component.emq.EmqKeeper;
...
@@ -47,6 +47,7 @@ import org.typroject.tyboot.component.emq.EmqKeeper;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.math.BigInteger
;
import
java.math.RoundingMode
;
import
java.math.RoundingMode
;
...
@@ -177,9 +178,6 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -177,9 +178,6 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
CarMapper
carMapper
;
CarMapper
carMapper
;
@Autowired
@Autowired
IMainIotMonitorSerivce
iMainIotMonitorSerivce
;
@Autowired
private
ISyncDataService
syncDataService
;
private
ISyncDataService
syncDataService
;
@Autowired
@Autowired
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/ControlScreenController.java
View file @
80cc8a5d
...
@@ -34,4 +34,12 @@ public class ControlScreenController extends AbstractBaseController {
...
@@ -34,4 +34,12 @@ public class ControlScreenController extends AbstractBaseController {
}
}
return
CommonResponseUtil
.
success
(
iPlanTaskService
.
firePatrolStatics
(
bizOrgCode
));
return
CommonResponseUtil
.
success
(
iPlanTaskService
.
firePatrolStatics
(
bizOrgCode
));
}
}
@GetMapping
(
"/statics"
)
@ApiOperation
(
value
=
"消防运维信息"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
CommonResponse
getStatics
(
@RequestParam
(
required
=
false
)
String
companyCode
)
{
return
CommonResponseUtil
.
success
(
iPlanTaskService
.
getStatics
(
companyCode
));
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
View file @
80cc8a5d
...
@@ -216,4 +216,9 @@ public interface PlanTaskMapper extends BaseMapper {
...
@@ -216,4 +216,9 @@ public interface PlanTaskMapper extends BaseMapper {
List
<
Map
<
String
,
Object
>>
getCheckNotQualifiedEquipInfo
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
);
List
<
Map
<
String
,
Object
>>
getCheckNotQualifiedEquipInfo
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
);
String
getCheckIdByDetailId
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
);
String
getCheckIdByDetailId
(
@Param
(
value
=
"taskDetailId"
)
String
taskDetailId
);
String
queryByCompanyCode
(
@Param
(
"companyCode"
)
String
companyCode
);
List
<
Map
<
String
,
Object
>>
getStatics
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
80cc8a5d
...
@@ -2028,6 +2028,16 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
...
@@ -2028,6 +2028,16 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
return
map
;
return
map
;
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
getStatics
(
String
companyCode
)
{
String
bizOrgCode
=
null
;
if
(
StringUtil
.
isNotEmpty
(
companyCode
))
{
bizOrgCode
=
planTaskMapper
.
queryByCompanyCode
(
companyCode
);
}
return
planTaskMapper
.
getStatics
(
bizOrgCode
);
}
public
static
byte
[]
file2byte
(
File
file
)
{
public
static
byte
[]
file2byte
(
File
file
)
{
try
{
try
{
FileInputStream
in
=
new
FileInputStream
(
file
);
FileInputStream
in
=
new
FileInputStream
(
file
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPlanTaskService.java
View file @
80cc8a5d
...
@@ -187,6 +187,8 @@ public interface IPlanTaskService {
...
@@ -187,6 +187,8 @@ public interface IPlanTaskService {
*/
*/
List
<
Map
<
String
,
Object
>>
firePatrolStatics
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
firePatrolStatics
(
String
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
getStatics
(
String
companyCode
);
/**
/**
* 计划执行查询
* 计划执行查询
*/
*/
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
80cc8a5d
...
@@ -5892,4 +5892,39 @@
...
@@ -5892,4 +5892,39 @@
update f_fire_fighting_system set system_status = #{status} where id = #{id}
update f_fire_fighting_system set system_status = #{status} where id = #{id}
</update>
</update>
<select
id=
"getFireWaterStatics"
resultType=
"java.util.Map"
>
select
(select
count(sequence_nbr)
from
cb_water_resource
<where>
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS total,
(select
count(sequence_nbr)
from
cb_water_resource
<where>
water_status = '2'
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS redCode,
(select
count(sequence_nbr)
from
cb_water_resource
<where>
water_status = '1'
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS yellowCode
</select>
</mapper>
</mapper>
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
80cc8a5d
...
@@ -1354,4 +1354,82 @@
...
@@ -1354,4 +1354,82 @@
<select
id=
"getCheckIdByDetailId"
resultType=
"java.lang.String"
>
<select
id=
"getCheckIdByDetailId"
resultType=
"java.lang.String"
>
select id from p_check where plan_task_detail_id = #{taskDetailId} limit 1
select id from p_check where plan_task_detail_id = #{taskDetailId} limit 1
</select>
</select>
<select
id=
"getStatics"
resultType=
"java.util.Map"
>
SELECT
'1' AS `key`,
ifnull( sum( `p_plan_task`.`finish_num` ), 0 ) AS `value`,
'' AS unit,
'今日累计巡查点位' AS `name`,
'xfxcjrljxcdw' AS code
FROM
`p_plan_task`
WHERE
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
ifnull( sum( ppk.`point_num` ), 0 ) AS `value`,
'' AS unit,
'合格' AS `name`,
'xfxchg' AS code,
'2' AS `key`
FROM
`p_plan_task` ppk
LEFT JOIN p_plan_task_detail pptd ON pptd.task_no = ppk.id
WHERE
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE () AND pptd.STATUS = 1
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
'' AS `value`,
'%' AS unit,
'合格占比' AS `name`,
'xfxchgzb' AS code,
'3' AS `key`
UNION ALL
SELECT
'' AS `value`,
'' AS unit,
'不合格' AS `name`,
'xfxcbhg' AS code,
'4' AS `key`
UNION ALL
SELECT
ifnull( sum( `p_plan_task`.`point_num` ), 0 ) AS `value`,
'' AS unit,
'今日漏查点位' AS `name`,
'currentDayMiss' AS `indexKey`,
'xfxcjrlcdw' AS code,
'5' AS `key`
FROM
`p_plan_task`
WHERE
`finish_status` = 3
AND DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE ()
<if
test=
"bizOrgCode != null and bizOrgCode != ''"
>
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
'' AS `value`,
'' AS unit,
'漏查率' AS `name`,
'xfxclcl' AS code,
'6' AS `key`
</select>
<select
id=
"queryByCompanyCode"
resultType=
"java.lang.String"
>
SELECT biz_org_code
FROM cb_org_usr
WHERE is_delete = 0
<if
test=
"companyCode != null and companyCode != ''"
>
AND code = #{companyCode}
</if>
</select>
</mapper>
</mapper>
\ 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