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
d70c598c
Commit
d70c598c
authored
Dec 30, 2024
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.检验检测中屏右侧超期数量查询逻辑修改
2.检验检测右屏八大类设备检验临期/超期统计卡片查询逻辑修改
parent
9de456eb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
7 deletions
+62
-7
SafetyProblemTracingMapper.java
...boot/module/jg/api/mapper/SafetyProblemTracingMapper.java
+2
-0
SafetyProblemTracingMapper.xml
.../src/main/resources/mapper/SafetyProblemTracingMapper.xml
+22
-0
JYJCDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/JYJCDPStatisticsServiceImpl.java
+38
-7
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/SafetyProblemTracingMapper.java
View file @
d70c598c
...
@@ -30,4 +30,6 @@ public interface SafetyProblemTracingMapper extends BaseMapper<SafetyProblemTrac
...
@@ -30,4 +30,6 @@ public interface SafetyProblemTracingMapper extends BaseMapper<SafetyProblemTrac
List
<
Map
<
String
,
Object
>>
getBusinessCount
(
@Param
(
"sourceTypeCode"
)
String
sourceTypeCode
,
@Param
(
"orgCode"
)
String
orgCode
);
List
<
Map
<
String
,
Object
>>
getBusinessCount
(
@Param
(
"sourceTypeCode"
)
String
sourceTypeCode
,
@Param
(
"orgCode"
)
String
orgCode
);
Long
countByTypeListAndOrgCode
(
@Param
(
"typeList"
)
List
<
String
>
typeList
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"mainBody"
)
String
mainBody
);
Long
countByTypeListAndOrgCode
(
@Param
(
"typeList"
)
List
<
String
>
typeList
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"mainBody"
)
String
mainBody
);
List
<
Map
<
String
,
Object
>>
countEquOverdue
(
@Param
(
"typeList"
)
List
<
String
>
typeList
,
@Param
(
"orgCode"
)
String
orgCode
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/SafetyProblemTracingMapper.xml
View file @
d70c598c
...
@@ -199,4 +199,26 @@
...
@@ -199,4 +199,26 @@
and source_type_code = #{mainBody}
and source_type_code = #{mainBody}
</if>
</if>
</select>
</select>
<select
id=
"countEquOverdue"
resultType=
"java.util.Map"
>
SELECT
equip_list_code equipListCode,
COUNT(1) count
FROM
tzs_safety_problem_tracing
WHERE
is_delete = '0'
<if
test=
"orgCode != null and orgCode != ''"
>
and governing_body_org_code like CONCAT(#{orgCode}, '%')
</if>
<if
test=
"typeList != null and typeList.size > 0"
>
and problem_type in
<foreach
collection=
"typeList"
item=
"type"
open=
"("
separator=
","
close=
")"
>
#{type}
</foreach>
</if>
and source_type_code = '3'
AND equip_list_code IS NOT NULL
GROUP BY
equip_list_code
</select>
</mapper>
</mapper>
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 @
d70c598c
...
@@ -10,10 +10,8 @@ import com.yeejoin.amos.boot.biz.common.dto.JyjcInspectionApplicationDto;
...
@@ -10,10 +10,8 @@ import com.yeejoin.amos.boot.biz.common.dto.JyjcInspectionApplicationDto;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto
;
import
com.yeejoin.amos.boot.module.common.api.enums.AlertCallEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.*
;
import
com.yeejoin.amos.boot.module.common.api.enums.JYJCBusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.SafetyProblemTracingMapper
;
import
com.yeejoin.amos.boot.module.common.api.enums.JYJCResultEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.UnitTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectTimeCountDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectTimeCountDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionTimelinesDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionTimelinesDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.PublicityInspectOrgInfoDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.PublicityInspectOrgInfoDto
;
...
@@ -49,6 +47,7 @@ import org.elasticsearch.search.sort.SortOrder;
...
@@ -49,6 +47,7 @@ import org.elasticsearch.search.sort.SortOrder;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
@@ -108,13 +107,15 @@ public class JYJCDPStatisticsServiceImpl {
...
@@ -108,13 +107,15 @@ public class JYJCDPStatisticsServiceImpl {
private
JYJCStatisticsMapper
jyjcStatisticsMapper
;
private
JYJCStatisticsMapper
jyjcStatisticsMapper
;
private
SafetyProblemTracingMapper
safetyProblemTracingMapper
;
/**
/**
* 法定检验机构名单
* 法定检验机构名单
*/
*/
@Value
(
"${jyjc.legal.companyCode:12610100750228848W,12610300MB2943942F,12610400435630992M,12610200435252143F,126105007326878566,12610600MB29845683,126108004366752362,12610700MB296441XY,12610900353680128G,126110004363154256,126100004352004822}"
)
@Value
(
"${jyjc.legal.companyCode:12610100750228848W,12610300MB2943942F,12610400435630992M,12610200435252143F,126105007326878566,12610600MB29845683,126108004366752362,12610700MB296441XY,12610900353680128G,126110004363154256,126100004352004822}"
)
private
String
legalCompanyCodes
;
private
String
legalCompanyCodes
;
public
JYJCDPStatisticsServiceImpl
(
JyjcInspectionApplicationEquipMapper
inspectionApplicationEquipMapper
,
JyjcInspectionApplicationMapper
inspectionApplicationMapper
,
TzsUserInfoMapper
tzsUserInfoMapper
,
JyjcInspectionResultMapper
inspectionResultMapper
,
JyjcOpeningApplicationMapper
openingApplicationMapper
,
RestHighLevelClient
restHighLevelClient
,
StCommonServiceImpl
stCommonService
,
JYJCStatisticsMapper
jyjcStatisticsMapper
)
{
public
JYJCDPStatisticsServiceImpl
(
JyjcInspectionApplicationEquipMapper
inspectionApplicationEquipMapper
,
JyjcInspectionApplicationMapper
inspectionApplicationMapper
,
TzsUserInfoMapper
tzsUserInfoMapper
,
JyjcInspectionResultMapper
inspectionResultMapper
,
JyjcOpeningApplicationMapper
openingApplicationMapper
,
RestHighLevelClient
restHighLevelClient
,
StCommonServiceImpl
stCommonService
,
JYJCStatisticsMapper
jyjcStatisticsMapper
,
SafetyProblemTracingMapper
safetyProblemTracingMapper
)
{
this
.
inspectionApplicationEquipMapper
=
inspectionApplicationEquipMapper
;
this
.
inspectionApplicationEquipMapper
=
inspectionApplicationEquipMapper
;
this
.
inspectionApplicationMapper
=
inspectionApplicationMapper
;
this
.
inspectionApplicationMapper
=
inspectionApplicationMapper
;
this
.
tzsUserInfoMapper
=
tzsUserInfoMapper
;
this
.
tzsUserInfoMapper
=
tzsUserInfoMapper
;
...
@@ -123,6 +124,7 @@ public class JYJCDPStatisticsServiceImpl {
...
@@ -123,6 +124,7 @@ public class JYJCDPStatisticsServiceImpl {
this
.
restHighLevelClient
=
restHighLevelClient
;
this
.
restHighLevelClient
=
restHighLevelClient
;
this
.
stCommonService
=
stCommonService
;
this
.
stCommonService
=
stCommonService
;
this
.
jyjcStatisticsMapper
=
jyjcStatisticsMapper
;
this
.
jyjcStatisticsMapper
=
jyjcStatisticsMapper
;
this
.
safetyProblemTracingMapper
=
safetyProblemTracingMapper
;
}
}
...
@@ -547,7 +549,7 @@ public class JYJCDPStatisticsServiceImpl {
...
@@ -547,7 +549,7 @@ public class JYJCDPStatisticsServiceImpl {
// 5.检验检测临期设备数数量统计
// 5.检验检测临期设备数数量统计
this
.
staticsCenterMapCountDataTemporary
(
result
,
dpFilterParamDto
);
this
.
staticsCenterMapCountDataTemporary
(
result
,
dpFilterParamDto
);
// 6.检验检测超期设备数数量统计
// 6.检验检测超期设备数数量统计
this
.
staticsCenterMapCountDataOverdue
(
result
,
dpFilterParamDto
);
this
.
staticsCenterMapCountDataOverdue
New
(
result
,
orgCode
,
dpFilterParamDto
);
// 7.检验机构总量 inspectionAgencyCount
// 7.检验机构总量 inspectionAgencyCount
this
.
countAllRegInspectCompany
(
result
,
orgCode
,
dpFilterParamDto
.
getCityCode
());
this
.
countAllRegInspectCompany
(
result
,
orgCode
,
dpFilterParamDto
.
getCityCode
());
// 8.第三方检验机构数量 thirdInspectionAgencyCount
// 8.第三方检验机构数量 thirdInspectionAgencyCount
...
@@ -572,6 +574,15 @@ public class JYJCDPStatisticsServiceImpl {
...
@@ -572,6 +574,15 @@ public class JYJCDPStatisticsServiceImpl {
result
.
put
(
"bizKtCount"
,
num
);
result
.
put
(
"bizKtCount"
,
num
);
}
}
private
void
staticsCenterMapCountDataOverdueNew
(
Map
<
String
,
Object
>
result
,
String
orgCode
,
DPFilterParamDto
dpFilterParamDto
)
{
long
num
=
0
;
List
<
String
>
typeList
=
new
ArrayList
<>();
typeList
.
add
(
"维保超期"
);
typeList
.
add
(
"检验超期"
);
num
=
safetyProblemTracingMapper
.
countByTypeListAndOrgCode
(
typeList
,
orgCode
,
IssueMainBodyEnum
.
EQUIPMENT
.
getCode
());
result
.
put
(
"jyjccqsbCount"
,
num
);
}
private
void
staticsCenterMapCountDataTemporary
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
)
{
private
void
staticsCenterMapCountDataTemporary
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
)
{
long
num
=
0
;
long
num
=
0
;
CountRequest
request
=
new
CountRequest
();
CountRequest
request
=
new
CountRequest
();
...
@@ -794,7 +805,7 @@ public class JYJCDPStatisticsServiceImpl {
...
@@ -794,7 +805,7 @@ public class JYJCDPStatisticsServiceImpl {
// 1.检验检测临期设备数数量统计
// 1.检验检测临期设备数数量统计
result
.
put
(
"approach"
,
staticsCenterMapCountDataForJyTimeTemporary
(
dpFilterParamDto
,
equipmentCategoryDtos
));
result
.
put
(
"approach"
,
staticsCenterMapCountDataForJyTimeTemporary
(
dpFilterParamDto
,
equipmentCategoryDtos
));
// 2.检验检测超期设备数数量统计
// 2.检验检测超期设备数数量统计
result
.
put
(
"overdue"
,
staticsCenterMapCountDataForJyTimeOverdue
(
dpFilterParamDto
,
equipmentCategoryDtos
));
result
.
put
(
"overdue"
,
staticsCenterMapCountDataForJyTimeOverdue
New
(
dpFilterParamDto
,
equipmentCategoryDtos
));
}
}
private
List
<
Long
>
staticsCenterMapCountDataForJyTimeTemporary
(
DPFilterParamDto
dpFilterParamDto
,
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
)
{
private
List
<
Long
>
staticsCenterMapCountDataForJyTimeTemporary
(
DPFilterParamDto
dpFilterParamDto
,
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
)
{
...
@@ -835,6 +846,26 @@ public class JYJCDPStatisticsServiceImpl {
...
@@ -835,6 +846,26 @@ public class JYJCDPStatisticsServiceImpl {
return
seresData
;
return
seresData
;
}
}
private
List
<
Long
>
staticsCenterMapCountDataForJyTimeOverdueNew
(
DPFilterParamDto
dpFilterParamDto
,
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
)
{
List
<
Long
>
seresData
=
new
ArrayList
<>();
// 区域信息模糊查询
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
());
List
<
String
>
typeList
=
new
ArrayList
<>();
typeList
.
add
(
"维保超期"
);
typeList
.
add
(
"检验超期"
);
List
<
Map
<
String
,
Object
>>
result
=
safetyProblemTracingMapper
.
countEquOverdue
(
typeList
,
orgCode
);
Map
<
String
,
Long
>
countMap
=
new
HashMap
<>();
if
(!
CollectionUtils
.
isEmpty
(
result
))
{
result
.
forEach
(
r
->
{
countMap
.
put
(
r
.
get
(
"equipListCode"
).
toString
(),
(
Long
)
r
.
get
(
"count"
));
});
}
equipmentCategoryDtos
.
forEach
(
c
->
{
seresData
.
add
(
countMap
.
getOrDefault
(
c
.
getCode
(),
0L
));
});
return
seresData
;
}
private
List
<
Long
>
staticsCenterMapCountDataForJyTimeOverdue
(
DPFilterParamDto
dpFilterParamDto
,
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
)
{
private
List
<
Long
>
staticsCenterMapCountDataForJyTimeOverdue
(
DPFilterParamDto
dpFilterParamDto
,
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
)
{
List
<
Long
>
seresData
=
new
ArrayList
<>();
List
<
Long
>
seresData
=
new
ArrayList
<>();
SearchRequest
request
=
new
SearchRequest
();
SearchRequest
request
=
new
SearchRequest
();
...
...
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