新首页的统计接口
This commit is contained in:
parent
6d18b8567c
commit
766685c466
|
|
@ -1185,4 +1185,20 @@ public class TaskController extends BaseController {
|
|||
List<RepairTaskStatisticDto> repairTaskStatisticDto = taskListService.repairTaskStatistic(paramMap, aicUser);
|
||||
return RestResult.ok(repairTaskStatisticDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 待办总览统计
|
||||
* type:1:统计各地区经营异常主体数量 2:统计经营异常主体类型分布
|
||||
*
|
||||
* @param pageRequestDto
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("indexPageStatistic")
|
||||
public RestResult<?> indexPageStatistic(@RequestBody PageRequestDto pageRequestDto, HttpServletRequest request) {
|
||||
AICUser curUser = getLoginUser(request);
|
||||
Map<String, Object> customParamMap = pageRequestDto.getCustomParamMap();
|
||||
Map<String, Object> map = taskListService.indexPageStatistic(customParamMap, curUser);
|
||||
return RestResult.ok(map);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
package com.chinaweal.aiccs.aiccs.business.entity.dto;
|
||||
|
||||
/**
|
||||
* 异常名录按地区统计实体类
|
||||
*/
|
||||
public class AbnEntLocStatistic {
|
||||
|
||||
/**
|
||||
* 机构组织代码
|
||||
*/
|
||||
private String orgNumber;
|
||||
|
||||
/**
|
||||
* 机构组织名称
|
||||
*/
|
||||
private String orgName;
|
||||
|
||||
/**
|
||||
* 异常数量
|
||||
*/
|
||||
private Integer abnNum;
|
||||
|
||||
// 构造函数
|
||||
public AbnEntLocStatistic() {
|
||||
}
|
||||
|
||||
// Getter 和 Setter 方法
|
||||
public String getOrgNumber() {
|
||||
return orgNumber;
|
||||
}
|
||||
|
||||
public void setOrgNumber(String orgNumber) {
|
||||
this.orgNumber = orgNumber;
|
||||
}
|
||||
|
||||
public String getOrgName() {
|
||||
return orgName;
|
||||
}
|
||||
|
||||
public void setOrgName(String orgName) {
|
||||
this.orgName = orgName;
|
||||
}
|
||||
|
||||
public Integer getAbnNum() {
|
||||
return abnNum;
|
||||
}
|
||||
|
||||
public void setAbnNum(Integer abnNum) {
|
||||
this.abnNum = abnNum;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
import com.chinaweal.aiccs.aiccs.abnormal.entity.TSAbnList;
|
||||
import com.chinaweal.aiccs.aiccs.abnormal.entity.excel.AbnListExcel;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.dto.AbnEntLocStatistic;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.dto.RepairTaskListDto;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.dto.RepairTaskStatisticDto;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.dto.TaskListUnionDto;
|
||||
|
|
@ -164,4 +165,11 @@ public interface TSTaskListMapper extends BaseMapper<TSTaskList> {
|
|||
IPage<RepairTaskListDto> repairTaskQuery(Page<RepairTaskListDto> page, @Param("customParamMap") Map<String, Object> paramMap);
|
||||
|
||||
List<RepairTaskStatisticDto> repairTaskStatistic(@Param("customParamMap") Map<String, Object> paramMap);
|
||||
|
||||
Map<String,Object> indexPageRepairStatistic(@Param("customParamMap") Map<String, Object> customParamMap);
|
||||
|
||||
Map<String,Object> tsAbnEntTypeStatistic();
|
||||
|
||||
List<AbnEntLocStatistic> tsAbnEntLocStatistic(@Param("customParamMap") Map<String, Object> customParamMap);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -232,4 +232,12 @@ public interface TSTaskListService extends BaseService<TSTaskList> {
|
|||
TSTaskList searchTaskListByBizId(String bizId);
|
||||
|
||||
List<RepairTaskStatisticDto> repairTaskStatistic(Map<String, Object> paramMap,AICUser aicUser);
|
||||
|
||||
/**
|
||||
* 首页统计接口
|
||||
* @param customParamMap
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> indexPageStatistic(Map<String, Object> customParamMap,AICUser aicUser);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,10 +19,7 @@ import com.chinaweal.aiccs.aiccs.auditing.service.TSOpinionService;
|
|||
import com.chinaweal.aiccs.aiccs.business.entity.TSHwfProcessNode;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.TSTwfProcessNode;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.dto.RepairTaskListDto;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.dto.RepairTaskStatisticDto;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.dto.ResultMap;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.dto.TaskListUnionDto;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.dto.*;
|
||||
import com.chinaweal.aiccs.aiccs.business.mapper.TSTaskListMapper;
|
||||
import com.chinaweal.aiccs.aiccs.business.service.TSHwfProcessNodeService;
|
||||
import com.chinaweal.aiccs.aiccs.business.service.TSTaskListService;
|
||||
|
|
@ -754,4 +751,43 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
|
|||
return repairTaskStatisticDtos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> indexPageStatistic(Map<String, Object> customParamMap,AICUser aicUser) {
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
customParamMap.put("areaCode", aicUser.getRegionID());
|
||||
//统计信用修复正常、即将超期、超期的数量
|
||||
Map<String, Object> repairStatistic = baseMapper.indexPageRepairStatistic(customParamMap);
|
||||
map.put("repairStatistic",repairStatistic);
|
||||
|
||||
//统计经营异常主体类型分布
|
||||
Map<String, Object> entTypeStatistic = baseMapper.tsAbnEntTypeStatistic();
|
||||
map.put("entTypeStatistic",entTypeStatistic);
|
||||
|
||||
//统计各地区经营异常主体数量
|
||||
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);
|
||||
//处理机构名称
|
||||
for (AbnEntLocStatistic item : abnEntLocStatistic){
|
||||
params.put("orgNumber", item.getOrgNumber());
|
||||
OrgUnits orgUnits = aicorgMapper.queryByOrgNumberMap(params);
|
||||
item.setOrgName(orgUnits==null?"":orgUnits.getOrgUnitName());
|
||||
}
|
||||
map.put("abnEntLocStatistic",abnEntLocStatistic);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1563,4 +1563,45 @@
|
|||
ORDER BY ta.area_code
|
||||
</select>
|
||||
|
||||
<select id="indexPageRepairStatistic" resultType="java.util.Map">
|
||||
SELECT
|
||||
sum(case WHEN m.DEADLINEDATE is not null
|
||||
AND trunc(sysdate - m.DEADLINEDATE) < -1
|
||||
THEN 1 ELSE 0 END) as "normalnum", -- 正常:截止日期距离当前日期大于1天
|
||||
sum(case WHEN m.DEADLINEDATE is not null
|
||||
AND trunc(sysdate - m.DEADLINEDATE) BETWEEN -1 AND 0
|
||||
THEN 1 ELSE 0 END) as "aboutExpirenum", -- 即将超期:截止日期距离当前日期小于等于1天且未过期
|
||||
sum(case WHEN m.DEADLINEDATE is not null
|
||||
AND trunc(sysdate - m.DEADLINEDATE) > 0
|
||||
THEN 1 ELSE 0 END) as "expirednum" -- 超期:截止日期已超过当前日期
|
||||
FROM (
|
||||
select ta.TASKLISTID, ta.WORKFLOWID, ta.BIZSEQID, ta.SIGNUSERID, ta.SENDERORGID, ta.SENDERUSERID,
|
||||
ta.SENDTOORGID, ta.ACCEPTNO, ta.BUSNAME, ta.SIGNTIME, ta.BUSTYPE, ta.BUSSTATUS,
|
||||
ta.LINKNAME, ta.AUDITDEPTTYPE, ta.ISSIGNON,ta.SIGNLOGINNAME, ta.SENDERTIME, ta.SENDERNAME,
|
||||
ta.ACCEPTGROUPID, ta.AREA_CODE, ta.LAUPTIME , n.currentNode as currentNodeOrBizStatus,
|
||||
ta.DEADLINEDATE, ta.CREATETIME, ta.ISDEADLINE
|
||||
from TSTaskList ta
|
||||
LEFT JOIN TSTwfProcessNode n on ta.WorkflowID = n.processid
|
||||
where n.status = 0 and ta.BUSSTATUS in ('0','-1')
|
||||
) m
|
||||
where m.BUSTYPE in ('33','7','12','14','27')
|
||||
and ( m.SIGNUSERID = #{customParamMap.userId}
|
||||
or (m.area_code = #{customParamMap.areaCode} AND m.currentNodeOrBizStatus = 'exptlistEnter' AND m.SIGNUSERID IS null)
|
||||
or exists (select 1 from tsrefgroupanduser tg where tg.GROUPID = m.ACCEPTGROUPID and tg.USERID = #{customParamMap.userId}) )
|
||||
</select>
|
||||
|
||||
<select id="tsAbnEntTypeStatistic" resultType="java.util.Map">
|
||||
SELECT
|
||||
SUM(CASE WHEN enttype = '9910' OR enttype = '9500' THEN 1 ELSE 0 END) AS "individualNum", -- 个体户数量
|
||||
SUM(CASE WHEN enttype = '9100' OR enttype = '9200' THEN 1 ELSE 0 END) AS "coopNum", -- 农专数量
|
||||
SUM(CASE WHEN enttype != '9910' AND enttype != '9500' AND enttype != '9100' AND enttype != '9200' THEN 1 ELSE 0 END) AS "enterpriseNum" -- 企业数量
|
||||
FROM tsabnlist
|
||||
</select>
|
||||
|
||||
<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}
|
||||
GROUP BY DECORG
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue