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
9d67c7d3
Commit
9d67c7d3
authored
Jul 30, 2024
by
王果
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…
Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents
dfce221b
ffa64307
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
1144 additions
and
228 deletions
+1144
-228
IssueTypeEnum.java
...join/amos/boot/module/common/api/enums/IssueTypeEnum.java
+1
-1
DPMapStatisticsItemEnum.java
...mos/boot/module/jg/api/enums/DPMapStatisticsItemEnum.java
+7
-0
DPStatisticsMapper.java
...in/amos/boot/module/jg/api/mapper/DPStatisticsMapper.java
+10
-0
DPStatisticsMapper.xml
...e-jg-api/src/main/resources/mapper/DPStatisticsMapper.xml
+110
-0
JgMaintainNoticeMapper.xml
...-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
+5
-2
JgMaintenanceContractMapper.xml
...src/main/resources/mapper/JgMaintenanceContractMapper.xml
+20
-19
JgReformNoticeMapper.xml
...jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
+5
-0
JgChangeRegistrationReformController.java
.../biz/controller/JgChangeRegistrationReformController.java
+1
-1
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+3
-3
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+1
-1
installation-notification-report.ftl
.../resources/templates/installation-notification-report.ftl
+1
-1
InspectionCompanyPublicityDto.java
...ot/module/jyjc/api/dto/InspectionCompanyPublicityDto.java
+63
-0
JyjcOpeningApplicationMapper.java
.../module/jyjc/api/mapper/JyjcOpeningApplicationMapper.java
+3
-0
JyjcOpeningApplicationMapper.xml
...rc/main/resources/mapper/JyjcOpeningApplicationMapper.xml
+37
-0
JyjcOpeningApplicationController.java
...jyjc/biz/controller/JyjcOpeningApplicationController.java
+8
-0
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+28
-0
DPStatusEnum.java
...n/amos/boot/module/statistics/api/enums/DPStatusEnum.java
+60
-0
AQZSDPStatisticsMapper.java
.../module/statistics/api/mapper/AQZSDPStatisticsMapper.java
+1
-0
CylinderStatisticsMapper.java
...odule/statistics/api/mapper/CylinderStatisticsMapper.java
+7
-0
AQZSDPStatisticsMapper.xml
...-api/src/main/resources/mapper/AQZSDPStatisticsMapper.xml
+12
-0
CylinderStatisticsMapper.xml
...pi/src/main/resources/mapper/CylinderStatisticsMapper.xml
+21
-0
AQZSDPStatisticsController.java
.../statistcs/biz/controller/AQZSDPStatisticsController.java
+42
-22
DPSubController.java
...boot/module/statistcs/biz/controller/DPSubController.java
+8
-0
JGDPStatisticsController.java
...le/statistcs/biz/controller/JGDPStatisticsController.java
+23
-2
DataInitAfterRuning.java
...s/boot/module/statistcs/biz/init/DataInitAfterRuning.java
+6
-1
AQZSDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/AQZSDPStatisticsServiceImpl.java
+342
-114
DPSubServiceImpl.java
...t/module/statistcs/biz/service/impl/DPSubServiceImpl.java
+67
-9
JGDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
+102
-22
StCommonServiceImpl.java
...odule/statistcs/biz/service/impl/StCommonServiceImpl.java
+6
-0
company.json
...odule-statistics-biz/src/main/resources/json/company.json
+2
-7
equip_1000.json
...le-statistics-biz/src/main/resources/json/equip_1000.json
+16
-2
equip_2000.json
...le-statistics-biz/src/main/resources/json/equip_2000.json
+16
-2
equip_3000.json
...le-statistics-biz/src/main/resources/json/equip_3000.json
+16
-2
equip_4000.json
...le-statistics-biz/src/main/resources/json/equip_4000.json
+16
-2
equip_5000.json
...le-statistics-biz/src/main/resources/json/equip_5000.json
+16
-2
equip_6000.json
...le-statistics-biz/src/main/resources/json/equip_6000.json
+16
-2
equip_8000.json
...le-statistics-biz/src/main/resources/json/equip_8000.json
+16
-2
equip_9000.json
...le-statistics-biz/src/main/resources/json/equip_9000.json
+16
-2
EquipTechParamPipelineMapper.java
...t/module/ymt/api/mapper/EquipTechParamPipelineMapper.java
+2
-1
EquipmentCategoryMapper.java
...s/boot/module/ymt/api/mapper/EquipmentCategoryMapper.java
+2
-0
TzBaseEnterpriseInfoMapper.java
...oot/module/ymt/api/mapper/TzBaseEnterpriseInfoMapper.java
+2
-0
TzsUserInfoMapper.java
...in/amos/boot/module/ymt/api/mapper/TzsUserInfoMapper.java
+2
-1
CylinderAreaDataMapper.xml
...-api/src/main/resources/mapper/CylinderAreaDataMapper.xml
+6
-5
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/enums/IssueTypeEnum.java
View file @
9d67c7d3
...
...
@@ -38,7 +38,7 @@ public enum IssueTypeEnum {
//充装异常(气瓶)
CHARGE_EXCEPTION_CYLINDER
(
"充装异常"
,
"14"
,
"4"
),
//许可超期(设备,气瓶)
LICENSE_OVERDUE
(
"许可超期"
,
"1
4
"
,
"3,4"
),
LICENSE_OVERDUE
(
"许可超期"
,
"1
5
"
,
"3,4"
),
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/DPMapStatisticsItemEnum.java
View file @
9d67c7d3
...
...
@@ -15,6 +15,10 @@ public enum DPMapStatisticsItemEnum {
*/
TOTAL
(
"特种设备总量 (台)"
,
"total"
,
""
),
OVER15YEARS_ELEVATORS
(
"超过15年电梯数量"
,
"over15yearsCount"
,
""
),
USE_REGISTRATION_COUNT
(
"使用登记办理量"
,
"useRegistrationCount"
,
""
),
CONSTRUCTION_NOTICE_COUNT
(
"施工告知办理量"
,
"constructionNoticeCount"
,
""
),
CHANGE_COUNT
(
"变更办理量"
,
"changeCount"
,
""
),
GAS
(
"气瓶 (台)"
,
"gas"
,
""
),
ELEVATORS
(
"电梯 (台)"
,
"elevators"
,
"3000"
),
PRESSURE_VESSELS
(
"压力容器 (台)"
,
"pressureVessels"
,
"2000"
),
...
...
@@ -30,6 +34,9 @@ public enum DPMapStatisticsItemEnum {
GAS_UNITS
(
"充装单位 (家)"
,
"gasUnits"
,
""
),
OPERATORS
(
"作业人员 (人)"
,
"operators"
,
""
),
DEVICE_COUNT
(
"已纳管设备数"
,
"deviceCount"
,
""
),
PERSON_ISSUES_COUNT
(
"个人问题数"
,
"个人"
,
""
),
COMPANY_ISSUES_COUNT
(
"企业问题数"
,
"企业"
,
""
),
EQU_ISSUES_COUNT
(
"设备数"
,
"设备"
,
""
),
CERTIFICATE_COUNT
(
"登记证总量"
,
"certificateCount"
,
""
);
private
String
label
;
private
String
code
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/DPStatisticsMapper.java
View file @
9d67c7d3
...
...
@@ -66,4 +66,14 @@ public interface DPStatisticsMapper {
List
<
Map
<
String
,
Object
>>
disableCountByOrgCodes
(
@Param
(
"orgCodes"
)
List
<
String
>
orgCodes
);
List
<
Map
<
String
,
Object
>>
cancelCountByOrgCodes
(
@Param
(
"orgCodes"
)
List
<
String
>
orgCodes
);
long
certificateCountByOrgCode
(
@Param
(
"orgCode"
)
String
orgCode
);
long
useCountByOrgCode
(
@Param
(
"orgCode"
)
String
orgCode
);
Long
over15yearsCount
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"time"
)
String
time
);
Long
constructionNoticeCount
(
@Param
(
"orgCode"
)
String
orgCode
);
Long
changeCountByOrgCode
(
@Param
(
"orgCode"
)
String
orgCode
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/DPStatisticsMapper.xml
View file @
9d67c7d3
...
...
@@ -527,4 +527,114 @@
GROUP BY
T.org_code
</select>
<select
id=
"certificateCountByOrgCode"
resultType=
"java.lang.Long"
>
SELECT COUNT
(1)
FROM
tzs_jg_use_registration_manage A
INNER JOIN privilege_company C ON A.receive_company_code = C.company_code
WHERE
A.certificate_status = '已登记'
AND C.org_code LIKE concat ( #{orgCode}, '%' )
</select>
<select
id=
"useCountByOrgCode"
resultType=
"java.lang.Long"
>
SELECT COUNT
( 1 )
FROM
tzs_jg_use_registration T
WHERE
T.audit_status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )
</select>
<select
id=
"over15yearsCount"
resultType=
"java.lang.Long"
>
SELECT COUNT
( 1 )
FROM
idx_biz_jg_factory_info A
INNER JOIN idx_biz_jg_supervision_info B ON A.RECORD = B.RECORD
INNER JOIN idx_biz_jg_register_info C ON A.RECORD = C.RECORD
WHERE
B.ORG_BRANCH_CODE LIKE CONCAT ( #{orgCode}, '%' )
AND A.PRODUCE_DATE
<
#{time}
AND C.EQU_LIST = '3000'
</select>
<select
id=
"constructionNoticeCount"
resultType=
"java.lang.Long"
>
SELECT SUM
( T.COUNT )
FROM
(
SELECT COUNT
( 1 )
FROM
tzs_jg_installation_notice T
WHERE
T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_maintain_notice T
WHERE
T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_reform_notice T
WHERE
T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_transfer_notice T
WHERE
T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )
) T
</select>
<select
id=
"changeCountByOrgCode"
resultType=
"java.lang.Long"
>
SELECT SUM
( T.COUNT )
FROM
(
SELECT COUNT
( 1 )
FROM
privilege_company pc
INNER JOIN tzs_jg_change_registration_name crn ON crn.receive_org_code = pc.company_code
AND crn.audit_status = '已完成'
WHERE
pc.org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_change_registration_reform T
WHERE
T.audit_status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_change_registration_transfer T
WHERE
T.audit_status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_change_registration_unit T
WHERE
T.status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_change_vehicle_registration_unit T
WHERE
T.status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )
) T
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
View file @
9d67c7d3
...
...
@@ -185,8 +185,11 @@
fi.ins_use_maintain_explain AS insUseMaintainExplain,
useUnit.use_contact AS safetyManager,
useUnit.contact_phone AS safetyManagerPhone,
(select ui.CITY_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS useUnitCityName,
(select ui.COUNTY_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS useUnitCountyName,
(select ui.PROVINCE_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipProvinceName,
(select ui.CITY_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipCityName,
(select ui.COUNTY_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipCountyName,
(select ui.STREET_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipStreetName,
(select ui.ADDRESS from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipAddress,
useUnit.ADDRESS AS useUnitAddress,
useUnit.ADDRESS AS useUnitLeaderAddress,
installUnit.use_code AS useCode,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintenanceContractMapper.xml
View file @
9d67c7d3
...
...
@@ -39,15 +39,16 @@
tjmc.next_execute_user_ids,
tjmc.next_task_id,
tjmc.cancel_reason,
ri."EQU_CODE" as equCode,
concat(date_format(IFNULL(inform_start, null),'%Y-%m-%d'),' ~ ',date_format(IFNULL(inform_end, null),'%Y-%m-%d')) as informStartAndEnd,
(SELECT name from tz_equipment_category ec WHERE ec.code = ri.EQU_LIST) AS equList,
(select name from tz_equipment_category ec WHERE ec.code = ri.EQU_CATEGORY) AS equCategory,
(select name from tz_equipment_category ec WHERE ec.code = ri.EQU_DEFINE) AS equDefine
concat(date_format(IFNULL(inform_start, null),'%Y-%m-%d'),' ~ ',date_format(IFNULL(inform_end, null),'%Y-%m-%d')) as informStartAndEnd
<!-- ri."EQU_CODE" as equCode,-->
<!-- (SELECT name from tz_equipment_category ec WHERE ec.code = ri.EQU_LIST) AS equList,-->
<!-- (select name from tz_equipment_category ec WHERE ec.code = ri.EQU_CATEGORY) AS equCategory,-->
<!-- (select name from tz_equipment_category ec WHERE ec.code = ri.EQU_DEFINE) AS equDefine-->
FROM
amos_tzs_biz.tzs_jg_maintenance_contract tjmc
LEFT JOIN tzs_jg_maintenance_contract_eq tjmce ON tjmce.equip_transfer_id = tjmc.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = tjmce.equ_id
<!-- LEFT JOIN tzs_jg_maintenance_contract_eq tjmce ON tjmce.equip_transfer_id = tjmc.sequence_nbr-->
<!-- LEFT JOIN idx_biz_jg_register_info ri ON ri.record = tjmce.equ_id-->
<where>
tjmc.is_delete = 0
<if
test=
"contractDto.applyNo != '' and contractDto.applyNo != null"
>
...
...
@@ -79,18 +80,18 @@
<if
test=
"contractDto.receiveOrgCode != '' and contractDto.receiveOrgCode != null"
>
and tjmc.receive_org_code = #{contractDto.receiveOrgCode}
</if>
<if
test=
"contractDto.equList != null and contractDto.equList != ''"
>
AND ri."EQU_LIST" = #{contractDto.equList}
</if
>
<if
test=
"contractDto.equCategory != null and contractDto.equCategory != ''"
>
AND ri."equ_category" = #{contractDto.equCategory}
</if
>
<if
test=
"contractDto.equDefine != null and contractDto.equDefine != ''"
>
AND ri."EQU_DEFINE" = #{contractDto.equDefine}
</if
>
<if
test=
"contractDto.equCode != null and contractDto.equCode != ''"
>
AND ri."EQU_CODE" like concat('%',#{contractDto.equCode},'%')
</if
>
<!-- <if test="contractDto.equList != null and contractDto.equList != ''">--
>
<!-- AND ri."EQU_LIST" = #{contractDto.equList}-->
<!-- </if>--
>
<!-- <if test="contractDto.equCategory != null and contractDto.equCategory != ''">--
>
<!-- AND ri."equ_category" = #{contractDto.equCategory}-->
<!-- </if>--
>
<!-- <if test="contractDto.equDefine != null and contractDto.equDefine != ''">--
>
<!-- AND ri."EQU_DEFINE" = #{contractDto.equDefine}-->
<!-- </if>--
>
<!-- <if test="contractDto.equCode != null and contractDto.equCode != ''">--
>
<!-- AND ri."EQU_CODE" like concat('%',#{contractDto.equCode},'%')-->
<!-- </if>--
>
-- 数据过滤开始 ----------------------------------------------------
<!-- <choose>-->
<!-- <when test="contractDto.useUnitCodeFilter != '' and contractDto.useUnitCodeFilter != null and-->
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
View file @
9d67c7d3
...
...
@@ -146,6 +146,11 @@
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
(select ui.PROVINCE_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipProvinceName,
(select ui.CITY_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipCityName,
(select ui.COUNTY_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipCountyName,
(select ui.STREET_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipStreetName,
(select ui.ADDRESS from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipAddress,
(select useUnit.use_contact from tz_base_enterprise_info useUnit WHERE useUnit.use_code = isn.use_unit_credit_code) AS safetyManager,
(select useUnit.contact_phone from tz_base_enterprise_info useUnit WHERE useUnit.use_code = isn.use_unit_credit_code) AS safetyManagerPhone,
(select useUnit.ADDRESS from tz_base_enterprise_info useUnit WHERE useUnit.use_code = isn.use_unit_credit_code) AS useUnitLeaderAddress,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationReformController.java
View file @
9d67c7d3
...
...
@@ -181,7 +181,7 @@ public class JgChangeRegistrationReformController extends BaseController {
if
(!
ValidationUtil
.
isEmpty
(
receiveCompanyCode
)){
String
[]
codes
=
receiveCompanyCode
.
split
(
"_"
);
if
(!
ValidationUtil
.
isEmpty
(
codes
)){
dto
.
setReceiveCompanyCode
(
"1"
.
equals
(
transferType
)
?
null
:
codes
[
0
]);
dto
.
setReceiveCompanyCode
(
codes
[
0
]);
}
}
dto
.
setCertificateStatus
(
"1"
.
equals
(
transferType
)
?
"已注销"
:
"已登记"
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
View file @
9d67c7d3
...
...
@@ -2293,7 +2293,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
iIdxBizJgOtherInfoService
.
saveOrUpdateData
(
otherInfo
);
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategory
)
||
"2100"
.
equals
(
equCategory
))
{
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
equCategory
)
||
"2100"
.
equals
(
equCategory
)
||
"8300"
.
equals
(
equCategory
)
)
{
IdxBizJgInspectionDetectionInfo
inspectionDetectionInfo
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipmentInfoForm
),
IdxBizJgInspectionDetectionInfo
.
class
);
List
<
Map
<
String
,
Object
>>
inspectionAndTestingInstitutions
=
commonMapper
.
getUnitListByType
(
INSPECTION_AND_TESTING_INSTITUTIONS
);
Optional
<
Map
<
String
,
Object
>>
optional
=
inspectionAndTestingInstitutions
.
stream
().
filter
(
x
->
x
.
get
(
"useCode"
).
equals
(
inspectionDetectionInfo
.
getInspectOrgCode
())).
findFirst
();
...
...
@@ -2301,8 +2301,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
inspectionDetectionInfo
.
setInspectOrgName
((
String
)
mapOrDefault
.
getOrDefault
(
"useUnit"
,
inspectionDetectionInfo
.
getInspectOrgName
()));
inspectionDetectionInfo
.
setRecord
(
record
);
inspectionDetectionInfo
.
setRecDate
(
date
);
inspectionDetectionInfo
.
setInspectType
(
"ZZJDJY"
);
inspectionDetectionInfo
.
setInspectConclusion
(
"6040"
);
//
inspectionDetectionInfo.setInspectType("ZZJDJY");
//
inspectionDetectionInfo.setInspectConclusion("6040");
inspectionDetectionInfo
.
setSequenceNbr
(
OPERATESAVE
.
equals
(
operateType
)
?
null
:
String
.
valueOf
(
equipmentInfoForm
.
get
(
"INSPECTIONDETECTIONINFO_SEQ"
)));
iIdxBizJgInspectionDetectionInfoService
.
saveOrUpdateData
(
inspectionDetectionInfo
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
View file @
9d67c7d3
...
...
@@ -652,7 +652,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders
.
put
(
"installType"
,
businessType
);
// 施工类别
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"
provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"a
ddress"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"
equipProvinceName"
)
+
getValue
.
apply
(
"equipCityName"
)
+
getValue
.
apply
(
"equipCountyName"
)
+
getValue
.
apply
(
"equipStreetName"
)
+
getValue
.
apply
(
"equipA
ddress"
));
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/installation-notification-report.ftl
View file @
9d67c7d3
...
...
@@ -2332,7 +2332,7 @@
</w:rPr>
</w:pPr>
<
#list installLicenseExpirationDateList as item1>
<
#list
equipList.
installLicenseExpirationDateList as item1>
<w:r>
<w:rPr>
<w:rFonts
w:hint=
"eastAsia"
w:ascii=
"宋体"
w:hAnsi=
"宋体"
w:cs=
"宋体"
/>
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/dto/InspectionCompanyPublicityDto.java
0 → 100644
View file @
9d67c7d3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
dto
;
import
lombok.Data
;
/**
* 检验机构公示
*
* @author Administrator
*/
@Data
public
class
InspectionCompanyPublicityDto
{
/**
* 单位名称
*/
private
String
unitName
;
/**
* 单位编码
*/
private
String
unitCode
;
/**
* 核准信息:核准证号、核准证有限期
*/
private
String
approvalInfo
;
/**
* 开通区域
*/
private
String
detectionRegion
;
/**
* 业务有效期
*/
private
String
expiryDate
;
/**
* 法人
*/
private
String
legalPerson
;
/**
* 联系人
*/
private
String
useContact
;
/**
* 联系人电话
*/
private
String
contactPhone
;
/**
* 检验及检测人员数量
*/
private
Long
personNum
;
/**
* 开通业务类型
*/
private
String
openBizType
;
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/mapper/JyjcOpeningApplicationMapper.java
View file @
9d67c7d3
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jyjc.api.mapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.PublicityInspectOrgInfoDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
...
...
@@ -36,4 +37,6 @@ public interface JyjcOpeningApplicationMapper extends BaseMapper<JyjcOpeningAppl
* @return List<PublicityInspectOrgInfoDto>
*/
List
<
PublicityInspectOrgInfoDto
>
queryInspectionOrgListForPublicity
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"dto"
)
DPFilterParamDto
dpFilterParamDto
);
List
<
InspectionCompanyPublicityDto
>
queryInspectionOrgListForBiz
();
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcOpeningApplicationMapper.xml
View file @
9d67c7d3
...
...
@@ -83,4 +83,41 @@
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
ORDER BY unitName
</select>
<select
id=
"queryInspectionOrgListForBiz"
resultType=
"com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto"
>
select
ei.sequence_nbr,
ei.use_unit as unitName,
oa.unit_code,
oa.detection_region,
oa.expiry_date,
ei.legal_person,
ei.use_contact,
ei.contact_phone,
(select count(1) from tzs_user_info u where u.unit_code = ei.use_unit_code and u.is_delete = false) as personNum,
(
select
group_concat(concat(a.cert_no,'#',a.expiry_date)) cert_no
from
(
SELECT
cert_no,
min(expiry_date) as expiry_date
FROM
"tz_base_unit_licence"
where
unit_code= ei.use_unit_code
and cert_type_code like '1233%'
and expiry_date >= CURRENT_DATE
AND (case when cert_type_code = '1233-1' then 'jy' else 'jc' end) = oa.open_biz_type
GROUP BY cert_no,cert_type_code
) a
) as approvalInfo,
oa.open_biz_type
from
tz_jyjc_opening_application oa,
tz_base_enterprise_info ei
where
oa.unit_code = ei.use_unit_code
and oa.status = 6616
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcOpeningApplicationController.java
View file @
9d67c7d3
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstDto
;
...
...
@@ -284,4 +285,11 @@ public class JyjcOpeningApplicationController extends BaseController {
return
ResponseHelper
.
buildResponse
(
result
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"检验检测机构公示"
,
notes
=
"检验检测机构公示"
)
@PostMapping
(
value
=
"/inspectionOrgList/publicity"
)
public
ResponseModel
<
List
<
InspectionCompanyPublicityDto
>>
inspectionOrgListForPublicity
()
{
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
queryInspectionOrgListForBiz
());
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
9d67c7d3
...
...
@@ -17,6 +17,7 @@ import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BusinessTypeEnum
;
...
...
@@ -967,4 +968,30 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
commonService
.
saveExecuteFlowData2Redis
(
inspectionApplication
.
getWorkflowProstanceId
(),
this
.
buildInstanceRuntimeData
(
inspectionApplication
));
});
}
public
List
<
InspectionCompanyPublicityDto
>
queryInspectionOrgListForBiz
()
{
// 查询所有已经业务开通的检验检测机构,已机构为维度进行证的合并处理
List
<
InspectionCompanyPublicityDto
>
inspectionCompanyPublicityDtos
=
this
.
getBaseMapper
().
queryInspectionOrgListForBiz
();
// 枚举转换
inspectionCompanyPublicityDtos
.
forEach
(
c
->{
c
.
setDetectionRegion
(
this
.
castRegionCode2Name
(
c
.
getDetectionRegion
()));
c
.
setApprovalInfo
(
this
.
breakNewLineForApprovalInfo
(
c
.
getApprovalInfo
()));
c
.
setOpenBizType
(
this
.
castOpenBizTypeCode2Name
(
c
.
getOpenBizType
()));
});
return
inspectionCompanyPublicityDtos
;
}
private
String
castRegionCode2Name
(
String
detectionRegion
)
{
return
""
;
}
private
String
breakNewLineForApprovalInfo
(
String
approvalInfo
)
{
String
[]
approvalArray
=
approvalInfo
.
split
(
"#"
);
StringBuilder
stringBuilder
=
new
StringBuilder
();
return
""
;
}
private
String
castOpenBizTypeCode2Name
(
String
openBizType
)
{
return
OpenBizTypeEnum
.
getOneByCode
(
openBizType
).
getName
();
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/DPStatusEnum.java
0 → 100644
View file @
9d67c7d3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistics
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Getter
@AllArgsConstructor
public
enum
DPStatusEnum
{
EQUIP_STATUS_USE
(
"equipUse"
,
"在用"
,
"在用"
,
""
,
"success"
),
EQUIP_STATUS_STOP
(
"equipStop"
,
"停用"
,
"停用"
,
""
,
"error"
),
EQUIP_STATUS_LOGOUT
(
"equipLogout"
,
"注销"
,
"注销"
,
""
,
"error"
),
EQUIP_STATUS_SCRAP
(
"equipScrap"
,
"报废"
,
"报废"
,
""
,
"error"
),
EQUIP_EMPHASIS_MONITOR
(
"equipEmphasis"
,
"重点监控设备"
,
"重点监控设备"
,
""
,
"success"
),
USE_YEAR_GT_15
(
"gt15"
,
">15年"
,
"使用年限大于15年"
,
""
,
"error"
),
// 单位类型
COMPANY_SY
(
"sy"
,
"使用单位"
,
"使用单位"
,
""
,
"success"
),
COMPANY_CZ
(
"cz"
,
"充装单位"
,
"充装单位"
,
""
,
"success"
),
COMPANY_JYJC
(
"jyjc"
,
"检验检测机构"
,
"检验检测机构"
,
""
,
"success"
),
COMPANY_ZZ
(
"zz"
,
"制造单位"
,
"制造单位"
,
""
,
"success"
),
COMPANY_SJ
(
"sj"
,
"设计单位"
,
"设计单位"
,
""
,
"success"
),
COMPANY_AZGZWX
(
"azgzwx"
,
"安装改造维修单位"
,
"安装改造维修单位"
,
""
,
"success"
),
MANAGE_STATUS_USE
(
"manageUse"
,
"在业"
,
"在业"
,
""
,
"success"
),
MANAGE_STATUS_OPEN
(
"manageOpen"
,
"在业"
,
"开业"
,
""
,
"success"
),
MANAGE_STATUS_STOP
(
"manageStop"
,
"停业"
,
"停业"
,
""
,
"error"
),
COMPANY_EMPHASIS_MONITOR
(
"emphasisMonitorCompany"
,
"重点监控企业"
,
"重点监控企业"
,
""
,
"success"
),
COMPANY_HIGH_RISK
(
"highRisk"
,
"高风险企业"
,
"高风险企业"
,
""
,
"stop"
);
private
String
key
;
private
String
label
;
private
String
status
;
private
String
icon
;
private
String
value
;
public
static
DPStatusEnum
getEnumByStatus
(
String
status
)
{
for
(
DPStatusEnum
c
:
DPStatusEnum
.
values
())
{
if
(
c
.
getStatus
().
equals
(
status
)){
return
c
;
}
}
return
null
;
}
public
static
Map
toMap
(
DPStatusEnum
dpStatusEnum
)
{
Map
map
=
new
HashMap
<>();
map
.
put
(
"key"
,
dpStatusEnum
.
getKey
());
map
.
put
(
"label"
,
dpStatusEnum
.
getLabel
());
map
.
put
(
"status"
,
dpStatusEnum
.
getStatus
());
map
.
put
(
"icon"
,
dpStatusEnum
.
getIcon
());
map
.
put
(
"value"
,
dpStatusEnum
.
getValue
());
return
map
;
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/mapper/AQZSDPStatisticsMapper.java
View file @
9d67c7d3
...
...
@@ -62,4 +62,5 @@ public interface AQZSDPStatisticsMapper {
Map
<
String
,
Object
>
getInspectionResultRate
(
@Param
(
value
=
"orgCode"
)
String
orgCode
,
@Param
(
value
=
"appId"
)
String
appId
);
List
<
Map
<
String
,
Object
>>
selectByOrg
(
String
orgCode
);
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/mapper/CylinderStatisticsMapper.java
View file @
9d67c7d3
...
...
@@ -13,4 +13,11 @@ import org.apache.ibatis.annotations.Param;
public
interface
CylinderStatisticsMapper
{
Long
countEnterpriseNumForCylinder
(
@Param
(
"orgCode"
)
String
orgCode
);
/**
* 按照管辖维度,统计充装单位使用登记证的办理率
* @param orgCode 区域对应的单位orgCode
* @return 办理率*100
*/
String
queryUserRegisterCertAppPercent
(
@Param
(
"orgCode"
)
String
orgCode
);
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/AQZSDPStatisticsMapper.xml
View file @
9d67c7d3
...
...
@@ -306,6 +306,18 @@
and cu.supervise_org_code like concat(#{orgCode}, '%')
GROUP BY strKey
</select>
<select
id=
"selectByOrg"
resultType=
"java.util.Map"
>
SELECT COUNT
( 1 ),
source_type AS sourceType
FROM
tzs_safety_problem_tracing
WHERE
governing_body_org_code LIKE concat ( #{orgCode}, '%' )
GROUP BY
source_type
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/CylinderStatisticsMapper.xml
View file @
9d67c7d3
...
...
@@ -10,4 +10,25 @@
unit_type LIKE'%充装单位%'
and supervise_org_code like concat(#{orgCode},'%')
</select>
<select
id=
"queryUserRegisterCertAppPercent"
resultType=
"java.lang.String"
>
select
case when s2.total= 0 then 0 else round(s1.num/s2.total * 100, 2) end as percent
from
(SELECT
count(DISTINCT(a.use_unit_credit_code)) as num
FROM
"tzs_jg_use_registration_manage" a,
privilege_company c
where
a.receive_company_code = c.company_code
and a.certificate_status='已登记'
and c.org_code like concat(#{orgCode},'%')) s1,
(SELECT
count(1) as total
FROM "tz_base_enterprise_info"
where
unit_type LIKE'%充装单位%'
and supervise_org_code like concat(#{orgCode},'%')
) s2
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/AQZSDPStatisticsController.java
View file @
9d67c7d3
...
...
@@ -41,25 +41,23 @@ public class AQZSDPStatisticsController {
Map
<
String
,
Object
>
result
=
statisticsService
.
getSecurityIndex
(
dpFilterParamDto
);
return
ResponseHelper
.
buildResponse
(
result
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏-气瓶-区域安全指数统计"
)
@RequestMapping
(
value
=
"/earlyWarning/child"
,
method
=
RequestMethod
.
POST
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getChildEarlyWarning
(
@
RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
public
ResponseModel
<
Map
<
String
,
Object
>>
getChildEarlyWarning
(
@
Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
bindingResult
)
throws
Exception
{
List
<
FieldError
>
fieldErrors
=
bindingResult
.
getFieldErrors
(
);
if
(
!
fieldErrors
.
isEmpty
(
))
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
())
;
}
return
ResponseHelper
.
buildResponse
(
statisticsService
.
getChildEarlyWarning
(
regionCode
.
toString
()));
return
ResponseHelper
.
buildResponse
(
statisticsService
.
getChildEarlyWarning
(
dpFilterParamDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-左屏-问题类型主体统计"
)
@PostMapping
(
value
=
"/mainBodyCount"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
mainBodyCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
public
ResponseModel
<
Map
<
String
,
Object
>>
mainBodyCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -72,7 +70,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-左屏-设备问题近30天统计"
)
@PostMapping
(
value
=
"/equipmentCount"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
equipmentCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
public
ResponseModel
<
Map
<
String
,
Object
>>
equipmentCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -85,7 +83,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-左屏-企业问题近30天统计"
)
@PostMapping
(
value
=
"/companyCount"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
companyCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
companyCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -98,7 +96,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-左屏-人员问题近30天统计"
)
@PostMapping
(
value
=
"/personCount"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
personCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
public
ResponseModel
<
Map
<
String
,
Object
>>
personCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -112,7 +110,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-左屏-气瓶问题近30天统计"
)
@PostMapping
(
value
=
"/cylinderCount"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
cylinderCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
public
ResponseModel
<
Map
<
String
,
Object
>>
cylinderCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -125,7 +123,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-右屏-按月统计近12个月的问题数量趋势"
)
@PostMapping
(
value
=
"/issueCountByMonth"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
issueCountByMonth
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
public
ResponseModel
<
Map
<
String
,
Object
>>
issueCountByMonth
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -138,7 +136,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-右屏-按月统计近30天的问题数量趋势"
)
@PostMapping
(
value
=
"/issueCountByDay"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
issueCountByDay
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
public
ResponseModel
<
Map
<
String
,
Object
>>
issueCountByDay
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -149,8 +147,8 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-中屏-当前区域数据统计"
)
@PostMapping
(
value
=
"/issueCountByCityCode"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
issueCountByCityCode
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
@PostMapping
(
value
=
"/issueCountByCityCode
Old
"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
issueCountByCityCode
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -162,7 +160,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-中屏-当前区域子区域数据统计"
)
@PostMapping
(
value
=
"/issueChildrenCityCount"
)
@PostMapping
(
value
=
"/issueChildrenCityCount
Old
"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueChildrenCityCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
...
...
@@ -176,7 +174,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-左屏-当月问题列表(主体类型、问题类型、问题时间、操作)"
)
@PostMapping
(
value
=
"/issueMonthList"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueMonthList
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueMonthList
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -188,7 +186,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-右屏-当年问题等级分类统计"
)
@PostMapping
(
value
=
"/issueProblemLevelCount"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
issueProblemLevelCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
public
ResponseModel
<
Map
<
String
,
Object
>>
issueProblemLevelCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -200,7 +198,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-右屏-按问题类型排名top 10"
)
@PostMapping
(
value
=
"/issueCompanyTop"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueCompanyTop
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueCompanyTop
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -235,7 +233,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-右屏-按问题类型排名top 10"
)
@PostMapping
(
value
=
"/issueCountTopByProblemType"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueCountTopByProblemType
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueCountTopByProblemType
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -243,4 +241,26 @@ public class AQZSDPStatisticsController {
List
<
Map
<
String
,
Object
>>
result
=
statisticsService
.
issueCountTopByProblemType
(
regionCode
.
toString
());
return
ResponseHelper
.
buildResponse
(
result
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏-中间地图左右两侧8大类、单位、人员数量、问题数量全局统计"
,
notes
=
"大屏中间-地图左右两侧8大类、单位、人员数量、问题数量全局统计"
)
@PostMapping
(
value
=
"/issueCountByCityCode"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
centerMapCountForGlobal
(
@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
.
getCenterMapCountDataForGlobal
(
dpFilterParamDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"安全追溯大屏-中间地图地市统计"
,
notes
=
"安全追溯大屏中间-地图地市统计"
)
@PostMapping
(
value
=
"/issueChildrenCityCount"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
centerMapCountForOverview
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
throws
Exception
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
());
}
return
ResponseHelper
.
buildResponse
(
statisticsService
.
getCenterMapCountDataForOverview
(
dpFilterParamDto
));
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/DPSubController.java
View file @
9d67c7d3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.DPSubServiceImpl
;
import
io.swagger.annotations.Api
;
...
...
@@ -51,6 +52,13 @@ public class DPSubController {
}
return
ResponseHelper
.
buildResponse
(
subService
.
commonQuery
(
template
,
param
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"tab返回单个详情数据"
,
notes
=
"tab返回单个详情数据"
)
@PostMapping
(
value
=
"/tab/aloneApi"
)
public
ResponseModel
<
Object
>
aloneApi
(
@RequestBody
Map
map
)
{
return
ResponseHelper
.
buildResponse
(
subService
.
aloneApi
(
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
map
))));
}
}
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 @
9d67c7d3
...
...
@@ -228,7 +228,7 @@ public class JGDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏监管-中屏-各地市数据统计"
,
notes
=
"大屏监管-中屏-各地市数据统计"
)
@PostMapping
(
value
=
"/centre/dataStatistic"
)
@PostMapping
(
value
=
"/centre/dataStatistic
Old
"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
dataStatisticByReginCode
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
...
...
@@ -239,7 +239,7 @@ public class JGDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"大屏监管-中屏-当前区域数据统计"
,
notes
=
"大屏监管-中屏-当前区域数据统计"
)
@PostMapping
(
value
=
"/centre/dataStatisticCount"
)
@PostMapping
(
value
=
"/centre/dataStatisticCount
Old
"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
dataStatisticCountByReginCode
(
@Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
result
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
...
...
@@ -247,4 +247,25 @@ public class JGDPStatisticsController {
}
return
ResponseHelper
.
buildResponse
(
statisticsService
.
dataStatisticCountByReginCode
(
dpFilterParamDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管大屏-中间地图左右两侧8大类、单位、人员数量全局统计"
,
notes
=
"大屏总览中间-地图左右两侧8大类、单位、人员数量全局统计"
)
@PostMapping
(
value
=
"/centre/dataStatistic"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
JGCenterMapCountForGlobal
(
@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
.
JGCenterMapCountForGlobal
(
dpFilterParamDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管大屏-中间地图地市统计"
,
notes
=
"大屏总览中间-地图地市统计"
)
@PostMapping
(
value
=
"/centre/dataStatisticCount"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
JGCenterMapCountForOverview
(
@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
.
JGCenterMapCountForOverview
(
dpFilterParamDto
));
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/init/DataInitAfterRuning.java
View file @
9d67c7d3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
init
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.AQZSDPStatisticsServiceImpl
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.JGDPStatisticsServiceImpl
;
import
com.yeejoin.amos.boot.module.statistcs.biz.service.impl.StCommonServiceImpl
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
...
...
@@ -16,14 +17,17 @@ public class DataInitAfterRuning implements ApplicationRunner {
private
JGDPStatisticsServiceImpl
jgdpStatisticsService
;
private
AQZSDPStatisticsServiceImpl
aqzsdpStatisticsService
;
private
StCommonServiceImpl
stCommonService
;
private
AmosRequestContext
amosRequestContext
;
public
DataInitAfterRuning
(
JGDPStatisticsServiceImpl
jgdpStatisticsService
,
StCommonServiceImpl
stCommonService
,
AmosRequestContext
amosRequestContext
)
{
public
DataInitAfterRuning
(
JGDPStatisticsServiceImpl
jgdpStatisticsService
,
StCommonServiceImpl
stCommonService
,
AmosRequestContext
amosRequestContext
,
AQZSDPStatisticsServiceImpl
aqzsdpStatisticsService
)
{
this
.
jgdpStatisticsService
=
jgdpStatisticsService
;
this
.
stCommonService
=
stCommonService
;
this
.
amosRequestContext
=
amosRequestContext
;
this
.
aqzsdpStatisticsService
=
aqzsdpStatisticsService
;
}
@Override
...
...
@@ -34,5 +38,6 @@ public class DataInitAfterRuning implements ApplicationRunner {
RequestContext
.
setToken
(
amosRequestContext
.
getToken
());
jgdpStatisticsService
.
init
();
stCommonService
.
init
();
aqzsdpStatisticsService
.
init
();
}
}
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 @
9d67c7d3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
service
.
impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.yeejoin.amos.boot.biz.common.dto.CountDto
;
import
com.yeejoin.amos.boot.biz.common.dto.KeyValueDto
;
import
com.yeejoin.amos.boot.module.common.api.constant.TZSCommonConstant
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.common.api.enums.IssueMainBodyEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.IssueTypeEnum
;
import
com.yeejoin.amos.boot.module.
common.api.enums.ReginStep
Enum
;
import
com.yeejoin.amos.boot.module.
jg.api.enums.DPMapStatisticsItem
Enum
;
import
com.yeejoin.amos.boot.module.statistics.api.dto.EquipQuestionNumCountDto
;
import
com.yeejoin.amos.boot.module.statistics.api.dto.SecurityIndexCountItemDto
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.AQZSDPStatisticsMapper
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.CylinderStatisticsMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipTechParamPipelineMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
joptsimple.internal.Strings
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.lucene.queryparser.classic.QueryParser
;
import
org.elasticsearch.action.search.SearchRequest
;
import
org.elasticsearch.action.search.SearchResponse
;
import
org.elasticsearch.client.RequestOptions
;
import
org.elasticsearch.client.RestHighLevelClient
;
import
org.elasticsearch.client.core.CountRequest
;
import
org.elasticsearch.client.core.CountResponse
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.elasticsearch.search.aggregations.AggregationBuilders
;
import
org.elasticsearch.search.aggregations.bucket.terms.Terms
;
import
org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
...
...
@@ -37,8 +45,8 @@ import java.text.NumberFormat;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -55,16 +63,100 @@ public class AQZSDPStatisticsServiceImpl {
private
final
static
String
NO_DATA_STR
=
"--"
;
@Autowired
RestHighLevelClient
restHighLevelClient
;
/**
* 压力容器设备种类
*/
private
final
static
String
EQU_LIST_CYLINDER
=
"2000"
;
/**
* 气瓶设备类别
*/
private
final
static
String
EQU_CATEGORY_CYLINDER
=
"2300"
;
/**
* 单位类型-使用单位
*/
private
final
static
String
COMPANY_TYPE_USE
=
"使用单位"
;
/**
* 单位类型-安装改造维修单位
*/
private
final
static
String
COMPANY_TYPE_MAINTENANCE
=
"安装改造维修单位"
;
/**
* 单位类型-制造单位
*/
private
final
static
String
COMPANY_TYPE_MANUFACTURE
=
"制造单位"
;
/**
* 单位类型-充装单位
*/
private
final
static
String
COMPANY_TYPE_FILLING
=
"充装单位"
;
private
static
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
;
private
static
List
<
RegionModel
>
regionModels
=
new
ArrayList
<>();
private
RestHighLevelClient
restHighLevelClient
;
private
static
Map
<
String
,
String
>
regionCodeOrgCodeMap
=
new
ConcurrentHashMap
<>();
@Resource
private
AQZSDPStatisticsMapper
statisticsMapper
;
private
EquipmentCategoryMapper
equipmentCategoryMapper
;
private
EquipTechParamPipelineMapper
techParamsPipelineMapper
;
private
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
;
private
TzsUserInfoMapper
userInfoMapper
;
private
CylinderStatisticsMapper
cylinderStatisticsMapper
;
private
StCommonServiceImpl
stCommonService
;
public
void
init
()
{
// 数据不变所以放到内存,提高响应时间
equipmentCategoryDtos
=
equipmentCategoryMapper
.
selectClassify
();
initReginCode
();
}
private
void
initReginCode
()
{
Collection
<
RegionModel
>
result
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
result
.
forEach
(
r
->
{
regionModels
.
add
(
r
);
this
.
loopSetChildRegin
(
regionModels
,
r
.
getChildren
());
});
}
private
void
loopSetChildRegin
(
List
<
RegionModel
>
regionModels
,
Collection
<
RegionModel
>
children
)
{
if
(
children
!=
null
&&
children
.
size
()
>
0
)
{
children
.
forEach
(
c
->
{
regionModels
.
add
(
c
);
this
.
loopSetChildRegin
(
regionModels
,
c
.
getChildren
());
});
}
}
public
AQZSDPStatisticsServiceImpl
(
RestHighLevelClient
restHighLevelClient
,
AQZSDPStatisticsMapper
statisticsMapper
,
EquipmentCategoryMapper
equipmentCategoryMapper
,
EquipTechParamPipelineMapper
techParamsPipelineMapper
,
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
,
TzsUserInfoMapper
userInfoMapper
,
CylinderStatisticsMapper
cylinderStatisticsMapper
,
StCommonServiceImpl
stCommonService
)
{
this
.
restHighLevelClient
=
restHighLevelClient
;
this
.
statisticsMapper
=
statisticsMapper
;
this
.
equipmentCategoryMapper
=
equipmentCategoryMapper
;
this
.
techParamsPipelineMapper
=
techParamsPipelineMapper
;
this
.
enterpriseInfoMapper
=
enterpriseInfoMapper
;
this
.
userInfoMapper
=
userInfoMapper
;
this
.
cylinderStatisticsMapper
=
cylinderStatisticsMapper
;
this
.
stCommonService
=
stCommonService
;
}
private
String
getLicenseEfficiencyByRegion
(
String
orgCode
)
{
List
<
KeyValueDto
>
keyValueDtos
=
statisticsMapper
.
queryLicenseEfficiencyOfRegion
(
orgCode
);
int
totalUnitNumber
=
keyValueDtos
.
stream
().
mapToInt
(
KeyValueDto:
:
getIValue
).
sum
();
...
...
@@ -118,73 +210,28 @@ public class AQZSDPStatisticsServiceImpl {
}
}
public
Map
<
String
,
Object
>
getChildEarlyWarning
(
String
regionCode
)
throws
Exception
{
List
<
RegionModel
>
regionModels
=
this
.
setRegionIfRootParent
(
regionCode
);
List
<
String
>
collect
=
regionModels
.
stream
().
map
(
c
->
c
.
getRegionCode
().
toString
()).
collect
(
Collectors
.
toList
());
List
<
CompanyModel
>
companyModelList
=
Privilege
.
companyClient
.
queryListByCompanyCode
(
Strings
.
join
(
collect
,
","
)).
getResult
();
Map
<
String
,
CompanyModel
>
companyMap
=
companyModelList
.
stream
().
collect
(
Collectors
.
toMap
(
CompanyModel:
:
getCompanyCode
,
c
->
c
));
Set
<
String
>
legendData
=
new
HashSet
<>();
List
<
String
>
xdata
=
new
ArrayList
<>();
public
Map
<
String
,
Object
>
getChildEarlyWarning
(
DPFilterParamDto
dpFilterParamDto
)
throws
Exception
{
List
<
RegionModel
>
regionModels
=
stCommonService
.
setRegionIfRootParent
(
dpFilterParamDto
.
getCityCode
());
Map
<
String
,
SecurityIndexCountItemDto
>
regionCodeSecurityIndexMap
=
getSecurityIndexCountItemDtoMap
(
regionModels
);
Set
<
String
>
legendData
=
getLegendForCyArea
();
List
<
String
>
xuke
=
new
ArrayList
<>();
List
<
String
>
shiyongdengji
=
new
ArrayList
<>();
List
<
String
>
jianyanchaoqi
=
new
ArrayList
<>();
List
<
String
>
jianyanhege
=
new
ArrayList
<>();
List
<
String
>
czjc
=
new
ArrayList
<>();
List
<
String
>
czjchege
=
new
ArrayList
<>();
// List<String> renyuan = new ArrayList<>();
legendData
.
add
(
"许可有效率"
);
legendData
.
add
(
"使用登记办理率"
);
legendData
.
add
(
"检验超期率"
);
legendData
.
add
(
"检验合格率"
);
legendData
.
add
(
"充装检查率"
);
legendData
.
add
(
"充装检查合格率"
);
for
(
RegionModel
region
:
regionModels
)
{
CompanyModel
companyModel
=
companyMap
.
get
(
region
.
getRegionCode
().
toString
());
if
(
ObjectUtils
.
isEmpty
(
companyModel
))
{
continue
;
}
// 是否有充装企业在指定区域下
Boolean
isHavingUnitInRegion
=
true
;
String
orgCode
=
companyModel
.
getOrgCode
();
xdata
.
add
(
region
.
getRegionName
());
// 1.许可有效率
if
(!
ValidationUtil
.
isEmpty
(
companyModel
))
{
String
value
=
this
.
getLicenseEfficiencyByRegion
(
orgCode
);
if
(
NO_DATA_STR
.
equals
(
value
))
{
xuke
.
add
(
"0"
);
}
else
{
xuke
.
add
(
String
.
format
(
"%.4f"
,
Double
.
parseDouble
(
value
)
/
100.0000
));
}
}
// 2.使用登记办理率
shiyongdengji
.
add
(
"1"
);
// 3.检验超期率
jianyanchaoqi
.
add
(
String
.
format
(
"%.4f"
,
Double
.
parseDouble
(
statisticsMapper
.
getInspectionExpiredRate
(
orgCode
,
null
).
get
(
"expiredRate"
).
toString
())
/
100.0000
));
// 4.检验合格率
jianyanhege
.
add
(
String
.
format
(
"%.4f"
,
Double
.
parseDouble
(
statisticsMapper
.
getInspectionResultRate
(
orgCode
,
null
).
get
(
"resultRate"
).
toString
())
/
100.0000
));
// 5.充装检查率
long
totalAll
=
searchEsCount
(
false
,
false
,
orgCode
,
null
);
long
totalCheck
=
searchEsCount
(
true
,
false
,
orgCode
,
null
);
long
totalResult
=
searchEsCount
(
false
,
true
,
orgCode
,
null
);
if
(
totalAll
!=
0
)
{
czjc
.
add
(
new
DecimalFormat
(
"#.0000"
).
format
(((
double
)
totalCheck
/
totalAll
)));
}
else
{
czjc
.
add
(
"0"
);
}
// 6.充装检查合格率
if
(
totalAll
!=
0
)
{
czjchege
.
add
(
new
DecimalFormat
(
"#.0000"
).
format
(((
double
)
totalResult
/
totalAll
)));
}
else
{
czjchege
.
add
(
"0"
);
}
}
//TODO 多线程处理后,regionCodeSecurityIndexMap顺序与regionModels的顺序不一致,需让数据和x轴的顺序保存一致
List
<
String
>
xdata
=
stCommonService
.
buildXData
(
regionModels
);
regionModels
.
forEach
(
r
->
{
SecurityIndexCountItemDto
countItemDto
=
regionCodeSecurityIndexMap
.
get
(
r
.
getRegionCode
().
toString
());
xuke
.
add
(
countItemDto
.
getXuke
());
shiyongdengji
.
add
(
countItemDto
.
getShiyongdengji
());
jianyanchaoqi
.
add
(
countItemDto
.
getJianyanchaoqi
());
jianyanhege
.
add
(
countItemDto
.
getJianyanhege
());
czjc
.
add
(
countItemDto
.
getCzjc
());
czjchege
.
add
(
countItemDto
.
getCzjchege
());
});
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"xdata"
,
xdata
);
result
.
put
(
"legendData"
,
legendData
);
result
.
put
(
"xuke"
,
xuke
);
...
...
@@ -193,22 +240,23 @@ public class AQZSDPStatisticsServiceImpl {
result
.
put
(
"jianyanhege"
,
jianyanhege
);
result
.
put
(
"czjc"
,
czjc
);
result
.
put
(
"czjchege"
,
czjchege
);
return
result
;
}
private
List
<
RegionModel
>
setRegionIfRootParent
(
String
regionCode
)
throws
Exception
{
List
<
RegionModel
>
regionList
=
Systemctl
.
regionClient
.
queryByParentRegionCode
(
Integer
.
parseInt
(
regionCode
)).
getResult
();
// 陕西省时需要在地图返回独立的地级市:韩城、杨凌、西咸
if
(
regionCode
.
equals
(
TZSCommonConstant
.
SHAN_XI_REGION_CODE
))
{
List
<
RegionModel
>
independentRegions
=
ReginStepEnum
.
enum2RegionList
(
"map"
);
regionList
.
addAll
(
independentRegions
);
}
return
regionList
;
private
Set
<
String
>
getLegendForCyArea
()
{
Set
<
String
>
legendData
=
new
HashSet
<>();
legendData
.
add
(
"许可有效率"
);
legendData
.
add
(
"使用登记办理率"
);
legendData
.
add
(
"检验超期率"
);
legendData
.
add
(
"检验合格率"
);
legendData
.
add
(
"充装检查率"
);
legendData
.
add
(
"充装检查合格率"
);
return
legendData
;
}
public
Map
<
String
,
Object
>
getSecurityIndex
(
DPFilterParamDto
dpFilterParamDto
)
throws
Exception
{
List
<
RegionModel
>
regionModels
=
this
.
setRegionIfRootParent
(
dpFilterParamDto
.
getCityCode
());
List
<
RegionModel
>
regionModels
=
stCommonService
.
setRegionIfRootParent
(
dpFilterParamDto
.
getCityCode
());
Map
<
String
,
SecurityIndexCountItemDto
>
regionCodeSecurityIndexMap
=
getSecurityIndexCountItemDtoMap
(
regionModels
);
List
<
Map
<
String
,
String
>>
data
=
new
ArrayList
<>();
List
<
Map
<
String
,
String
>>
finalData
=
data
;
...
...
@@ -253,13 +301,14 @@ public class AQZSDPStatisticsServiceImpl {
}
private
Map
<
String
,
SecurityIndexCountItemDto
>
getSecurityIndexCountItemDtoMap
(
List
<
RegionModel
>
regionModels
)
{
// 多线程处理后,顺序与regionModels的顺序不一致,故生成list
List
<
SecurityIndexCountItemDto
>
countItemDtoList
=
getSecurityIndexCountDtoList
(
regionModels
);
return
countItemDtoList
.
stream
().
collect
(
Collectors
.
toMap
(
SecurityIndexCountItemDto:
:
getRegionCode
,
Function
.
identity
(),
(
k1
,
k2
)
->
k2
));
}
private
List
<
SecurityIndexCountItemDto
>
getSecurityIndexCountDtoList
(
List
<
RegionModel
>
regionModels
)
{
return
regionModels
.
parallelStream
().
map
(
r
->
{
String
orgCode
=
this
.
getAndSetOrgCode
(
r
.
getRegionCode
().
toString
());
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
r
.
getRegionCode
().
toString
());
SecurityIndexCountItemDto
countItemDto
=
new
SecurityIndexCountItemDto
();
countItemDto
.
setRegionCode
(
r
.
getRegionCode
().
toString
());
countItemDto
.
setRegionName
(
r
.
getRegionName
());
...
...
@@ -274,8 +323,8 @@ public class AQZSDPStatisticsServiceImpl {
}
else
{
countItemDto
.
setXuke
(
value
);
}
// 2.使用登记办理率
TODO
countItemDto
.
setShiyongdengji
(
"100"
);
// 2.使用登记办理率
countItemDto
.
setShiyongdengji
(
cylinderStatisticsMapper
.
queryUserRegisterCertAppPercent
(
orgCode
)
);
// 3.检验超期率
countItemDto
.
setJianyanchaoqi
(
statisticsMapper
.
getInspectionExpiredRate
(
orgCode
,
null
).
get
(
"expiredRate"
).
toString
());
// 4.检验合格率
...
...
@@ -321,9 +370,9 @@ public class AQZSDPStatisticsServiceImpl {
public
Map
<
String
,
Object
>
mainBodyCount
(
String
cityCode
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
String
startDate
=
LocalDate
.
now
().
minusDays
(
100
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
String
startDate
=
LocalDate
.
now
().
minusDays
(
29
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
List
<
String
>
mainBodyNameList
=
IssueMainBodyEnum
.
getEnumNameList
();
String
orgCode
=
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
List
<
Map
<
String
,
Object
>>
list
=
statisticsMapper
.
selectByOrgAndMainBody
(
orgCode
,
mainBodyNameList
,
startDate
,
null
);
List
<
Object
>
legendDataList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
2
;
i
++)
{
...
...
@@ -368,23 +417,13 @@ public class AQZSDPStatisticsServiceImpl {
return
resultMap
;
}
private
String
getAndSetOrgCode
(
String
cityCode
)
{
String
orgCode
=
regionCodeOrgCodeMap
.
get
(
cityCode
);
if
(
orgCode
==
null
)
{
orgCode
=
statisticsMapper
.
getOrgCodeByCompanyCode
(
cityCode
);
if
(
orgCode
!=
null
)
{
regionCodeOrgCodeMap
.
put
(
cityCode
,
orgCode
);
}
}
return
orgCode
;
}
public
Map
<
String
,
Object
>
equipmentCount
(
String
cityCode
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
List
<
Object
>
xdata
=
new
ArrayList
<>();
List
<
Object
>
ydata
=
new
ArrayList
<>();
String
orgCode
=
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
List
<
String
>
enumNameList
=
IssueTypeEnum
.
getEnumNameListByMainBody
(
"3"
);
String
startDate
=
LocalDate
.
now
().
minusDays
(
29
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
List
<
Map
<
String
,
Object
>>
list
=
statisticsMapper
.
selectByOrgAndProblemType
(
orgCode
,
enumNameList
,
startDate
,
IssueMainBodyEnum
.
EQUIPMENT
.
getName
(),
null
);
...
...
@@ -403,7 +442,7 @@ public class AQZSDPStatisticsServiceImpl {
public
List
<
Map
<
String
,
Object
>>
companyCount
(
String
cityCode
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
String
orgCode
=
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
List
<
String
>
enumNameList
=
IssueTypeEnum
.
getEnumNameListByMainBody
(
"2"
);
String
startDate
=
LocalDate
.
now
().
minusDays
(
29
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
List
<
Map
<
String
,
Object
>>
list
=
statisticsMapper
.
selectByOrgAndProblemType
(
orgCode
,
enumNameList
,
startDate
,
IssueMainBodyEnum
.
COMPANY
.
getName
(),
null
);
...
...
@@ -435,7 +474,7 @@ public class AQZSDPStatisticsServiceImpl {
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
List
<
Object
>
xdata
=
new
ArrayList
<>();
List
<
Object
>
ydata
=
new
ArrayList
<>();
String
orgCode
=
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
List
<
String
>
enumNameList
=
IssueTypeEnum
.
getEnumNameListByMainBody
(
"1"
);
String
startDate
=
LocalDate
.
now
().
minusDays
(
29
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
List
<
Map
<
String
,
Object
>>
list
=
statisticsMapper
.
selectByOrgAndProblemType
(
orgCode
,
enumNameList
,
startDate
,
IssueMainBodyEnum
.
PERSON
.
getName
(),
null
);
...
...
@@ -456,7 +495,7 @@ public class AQZSDPStatisticsServiceImpl {
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
List
<
Object
>
xdata
=
new
ArrayList
<>();
List
<
Object
>
ydata
=
new
ArrayList
<>();
String
orgCode
=
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
List
<
String
>
enumNameList
=
IssueTypeEnum
.
getEnumNameListByMainBody
(
"4"
);
String
startDate
=
LocalDate
.
now
().
minusDays
(
29
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
List
<
Map
<
String
,
Object
>>
list
=
statisticsMapper
.
selectByOrgAndProblemType
(
orgCode
,
enumNameList
,
startDate
,
IssueMainBodyEnum
.
EQUIPMENT
.
getName
(),
"2300"
);
...
...
@@ -487,7 +526,7 @@ public class AQZSDPStatisticsServiceImpl {
legendData
.
add
(
map
);
}
resultMap
.
put
(
"legendData"
,
legendData
);
String
orgCode
=
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
int
year
=
LocalDate
.
now
().
getYear
();
List
<
Map
<
String
,
Object
>>
allIssue
=
statisticsMapper
.
getIssueCountByMonth
(
orgCode
,
String
.
valueOf
(
year
),
null
);
List
<
Map
<
String
,
Object
>>
endIssue
=
statisticsMapper
.
getIssueCountByMonth
(
orgCode
,
String
.
valueOf
(
year
),
"1"
);
...
...
@@ -541,7 +580,7 @@ public class AQZSDPStatisticsServiceImpl {
legendData
.
add
(
map
);
}
resultMap
.
put
(
"legendData"
,
legendData
);
String
orgCode
=
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
String
year
=
LocalDate
.
now
().
minusDays
(
29
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
List
<
Map
<
String
,
Object
>>
allIssue
=
statisticsMapper
.
getIssueCountByDate
(
orgCode
,
year
,
null
);
List
<
Map
<
String
,
Object
>>
endIssue
=
statisticsMapper
.
getIssueCountByDate
(
orgCode
,
year
,
"1"
);
...
...
@@ -581,7 +620,7 @@ public class AQZSDPStatisticsServiceImpl {
}
public
Map
<
String
,
Object
>
issueCountByCityCode
(
String
cityCode
)
{
String
orgCode
=
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
String
now
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM"
));
int
count
=
statisticsMapper
.
countByOrgCode
(
orgCode
,
now
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
...
...
@@ -591,7 +630,7 @@ public class AQZSDPStatisticsServiceImpl {
public
List
<
Map
<
String
,
Object
>>
issueChildrenCityCount
(
String
cityCode
)
throws
Exception
{
List
<
RegionModel
>
regionModels
=
setRegionIfRootParent
(
cityCode
);
List
<
RegionModel
>
regionModels
=
s
tCommonService
.
s
etRegionIfRootParent
(
cityCode
);
List
<
Integer
>
regionCodeList
=
regionModels
.
stream
().
map
(
m
->
m
.
getRegionCode
()).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
String
>>
orgCodeAndCompanyCodesByCompanyCodes
=
statisticsMapper
.
getOrgCodeAndCompanyCodesByCompanyCodes
(
regionCodeList
);
List
<
String
>
orgCodes
=
orgCodeAndCompanyCodesByCompanyCodes
.
stream
().
map
(
m
->
m
.
get
(
"orgCode"
)).
collect
(
Collectors
.
toList
());
...
...
@@ -629,7 +668,7 @@ public class AQZSDPStatisticsServiceImpl {
}
public
List
<
Map
<
String
,
Object
>>
issueMonthList
(
String
cityCode
)
{
String
orgCode
=
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
String
time
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM"
));
List
<
Map
<
String
,
Object
>>
list
=
statisticsMapper
.
issueMonthList
(
orgCode
,
time
);
return
list
;
...
...
@@ -637,7 +676,7 @@ public class AQZSDPStatisticsServiceImpl {
public
Map
<
String
,
Object
>
issueProblemLevelCount
(
String
cityCode
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
String
orgCode
=
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
String
time
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy"
));
List
<
Map
<
String
,
Object
>>
list
=
statisticsMapper
.
issueProblemLevelCount
(
orgCode
,
time
);
List
<
Object
>
xdata
=
new
ArrayList
<>();
...
...
@@ -653,7 +692,7 @@ public class AQZSDPStatisticsServiceImpl {
public
List
<
Map
<
String
,
Object
>>
issueCompanyTop
(
String
cityCode
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
String
orgCode
=
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
String
time
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy"
));
List
<
Map
<
String
,
Object
>>
list
=
statisticsMapper
.
issueCompanyTop
(
orgCode
,
time
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
...
...
@@ -668,8 +707,8 @@ public class AQZSDPStatisticsServiceImpl {
}
public
List
<
Map
<
String
,
Object
>>
issueChildrenCityCountTop
(
String
cityCode
)
throws
Exception
{
List
<
RegionModel
>
regionModels
=
setRegionIfRootParent
(
cityCode
);
List
<
Integer
>
regionCodeList
=
regionModels
.
stream
().
map
(
m
->
m
.
getRegionCode
()
).
collect
(
Collectors
.
toList
());
List
<
RegionModel
>
regionModels
=
s
tCommonService
.
s
etRegionIfRootParent
(
cityCode
);
List
<
Integer
>
regionCodeList
=
regionModels
.
stream
().
map
(
RegionModel:
:
getRegionCode
).
collect
(
Collectors
.
toList
());
List
<
Map
<
String
,
String
>>
orgCodeAndCompanyCodesByCompanyCodes
=
statisticsMapper
.
getOrgCodeAndCompanyCodesByCompanyCodes
(
regionCodeList
);
List
<
String
>
orgCodes
=
orgCodeAndCompanyCodesByCompanyCodes
.
stream
().
map
(
m
->
m
.
get
(
"orgCode"
)).
collect
(
Collectors
.
toList
());
String
now
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy"
));
...
...
@@ -729,11 +768,11 @@ public class AQZSDPStatisticsServiceImpl {
}
public
List
<
Map
<
String
,
Object
>>
issueCountTopByProblemType
(
String
cityCode
)
{
String
orgCode
=
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
List
<
Map
<
String
,
Object
>>
allList
=
statisticsMapper
.
issueCountTopByProblemType
(
orgCode
,
null
);
List
<
Map
<
String
,
Object
>>
endList
=
statisticsMapper
.
issueCountTopByProblemType
(
orgCode
,
"1"
);
Map
<
String
,
Object
>
endIssuedataMap
=
new
HashMap
<>();
endList
.
stream
().
forEach
(
t
->
{
endList
.
forEach
(
t
->
{
endIssuedataMap
.
put
(
t
.
get
(
"problemTypeCode"
).
toString
(),
t
.
get
(
"count"
));
});
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
...
...
@@ -752,7 +791,7 @@ public class AQZSDPStatisticsServiceImpl {
public
List
<
Map
<
String
,
Object
>>
getEquipQuestionList
(
DPFilterParamDto
dpFilterParamDto
)
{
this
.
setDefaultFilter
(
dpFilterParamDto
);
String
orgCode
=
this
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
());
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
());
if
(
StringUtils
.
isEmpty
(
orgCode
))
{
return
new
ArrayList
<>();
}
...
...
@@ -815,4 +854,192 @@ public class AQZSDPStatisticsServiceImpl {
}
}
public
Map
<
String
,
Object
>
getCenterMapCountDataForGlobal
(
DPFilterParamDto
dpFilterParamDto
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
());
if
(
StringUtils
.
isEmpty
(
orgCode
))
{
return
new
HashMap
<>();
}
// 1.气瓶数量统计
long
cylinderNum
=
this
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
);
//1.8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
this
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
);
//2.压力管道长度统计
this
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
);
//3.单位数量统计
this
.
staticsCenterMapCountDataForCompany
(
result
,
orgCode
);
//4.人员数量统计
this
.
staticsCenterMapCountDataForPerson
(
result
,
dpFilterParamDto
,
orgCode
);
//5.问题数统计
this
.
staticsCenterMapCountDataForIssue
(
result
,
orgCode
);
return
result
;
}
private
void
staticsCenterMapCountDataForIssue
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
List
<
Map
<
String
,
Object
>>
list
=
statisticsMapper
.
selectByOrg
(
orgCode
);
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
AtomicReference
<
Long
>
issueCount
=
new
AtomicReference
<>(
0L
);
list
.
stream
().
forEach
(
t
->
{
dataMap
.
put
(
t
.
get
(
"sourceType"
).
toString
(),
t
.
get
(
"count"
));
issueCount
.
updateAndGet
(
v
->
v
+
Long
.
parseLong
(
t
.
get
(
"count"
).
toString
()));
});
result
.
put
(
"issueCount"
,
issueCount
.
get
());
result
.
put
(
"deviceIssueCount"
,
dataMap
.
getOrDefault
(
DPMapStatisticsItemEnum
.
EQU_ISSUES_COUNT
,
0L
));
result
.
put
(
"companyIssueCount"
,
dataMap
.
getOrDefault
(
DPMapStatisticsItemEnum
.
COMPANY_ISSUES_COUNT
,
0L
));
result
.
put
(
"personIssueCount"
,
dataMap
.
getOrDefault
(
DPMapStatisticsItemEnum
.
PERSON_ISSUES_COUNT
,
0L
));
}
private
long
staticsCenterMapCountDataForCylinder
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
long
num
=
0
;
CountRequest
request
=
new
CountRequest
();
request
.
indices
(
"idx_biz_view_jg_all"
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
// 按照管辖机构区域信息模糊查询
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_CODE.keyword"
,
QueryParser
.
escape
(
orgCode
)
+
"*"
));
// 设备类别精确查询气瓶
boolMust
.
must
(
QueryBuilders
.
termsQuery
(
"EQU_CATEGORY_CODE"
,
EQU_CATEGORY_CYLINDER
));
// 且在用状态设备
boolMust
.
must
(
QueryBuilders
.
termQuery
(
"EQU_STATE"
,
EquimentEnum
.
ZAIYONG
.
getCode
()));
request
.
query
(
boolMust
);
try
{
CountResponse
response
=
restHighLevelClient
.
count
(
request
,
RequestOptions
.
DEFAULT
);
num
=
response
.
getCount
();
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
result
.
put
(
DPMapStatisticsItemEnum
.
GAS
.
getCode
(),
num
);
return
num
;
}
private
void
staticsCenterMapCountDataForEquip
(
Map
<
String
,
Object
>
result
,
long
cylinderNum
,
String
orgCode
)
{
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
)
+
"*"
));
// 且在用状态设备
boolMust
.
must
(
QueryBuilders
.
termQuery
(
"EQU_STATE"
,
EquimentEnum
.
ZAIYONG
.
getCode
()));
SearchSourceBuilder
builder
=
new
SearchSourceBuilder
();
builder
.
query
(
boolMust
);
TermsAggregationBuilder
aggregationBuilder
=
AggregationBuilders
.
terms
(
"count_by_equ_list_code"
).
field
(
"EQU_LIST_CODE"
);
builder
.
aggregation
(
aggregationBuilder
);
request
.
source
(
builder
);
try
{
SearchResponse
response
=
restHighLevelClient
.
search
(
request
,
RequestOptions
.
DEFAULT
);
Terms
terms
=
response
.
getAggregations
().
get
(
"count_by_equ_list_code"
);
Map
<
String
,
Long
>
countMap
=
new
HashMap
<>();
for
(
Terms
.
Bucket
bucket
:
terms
.
getBuckets
())
{
// 压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
if
(
bucket
.
getKeyAsString
().
equals
(
EQU_LIST_CYLINDER
))
{
countMap
.
put
(
bucket
.
getKeyAsString
(),
bucket
.
getDocCount
()
-
cylinderNum
);
}
else
{
countMap
.
put
(
bucket
.
getKeyAsString
(),
bucket
.
getDocCount
());
}
}
// 按照8大类枚举,进行加工。目的:固定八大类防止没统计数据导致缺少分类、将设备种类的code换成前端定义的key
equipmentCategoryDtos
.
forEach
(
c
->
{
result
.
put
(
this
.
castCategoryCode2WebCode
(
c
.
getCode
()),
countMap
.
getOrDefault
(
c
.
getCode
(),
0L
));
});
result
.
put
(
DPMapStatisticsItemEnum
.
TOTAL
.
getCode
(),
countMap
.
values
().
stream
().
mapToLong
(
e
->
e
).
sum
()
+
cylinderNum
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
result
.
remove
(
DPMapStatisticsItemEnum
.
PRESSURE_PIPELINES
.
getCategory
());
}
private
String
castCategoryCode2WebCode
(
String
category
)
{
DPMapStatisticsItemEnum
itemEnum
=
DPMapStatisticsItemEnum
.
getInstanceByCategory
(
category
);
return
itemEnum
.
getCode
();
}
private
void
staticsCenterMapCountDataForPipeline
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
String
length
=
techParamsPipelineMapper
.
sumPipeLengthByOrgCode
(
orgCode
);
BigDecimal
lengthDecimal
=
new
BigDecimal
(
length
);
if
(
lengthDecimal
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
length
=
lengthDecimal
.
divide
(
new
BigDecimal
(
"1000"
),
3
,
RoundingMode
.
HALF_UP
).
toPlainString
();
}
result
.
put
(
DPMapStatisticsItemEnum
.
PRESSURE_PIPELINES
.
getCode
(),
length
);
}
private
void
staticsCenterMapCountDataForCompany
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
if
(
orgCode
==
null
)
{
setDefaultCompanyCountData
(
result
);
return
;
}
List
<
CountDto
>
countDtos
=
enterpriseInfoMapper
.
countByUnitTypeAndOrgCode
(
orgCode
);
result
.
put
(
DPMapStatisticsItemEnum
.
USERS_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_USE
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
result
.
put
(
DPMapStatisticsItemEnum
.
CONSTRUCTION_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_MAINTENANCE
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
result
.
put
(
DPMapStatisticsItemEnum
.
MANUFACTURING_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_MANUFACTURE
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
result
.
put
(
DPMapStatisticsItemEnum
.
GAS_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_FILLING
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
}
private
void
setDefaultCompanyCountData
(
Map
<
String
,
Object
>
m
)
{
m
.
put
(
DPMapStatisticsItemEnum
.
USERS_UNITS
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
CONSTRUCTION_UNITS
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
MANUFACTURING_UNITS
.
getCode
(),
0
);
m
.
put
(
DPMapStatisticsItemEnum
.
GAS_UNITS
.
getCode
(),
0
);
}
private
void
staticsCenterMapCountDataForPerson
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
,
String
orgCode
)
{
if
(
orgCode
==
null
)
{
result
.
put
(
DPMapStatisticsItemEnum
.
OPERATORS
.
getCode
(),
0
);
return
;
}
Long
num
=
userInfoMapper
.
countUserByPostAndAreaCode
(
orgCode
,
"6552"
,
dpFilterParamDto
.
getCityCode
());
result
.
put
(
DPMapStatisticsItemEnum
.
OPERATORS
.
getCode
(),
num
);
}
public
List
<
Map
<
String
,
Object
>>
getCenterMapCountDataForOverview
(
DPFilterParamDto
dpFilterParamDto
)
throws
Exception
{
List
<
RegionModel
>
regionModels
=
stCommonService
.
setRegionIfRootParent
(
dpFilterParamDto
.
getCityCode
());
List
<
Map
<
String
,
Object
>>
result
=
regionModels
.
parallelStream
().
map
(
r
->
{
DPFilterParamDto
filterParamDto
=
new
DPFilterParamDto
();
filterParamDto
.
setCityCode
(
r
.
getRegionCode
().
toString
());
Map
<
String
,
Object
>
itemResult
=
getCenterMapOverviewData
(
filterParamDto
);
itemResult
.
put
(
"regionCode"
,
r
.
getRegionCode
());
itemResult
.
put
(
"regionName"
,
r
.
getRegionName
());
return
itemResult
;
}).
collect
(
Collectors
.
toList
());
this
.
setCompanyDataBatch
(
result
);
return
result
;
}
private
void
setCompanyDataBatch
(
List
<
Map
<
String
,
Object
>>
result
)
{
List
<
CountDto
>
countDtos
=
enterpriseInfoMapper
.
countByUnitTypeAndOrgCodeNoParam
();
result
.
forEach
(
m
->
{
String
cityCode
=
m
.
get
(
"regionCode"
).
toString
();
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
if
(
orgCode
!=
null
)
{
m
.
put
(
DPMapStatisticsItemEnum
.
USERS_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_USE
)
&&
c
.
getLabel
().
contains
(
orgCode
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
m
.
put
(
DPMapStatisticsItemEnum
.
CONSTRUCTION_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_MAINTENANCE
)
&&
c
.
getLabel
().
contains
(
orgCode
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
m
.
put
(
DPMapStatisticsItemEnum
.
MANUFACTURING_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_MANUFACTURE
)
&&
c
.
getLabel
().
contains
(
orgCode
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
m
.
put
(
DPMapStatisticsItemEnum
.
GAS_UNITS
.
getCode
(),
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
COMPANY_TYPE_FILLING
)
&&
c
.
getLabel
().
contains
(
orgCode
)).
mapToInt
(
CountDto:
:
getIntValue
).
sum
());
}
else
{
setDefaultCompanyCountData
(
m
);
}
});
}
private
Map
<
String
,
Object
>
getCenterMapOverviewData
(
DPFilterParamDto
dpFilterParamDto
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
());
if
(
StringUtils
.
isEmpty
(
orgCode
))
{
return
new
HashMap
<>();
}
// 0. 气瓶数量统计
long
cylinderNum
=
this
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
);
// 1. 8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
this
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
);
// 2. 压力管道长度统计
this
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
);
// 3.单位数量统计
this
.
staticsCenterMapCountDataForCompany
(
result
,
orgCode
);
// 4. 人员数量统计
this
.
staticsCenterMapCountDataForPerson
(
result
,
dpFilterParamDto
,
orgCode
);
// 5.问题统计
this
.
staticsCenterMapCountDataForIssue
(
result
,
orgCode
);
return
result
;
}
}
\ No newline at end of file
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/DPSubServiceImpl.java
View file @
9d67c7d3
...
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.biz.common.utils.JsonValueUtils;
import
com.yeejoin.amos.boot.biz.common.utils.RestTemplateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.StringUtils
;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.DpSubUtils
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.DPStatusEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.*
;
import
com.yeejoin.amos.feign.morphic.Morphic
;
import
com.yeejoin.amos.feign.morphic.model.FormSceneModel
;
...
...
@@ -82,7 +83,34 @@ public class DPSubServiceImpl {
return
result
;
}
public
Object
aloneApi
(
JSONObject
jsonObject
){
Object
resultConvert
=
JsonValueUtils
.
getValueByKey
(
jsonObject
,
"dataConfig"
,
"dataConfig.resultConvert"
);
Object
api
=
JsonValueUtils
.
getValueByKey
(
jsonObject
,
"dataConfig"
,
"dataConfig.api"
);
String
renderType
=
jsonObject
.
getString
(
"renderType"
);
Object
apiResult
=
null
;
ResponseModel
responseModel
=
this
.
getApiResult
((
JSONObject
)
api
,
!
ValidationUtil
.
isEmpty
(
resultConvert
)
?
resultConvert
.
toString
()
:
null
);
if
(!
ValidationUtil
.
isEmpty
(
responseModel
.
getResult
()))
{
apiResult
=
responseModel
.
getResult
();
}
if
(
"timeline"
.
equals
(
renderType
)){
return
apiResult
;
}
else
if
(
"table"
.
equals
(
renderType
)){
JSONObject
map
=
new
JSONObject
();
Object
columns
=
JsonValueUtils
.
getValueByKey
(
jsonObject
,
"visualParams"
,
"visualParams.columns"
);
map
.
put
(
"columns"
,
columns
);
map
.
put
(
"dataList"
,
apiResult
);
map
.
put
(
"showPage"
,
true
);
map
.
put
(
"api"
,
api
);
map
.
put
(
"rowKey"
,
JsonValueUtils
.
getValueByKey
(
jsonObject
,
"visualParams"
,
"visualParams.rowKey"
));
return
map
;
}
return
apiResult
;
}
public
void
buildContent
(
JSONObject
content
,
JSONObject
tab
,
Map
<
String
,
Object
>
param
)
{
if
(!
ValidationUtil
.
isEmpty
(
tab
.
getBoolean
(
"useAloneApi"
))
&&
tab
.
getBoolean
(
"useAloneApi"
)){
return
;
}
Long
formSeq
=
tab
.
getLong
(
"formSeq"
);
String
renderType
=
tab
.
getString
(
"renderType"
);
Object
resultConvert
=
JsonValueUtils
.
getValueByKey
(
tab
,
"dataConfig"
,
"dataConfig.resultConvert"
);
...
...
@@ -105,6 +133,11 @@ public class DPSubServiceImpl {
log
.
info
(
"{}tab页获取详情接口,共耗时:{} 毫秒"
,
tab
.
get
(
"displayName"
),
(
e
-
s
));
}
if
(
tab
.
getString
(
"template"
).
contains
(
"emergency"
)){
content
.
put
(
tab
.
getString
(
"key"
),
JSONObject
.
parseObject
(
apiResult
.
toString
()));
return
;
}
if
(!
ValidationUtil
.
isEmpty
(
formSeq
))
{
long
s
=
System
.
currentTimeMillis
();
FormSceneModel
formPage
=
Morphic
.
formSceneClient
.
seleteOne
(
formSeq
).
getResult
();
...
...
@@ -165,10 +198,6 @@ public class DPSubServiceImpl {
public
JSONObject
buildContentKeyinfoData
(
JSONObject
tab
,
JSONObject
content
,
Object
apiResult
){
JSONObject
result
=
JSONObject
.
parseObject
(
apiResult
.
toString
());
if
(
tab
.
getString
(
"template"
).
contains
(
"emergency"
)){
content
.
put
(
"keyinfo"
,
result
);
return
content
;
}
JSONObject
param
=
tab
.
getJSONObject
(
"param"
);
Object
keyParams
=
JsonValueUtils
.
getValueByKey
(
content
,
"keyinfo"
,
"keyinfo.keyParams"
);
if
(
ValidationUtil
.
isEmpty
(
keyParams
)){
...
...
@@ -197,27 +226,56 @@ public class DPSubServiceImpl {
xobj
.
put
(
"value"
,
"param"
.
equals
(
xobj
.
getString
(
"source"
))
?
param
.
get
(
xobj
.
getString
(
"key"
))
:
result
.
get
(
xobj
.
getString
(
"key"
)));
});
this
.
processQRCodeWidget
(
content
.
getJSONObject
(
"keyinfo"
).
getJSONObject
(
"qrcode"
),
result
);
this
.
processQRCodeWidget
(
content
.
getJSONObject
(
"keyinfo"
).
getJSONObject
(
"qrcode"
),
result
);
if
(
tab
.
getString
(
"template"
).
contains
(
"equip"
)){
// 处理图片
JSONArray
jsonArray
=
result
.
getJSONArray
(
"PRODUCT_PHOTO"
);
if
(!
ValidationUtil
.
isEmpty
(
jsonArray
)){
content
.
getJSONObject
(
"keyinfo"
).
put
(
"photo"
,
jsonArray
.
getJSONObject
(
0
).
getString
(
"url"
));
}
// 处理标签
JSONArray
status
=
(
JSONArray
)
JsonValueUtils
.
getValueByKey
(
content
,
"keyinfo"
,
"keyinfo.status"
);
this
.
processLabel
(
status
,
param
.
getString
(
"EQU_STATE"
));
// 处理问题列表
List
<
Map
<
String
,
String
>>
problem
=
dpSubBizService
.
queryProblemListByEquipId
(
param
.
getString
(
"record"
));
if
(!
ValidationUtil
.
isEmpty
(
problem
)){
Object
qrcode
=
JsonValueUtils
.
getValueByKey
(
content
,
"keyinfo"
,
"keyinfo.qrcode"
);
((
JSONObject
)
qrcode
)
.
put
(
"problem"
,
problem
);
JSONObject
qrcode
=
(
JSONObject
)
JsonValueUtils
.
getValueByKey
(
content
,
"keyinfo"
,
"keyinfo.qrcode"
);
qrcode
.
put
(
"problem"
,
problem
);
}
// 处理监管履历
List
<
Map
<
String
,
String
>>
datas
=
dpSubBizService
.
equOnJgServiceOperationRecords
(
param
.
getString
(
"record"
));
if
(!
ValidationUtil
.
isEmpty
(
datas
)){
Object
infoRecords
=
JsonValueUtils
.
getValueByKey
(
content
,
"keyinfo"
,
"keyinfo.infoRecords"
);
((
JSONObject
)
infoRecords
)
.
put
(
"datas"
,
datas
);
JSONObject
infoRecords
=
(
JSONObject
)
JsonValueUtils
.
getValueByKey
(
content
,
"keyinfo"
,
"keyinfo.infoRecords"
);
infoRecords
.
put
(
"datas"
,
datas
);
param
.
put
(
"reghistory"
,
datas
);
}
}
else
if
(
tab
.
getString
(
"template"
).
contains
(
"company"
)){
// 处理标签
JSONArray
status
=
(
JSONArray
)
JsonValueUtils
.
getValueByKey
(
content
,
"keyinfo"
,
"keyinfo.status"
);
this
.
processLabel
(
status
,
result
.
getString
(
"unitType"
));
this
.
processLabel
(
status
,
result
.
getString
(
"operatingStatus"
));
// 处理图片
JSONArray
jsonArray
=
result
.
getJSONArray
(
"unitBusinessLicense"
);
if
(!
ValidationUtil
.
isEmpty
(
jsonArray
)){
content
.
getJSONObject
(
"keyinfo"
).
put
(
"photo"
,
jsonArray
.
getJSONObject
(
0
).
getString
(
"url"
));
}
}
return
content
;
}
private
JSONArray
processLabel
(
JSONArray
status
,
String
value
){
if
(!
ValidationUtil
.
isEmpty
(
value
)){
DPStatusEnum
enumByStatus
=
DPStatusEnum
.
getEnumByStatus
(
value
);
if
(!
ValidationUtil
.
isEmpty
(
enumByStatus
)){
status
.
add
(
DPStatusEnum
.
toMap
(
enumByStatus
));
}
}
return
status
;
}
private
JSONArray
processShowHideRules
(
JSONArray
children
,
Object
showHideRules
,
Object
apiResult
)
{
JSONObject
result
=
JSONObject
.
parseObject
(
apiResult
.
toString
());
if
(!
ValidationUtil
.
isEmpty
(
showHideRules
))
{
...
...
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 @
9d67c7d3
...
...
@@ -799,19 +799,16 @@ public class JGDPStatisticsServiceImpl {
* 1 在用
* 2 停用
* 4 注销
* 0 未登记
*/
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
for
(
int
i
=
0
;
i
<
4
;
i
++)
{
Map
<
String
,
Object
>
map
=
new
HashMap
();
if
(
i
==
0
)
{
map
.
put
(
"name"
,
"未登记"
);
}
else
if
(
i
==
1
)
{
if
(
i
==
0
)
{
map
.
put
(
"name"
,
"在用"
);
}
else
if
(
i
==
2
)
{
}
else
if
(
i
==
1
)
{
map
.
put
(
"name"
,
"停用"
);
}
else
if
(
i
==
3
)
{
}
else
if
(
i
==
2
)
{
map
.
put
(
"name"
,
"报废"
);
}
else
if
(
i
==
4
)
{
}
else
if
(
i
==
3
)
{
map
.
put
(
"name"
,
"注销"
);
}
map
.
put
(
"value"
,
dataMap
.
getOrDefault
(
String
.
valueOf
(
i
),
0L
));
...
...
@@ -1300,7 +1297,7 @@ public class JGDPStatisticsServiceImpl {
legendData
.
add
(
map
);
}
resultMap
.
put
(
"legendData"
,
legendData
);
List
<
String
>
xDataList
=
Arrays
.
asList
(
"气瓶"
,
"电梯"
,
"压力容器"
,
"锅炉"
,
"起重机械"
,
"场(厂)内专用"
,
"大型游乐设施"
,
"压力管道"
,
"客运索道"
);
List
<
String
>
xDataList
=
Arrays
.
asList
(
"电梯"
,
"压力容器"
,
"锅炉"
,
"起重机械"
,
"场(厂)内专用"
,
"大型游乐设施"
,
"压力管道"
,
"客运索道"
);
resultMap
.
put
(
"xdata"
,
xDataList
);
List
installNotify
=
new
ArrayList
<>();
List
transformNotify
=
new
ArrayList
<>();
...
...
@@ -1318,47 +1315,42 @@ public class JGDPStatisticsServiceImpl {
* 9000 客运索道
*/
for
(
int
i
=
0
;
i
<
xDataList
.
size
();
i
++)
{
if
(
i
==
0
)
{
installNotify
.
add
(
installCountMap
.
getOrDefault
(
"2300"
,
0
));
transformNotify
.
add
(
reformCountMap
.
getOrDefault
(
"2300"
,
0
));
maintainNotify
.
add
(
maintenanceCountMap
.
getOrDefault
(
"2300"
,
0
));
transloadingNotify
.
add
(
transferCountMap
.
getOrDefault
(
"2300"
,
0
));
}
else
if
(
i
==
1
)
{
if
(
i
==
0
)
{
installNotify
.
add
(
installCountMap
.
getOrDefault
(
"3000"
,
0
));
transformNotify
.
add
(
reformCountMap
.
getOrDefault
(
"3000"
,
0
));
maintainNotify
.
add
(
maintenanceCountMap
.
getOrDefault
(
"3000"
,
0
));
transloadingNotify
.
add
(
transferCountMap
.
getOrDefault
(
"3000"
,
0
));
}
else
if
(
i
==
2
)
{
}
else
if
(
i
==
1
)
{
installNotify
.
add
(
installCountMap
.
getOrDefault
(
"2000"
,
0
));
transformNotify
.
add
(
reformCountMap
.
getOrDefault
(
"2000"
,
0
));
maintainNotify
.
add
(
maintenanceCountMap
.
getOrDefault
(
"2000"
,
0
));
transloadingNotify
.
add
(
transferCountMap
.
getOrDefault
(
"2000"
,
0
));
}
else
if
(
i
==
3
)
{
}
else
if
(
i
==
2
)
{
installNotify
.
add
(
installCountMap
.
getOrDefault
(
"1000"
,
0
));
transformNotify
.
add
(
reformCountMap
.
getOrDefault
(
"1000"
,
0
));
maintainNotify
.
add
(
maintenanceCountMap
.
getOrDefault
(
"1000"
,
0
));
transloadingNotify
.
add
(
transferCountMap
.
getOrDefault
(
"1000"
,
0
));
}
else
if
(
i
==
4
)
{
}
else
if
(
i
==
3
)
{
installNotify
.
add
(
installCountMap
.
getOrDefault
(
"4000"
,
0
));
transformNotify
.
add
(
reformCountMap
.
getOrDefault
(
"4000"
,
0
));
maintainNotify
.
add
(
maintenanceCountMap
.
getOrDefault
(
"4000"
,
0
));
transloadingNotify
.
add
(
transferCountMap
.
getOrDefault
(
"4000"
,
0
));
}
else
if
(
i
==
5
)
{
}
else
if
(
i
==
4
)
{
installNotify
.
add
(
installCountMap
.
getOrDefault
(
"5000"
,
0
));
transformNotify
.
add
(
reformCountMap
.
getOrDefault
(
"5000"
,
0
));
maintainNotify
.
add
(
maintenanceCountMap
.
getOrDefault
(
"5000"
,
0
));
transloadingNotify
.
add
(
transferCountMap
.
getOrDefault
(
"5000"
,
0
));
}
else
if
(
i
==
6
)
{
}
else
if
(
i
==
5
)
{
installNotify
.
add
(
installCountMap
.
getOrDefault
(
"6000"
,
0
));
transformNotify
.
add
(
reformCountMap
.
getOrDefault
(
"6000"
,
0
));
maintainNotify
.
add
(
maintenanceCountMap
.
getOrDefault
(
"6000"
,
0
));
transloadingNotify
.
add
(
transferCountMap
.
getOrDefault
(
"6000"
,
0
));
}
else
if
(
i
==
7
)
{
}
else
if
(
i
==
6
)
{
installNotify
.
add
(
installCountMap
.
getOrDefault
(
"8000"
,
0
));
transformNotify
.
add
(
reformCountMap
.
getOrDefault
(
"8000"
,
0
));
maintainNotify
.
add
(
maintenanceCountMap
.
getOrDefault
(
"8000"
,
0
));
transloadingNotify
.
add
(
transferCountMap
.
getOrDefault
(
"8000"
,
0
));
}
else
if
(
i
==
8
)
{
}
else
if
(
i
==
7
)
{
installNotify
.
add
(
installCountMap
.
getOrDefault
(
"9000"
,
0
));
transformNotify
.
add
(
reformCountMap
.
getOrDefault
(
"9000"
,
0
));
maintainNotify
.
add
(
maintenanceCountMap
.
getOrDefault
(
"9000"
,
0
));
...
...
@@ -1677,4 +1669,92 @@ public class JGDPStatisticsServiceImpl {
return
resultList
;
}
public
Map
<
String
,
Object
>
JGCenterMapCountForGlobal
(
DPFilterParamDto
dpFilterParamDto
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
String
orgCode
=
this
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
());
if
(
StringUtils
.
isEmpty
(
orgCode
))
{
return
new
HashMap
<>();
}
// 0.气瓶数量统计
long
cylinderNum
=
this
.
staticsCenterMapCountDataForCylinder
(
result
,
orgCode
);
// 1.8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
this
.
staticsCenterMapCountDataForEquip
(
result
,
cylinderNum
,
orgCode
);
// 2.压力管道长度统计
this
.
staticsCenterMapCountDataForPipeline
(
result
,
orgCode
);
// 3.已纳管设备总数
this
.
staticsCenterMapCountDataForEquipIsManage
(
result
,
orgCode
);
// 4.登记证总数
this
.
staticsCenterMapCountCertificate
(
result
,
orgCode
);
// 5.超过15年电梯数量
this
.
staticsCenterMapCountDataForOver15Years
(
result
,
orgCode
);
// 6.使用登记办理量
this
.
staticsCenterMapCountDataForUseReg
(
result
,
orgCode
);
// 7.施工告知办理量
this
.
staticsCenterMapCountDataForConstructionNotice
(
result
,
orgCode
);
// 8.变更办理量
this
.
staticsCenterMapCountDataForChange
(
result
,
orgCode
);
return
result
;
}
private
void
staticsCenterMapCountDataForChange
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
Long
num
=
dpStatisticsMapper
.
changeCountByOrgCode
(
orgCode
);
result
.
put
(
DPMapStatisticsItemEnum
.
CHANGE_COUNT
.
getCode
(),
num
);
}
private
void
staticsCenterMapCountDataForConstructionNotice
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
Long
num
=
dpStatisticsMapper
.
constructionNoticeCount
(
orgCode
);
result
.
put
(
DPMapStatisticsItemEnum
.
CONSTRUCTION_NOTICE_COUNT
.
getCode
(),
num
);
}
private
void
staticsCenterMapCountDataForOver15Years
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
String
time
=
LocalDate
.
now
().
minusYears
(
15
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
Long
num
=
dpStatisticsMapper
.
over15yearsCount
(
orgCode
,
time
);
result
.
put
(
DPMapStatisticsItemEnum
.
OVER15YEARS_ELEVATORS
.
getCode
(),
num
);
}
private
void
staticsCenterMapCountDataForUseReg
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
//使用告知
long
num
=
dpStatisticsMapper
.
useCountByOrgCode
(
orgCode
);
result
.
put
(
DPMapStatisticsItemEnum
.
USE_REGISTRATION_COUNT
.
getCode
(),
num
);
}
private
void
staticsCenterMapCountCertificate
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
long
num
=
dpStatisticsMapper
.
certificateCountByOrgCode
(
orgCode
);
result
.
put
(
DPMapStatisticsItemEnum
.
CERTIFICATE_COUNT
.
getCode
(),
num
);
}
private
void
staticsCenterMapCountDataForEquipIsManage
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
long
num
=
0
;
CountRequest
request
=
new
CountRequest
();
request
.
indices
(
"idx_biz_view_jg_all"
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
// 按照管辖机构区域信息模糊查询
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"ORG_BRANCH_CODE.keyword"
,
QueryParser
.
escape
(
orgCode
)
+
"*"
));
// 设备类别精确查询气瓶
boolMust
.
must
(
QueryBuilders
.
termQuery
(
"IS_INTO_MANAGEMENT"
,
true
));
request
.
query
(
boolMust
);
try
{
CountResponse
response
=
restHighLevelClient
.
count
(
request
,
RequestOptions
.
DEFAULT
);
num
=
response
.
getCount
();
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
result
.
put
(
DPMapStatisticsItemEnum
.
DEVICE_COUNT
.
getCode
(),
num
);
}
public
List
<
Map
<
String
,
Object
>>
JGCenterMapCountForOverview
(
DPFilterParamDto
dpFilterParamDto
)
{
List
<
RegionModel
>
regionModels
=
this
.
setRegionIfRootParent
(
dpFilterParamDto
);
List
<
Map
<
String
,
Object
>>
result
=
regionModels
.
parallelStream
().
map
(
r
->
{
DPFilterParamDto
filterParamDto
=
new
DPFilterParamDto
();
filterParamDto
.
setCityCode
(
r
.
getRegionCode
().
toString
());
Map
<
String
,
Object
>
itemResult
=
JGCenterMapCountForGlobal
(
filterParamDto
);
itemResult
.
put
(
"regionCode"
,
r
.
getRegionCode
());
itemResult
.
put
(
"regionName"
,
r
.
getRegionName
());
return
itemResult
;
}).
collect
(
Collectors
.
toList
());
return
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/StCommonServiceImpl.java
View file @
9d67c7d3
...
...
@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
/**
* @author Administrator
...
...
@@ -78,4 +79,9 @@ public class StCommonServiceImpl {
}
return
regionList
;
}
public
List
<
String
>
buildXData
(
List
<
RegionModel
>
regionList
)
{
return
regionList
.
stream
().
map
(
RegionModel:
:
getRegionName
).
collect
(
Collectors
.
toList
());
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/company.json
View file @
9d67c7d3
...
...
@@ -45,7 +45,7 @@
"key"
:
"devtable"
,
"displayName"
:
"设备列表"
,
"renderType"
:
"table"
,
"
formSeq"
:
""
,
"
useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
...
...
@@ -74,12 +74,7 @@
],
"content"
:
{
"keyinfo"
:
{
"status"
:
[
{
"key"
:
"unitType"
,
"label"
:
""
,
"icon"
:
""
,
"value"
:
"success"
},
{
"key"
:
"2"
,
"label"
:
""
,
"icon"
:
""
,
"value"
:
"success"
},
{
"key"
:
"3"
,
"label"
:
"否"
,
"icon"
:
""
,
"value"
:
"error"
},
{
"key"
:
"4"
,
"label"
:
"否"
,
"icon"
:
""
,
"value"
:
"stop"
}
],
"status"
:
[],
"qrcode"
:
{
"title"
:
"监管码"
,
"problem"
:
[]
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/equip_1000.json
View file @
9d67c7d3
...
...
@@ -84,13 +84,27 @@
{
"key"
:
"reghistory"
,
"displayName"
:
"监管履历信息"
,
"renderType"
:
"timeline"
"renderType"
:
"timeline"
,
"useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"apiPath"
:
"/jg/common/equOnJgServiceOperationRecords"
,
"params"
:
{
"record"
:
"{record}"
},
"ruleData"
:
{
"responseSuccess"
:
"data.result"
,
"operater"
:
"content"
}
}
}
},
{
"key"
:
"devtable"
,
"displayName"
:
"问题列表"
,
"renderType"
:
"table"
,
"
formSeq"
:
""
,
"
useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/equip_2000.json
View file @
9d67c7d3
...
...
@@ -88,13 +88,27 @@
{
"key"
:
"reghistory"
,
"displayName"
:
"监管履历信息"
,
"renderType"
:
"timeline"
"renderType"
:
"timeline"
,
"useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"apiPath"
:
"/jg/common/equOnJgServiceOperationRecords"
,
"params"
:
{
"record"
:
"{record}"
},
"ruleData"
:
{
"responseSuccess"
:
"data.result"
,
"operater"
:
"content"
}
}
}
},
{
"key"
:
"devtable"
,
"displayName"
:
"问题列表"
,
"renderType"
:
"table"
,
"
formSeq"
:
""
,
"
useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/equip_3000.json
View file @
9d67c7d3
...
...
@@ -84,13 +84,27 @@
{
"key"
:
"reghistory"
,
"displayName"
:
"监管履历信息"
,
"renderType"
:
"timeline"
"renderType"
:
"timeline"
,
"useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"apiPath"
:
"/jg/common/equOnJgServiceOperationRecords"
,
"params"
:
{
"record"
:
"{record}"
},
"ruleData"
:
{
"responseSuccess"
:
"data.result"
,
"operater"
:
"content"
}
}
}
},
{
"key"
:
"devtable"
,
"displayName"
:
"问题列表"
,
"renderType"
:
"table"
,
"
formSeq"
:
""
,
"
useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/equip_4000.json
View file @
9d67c7d3
...
...
@@ -80,13 +80,27 @@
{
"key"
:
"reghistory"
,
"displayName"
:
"监管履历信息"
,
"renderType"
:
"timeline"
"renderType"
:
"timeline"
,
"useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"apiPath"
:
"/jg/common/equOnJgServiceOperationRecords"
,
"params"
:
{
"record"
:
"{record}"
},
"ruleData"
:
{
"responseSuccess"
:
"data.result"
,
"operater"
:
"content"
}
}
}
},
{
"key"
:
"devtable"
,
"displayName"
:
"问题列表"
,
"renderType"
:
"table"
,
"
formSeq"
:
""
,
"
useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/equip_5000.json
View file @
9d67c7d3
...
...
@@ -76,13 +76,27 @@
{
"key"
:
"reghistory"
,
"displayName"
:
"监管履历信息"
,
"renderType"
:
"timeline"
"renderType"
:
"timeline"
,
"useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"apiPath"
:
"/jg/common/equOnJgServiceOperationRecords"
,
"params"
:
{
"record"
:
"{record}"
},
"ruleData"
:
{
"responseSuccess"
:
"data.result"
,
"operater"
:
"content"
}
}
}
},
{
"key"
:
"devtable"
,
"displayName"
:
"问题列表"
,
"renderType"
:
"table"
,
"
formSeq"
:
""
,
"
useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/equip_6000.json
View file @
9d67c7d3
...
...
@@ -70,13 +70,27 @@
{
"key"
:
"reghistory"
,
"displayName"
:
"监管履历信息"
,
"renderType"
:
"timeline"
"renderType"
:
"timeline"
,
"useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"apiPath"
:
"/jg/common/equOnJgServiceOperationRecords"
,
"params"
:
{
"record"
:
"{record}"
},
"ruleData"
:
{
"responseSuccess"
:
"data.result"
,
"operater"
:
"content"
}
}
}
},
{
"key"
:
"devtable"
,
"displayName"
:
"问题列表"
,
"renderType"
:
"table"
,
"
formSeq"
:
""
,
"
useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/equip_8000.json
View file @
9d67c7d3
...
...
@@ -76,13 +76,27 @@
{
"key"
:
"reghistory"
,
"displayName"
:
"监管履历信息"
,
"renderType"
:
"timeline"
"renderType"
:
"timeline"
,
"useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"apiPath"
:
"/jg/common/equOnJgServiceOperationRecords"
,
"params"
:
{
"record"
:
"{record}"
},
"ruleData"
:
{
"responseSuccess"
:
"data.result"
,
"operater"
:
"content"
}
}
}
},
{
"key"
:
"devtable"
,
"displayName"
:
"问题列表"
,
"renderType"
:
"table"
,
"
formSeq"
:
""
,
"
useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/equip_9000.json
View file @
9d67c7d3
...
...
@@ -76,13 +76,27 @@
{
"key"
:
"reghistory"
,
"displayName"
:
"监管履历信息"
,
"renderType"
:
"timeline"
"renderType"
:
"timeline"
,
"useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
"apiPath"
:
"/jg/common/equOnJgServiceOperationRecords"
,
"params"
:
{
"record"
:
"{record}"
},
"ruleData"
:
{
"responseSuccess"
:
"data.result"
,
"operater"
:
"content"
}
}
}
},
{
"key"
:
"devtable"
,
"displayName"
:
"问题列表"
,
"renderType"
:
"table"
,
"
formSeq"
:
""
,
"
useAloneApi"
:
true
,
"dataConfig"
:
{
"api"
:
{
"httpMethod"
:
"GET"
,
...
...
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 @
9d67c7d3
...
...
@@ -2,8 +2,9 @@ package com.yeejoin.amos.boot.module.ymt.api.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipTechParamPipeline
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
EquipTechParamPipelineMapper
extends
BaseMapper
<
EquipTechParamPipeline
>
{
/**
* 在用的最新需求整理的技术参数--需求未出
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/EquipmentCategoryMapper.java
View file @
9d67c7d3
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto;
import
com.yeejoin.amos.boot.module.ymt.api.dto.UseUnitCreditCodeCategoryDto
;
import
com.yeejoin.amos.boot.module.ymt.api.vo.EquipExportVo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
...
...
@@ -19,6 +20,7 @@ import java.util.Map;
* @author system_generator
* @date 2021-10-20
*/
@Mapper
public
interface
EquipmentCategoryMapper
extends
BaseMapper
<
EquipmentCategory
>
{
@Select
(
"select * from tz_equipment_category where code in('1000','2000','3000','4000','5000','6000','8000','9000')"
)
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/TzBaseEnterpriseInfoMapper.java
View file @
9d67c7d3
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquEnterDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -17,6 +18,7 @@ import java.util.List;
* @author duanwei
* @date 2022-08-10
*/
@Mapper
public
interface
TzBaseEnterpriseInfoMapper
extends
BaseMapper
<
TzBaseEnterpriseInfo
>
{
/**
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/TzsUserInfoMapper.java
View file @
9d67c7d3
...
...
@@ -4,8 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
TzsUserInfoMapper
extends
BaseMapper
<
TzsUserInfo
>
{
Page
<
TzsUserInfoDto
>
selectPageMessage
(
@Param
(
"page"
)
Page
<
TzsUserInfoDto
>
page
,
@Param
(
"dto"
)
TzsUserInfoDto
dto
);
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/CylinderAreaDataMapper.xml
View file @
9d67c7d3
...
...
@@ -146,16 +146,17 @@
SELECT
count(1)
FROM
tz_base_enterprise_info u
tz_base_enterprise_info u
RIGHT JOIN tzs_user_info ui ON ui.unit_code = u.use_unit_code
WHERE
u.data_sources = '陕西省内企业'
AND u.unit_type LIKE'%充装单位%'
AND ui.post like '%6552%'
u.data_sources = '陕西省内企业'
AND u.unit_type LIKE'%充装单位%'
AND ui.post like '%6552%'
and ui.is_delete = false
<if
test=
"orgCodes != null and orgCodes.size > 0"
>
AND
<foreach
collection=
"orgCodes"
open=
"("
item=
"orgCode"
close=
")"
separator=
" or "
>
(u.org_code like concat(#{orgCode}, '%') )
(u.
supervise_
org_code like concat(#{orgCode}, '%') )
</foreach>
</if>
</select>
...
...
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