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
8b9b1c1f
Commit
8b9b1c1f
authored
Dec 18, 2024
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加查询八大类未赋码数量接口
parent
cccb7be9
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
69 additions
and
29 deletions
+69
-29
JGDPStatisticsController.java
...le/statistcs/biz/controller/JGDPStatisticsController.java
+11
-0
AQZSDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/AQZSDPStatisticsServiceImpl.java
+6
-6
JGDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
+24
-9
JYJCDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/JYJCDPStatisticsServiceImpl.java
+3
-3
StCommonServiceImpl.java
...odule/statistcs/biz/service/impl/StCommonServiceImpl.java
+14
-6
EquipTechParamPipelineMapper.java
...t/module/ymt/api/mapper/EquipTechParamPipelineMapper.java
+1
-1
EquipTechParamPipelineMapper.xml
...rc/main/resources/mapper/EquipTechParamPipelineMapper.xml
+10
-4
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/JGDPStatisticsController.java
View file @
8b9b1c1f
...
...
@@ -62,6 +62,17 @@ public class JGDPStatisticsController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏总览-中间地图左右两侧8大类、单位、人员数量全局统计/无监管码"
,
notes
=
"大屏总览中间-地图左右两侧8大类、单位、人员数量全局统计/无监管码"
)
@PostMapping
(
value
=
"/zl/center-map/legendNoSupervisoryCode"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
centerMapCountForGlobalNoSupervisoryCode
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
());
}
return
ResponseHelper
.
buildResponse
(
statisticsService
.
centerMapCountForGlobalNoSupervisoryCode
(
dpFilterParamDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏总览-中间地图地市统计"
,
notes
=
"大屏总览中间-地图地市统计"
)
@PostMapping
(
value
=
"/zl/center-map/overview"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
centerMapCountForOverview
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
{
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/AQZSDPStatisticsServiceImpl.java
View file @
8b9b1c1f
...
...
@@ -894,11 +894,11 @@ public class AQZSDPStatisticsServiceImpl {
return
new
HashMap
<>();
}
// 1.气瓶数量统计
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
);
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
,
true
);
//1.8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
,
true
);
//2.压力管道长度统计
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
,
true
);
//3.单位数量统计
this
.
staticsCenterMapCountDataForCompany
(
result
,
orgCode
);
//4.人员数量统计
...
...
@@ -989,11 +989,11 @@ public class AQZSDPStatisticsServiceImpl {
return
new
HashMap
<>();
}
// 0. 气瓶数量统计
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
);
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
,
true
);
// 1. 8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
,
true
);
// 2. 压力管道长度统计
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
,
true
);
// 3.单位数量统计
this
.
staticsCenterMapCountDataForCompany
(
result
,
orgCode
);
// 4. 人员数量统计
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
View file @
8b9b1c1f
...
...
@@ -407,11 +407,11 @@ public class JGDPStatisticsServiceImpl {
return
setDefaultCount
(
result
);
}
// 1.气瓶数量统计
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
);
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
,
true
);
//1.8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
,
true
);
//2.压力管道长度统计
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
,
true
);
//3.单位数量统计
this
.
staticsCenterMapCountDataForCompany
(
result
,
orgCode
);
//4.人员数量统计
...
...
@@ -419,6 +419,21 @@ public class JGDPStatisticsServiceImpl {
return
result
;
}
public
Map
<
String
,
Object
>
centerMapCountForGlobalNoSupervisoryCode
(
DPFilterParamDto
dpFilterParamDto
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
());
if
(
StringUtils
.
isEmpty
(
orgCode
))
{
return
setDefaultCount
(
result
);
}
// 1.气瓶数量统计
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
,
false
);
//1.8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
,
false
);
//2.压力管道长度统计
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
,
false
);
return
result
;
}
private
Map
<
String
,
Object
>
getCenterMapOverviewData
(
DPFilterParamDto
dpFilterParamDto
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
());
...
...
@@ -426,11 +441,11 @@ public class JGDPStatisticsServiceImpl {
return
setDefaultCount
(
result
);
}
// 0. 气瓶数量统计
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
);
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
,
true
);
// 1. 8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
,
true
);
// 2. 压力管道长度统计
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
,
true
);
// 3. 人员数量统计
this
.
staticsCenterMapCountDataForPerson
(
result
,
dpFilterParamDto
,
orgCode
);
return
result
;
...
...
@@ -1619,11 +1634,11 @@ public class JGDPStatisticsServiceImpl {
return
new
HashMap
<>();
}
// 0.气瓶数量统计
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
);
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
,
true
);
// 1.8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
,
true
);
// 2.压力管道长度统计
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
,
true
);
// 3.已纳管设备总数
this
.
staticsCenterMapCountDataForEquipIsManage
(
result
);
// 4.登记证总数
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/JYJCDPStatisticsServiceImpl.java
View file @
8b9b1c1f
...
...
@@ -537,11 +537,11 @@ public class JYJCDPStatisticsServiceImpl {
return
result
;
}
// 1.气瓶统计
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
);
long
cylinderNum
=
stCommonService
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
,
true
);
// 2.8大类统计
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
,
true
);
// 3.压力管道统计
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
);
stCommonService
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
,
true
);
// 4.报检数量统计
this
.
staticsCenterMapCountDataReporting
(
result
,
dpFilterParamDto
);
// 5.检验检测临期设备数数量统计
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/StCommonServiceImpl.java
View file @
8b9b1c1f
...
...
@@ -202,7 +202,7 @@ public class StCommonServiceImpl {
return
regionList
.
stream
().
map
(
RegionModel:
:
getRegionName
).
collect
(
Collectors
.
toList
());
}
public
long
staticsCenterMapCountDataForCylinder
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
public
long
staticsCenterMapCountDataForCylinder
(
Map
<
String
,
Object
>
result
,
String
orgCode
,
Boolean
supervisoryFlag
)
{
long
num
=
0
;
CountRequest
request
=
new
CountRequest
();
request
.
indices
(
"idx_biz_view_jg_all"
);
...
...
@@ -211,9 +211,13 @@ public class StCommonServiceImpl {
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_CODE.keyword"
,
QueryParser
.
escape
(
orgCode
)
+
"*"
));
// 设备类别精确查询气瓶
boolMust
.
must
(
QueryBuilders
.
termQuery
(
"EQU_CATEGORY_CODE"
,
EQU_CATEGORY_CYLINDER
));
if
(
supervisoryFlag
)
{
//已赋码
boolMust
.
must
(
QueryBuilders
.
existsQuery
(
"SUPERVISORY_CODE"
));
boolMust
.
mustNot
(
QueryBuilders
.
termQuery
(
"SUPERVISORY_CODE"
,
"null"
));
boolMust
.
mustNot
(
QueryBuilders
.
termQuery
(
"SUPERVISORY_CODE"
,
"null"
));
}
else
{
boolMust
.
mustNot
(
QueryBuilders
.
existsQuery
(
"SUPERVISORY_CODE"
));
}
//状态为已认领
String
[]
status
=
{
"草稿"
,
"已拒领"
,
"待认领"
};
boolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"STATUS"
,
Arrays
.
asList
(
status
)));
...
...
@@ -228,15 +232,19 @@ public class StCommonServiceImpl {
return
num
;
}
public
void
staticsCenterMapCountDataForEquip
(
Map
<
String
,
Object
>
result
,
long
cylinderNum
,
String
orgCode
)
{
public
void
staticsCenterMapCountDataForEquip
(
Map
<
String
,
Object
>
result
,
long
cylinderNum
,
String
orgCode
,
Boolean
supervisoryFlag
)
{
SearchRequest
request
=
new
SearchRequest
();
request
.
indices
(
"idx_biz_view_jg_all"
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
// 按照管辖机构区域信息模糊查询
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_CODE.keyword"
,
QueryParser
.
escape
(
orgCode
)
+
"*"
));
if
(
supervisoryFlag
)
{
//已赋码
boolMust
.
must
(
QueryBuilders
.
existsQuery
(
"SUPERVISORY_CODE"
));
boolMust
.
mustNot
(
QueryBuilders
.
termQuery
(
"SUPERVISORY_CODE"
,
"null"
));
boolMust
.
mustNot
(
QueryBuilders
.
termQuery
(
"SUPERVISORY_CODE"
,
"null"
));
}
else
{
boolMust
.
mustNot
(
QueryBuilders
.
existsQuery
(
"SUPERVISORY_CODE"
));
}
//状态为已认领
String
[]
status
=
{
"草稿"
,
"已拒领"
,
"待认领"
};
boolMust
.
mustNot
(
QueryBuilders
.
termsQuery
(
"STATUS"
,
Arrays
.
asList
(
status
)));
...
...
@@ -281,8 +289,8 @@ public class StCommonServiceImpl {
return
itemEnum
.
getCode
();
}
public
void
staticsCenterMapCountDataForPipeline
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
String
length
=
techParamsPipelineMapper
.
sumPipeLengthByOrgCode
(
orgCode
);
public
void
staticsCenterMapCountDataForPipeline
(
Map
<
String
,
Object
>
result
,
String
orgCode
,
Boolean
supervisoryFlag
)
{
String
length
=
techParamsPipelineMapper
.
sumPipeLengthByOrgCode
(
orgCode
,
supervisoryFlag
);
BigDecimal
lengthDecimal
=
new
BigDecimal
(
length
);
if
(
lengthDecimal
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
// 数据库的米换算成千米
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/EquipTechParamPipelineMapper.java
View file @
8b9b1c1f
...
...
@@ -20,5 +20,5 @@ public interface EquipTechParamPipelineMapper extends BaseMapper<EquipTechParamP
* @param orgCode 区域code对应的管辖机构
* @return 数量
*/
String
sumPipeLengthByOrgCode
(
@Param
(
"orgCode"
)
String
orgCode
);
String
sumPipeLengthByOrgCode
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"supervisoryFlag"
)
Boolean
supervisoryFlag
);
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/EquipTechParamPipelineMapper.xml
View file @
8b9b1c1f
...
...
@@ -36,13 +36,19 @@
si."ORG_BRANCH_CODE" as orgBranchCode
FROM
"idx_biz_jg_register_info" ri,
idx_biz_jg_use_info u
i,
idx_biz_jg_supervision_info s
i
idx_biz_jg_supervision_info s
i,
idx_biz_jg_other_info o
i
where
ri."EQU_LIST" = '8000'
and ri."RECORD" = ui."RECORD"
and ui.IS_INTO_MANAGEMENT =true
and ri."RECORD" = si."RECORD"
and ri."RECORD" = oi."RECORD"
<if
test=
"supervisoryFlag == true"
>
AND oi.SUPERVISORY_CODE IS NOT NULL
</if>
<if
test=
"supervisoryFlag == false"
>
AND (oi.SUPERVISORY_CODE IS NULL OR oi.SUPERVISORY_CODE='')
</if>
and oi.CLAIM_STATUS = '已认领'
) a
where
p."RECORD" = a."RECORD" and a.orgBranchCode like concat(#{orgCode}, '%')
...
...
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