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
541d20d0
Commit
541d20d0
authored
Oct 25, 2024
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
施工单位施工总量排名TOP10下钻列表
代码修改
parent
cc5ca27f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
141 additions
and
94 deletions
+141
-94
CylinderStatisticsMapper.java
...odule/statistics/api/mapper/CylinderStatisticsMapper.java
+2
-0
CylinderStatisticsMapper.xml
...pi/src/main/resources/mapper/CylinderStatisticsMapper.xml
+123
-88
CylinderDPStatisticsServiceImpl.java
...tcs/biz/service/impl/CylinderDPStatisticsServiceImpl.java
+16
-6
No files found.
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 @
541d20d0
...
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -52,4 +53,5 @@ public interface CylinderStatisticsMapper {
Long
countOffloading
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
);
Page
<
Map
<
String
,
Object
>>
getNormalPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"dpFilterParamForDetailDto"
)
DPFilterParamForDetailDto
dpFilterParamForDetailDto
);
List
<
Map
<
String
,
Object
>>
getNormalByUnitCode
(
@Param
(
"unitCodeList"
)
List
<
String
>
unitCodeList
,
@Param
(
"dpFilterParamForDetailDto"
)
DPFilterParamForDetailDto
dpFilterParamForDetailDto
);
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/CylinderStatisticsMapper.xml
View file @
541d20d0
...
...
@@ -130,98 +130,20 @@
</select>
<select
id=
"getNormalPage"
resultType=
"java.util.Map"
>
SELECT
tbei.use_unit_code AS useUnitCode,
tbei.unit_type AS unitType,
tbei.use_unit AS useUnit,
concat(tbei.province,tbei.city,tbei.district) AS region,
tbei.address AS address,
tbei.legal_person AS legalPerson,
tbei.use_unit_certificate AS useUnitCertificate,
tbei.supervise_org_name AS superviseOrgName,
l.expiry_date AS expiryDate,
IFNULL ( u."userCount", '0' ) AS userCount,
IFNULL ( e."equipCount", '0' ) AS equipCount,
IFNULL ( f."fillingCount", '0' ) AS fillingCount,
IFNULL ( co."offloadingVolume", '0' ) AS offloadingVolume
tbei.use_unit_code AS useNnitCode
FROM
tz_base_enterprise_info tbei
LEFT JOIN ( SELECT * FROM tz_base_unit_licence GROUP BY unit_code ORDER BY expiry_date DESC ) AS l ON
l.unit_code = tbei.use_unit_code
LEFT JOIN (
SELECT
tbei.use_unit_code AS useNnitCode,
COUNT ( 1 ) AS userCount
FROM
tz_base_enterprise_info tbei
INNER JOIN tzs_user_info ui ON tbei.use_unit_code = ui.unit_code
where
tbei.unit_type LIKE'%充装单位%'
GROUP BY
tbei.use_unit_code
) u ON u."useNnitCode" = tbei.use_unit_code
LEFT JOIN (
SELECT
tbei.use_unit_code AS useNnitCode,
COUNT ( 1 ) AS equipCount
FROM
tz_base_enterprise_info tbei
INNER JOIN idx_biz_jg_use_info jui ON tbei.use_unit_code = jui.USE_UNIT_CREDIT_CODE
LEFT JOIN idx_biz_jg_other_info joi ON joi.RECORD = jui.RECORD
AND joi.SUPERVISORY_CODE IS NOT NULL
AND joi.SUPERVISORY_CODE != ''
AND joi.SUPERVISORY_CODE != 'null'
where
tbei.unit_type LIKE'%充装单位%'
GROUP BY
tbei.use_unit_code
) e ON e."useNnitCode" = tbei.use_unit_code
LEFT JOIN (
SELECT
IFNULL ( SUM ( cfr.filling_quantity ), 0 ) AS fillingCount,
tbei.use_unit_code AS useNnitCode
FROM
tz_base_enterprise_info tbei
INNER JOIN tz_cylinder_filling_record cfr ON tbei.app_id = cfr.app_id
left join idx_biz_jg_factory_info jfi ON cfr.sequence_code = CONCAT(jfi.PRODUCE_UNIT_CREDIT_CODE,'-',jfi.FACTORY_NUM)
left join idx_biz_jg_tech_params_vessel jtpv ON jtpv.RECORD = jfi.RECORD
WHERE
tbei.unit_type LIKE'%充装单位%'
<if
test=
"dpFilterParamForDetailDto.fillingMedium != null and dpFilterParamForDetailDto.fillingMedium != ''"
>
AND jtpv.CHARGING_MEDIUM = #{dpFilterParamForDetailDto.fillingMedium}
INNER JOIN tz_cylinder_offloading co ON tbei.app_id = co.app_id
WHERE
tbei.unit_type LIKE'%充装单位%'
<if
test=
"dpFilterParamForDetailDto.timeSearchOne != null"
>
<if
test=
"dpFilterParamForDetailDto.timeSearchOne.beginDate != null and dpFilterParamForDetailDto.timeSearchOne.beginDate != ''"
>
and date_ge(CAST(co.statistics_sync_date as date),#{dpFilterParamForDetailDto.timeSearchOne.beginDate})
</if>
<if
test=
"dpFilterParamForDetailDto.timeSearchOne != null"
>
<if
test=
"dpFilterParamForDetailDto.timeSearchOne.beginDate != null and dpFilterParamForDetailDto.timeSearchOne.beginDate != ''"
>
and date_ge(CAST(cfr.filling_endtime as date),#{dpFilterParamForDetailDto.timeSearchOne.beginDate})
</if>
<if
test=
"dpFilterParamForDetailDto.timeSearchOne.endDate != null and dpFilterParamForDetailDto.timeSearchOne.endDate != ''"
>
and date_le(CAST(cfr.filling_endtime as date),#{dpFilterParamForDetailDto.timeSearchOne.endDate})
</if>
<if
test=
"dpFilterParamForDetailDto.timeSearchOne.endDate != null and dpFilterParamForDetailDto.timeSearchOne.endDate != ''"
>
and date_le(CAST(co.statistics_sync_date as date),#{dpFilterParamForDetailDto.timeSearchOne.endDate})
</if>
GROUP BY
tbei.use_unit_code
) f ON f."useNnitCode" = tbei.use_unit_code
LEFT JOIN (
SELECT
IFNULL ( SUM ( co.offloading_volume ), 0 ) AS offloadingVolume,
tbei.use_unit_code AS useNnitCode
FROM
tz_base_enterprise_info tbei
INNER JOIN tz_cylinder_offloading co ON tbei.app_id = co.app_id
WHERE
tbei.unit_type LIKE'%充装单位%'
<if
test=
"dpFilterParamForDetailDto.timeSearchOne != null"
>
<if
test=
"dpFilterParamForDetailDto.timeSearchOne.beginDate != null and dpFilterParamForDetailDto.timeSearchOne.beginDate != ''"
>
and date_ge(CAST(co.statistics_sync_date as date),#{dpFilterParamForDetailDto.timeSearchOne.beginDate})
</if>
<if
test=
"dpFilterParamForDetailDto.timeSearchOne.endDate != null and dpFilterParamForDetailDto.timeSearchOne.endDate != ''"
>
and date_le(CAST(co.statistics_sync_date as date),#{dpFilterParamForDetailDto.timeSearchOne.endDate})
</if>
</if>
GROUP BY
tbei.use_unit_code
) co ON co."useNnitCode" = tbei.use_unit_code
WHERE
tbei.unit_type LIKE'%充装单位%'
</if>
<if
test=
"dpFilterParamForDetailDto.orgCode != null and dpFilterParamForDetailDto.orgCode != '' "
>
AND tbei.supervise_org_code like concat(#{dpFilterParamForDetailDto.orgCode},'%')
</if>
...
...
@@ -234,5 +156,118 @@
<if
test=
"dpFilterParamForDetailDto.companyName != null and dpFilterParamForDetailDto.companyName != '' "
>
AND tbei.use_unit LIKE concat ( '%', #{dpFilterParamForDetailDto.companyName}, '%' )
</if>
GROUP BY
tbei.use_unit_code
</select>
<select
id=
"getNormalByUnitCode"
resultType=
"java.util.Map"
>
SELECT
tbei.use_unit_code AS useUnitCode,
tbei.unit_type AS unitType,
tbei.use_unit AS useUnit,
concat(tbei.province,tbei.city,tbei.district) AS region,
tbei.address AS address,
tbei.legal_person AS legalPerson,
tbei.use_unit_certificate AS useUnitCertificate,
tbei.supervise_org_name AS superviseOrgName,
l.expiry_date AS expiryDate,
IFNULL ( u."userCount", '0' ) AS userCount,
IFNULL ( e."equipCount", '0' ) AS equipCount,
IFNULL ( f."fillingCount", '0' ) AS fillingCount,
IFNULL ( co."offloadingVolume", '0' ) AS offloadingVolume
FROM
tz_base_enterprise_info tbei
LEFT JOIN ( SELECT * FROM tz_base_unit_licence GROUP BY unit_code ORDER BY expiry_date DESC ) AS l ON
l.unit_code = tbei.use_unit_code
LEFT JOIN (
SELECT
tbei.use_unit_code AS useNnitCode,
COUNT ( 1 ) AS userCount
FROM
tz_base_enterprise_info tbei
INNER JOIN tzs_user_info ui ON tbei.use_unit_code = ui.unit_code
where
tbei.unit_type LIKE'%充装单位%'
GROUP BY
tbei.use_unit_code
) u ON u."useNnitCode" = tbei.use_unit_code
LEFT JOIN (
SELECT
tbei.use_unit_code AS useNnitCode,
COUNT ( 1 ) AS equipCount
FROM
tz_base_enterprise_info tbei
INNER JOIN idx_biz_jg_use_info jui ON tbei.use_unit_code = jui.USE_UNIT_CREDIT_CODE
LEFT JOIN idx_biz_jg_other_info joi ON joi.RECORD = jui.RECORD
AND joi.SUPERVISORY_CODE IS NOT NULL
AND joi.SUPERVISORY_CODE != ''
AND joi.SUPERVISORY_CODE != 'null'
where
tbei.unit_type LIKE'%充装单位%'
GROUP BY
tbei.use_unit_code
) e ON e."useNnitCode" = tbei.use_unit_code
LEFT JOIN (
SELECT
IFNULL ( SUM ( cfr.filling_quantity ), 0 ) AS fillingCount,
tbei.use_unit_code AS useNnitCode
FROM
tz_base_enterprise_info tbei
INNER JOIN tz_cylinder_filling_record cfr ON tbei.app_id = cfr.app_id
left join idx_biz_jg_factory_info jfi ON cfr.sequence_code = CONCAT(jfi.PRODUCE_UNIT_CREDIT_CODE,'-',jfi.FACTORY_NUM)
left join idx_biz_jg_tech_params_vessel jtpv ON jtpv.RECORD = jfi.RECORD
WHERE
tbei.unit_type LIKE'%充装单位%'
<if
test=
"dpFilterParamForDetailDto.fillingMedium != null and dpFilterParamForDetailDto.fillingMedium != ''"
>
AND jtpv.CHARGING_MEDIUM = #{dpFilterParamForDetailDto.fillingMedium}
</if>
<if
test=
"dpFilterParamForDetailDto.timeSearchOne != null"
>
<if
test=
"dpFilterParamForDetailDto.timeSearchOne.beginDate != null and dpFilterParamForDetailDto.timeSearchOne.beginDate != ''"
>
and date_ge(CAST(cfr.filling_endtime as date),#{dpFilterParamForDetailDto.timeSearchOne.beginDate})
</if>
<if
test=
"dpFilterParamForDetailDto.timeSearchOne.endDate != null and dpFilterParamForDetailDto.timeSearchOne.endDate != ''"
>
and date_le(CAST(cfr.filling_endtime as date),#{dpFilterParamForDetailDto.timeSearchOne.endDate})
</if>
</if>
GROUP BY
tbei.use_unit_code
) f ON f."useNnitCode" = tbei.use_unit_code
LEFT JOIN (
SELECT
IFNULL ( SUM ( co.offloading_volume ), 0 ) AS offloadingVolume,
tbei.use_unit_code AS useNnitCode
FROM
tz_base_enterprise_info tbei
INNER JOIN tz_cylinder_offloading co ON tbei.app_id = co.app_id
WHERE
tbei.unit_type LIKE'%充装单位%'
<if
test=
"dpFilterParamForDetailDto.timeSearchOne != null"
>
<if
test=
"dpFilterParamForDetailDto.timeSearchOne.beginDate != null and dpFilterParamForDetailDto.timeSearchOne.beginDate != ''"
>
and date_ge(CAST(co.statistics_sync_date as date),#{dpFilterParamForDetailDto.timeSearchOne.beginDate})
</if>
<if
test=
"dpFilterParamForDetailDto.timeSearchOne.endDate != null and dpFilterParamForDetailDto.timeSearchOne.endDate != ''"
>
and date_le(CAST(co.statistics_sync_date as date),#{dpFilterParamForDetailDto.timeSearchOne.endDate})
</if>
</if>
GROUP BY
tbei.use_unit_code
) co ON co."useNnitCode" = tbei.use_unit_code
WHERE
tbei.unit_type LIKE'%充装单位%'
<if
test=
"dpFilterParamForDetailDto.orgCode != null and dpFilterParamForDetailDto.orgCode != '' "
>
AND tbei.supervise_org_code like concat(#{dpFilterParamForDetailDto.orgCode},'%')
</if>
<if
test=
"dpFilterParamForDetailDto.isDock == 0"
>
AND ( fillingCount is null and offloadingVolume is null )
</if>
<if
test=
"dpFilterParamForDetailDto.isDock == 1"
>
AND ( fillingCount is not null OR offloadingVolume is not null )
</if>
<if
test=
"dpFilterParamForDetailDto.companyName != null and dpFilterParamForDetailDto.companyName != '' "
>
AND tbei.use_unit LIKE concat ( '%', #{dpFilterParamForDetailDto.companyName}, '%' )
</if>
and tbei.use_unit_code in
<foreach
collection=
"unitCodeList"
item=
"unitCode"
separator=
","
open=
"("
close=
")"
>
#{unitCode}
</foreach>
</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/service/impl/CylinderDPStatisticsServiceImpl.java
View file @
541d20d0
...
...
@@ -956,16 +956,26 @@ public class CylinderDPStatisticsServiceImpl {
public
Page
<
Map
<
String
,
Object
>>
normalPage
(
Page
<
Map
<
String
,
Object
>>
page
,
DPFilterParamForDetailDto
dpFilterParamForDetailDto
)
{
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamForDetailDto
.
getCityCode
());
dpFilterParamForDetailDto
.
setOrgCode
(
orgCode
);
Page
<
Map
<
String
,
Object
>>
list
=
cylinderStatisticsMapper
.
getNormalPage
(
page
,
dpFilterParamForDetailDto
);
Page
<
Map
<
String
,
Object
>>
returnPage
=
cylinderStatisticsMapper
.
getNormalPage
(
page
,
dpFilterParamForDetailDto
);
List
<
String
>
unitCodeList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
returnPage
.
getRecords
().
size
();
i
++){
unitCodeList
.
add
(
returnPage
.
getRecords
().
get
(
i
).
get
(
"useUnitCode"
).
toString
());
}
if
(
org
.
apache
.
commons
.
collections
.
CollectionUtils
.
isEmpty
(
unitCodeList
)){
return
page
;
}
List
<
Map
<
String
,
Object
>>
list
=
cylinderStatisticsMapper
.
getNormalByUnitCode
(
unitCodeList
,
dpFilterParamForDetailDto
);
for
(
int
i
=
0
;
i
<
list
.
getRecords
().
size
();
i
++){
if
(
"0.0"
.
equals
(
list
.
get
Records
().
get
(
i
).
get
(
"fillingCount"
)+
""
)
&&
"0.0"
.
equals
(
list
.
getRecords
()
.
get
(
i
).
get
(
"offloadingVolume"
)+
""
)){
list
.
get
Records
().
get
(
i
).
put
(
"isDock"
,
"未对接"
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
if
(
"0.0"
.
equals
(
list
.
get
(
i
).
get
(
"fillingCount"
)+
""
)
&&
"0.0"
.
equals
(
list
.
get
(
i
).
get
(
"offloadingVolume"
)+
""
)){
list
.
get
(
i
).
put
(
"isDock"
,
"未对接"
);
}
else
{
list
.
get
Records
().
get
(
i
).
put
(
"isDock"
,
"对接"
);
list
.
get
(
i
).
put
(
"isDock"
,
"对接"
);
}
}
return
list
;
returnPage
.
setRecords
(
list
);
return
returnPage
;
}
public
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
normalSearch
(
DPFilterParamForDetailDto
dpFilterParamForDetailDto
)
{
...
...
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