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
d367cae8
Commit
d367cae8
authored
Dec 05, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg):行政审批局
1.大屏统计办理时效统计,统计维度由接收机构的单位orgcode调整为使用单位的管辖和使用办理的设备数情况统计保持一致
parent
35fd5b93
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
204 additions
and
77 deletions
+204
-77
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+1
-1
CommonBaseMapper.java
...s/boot/module/statistics/api/mapper/CommonBaseMapper.java
+10
-0
JGStatisticsMapper.java
...boot/module/statistics/api/mapper/JGStatisticsMapper.java
+1
-2
CommonBaseMapper.xml
...istics-api/src/main/resources/mapper/CommonBaseMapper.xml
+9
-0
JGStatisticsMapper.xml
...tics-api/src/main/resources/mapper/JGStatisticsMapper.xml
+140
-59
JGDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
+3
-3
StCommonServiceImpl.java
...odule/statistcs/biz/service/impl/StCommonServiceImpl.java
+40
-12
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
d367cae8
...
...
@@ -3560,7 +3560,7 @@
from
privilege_company
where
company_code = #{receiveCompanyCode}
company_code = #{receiveCompanyCode}
and is_deleted = false
</select>
<select
id=
"querySupervisionCompanyCode"
resultType=
"java.lang.String"
>
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/mapper/CommonBaseMapper.java
View file @
d367cae8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistics
.
api
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* Mapper 接口
...
...
@@ -14,4 +15,13 @@ public interface CommonBaseMapper {
String
getOrgCodeByCompanyCode
(
String
companyCode
);
String
getCompanyCodeByOrgCode
(
String
orgCode
);
/**
* 按照 地市或者区县查询对应行政区划seq
*
* @param receiveCompanyCode 地市或者区县companyCode
* @return 地市对应行政区划seq
*/
String
selectCompanyRegionSeq
(
@Param
(
"receiveCompanyCode"
)
String
receiveCompanyCode
);
}
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 @
d367cae8
...
...
@@ -74,8 +74,7 @@ public interface JGStatisticsMapper {
/**
* 告知类业务平均办理时效,统计维度:接收机构所在的行政区域;
* 由于告知类,接收机构为监管机构,receive_company_org_code为监管机构的orgCode,故还保持使用receive_company_org_code匹配orgCode即可
* @param dpFilterParamDto 过滤条件
* @param dpFilterParamDto 过滤条件
* @param orgCode 登录人或者选择区域转换后的orgCode
* @return 告知类业务平均办理时效
*/
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/CommonBaseMapper.xml
View file @
d367cae8
...
...
@@ -9,4 +9,13 @@
<select
id=
"getCompanyCodeByOrgCode"
resultType=
"java.lang.String"
>
select company_code from privilege_company where org_code = #{orgCode} limit 1
</select>
<select
id=
"selectCompanyRegionSeq"
resultType=
"java.lang.String"
>
select
region_seq
from
privilege_company
where
company_code = #{receiveCompanyCode} and is_deleted = false
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/JGStatisticsMapper.xml
View file @
d367cae8
...
...
@@ -669,67 +669,119 @@
<select
id=
"queryNoticeAvgDayByReceiveCompany"
resultType=
"com.yeejoin.amos.boot.biz.common.dto.CountDto"
>
SELECT
round(avg(T.handle_date::date - T.notice_date::date + 1),1) as strValue,
T.receive_
company_org
_code AS keyStr
T.receive_
org_credit
_code AS keyStr
FROM
tzs_jg_installation_notice T
WHERE
T.notice_status = 6616
and bi.supervise_org_code like concat(#{orgCode}, '%')
<choose>
<when
test=
'dto.cityCode != null and dto.cityCode == "610000"'
>
and 1=1
</when>
<otherwise>
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and T.receive_org_credit_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if
test=
"dto.beginDate !=null and dto.beginDate !=''"
>
and date_ge(CAST(T.notice_date as date),#{dto.beginDate})
</if>
<if
test=
"dto.endDate !=null and dto.endDate !=''"
>
and date_le(CAST(T.notice_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_
company_org
_code
GROUP BY T.receive_
org_credit
_code
union all
SELECT
round(avg(T.accept_date::date - T.notice_date::date + 1),1) as strValue,
T.receive_company_
org_
code AS keyStr
T.receive_company_code AS keyStr
FROM
tzs_jg_maintain_notice T
WHERE
T.notice_status = 6616
and bi.supervise_org_code like concat(#{orgCode}, '%')
<choose>
<when
test=
'dto.cityCode != null and dto.cityCode == "610000"'
>
and 1=1
</when>
<otherwise>
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and T.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if
test=
"dto.beginDate !=null and dto.beginDate !=''"
>
and date_ge(CAST(T.notice_date as date),#{dto.beginDate})
</if>
<if
test=
"dto.endDate !=null and dto.endDate !=''"
>
and date_le(CAST(T.notice_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_company_
org_
code
GROUP BY T.receive_company_code
union all
SELECT
round(avg(T.accept_date::date - T.notice_date::date + 1),1) as strValue,
T.receive_company_
org_
code AS keyStr
T.receive_company_code AS keyStr
FROM
tzs_jg_reform_notice T
WHERE
T.notice_status = 6616
and bi.supervise_org_code like concat(#{orgCode}, '%')
<choose>
<when
test=
'dto.cityCode != null and dto.cityCode == "610000"'
>
and 1=1
</when>
<otherwise>
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and T.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if
test=
"dto.beginDate !=null and dto.beginDate !=''"
>
and date_ge(CAST(T.notice_date as date),#{dto.beginDate})
</if>
<if
test=
"dto.endDate !=null and dto.endDate !=''"
>
and date_le(CAST(T.notice_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_company_
org_
code
GROUP BY T.receive_company_code
union all
SELECT
round(avg(T.handle_date::date - T.notice_date::date + 1),1) as strValue,
T.receive_company_
org_
code AS keyStr
T.receive_company_code AS keyStr
FROM
tzs_jg_transfer_notice T
WHERE
T.notice_status = 6616
and bi.supervise_org_code like concat(#{orgCode}, '%')
<choose>
<when
test=
'dto.cityCode != null and dto.cityCode == "610000"'
>
and 1=1
</when>
<otherwise>
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and T.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if
test=
"dto.beginDate !=null and dto.beginDate !=''"
>
and date_ge(CAST(T.notice_date as date),#{dto.beginDate})
</if>
<if
test=
"dto.endDate !=null and dto.endDate !=''"
>
and date_le(CAST(T.notice_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_company_
org_
code
GROUP BY T.receive_company_code
</select>
<select
id=
"queryUseAvgDayByReceiveCompany"
resultType=
"com.yeejoin.amos.boot.biz.common.dto.CountDto"
>
SELECT
...
...
@@ -744,11 +796,13 @@
and 1=1
</when>
<otherwise>
and T.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and T.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if
test=
"dto.beginDate !=null and dto.beginDate !=''"
>
...
...
@@ -771,11 +825,13 @@
and 1=1
</when>
<otherwise>
and T.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and T.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if
test=
"dto.beginDate !=null and dto.beginDate !=''"
>
...
...
@@ -799,11 +855,13 @@
and 1=1
</when>
<otherwise>
and crn.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and crn.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
and crn.apply_date is not null
...
...
@@ -823,14 +881,27 @@
tzs_jg_change_registration_reform T
WHERE
T.audit_status = '已完成'
and bi.supervise_org_code like concat(#{orgCode},'%')
<choose>
<when
test=
'dto.cityCode != null and dto.cityCode == "610000"'
>
and 1=1
</when>
<otherwise>
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and T.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if
test=
"dto.beginDate !=null and dto.beginDate !=''"
>
and date_ge(CAST(T.reg_date as date),#{dto.beginDate})
</if>
<if
test=
"dto.endDate !=null and dto.endDate !=''"
>
and date_le(CAST(T.reg_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_company_
org_
code
GROUP BY T.receive_company_code
union all
SELECT
round(avg(T.audit_pass_date::date - T.reg_date::date + 1),1) as strValue,
...
...
@@ -844,11 +915,13 @@
and 1=1
</when>
<otherwise>
and T.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and T.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if
test=
"dto.beginDate !=null and dto.beginDate !=''"
>
...
...
@@ -871,11 +944,13 @@
and 1=1
</when>
<otherwise>
and T.receive_org_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and T.receive_org_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if
test=
"dto.beginDate !=null and dto.beginDate !=''"
>
...
...
@@ -888,7 +963,7 @@
union all
SELECT
round(avg(T.audit_pass_date::date - T.apply_date::date + 1),1) as strValue,
T.receive_org_code AS keyStr
T.receive_org_code AS keyStr
FROM
tzs_jg_change_vehicle_registration_unit T
WHERE
...
...
@@ -898,11 +973,13 @@
and 1=1
</when>
<otherwise>
and T.receive_org_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and T.receive_org_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if
test=
"dto.beginDate !=null and dto.beginDate !=''"
>
...
...
@@ -921,7 +998,7 @@
(
SELECT
crn.sequence_nbr,
crn.receive_
org
_code,
crn.receive_
company
_code,
crn.audit_pass_date,
crn.apply_date
FROM
...
...
@@ -933,11 +1010,13 @@
and 1=1
</when>
<otherwise>
and crn.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and crn.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if
test=
"dto.beginDate !=null and dto.beginDate !=''"
>
...
...
@@ -953,12 +1032,12 @@
<select
id=
"queryCancelAvgDayByReceiveCompany"
resultType=
"com.yeejoin.amos.boot.biz.common.dto.CountDto"
>
SELECT
round(avg(T.audit_pass_date::date - T.create_date::date + 1),1) as strValue,
T.receive_
company
_code AS keyStr
T.receive_
org
_code AS keyStr
FROM
(
SELECT
crn.sequence_nbr,
crn.receive_org_code
as receive_company_code
,
crn.receive_org_code,
crn.audit_pass_date,
crn.create_date
FROM
...
...
@@ -970,11 +1049,13 @@
and 1=1
</when>
<otherwise>
and crn.receive_company_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
<if
test=
"dto.companyCodes != null and dto.companyCodes.size > 0"
>
and crn.receive_org_code = ANY(ARRAY[
<foreach
collection=
"dto.companyCodes"
item=
"companyCode"
separator=
","
>
#{companyCode}
</foreach>
])
</if>
</otherwise>
</choose>
<if
test=
"dto.beginDate !=null and dto.beginDate !=''"
>
...
...
@@ -984,7 +1065,7 @@
and date_le(CAST(T.create_date as date),#{dto.endDate})
</if>
) T
GROUP BY T.receive_
company
_code
GROUP BY T.receive_
org
_code
</select>
<select
id=
"selectAZNoticeDetailList"
resultType=
"java.util.Map"
>
SELECT
...
...
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 @
d367cae8
...
...
@@ -1313,9 +1313,9 @@ public class JGDPStatisticsServiceImpl {
List
<
String
>
yData
=
new
ArrayList
<>();
regionModels
.
forEach
(
r
->
{
xData
.
add
(
r
.
getRegionName
());
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
r
.
getRegionCode
().
toString
()
);
if
(!
ValidationUtil
.
isEmpty
(
orgCode
))
{
yData
.
add
(
this
.
avgAndSumDealDate
(
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
contains
(
orgCode
)).
collect
(
Collectors
.
toList
())));
String
selfAndChildRegion
=
stCommonService
.
getSelfAndChildRegion
(
r
);
if
(!
ValidationUtil
.
isEmpty
(
selfAndChildRegion
))
{
yData
.
add
(
this
.
avgAndSumDealDate
(
countDtos
.
stream
().
filter
(
c
->
selfAndChildRegion
.
contains
(
stCommonService
.
castCompanyCode2RegionCode
(
c
.
getKeyStr
())
)).
collect
(
Collectors
.
toList
())));
}
else
{
yData
.
add
(
"0"
);
}
...
...
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 @
d367cae8
...
...
@@ -22,6 +22,7 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipTechParamPipelineMapper;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
lombok.Getter
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.lucene.queryparser.classic.QueryParser
;
import
org.apache.lucene.search.join.ScoreMode
;
...
...
@@ -77,23 +78,24 @@ public class StCommonServiceImpl {
*/
public
final
static
String
REGION_LEVEL_THIRD
=
"3"
;
private
CommonBaseMapper
commonMapper
;
private
final
CommonBaseMapper
commonMapper
;
private
RestHighLevelClient
restHighLevelClient
;
private
final
RestHighLevelClient
restHighLevelClient
;
private
TZSCommonServiceImpl
tzsCommonService
;
private
final
TZSCommonServiceImpl
tzsCommonService
;
private
EquipTechParamPipelineMapper
techParamsPipelineMapper
;
private
final
EquipTechParamPipelineMapper
techParamsPipelineMapper
;
private
EquipmentCategoryMapper
equipmentCategoryMapper
;
private
final
EquipmentCategoryMapper
equipmentCategoryMapper
;
private
ZLStatisticsMapper
zlStatisticsMapper
;
private
final
ZLStatisticsMapper
zlStatisticsMapper
;
private
static
Map
<
String
,
String
>
regionCodeOrgCodeMap
=
new
ConcurrentHashMap
<>();
@Getter
private
static
final
Map
<
String
,
String
>
regionCodeOrgCodeMap
=
new
ConcurrentHashMap
<>();
private
static
Map
<
Integer
,
RegionModel
>
regionCodeRegionMap
=
new
ConcurrentHashMap
<>();
private
static
List
<
RegionModel
>
regionModels
=
new
ArrayList
<>();
private
static
final
List
<
RegionModel
>
regionModels
=
new
ArrayList
<>();
private
static
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
;
...
...
@@ -111,10 +113,6 @@ public class StCommonServiceImpl {
this
.
tzsCommonService
=
tzsCommonService
;
}
public
static
Map
<
String
,
String
>
getRegionCodeOrgCodeMap
()
{
return
regionCodeOrgCodeMap
;
}
public
static
List
<
EquipmentCategoryDto
>
getEquipmentCategory
()
{
return
equipmentCategoryDtos
;
}
...
...
@@ -156,9 +154,18 @@ public class StCommonServiceImpl {
public
String
getAndSetOrgCode
(
DPFilterParamDto
dpFilterParamDto
)
{
String
cityCode
=
dpFilterParamDto
.
getCityCode
();
this
.
setChildCompanyCodeByRegion
(
cityCode
,
dpFilterParamDto
);
return
getAndSetOrgCode
(
cityCode
);
}
/**
* 按照regionCode查询区域下的公司
* @param cityCode 区域
* @param dpFilterParamDto 过滤条件
*/
private
void
setChildCompanyCodeByRegion
(
String
cityCode
,
DPFilterParamDto
dpFilterParamDto
)
{
}
public
String
getAndSetOrgCode
(
String
cityCode
)
{
String
orgCode
=
regionCodeOrgCodeMap
.
get
(
cityCode
);
if
(
orgCode
==
null
)
{
...
...
@@ -551,4 +558,25 @@ public class StCommonServiceImpl {
children
.
forEach
(
child
->
buildSubtree
(
child
,
parentCodeMap
));
}
}
/**
* 获取本级及子级区域code
* @param region 区域
* @return 本级及子级区域code
*/
public
String
getSelfAndChildRegion
(
RegionModel
region
)
{
return
null
;
}
/**
* 将单位code转行政区划
* @param companyCode 单位code
* @return 单位所在行政区划
*/
public
CharSequence
castCompanyCode2RegionCode
(
String
companyCode
)
{
String
regionSeq
=
commonMapper
.
selectCompanyRegionSeq
(
companyCode
);
Optional
<
RegionModel
>
optionalRegionModel
=
regionModels
.
stream
().
filter
(
r
->
String
.
valueOf
(
r
.
getSequenceNbr
()).
equals
(
regionSeq
)).
findFirst
();
optionalRegionModel
.
orElseThrow
(()->
new
RuntimeException
(
""
));
return
null
;
}
}
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