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
8c0e9fb8
Commit
8c0e9fb8
authored
Oct 25, 2021
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐患统计接口
parent
0158d112
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
87 additions
and
3 deletions
+87
-3
LatentDangerFeignClient.java
...boot/module/common/api/feign/LatentDangerFeignClient.java
+27
-0
LatentDangerController.java
...entdanger/business/controller/LatentDangerController.java
+7
-0
LatentDangerMapper.java
.../latentdanger/business/dao/mapper/LatentDangerMapper.java
+2
-0
LatentDangerServiceImpl.java
...danger/business/service/impl/LatentDangerServiceImpl.java
+17
-0
ILatentDangerService.java
...ntdanger/business/service/intfc/ILatentDangerService.java
+7
-0
application.properties
...boot-system-jcs/src/main/resources/application.properties
+3
-2
LatentDangerMapper.xml
...anger/src/main/resources/db/mapper/LatentDangerMapper.xml
+23
-0
application.properties
...t-system-patrol/src/main/resources/application.properties
+1
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/LatentDangerFeignClient.java
0 → 100644
View file @
8c0e9fb8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
feign
;
import
com.alibaba.fastjson.JSONObject
;
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.typroject.tyboot.core.restful.utils.ResponseModel
;
/**
* 隐患服务feign
*
* @author Dell
*/
@FeignClient
(
name
=
"${latentDanger.feign.name}"
,
path
=
"latentDanger"
,
configuration
=
{
MultipartSupportConfig
.
class
})
public
interface
LatentDangerFeignClient
{
/**
* 获取未完成隐患数量
*
* @return
*/
@RequestMapping
(
value
=
"/api/latent/danger/app/unFinished"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Object
>
getUnFinishedDangerCount
();
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/controller/LatentDangerController.java
View file @
8c0e9fb8
...
...
@@ -369,4 +369,11 @@ public class LatentDangerController extends BaseController {
public
ResponseModel
getAllDangerState
()
{
return
ResponseHelper
.
buildResponse
((
iLatentDangerService
.
getAllDangerState
()));
}
@ApiOperation
(
value
=
"所有未完成隐患数量"
,
notes
=
"所有未完成隐患数量"
)
@GetMapping
(
value
=
"/app/unFinished/"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
getUnFinishedDangerCount
()
{
return
ResponseHelper
.
buildResponse
((
iLatentDangerService
.
getUnFinishedDangerCount
()));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/dao/mapper/LatentDangerMapper.java
View file @
8c0e9fb8
...
...
@@ -80,4 +80,6 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
* @return
*/
IPage
<
LatentDanger
>
selectPageByParam
(
@Param
(
"page"
)
Page
<
LatentDanger
>
page
,
@Param
(
"paramMap"
)
Map
<
String
,
Object
>
paramMap
);
Integer
selectUnFinishedCount
(
@Param
(
"dangerState1"
)
List
<
String
>
dangerState1
,
@Param
(
"dangerState2"
)
List
<
String
>
dangerState2
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/impl/LatentDangerServiceImpl.java
View file @
8c0e9fb8
...
...
@@ -2090,4 +2090,21 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
pageParam
.
put
(
"bizType"
,
bizType
);
return
pageListDanger
(
pageParam
);
}
@Override
public
Integer
getUnFinishedDangerCount
()
{
LambdaQueryWrapper
<
LatentDanger
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 巡检隐患未关闭状态集合
List
<
LatentDangerState
.
PatrolDangerStateEnum
>
pDangerStateEnumList
=
Lists
.
newArrayList
();
pDangerStateEnumList
.
add
(
LatentDangerState
.
PatrolDangerStateEnum
.
治理完毕
);
pDangerStateEnumList
.
add
(
LatentDangerState
.
PatrolDangerStateEnum
.
待评审
);
pDangerStateEnumList
.
add
(
LatentDangerState
.
PatrolDangerStateEnum
.
已撤销
);
// 防火监督未关闭隐患状态集合
List
<
LatentDangerState
.
SupervisionDangerStateEnum
>
sDangerStateEnumList
=
Lists
.
newArrayList
();
sDangerStateEnumList
.
addAll
(
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumListByProcessState
(
LatentDangerProcessStateEnum
.
未审核
.
getCode
()));
sDangerStateEnumList
.
addAll
(
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumListByProcessState
(
LatentDangerProcessStateEnum
.
待审核
.
getCode
()));
sDangerStateEnumList
.
addAll
(
LatentDangerState
.
SupervisionDangerStateEnum
.
getEnumListByProcessState
(
LatentDangerProcessStateEnum
.
治理完毕
.
getCode
()));
return
this
.
baseMapper
.
selectUnFinishedCount
(
pDangerStateEnumList
.
stream
().
map
(
LatentDangerState
.
PatrolDangerStateEnum
::
getCode
).
collect
(
Collectors
.
toList
()),
sDangerStateEnumList
.
stream
().
map
(
LatentDangerState
.
SupervisionDangerStateEnum
::
getCode
).
collect
(
Collectors
.
toList
()));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/intfc/ILatentDangerService.java
View file @
8c0e9fb8
...
...
@@ -166,4 +166,11 @@ public interface ILatentDangerService {
* @return
*/
List
<
Map
<
String
,
String
>>
getAllDangerState
();
/**
* 获取所有未完成的隐患数量
*
* @return
*/
Integer
getUnFinishedDangerCount
();
}
amos-boot-system-jcs/src/main/resources/application.properties
View file @
8c0e9fb8
...
...
@@ -86,4 +86,5 @@ spring.servlet.multipart.maxFileSize=3MB
spring.servlet.multipart.maxRequestSize
=
3MB
supervision.feign.name
=
AMOS-SUPERVISION-API
video.fegin.name
=
VIDEO888
\ No newline at end of file
video.fegin.name
=
VIDEO888
latentDanger.feign.name
=
AMOS-LATENT-DANGER
\ No newline at end of file
amos-boot-system-latentdanger/src/main/resources/db/mapper/LatentDangerMapper.xml
View file @
8c0e9fb8
...
...
@@ -1027,4 +1027,26 @@
order by a.create_date desc
</if>
</select>
<select
id=
"selectUnFinishedCount"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1)
FROM p_latent_danger
WHERE deleted = 0
AND (
(biz_type = 'patrol'
<if
test=
"dangerState1 != null and !dangerState1.isEmpty()"
>
AND danger_state NOT IN
<foreach
collection=
"dangerState1"
item=
"state"
open=
"("
separator=
","
close=
")"
>
#{state}
</foreach>
</if>
)
OR (biz_type = 'supervision'
<if
test=
"dangerState2 != null and !dangerState2.isEmpty()"
>
AND danger_state NOT IN
<foreach
collection=
"dangerState2"
item=
"state"
open=
"("
separator=
","
close=
")"
>
#{state}
</foreach>
</if>
))
</select>
</mapper>
\ No newline at end of file
amos-boot-system-patrol/src/main/resources/application.properties
View file @
8c0e9fb8
spring.application.name
=
AMOS-PATROL
spring.application.name
=
AMOS-PATROL
-tb
server.servlet.context-path
=
/patrol
server.port
=
8082
...
...
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