修改业务统计按级别统计
This commit is contained in:
parent
b75217bcd8
commit
78e3574f7c
|
|
@ -629,8 +629,11 @@ public class EBaseinfoController extends BaseController {
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -686,6 +686,7 @@ 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
|
||||
/*
|
||||
|
|
@ -704,7 +705,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());
|
||||
|
|
|
|||
|
|
@ -766,10 +766,13 @@
|
|||
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)}||'%'
|
||||
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.substring(0,6)}||'%'
|
||||
and rs2.orgn like #{customParamMap.regionId}||'%'
|
||||
</otherwise>
|
||||
</choose>
|
||||
) jg group by orgn, orgunitname
|
||||
|
|
|
|||
Loading…
Reference in New Issue