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
61d7824e
Commit
61d7824e
authored
Oct 24, 2024
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监督管理 / 施工单位施工总量排名
下钻代码提交
parent
4f71da2c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
252 additions
and
4 deletions
+252
-4
JGStatisticsMapper.java
...boot/module/statistics/api/mapper/JGStatisticsMapper.java
+4
-0
JGStatisticsMapper.xml
...tics-api/src/main/resources/mapper/JGStatisticsMapper.xml
+146
-0
JGDPStatisticsController.java
...le/statistcs/biz/controller/JGDPStatisticsController.java
+36
-0
JGDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
+62
-0
JYJCDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/JYJCDPStatisticsServiceImpl.java
+2
-2
YJDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/YJDPStatisticsServiceImpl.java
+2
-2
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/JGStatisticsMapper.java
View file @
61d7824e
...
...
@@ -91,4 +91,8 @@ public interface JGStatisticsMapper {
Page
<
Map
<
String
,
Object
>>
countBizFinishedNumForDPListZXBF
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"dto"
)
DPFilterParamDto
filterParamDto
,
@Param
(
"treeValue"
)
String
treeValue
);
Page
<
Map
<
String
,
Object
>>
countBizFinishedNumForDPListAll
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"dto"
)
DPFilterParamDto
filterParamDto
,
@Param
(
"treeValue"
)
String
treeValue
);
Long
getNoticeCountTopChart
(
@Param
(
"dpFilterParamForDetailDto"
)
DPFilterParamForDetailDto
dpFilterParamForDetailDto
);
Page
<
Map
<
String
,
Object
>>
noticeCountTopPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"dpFilterParamForDetailDto"
)
DPFilterParamForDetailDto
dpFilterParamForDetailDto
);
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/JGStatisticsMapper.xml
View file @
61d7824e
...
...
@@ -2244,4 +2244,150 @@
GROUP BY tjsc.sequence_nbr
</if>
</select>
<select
id=
"getNoticeCountTopChart"
resultType=
"java.lang.Long"
>
SELECT SUM
( T.num ) AS COUNT
FROM
(
SELECT COUNT
( 1 ) AS num,
T.install_unit_name AS company,
T.install_unit_credit_code
FROM
tzs_jg_installation_notice T
WHERE
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' )
GROUP BY
T.install_unit_credit_code UNION ALL
SELECT COUNT
( 1 ) AS num,
T.install_unit_name AS company,
T.install_unit_credit_code
FROM
tzs_jg_maintain_notice T
WHERE
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' )
GROUP BY
T.install_unit_credit_code UNION ALL
SELECT
( 1 ) AS num,
T.install_unit_name AS company,
T.install_unit_credit_code
FROM
tzs_jg_reform_notice T
WHERE
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' )
GROUP BY
T.install_unit_credit_code UNION ALL
SELECT
( 1 ) AS num,
T.install_unit_name AS company,
T.install_unit_credit_code
FROM
tzs_jg_transfer_notice T
WHERE
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' )
GROUP BY
T.install_unit_credit_code
) T
</select>
<select
id=
"noticeCountTopPage"
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 ( T.num, '0' ) AS installCount
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 T
.num AS num,
T.install_unit_credit_code
FROM
(
SELECT COUNT
( 1 ) AS num,
T.install_unit_name AS company,
T.install_unit_credit_code
FROM
tzs_jg_installation_notice T
WHERE
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' )
GROUP BY
T.install_unit_credit_code UNION ALL
SELECT COUNT
( 1 ) AS num,
T.install_unit_name AS company,
T.install_unit_credit_code
FROM
tzs_jg_maintain_notice T
WHERE
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' )
GROUP BY
T.install_unit_credit_code UNION ALL
SELECT
( 1 ) AS num,
T.install_unit_name AS company,
T.install_unit_credit_code
FROM
tzs_jg_reform_notice T
WHERE
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' )
GROUP BY
T.install_unit_credit_code UNION ALL
SELECT
( 1 ) AS num,
T.install_unit_name AS company,
T.install_unit_credit_code
FROM
tzs_jg_transfer_notice T
WHERE
T.receive_company_org_code LIKE CONCAT ( #{dpFilterParamForDetailDto.orgCode}, '%' )
GROUP BY
T.install_unit_credit_code
) T
) T ON T.install_unit_credit_code = tbei.use_unit_code
where tbei.unit_type LIKE'%安装改造维修单位%' and tbei.org_code LIKE CONCAT (#{dpFilterParamForDetailDto.orgCode},'%')
<if
test=
"dpFilterParamForDetailDto.companyName != null and dpFilterParamForDetailDto.companyName != ''"
>
and tbei.use_unit like concat('%',#{dpFilterParamForDetailDto.companyName},'%')
</if>
</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/JGDPStatisticsController.java
View file @
61d7824e
...
...
@@ -343,6 +343,42 @@ public class JGDPStatisticsController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管大屏-右屏-施工单位施工总量排名TOP10图表"
,
notes
=
"监管大屏-右屏-施工单位施工总量排名TOP10图表"
)
@PostMapping
(
value
=
"/noticeCountTopChart"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
noticeCountTopChart
(
@Validated
@RequestBody
DPFilterParamForDetailDto
dpFilterParamForDetailDto
,
BindingResult
result
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
());
}
return
ResponseHelper
.
buildResponse
(
statisticsService
.
noticeCountTopChart
(
dpFilterParamForDetailDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管大屏-右屏-施工单位施工总量排名TOP10类型"
,
notes
=
"监管大屏-右屏-施工单位施工总量排名TOP10类型"
)
@PostMapping
(
value
=
"/noticeCountTopType"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
noticeCountTopType
(
@Validated
@RequestBody
DPFilterParamForDetailDto
dpFilterParamForDetailDto
,
BindingResult
result
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
());
}
return
ResponseHelper
.
buildResponse
(
statisticsService
.
noticeCountTopType
(
dpFilterParamForDetailDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管大屏-右屏-施工单位施工总量排名TOP10下钻列表"
,
notes
=
"监管大屏-右屏-施工单位施工总量排名TOP10下钻列表"
)
@PostMapping
(
value
=
"/noticeCountTopPage"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
noticeCountTopPage
(
@Validated
@RequestBody
DPFilterParamForDetailDto
dpFilterParamDto
,
BindingResult
result
,
@RequestParam
(
value
=
"current"
,
defaultValue
=
"1"
)
Integer
current
,
@RequestParam
(
value
=
"size"
,
defaultValue
=
"20"
)
Integer
size
)
{
List
<
FieldError
>
fieldErrors
=
result
.
getFieldErrors
();
if
(!
fieldErrors
.
isEmpty
())
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
());
}
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
return
ResponseHelper
.
buildResponse
(
statisticsService
.
noticeCountTopPage
(
page
,
dpFilterParamDto
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管大屏-右屏-近30天办结率下钻类型"
,
notes
=
"监管大屏-右屏-近30天办结率下钻类型"
)
@PostMapping
(
value
=
"/getBusinessType"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getBusinessType
(
@Validated
@RequestBody
DPFilterParamForDetailDto
dpFilterParamForDetailDto
,
BindingResult
result
)
{
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
View file @
61d7824e
...
...
@@ -1697,6 +1697,68 @@ public class JGDPStatisticsServiceImpl {
return
jgStatisticsMapper
.
selectNoticeCountTopTen
(
orgCode
,
time
);
}
public
Map
<
String
,
Object
>
noticeCountTopChart
(
DPFilterParamForDetailDto
dpFilterParamForDetailDto
)
{
List
<
RegionModel
>
regionModels
=
stCommonService
.
setRegionIfRootParent
(
dpFilterParamForDetailDto
.
getCityCode
());
List
<
Map
<
String
,
Object
>>
result
=
regionModels
.
parallelStream
().
map
(
r
->
{
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
r
.
getRegionCode
()+
""
);
DPFilterParamForDetailDto
dpFilterParamForDetailDtoForSearch
=
new
DPFilterParamForDetailDto
();
dpFilterParamForDetailDtoForSearch
.
setOrgCode
(
orgCode
);
dpFilterParamForDetailDtoForSearch
.
setCityCode
(
r
.
getRegionCode
()+
""
);
Map
<
String
,
Object
>
itemResult
=
new
HashMap
<>();
itemResult
.
put
(
"xdata"
,
r
.
getRegionName
());
getNoticeCountTopChart
(
itemResult
,
dpFilterParamForDetailDtoForSearch
);
return
itemResult
;
}).
collect
(
Collectors
.
toList
());
Map
<
String
,
Object
>
returnMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
legendData
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"dataKey"
,
"count"
);
map
.
put
(
"value"
,
"施工数量"
);
map
.
put
(
"chartType"
,
"bar"
);
legendData
.
add
(
map
);
returnMap
.
put
(
"legendData"
,
legendData
);
List
xdata
=
new
ArrayList
();
List
count
=
new
ArrayList
();
for
(
int
i
=
0
;
i
<
result
.
size
();
i
++){
xdata
.
add
(
result
.
get
(
i
).
get
(
"xdata"
));
count
.
add
(
result
.
get
(
i
).
get
(
"count"
)
==
null
?
"0"
:
result
.
get
(
i
).
get
(
"count"
));
}
returnMap
.
put
(
"xdata"
,
xdata
);
returnMap
.
put
(
"count"
,
count
);
return
returnMap
;
}
public
Page
<
Map
<
String
,
Object
>>
noticeCountTopPage
(
Page
<
Map
<
String
,
Object
>>
page
,
DPFilterParamForDetailDto
dpFilterParamForDetailDto
)
{
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamForDetailDto
.
getCityCode
());
dpFilterParamForDetailDto
.
setOrgCode
(
orgCode
);
return
jgStatisticsMapper
.
noticeCountTopPage
(
page
,
dpFilterParamForDetailDto
);
}
public
List
<
Map
<
String
,
Object
>>
noticeCountTopType
(
DPFilterParamForDetailDto
dpFilterParamForDetailDto
)
{
List
<
Map
<
String
,
Object
>>
enumList
=
new
ArrayList
<>();
Map
<
String
,
Object
>
enumMap
=
new
HashMap
<>();
enumMap
.
put
(
"title"
,
"安装改造维修单位"
);
enumMap
.
put
(
"value"
,
"安装改造维修单位"
);
enumList
.
add
(
enumMap
);
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"title"
,
"业务类型"
);
map
.
put
(
"value"
,
"0"
);
map
.
put
(
"children"
,
enumList
);
result
.
add
(
map
);
return
result
;
}
private
void
getNoticeCountTopChart
(
Map
<
String
,
Object
>
itemResult
,
DPFilterParamForDetailDto
dpFilterParamForDetailDto
)
{
Long
count
=
jgStatisticsMapper
.
getNoticeCountTopChart
(
dpFilterParamForDetailDto
);
itemResult
.
put
(
"count"
,
count
);
}
private
List
<
Long
>
countBizFinishedNumForDetail
(
DPFilterParamDto
dpFilterParamDto
,
String
businessType
)
{
// 1.统计各业务办理量注意要和x轴顺序一致
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
());
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/JYJCDPStatisticsServiceImpl.java
View file @
61d7824e
...
...
@@ -402,8 +402,8 @@ public class JYJCDPStatisticsServiceImpl {
for
(
int
i
=
0
;
i
<
result
.
size
();
i
++){
xdata
.
add
(
result
.
get
(
i
).
get
(
"xdata"
));
inspectionCount
.
add
(
result
.
get
(
i
).
get
(
"inspectionCount"
)
==
null
?
0
:
result
.
get
(
i
).
get
(
"inspectionCount"
));
inspectionFinishCount
.
add
(
result
.
get
(
i
).
get
(
"inspectionFinishCount"
)
==
null
?
0
:
result
.
get
(
i
).
get
(
"inspectionFinishCount"
));
inspectionCount
.
add
(
result
.
get
(
i
).
get
(
"inspectionCount"
)
==
null
?
"0"
:
result
.
get
(
i
).
get
(
"inspectionCount"
));
inspectionFinishCount
.
add
(
result
.
get
(
i
).
get
(
"inspectionFinishCount"
)
==
null
?
"0"
:
result
.
get
(
i
).
get
(
"inspectionFinishCount"
));
}
returnMap
.
put
(
"xdata"
,
xdata
);
...
...
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/YJDPStatisticsServiceImpl.java
View file @
61d7824e
...
...
@@ -353,8 +353,8 @@ public class YJDPStatisticsServiceImpl {
for
(
int
i
=
0
;
i
<
result
.
size
();
i
++){
xdata
.
add
(
result
.
get
(
i
).
get
(
"xdata"
));
count
.
add
(
result
.
get
(
i
).
get
(
"count"
)
==
null
?
0
:
result
.
get
(
i
).
get
(
"count"
));
avgTime
.
add
(
result
.
get
(
i
).
get
(
"avgTime"
)
==
null
?
0
:
result
.
get
(
i
).
get
(
"avgTime"
));
count
.
add
(
result
.
get
(
i
).
get
(
"count"
)
==
null
?
"0"
:
result
.
get
(
i
).
get
(
"count"
));
avgTime
.
add
(
result
.
get
(
i
).
get
(
"avgTime"
)
==
null
?
"0"
:
result
.
get
(
i
).
get
(
"avgTime"
));
}
returnMap
.
put
(
"xdata"
,
xdata
);
...
...
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