业务统计按级别统计修改
This commit is contained in:
parent
36fce097ae
commit
b75217bcd8
|
|
@ -627,6 +627,11 @@ public class EBaseinfoController extends BaseController {
|
|||
|
||||
@RequestMapping("queryCphStatistics")
|
||||
public RestResult<?> queryCphStatistics(@RequestBody Map<String, Object> customParamMap, HttpServletRequest request) {
|
||||
AICUser aicUser = getLoginUser(request);
|
||||
if (aicUser != null) {
|
||||
String regionId = aicUser.getRegionID();
|
||||
customParamMap.put("regionId", regionId);
|
||||
}
|
||||
List<ComprehensiveStat> rs = eBaseinfoService.queryCphStat(customParamMap);
|
||||
return RestResult.ok(rs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -688,6 +688,7 @@ public class EBaseinfoServiceImpl extends BaseServiceImpl<EBaseinfoMapper, EBase
|
|||
List<ComprehensiveStat> rs = baseMapper.queryCphStat(customParamMap);
|
||||
|
||||
// 一笔业务包含多个主体的要统计主体数量,xiangwu
|
||||
/*
|
||||
for (ComprehensiveStat each : rs) {
|
||||
each.setAbnlrnum(baseMapper.countabnlrnum(each.getOrgn(), customParamMap));
|
||||
each.setLeglrnum(baseMapper.countleglrnum(each.getOrgn(), customParamMap));
|
||||
|
|
@ -695,6 +696,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<>();
|
||||
|
|
|
|||
|
|
@ -654,10 +654,14 @@
|
|||
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(ualfknum) as ualfknum,
|
||||
sum(mytrnum) as mytrnum,
|
||||
sum(wtcznum) as wtcznum,
|
||||
|
|
@ -675,10 +679,14 @@
|
|||
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.ualfknum,
|
||||
rs1.mytrnum,
|
||||
rs1.wtcznum,
|
||||
|
|
@ -696,10 +704,14 @@
|
|||
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='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 +726,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 +739,39 @@
|
|||
<if test="customParamMap.endDate != null and customParamMap.endDate != '' ">
|
||||
and date_format(SIGNTIME,'%Y-%m-%d') <= #{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 #{customParamMap.regionId.substring(0,4)}||'%'
|
||||
</when>
|
||||
<otherwise>
|
||||
and rs2.orgn like #{customParamMap.regionId.substring(0,6)}||'%'
|
||||
</otherwise>
|
||||
</choose>
|
||||
) jg group by orgn, orgunitname
|
||||
order by orgn asc
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue