各地区经营异常主体数量统计,只统计下一级的
This commit is contained in:
parent
b79ebdd2d4
commit
6c31bce4e7
|
|
@ -764,22 +764,23 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
|
|||
map.put("entTypeStatistic",entTypeStatistic);
|
||||
|
||||
//统计各地区经营异常主体数量
|
||||
List<OrgUnits> orgList = aicorgMapper.selectList(new LambdaQueryWrapper<OrgUnits>()
|
||||
.eq(OrgUnits::getParentId, aicUser.getOrgID())
|
||||
.eq(OrgUnits::getDeleted, "0")
|
||||
.eq(OrgUnits::getUnitType, "1"));
|
||||
//提取出机构ID
|
||||
List<String> orgUnitIds = orgList.stream()
|
||||
.map(OrgUnits::getOrgNumber)
|
||||
.collect(Collectors.toList());
|
||||
orgUnitIds.add(0, aicUser.getRegionID()); // 在索引0位置插入当前用户的regionID
|
||||
customParamMap.put("orgList", orgUnitIds);
|
||||
|
||||
List<AbnEntLocStatistic> abnEntLocStatistic = baseMapper.tsAbnEntLocStatistic(customParamMap);
|
||||
//处理机构名称
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("deleted", "0");
|
||||
params.put("unittype", "1");
|
||||
params.put("orgNumber", aicUser.getRegionID());
|
||||
OrgUnits org = aicorgMapper.queryByOrgNumberMap(params);
|
||||
Integer orgLevel = org.getOrgLevel();
|
||||
//根据机构等级判断
|
||||
if (orgLevel == 1) { //省局
|
||||
customParamMap.put("orgNumber", StringUtils.substring(aicUser.getRegionID(), 0, 2)+"%");
|
||||
} else if (orgLevel == 2) { //市局
|
||||
customParamMap.put("orgNumber", StringUtils.substring(aicUser.getRegionID(), 0, 4)+"%");
|
||||
} else if (orgLevel >= 3) { //区局
|
||||
customParamMap.put("orgNumber", StringUtils.substring(aicUser.getRegionID(), 0, 6)+"%");
|
||||
}
|
||||
List<AbnEntLocStatistic> abnEntLocStatistic = baseMapper.tsAbnEntLocStatistic(customParamMap);
|
||||
//处理机构名称
|
||||
params.put("parentID", aicUser.getOrgID());
|
||||
for (AbnEntLocStatistic item : abnEntLocStatistic){
|
||||
params.put("orgNumber", item.getOrgNumber());
|
||||
OrgUnits orgUnits = aicorgMapper.queryByOrgNumberMap(params);
|
||||
|
|
|
|||
|
|
@ -2,31 +2,42 @@ package com.chinaweal.aiccs.org.entity;
|
|||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Created by Yang on 2017/9/16.
|
||||
*/
|
||||
|
||||
@Getter
|
||||
@TableName(value = "cxaicorg.t_orgUnits")
|
||||
public class OrgUnits implements Serializable {
|
||||
|
||||
|
||||
// Fields
|
||||
@TableField(value = "ORGUNITID")
|
||||
private String orgUnitId; //机构ID
|
||||
|
||||
@Setter
|
||||
@TableField(value = "ORGUNITNAME")
|
||||
private String orgUnitName; //机构名称
|
||||
|
||||
@Setter
|
||||
@TableField(value = "ORGNUMBER")
|
||||
private String orgNumber; //机构编码
|
||||
|
||||
@TableField(value = "PARENTID")
|
||||
private String parentId; //父级ID
|
||||
|
||||
@TableField(value = "UNITTYPE")
|
||||
private String unitType; //组织类型
|
||||
|
||||
@Setter
|
||||
@TableField(value = "ORGLEVEL")
|
||||
private Integer orgLevel; //组织层次
|
||||
|
||||
@Setter
|
||||
@TableField(value = "DELETED")
|
||||
private String deleted; //是否删除 0:没有删除 1:删除
|
||||
|
||||
@TableField(exist = false)
|
||||
private String locDistrict; //行政区划,业务用
|
||||
|
||||
|
|
@ -56,69 +67,4 @@ public class OrgUnits implements Serializable {
|
|||
this.unitType = unitType;
|
||||
}
|
||||
|
||||
// Property accessors
|
||||
|
||||
public String getOrgUnitId() {
|
||||
return this.orgUnitId;
|
||||
}
|
||||
|
||||
public void setOrgUnitId(String orgUnitId) {
|
||||
this.orgUnitId = orgUnitId;
|
||||
}
|
||||
|
||||
public String getOrgUnitName() {
|
||||
return this.orgUnitName;
|
||||
}
|
||||
|
||||
public void setOrgUnitName(String orgUnitName) {
|
||||
this.orgUnitName = orgUnitName;
|
||||
}
|
||||
|
||||
public String getOrgNumber() {
|
||||
return this.orgNumber;
|
||||
}
|
||||
|
||||
public void setOrgNumber(String orgNumber) {
|
||||
this.orgNumber = orgNumber;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getUnitType() {
|
||||
return this.unitType;
|
||||
}
|
||||
|
||||
public void setUnitType(String unitType) {
|
||||
this.unitType = unitType;
|
||||
}
|
||||
|
||||
public Integer getOrgLevel() {
|
||||
return this.orgLevel;
|
||||
}
|
||||
|
||||
public void setOrgLevel(Integer orgLevel) {
|
||||
this.orgLevel = orgLevel;
|
||||
}
|
||||
|
||||
public String getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
public void setDeleted(String deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
public String getLocDistrict() {
|
||||
return locDistrict;
|
||||
}
|
||||
|
||||
public void setLocDistrict(String locDistrict) {
|
||||
this.locDistrict = locDistrict;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1600,7 +1600,16 @@
|
|||
|
||||
<select id="tsAbnEntLocStatistic" resultType="com.chinaweal.aiccs.aiccs.business.entity.dto.AbnEntLocStatistic">
|
||||
SELECT DECORG as orgNumber,count(*) as abnNum FROM AICCS.tsabnlist
|
||||
WHERE DECORG LIKE #{customParamMap.orgNumber}
|
||||
WHERE 1=1
|
||||
<if test="customParamMap.orgNumber != null and customParamMap.orgNumber != ''">
|
||||
AND DECORG LIKE #{customParamMap.orgNumber}
|
||||
</if>
|
||||
<if test="customParamMap.orgList != null">
|
||||
AND DECORG IN
|
||||
<foreach collection="customParamMap.orgList" item="decorg" open="(" separator="," close=")">
|
||||
#{decorg}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY DECORG
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue