Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhouxy 2026-01-10 21:21:16 +08:00
commit 4a20db4a72
4 changed files with 95 additions and 4 deletions

View File

@ -589,6 +589,14 @@ public class EBaseinfoController extends BaseController {
@RequestMapping("queryCphStatistics")
public RestResult<?> queryCphStatistics(@RequestBody Map<String, Object> customParamMap, HttpServletRequest request) {
AICUser aicUser = getLoginUser(request);
if (aicUser != null) {
log.debug("orgId: {} regionId: {}", aicUser.getOrgID(), aicUser.getRegionID());
String regionId = aicUser.getRegionID();
customParamMap.put("regionId", regionId);
} else {
log.error("用户未登录");
}
List<ComprehensiveStat> rs = eBaseinfoService.queryCphStat(customParamMap);
return RestResult.ok(rs);
}

View File

@ -66,6 +66,21 @@ public class ComprehensiveStat implements Serializable {
*/
private int legycnumoff;
/**
* 行政处罚信用修复
*/
private int penxfnum;
/**
* 行政处罚信用修复线上申请
*/
private int penxfnumon;
/**
* 行政处罚信用修复线下申请
*/
private int penxfnumoff;
/**
* 年报公示信息异议反馈
*/

View File

@ -693,8 +693,10 @@ public class EBaseinfoServiceImpl extends BaseServiceImpl<EBaseinfoMapper, EBase
public List<ComprehensiveStat> queryCphStat(Map<String, Object> customParamMap) {
customParamMap = checkSearchDate(customParamMap);
List<ComprehensiveStat> rs = baseMapper.queryCphStat(customParamMap);
String regionId = (String) customParamMap.get("regionId");
// 一笔业务包含多个主体的要统计主体数量,xiangwu
/*
for (ComprehensiveStat each : rs) {
each.setAbnlrnum(baseMapper.countabnlrnum(each.getOrgn(), customParamMap));
each.setLeglrnum(baseMapper.countleglrnum(each.getOrgn(), customParamMap));
@ -702,6 +704,7 @@ public class EBaseinfoServiceImpl extends BaseServiceImpl<EBaseinfoMapper, EBase
each.setUnlocknum(baseMapper.countunlocknum(each.getOrgn(), customParamMap));
each.setPldxnum(baseMapper.countpldxnum(each.getOrgn(), customParamMap));
}
*/
List<RegulatoryVO> regulatoryVOS = regulatoryMapper.queryParentRegulatory();
List<String> orgnList = new ArrayList<>();
@ -709,7 +712,25 @@ public class EBaseinfoServiceImpl extends BaseServiceImpl<EBaseinfoMapper, EBase
orgnList.add(comprehensiveStat.getOrgn());
}
for (RegulatoryVO regulatoryVO : regulatoryVOS) {
if (StringUtils.isNotBlank(regulatoryVO.getOrgNUmber()) && !orgnList.contains(regulatoryVO.getOrgNUmber())) {
String orgNumber = regulatoryVO.getOrgNUmber();
if (StringUtils.isBlank(regionId) || "150000".equals(regionId)) {
if (StringUtils.isNotBlank(orgNumber) && !(orgNumber.length() == 6 && orgNumber.endsWith("00"))) {
continue;
}
} else if (regionId.length() == 6 && regionId.endsWith("00")) {
if (StringUtils.isNotBlank(orgNumber) && !(orgNumber.length() == 6 && orgNumber.startsWith(regionId.substring(0,4)))) {
continue;
}
} else if (regionId.length() == 6) {
if (StringUtils.isNotBlank(orgNumber) && !orgNumber.startsWith(regionId.substring(0,6))) {
continue;
}
} else {
if (StringUtils.isNotBlank(orgNumber) && !orgNumber.startsWith(regionId)) {
continue;
}
}
if (StringUtils.isNotBlank(orgNumber) && !orgnList.contains(orgNumber)) {
ComprehensiveStat cphStat = new ComprehensiveStat();
cphStat.setOrgn(regulatoryVO.getOrgNUmber());
cphStat.setOrgunitname(regulatoryVO.getOrgUnitName());

View File

@ -654,10 +654,17 @@
select orgn, orgunitname,
sum(abnlrnum) as abnlrnum,
sum(abnycnum) as abnycnum,
sum(abnycnumon) as abnycnumon,
sum(abnycnumoff) as abnycnumoff,
sum(abnyynum) as abnyynum,
sum(leglrnum) as leglrnum,
sum(legyynum) as legyynum,
sum(legycnum) as legycnum,
sum(legycnumon) as legycnumon,
sum(legycnumoff) as legycnumoff,
sum(penxfnum) as penxfnum,
sum(penxfnumon) as penxfnumon,
sum(penxfnumoff) as penxfnumoff,
sum(ualfknum) as ualfknum,
sum(mytrnum) as mytrnum,
sum(wtcznum) as wtcznum,
@ -675,10 +682,17 @@
select rs2.orgn, rs2.orgunitname,
rs1.abnlrnum,
rs1.abnycnum,
rs1.abnycnumon,
rs1.abnycnumoff,
rs1.abnyynum,
rs1.leglrnum,
rs1.legyynum,
rs1.legycnum,
rs1.legycnumon,
rs1.legycnumoff,
rs1.penxfnum,
rs1.penxfnumon,
rs1.penxfnumoff,
rs1.ualfknum,
rs1.mytrnum,
rs1.wtcznum,
@ -696,10 +710,17 @@
select SIGNUSERID,
count(case when bustype in ('5','13','11') then 1 else null end) as abnlrnum,
count(case when bustype in ('7','14','12') then 1 else null end) as abnycnum,
count(case when bustype in ('7','14','12') and origin='1' then 1 else null end) as abnycnumon,
count(case when bustype in ('7','14','12') and (origin is null or origin!='1') then 1 else null end) as abnycnumoff,
count(case when bustype='6' then 1 else null end) as abnyynum,
count(case when bustype='15' then 1 else null end) as leglrnum,
count(case when bustype='16' then 1 else null end) as legyynum,
count(case when bustype='17' then 1 else null end) as legycnum,
count(case when bustype='17' and origin='1' then 1 else null end) as legycnumon,
count(case when bustype='17' and (origin is null or origin!='1') then 1 else null end) as legycnumoff,
count(case when bustype='27' then 1 else null end) as penxfnum,
count(case when bustype='27' and origin='1' then 1 else null end) as penxfnumon,
count(case when bustype='27' and (origin is null or origin!='1') then 1 else null end) as penxfnumoff,
count(case when bustype='30' then 1 else null end) as ualfknum,
count(case when bustype='31' then 1 else null end) as mytrnum,
count(case when bustype='32' then 1 else null end) as wtcznum,
@ -714,7 +735,7 @@
count(case when bustype='61' then 1 else null end) as locknum,
count(case when bustype='62' then 1 else null end) as unlocknum
from
(select BIZSEQID,BUSTYPE,max(SIGNUSERID) SIGNUSERID from aiccs.tstasklist where BUSSTATUS !=4
(select BIZSEQID,BUSTYPE,max(SIGNUSERID) SIGNUSERID,origin from aiccs.tstasklist where BUSSTATUS !=4
<if test="customParamMap.busstatus == 1 ">
and BUSSTATUS = '2'
</if>
@ -727,16 +748,42 @@
<if test="customParamMap.endDate != null and customParamMap.endDate != '' ">
and date_format(SIGNTIME,'%Y-%m-%d') &lt;= #{customParamMap.endDate}
</if>
group by bizseqid,BUSTYPE
group by bizseqid,BUSTYPE,origin
) t2
group by SIGNUSERID
) rs1 left join (
select rs.*, tog.orgunitname from (
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
select tu.userid,
<choose>
<when test="customParamMap.regionId == null or customParamMap.regionId == '150000' ">
left(tog.orgNumber,4)||'00'
</when>
<when test="customParamMap.regionId.length() == 6 and customParamMap.regionId.endsWith('00')">
left(tog.orgNumber,6)
</when>
<otherwise>
tog.orgNumber
</otherwise>
</choose>
as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
) rs left join cxaicorg.t_orgunits tog on rs.orgn = tog.orgNumber
)rs2 on rs1.SIGNUSERID = rs2.userid
where rs2.orgn is not null and rs2.orgunitname is not null
<choose>
<when test="customParamMap.regionId == null or customParamMap.regionId == '150000' ">
and rs2.orgn like '15%'
</when>
<when test="customParamMap.regionId.length() == 6 and customParamMap.regionId.endsWith('00')">
and rs2.orgn like left(#{customParamMap.regionId},4)||'%'
</when>
<when test="customParamMap.regionId.length() == 6">
and rs2.orgn like left(#{customParamMap.regionId},6)||'%'
</when>
<otherwise>
and rs2.orgn like #{customParamMap.regionId}||'%'
</otherwise>
</choose>
) jg group by orgn, orgunitname
order by orgn asc
</select>