信用修复预警统计加上数量统计表格
This commit is contained in:
parent
0c3809a871
commit
482ed6efcf
|
|
@ -24,6 +24,7 @@ import com.chinaweal.aiccs.aiccs.auditing.service.TSTaskListEnterTypeService;
|
|||
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.TaskListUnionDto;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.excel.TaskListRepairData;
|
||||
import com.chinaweal.aiccs.aiccs.business.mapper.TSTaskListMapper;
|
||||
|
|
@ -1167,4 +1168,16 @@ public class TaskController extends BaseController {
|
|||
.sheet("信用修复超期名单")
|
||||
.doWrite(rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 信用修复预警统计
|
||||
*/
|
||||
@RequestMapping("/repairTaskStatistic")
|
||||
public RestResult<?> repairTaskStatistic(@RequestBody PageRequestDto pageRequestDto,HttpServletRequest request) {
|
||||
Map<String, Object> paramMap = pageRequestDto.getCustomParamMap();
|
||||
AICUser aicUser = getLoginUser(request);
|
||||
//统计内外网的数量,只统计未完成的
|
||||
List<RepairTaskStatisticDto> repairTaskStatisticDto = taskListService.repairTaskStatistic(paramMap, aicUser);
|
||||
return RestResult.ok(repairTaskStatisticDto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,4 +143,14 @@ public class RepairTaskListDto implements Serializable{
|
|||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 机构编号
|
||||
*/
|
||||
private String areaCode;
|
||||
|
||||
/**
|
||||
* 信用修复预警统计Dto
|
||||
*/
|
||||
private RepairTaskStatisticDto repairTaskStatisticDto;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
package com.chinaweal.aiccs.aiccs.business.entity.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 信用修复预警统计Dto
|
||||
*
|
||||
* @author zhouxy
|
||||
* @since 2026-1-20
|
||||
*/
|
||||
@Data
|
||||
public class RepairTaskStatisticDto implements Serializable{
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 机构编号
|
||||
*/
|
||||
private String orgNumber;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String orgName;
|
||||
|
||||
/**
|
||||
* 外网申请的数量
|
||||
*/
|
||||
private Integer outerCount;
|
||||
|
||||
/**
|
||||
* 内网发起的数量
|
||||
*/
|
||||
private Integer innerCount;
|
||||
|
||||
/**
|
||||
* 总计数量
|
||||
*/
|
||||
private Integer total;
|
||||
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@ 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.RepairTaskListDto;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.dto.RepairTaskStatisticDto;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.dto.TaskListUnionDto;
|
||||
import com.chinaweal.aiccs.crgs.system.entity.TaskList;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -161,4 +162,6 @@ public interface TSTaskListMapper extends BaseMapper<TSTaskList> {
|
|||
List<AbnListExcel> exportAbnList(@Param("customParamMap") Map<String, Object> customParamMap);
|
||||
|
||||
IPage<RepairTaskListDto> repairTaskQuery(Page<RepairTaskListDto> page, @Param("customParamMap") Map<String, Object> paramMap);
|
||||
|
||||
List<RepairTaskStatisticDto> repairTaskStatistic(@Param("customParamMap") Map<String, Object> paramMap);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.chinaweal.aiccs.aiccs.abnormal.entity.vo.XyxfCqDto;
|
|||
import com.chinaweal.aiccs.aiccs.auditing.entity.TSOpinion;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList;
|
||||
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;
|
||||
import com.chinaweal.aiccs.aiccs.seriousillegal.entity.TSBizSerIllegalRem;
|
||||
import com.chinaweal.aiccs.crgs.system.entity.TaskList;
|
||||
|
|
@ -229,4 +230,6 @@ public interface TSTaskListService extends BaseService<TSTaskList> {
|
|||
List<XyxfCqDto> exportxyxfCqList(Map<String, Object> paramMap);
|
||||
|
||||
TSTaskList searchTaskListByBizId(String bizId);
|
||||
|
||||
List<RepairTaskStatisticDto> repairTaskStatistic(Map<String, Object> paramMap,AICUser aicUser);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ 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.mapper.TSTaskListMapper;
|
||||
|
|
@ -41,6 +42,7 @@ import com.chinaweal.aiccs.door.service.ITUserportalService;
|
|||
import com.chinaweal.aiccs.org.entity.OrgUnits;
|
||||
import com.chinaweal.aiccs.org.mapper.AicorgMapper;
|
||||
import com.chinaweal.aiccs.org.mapper.TUsersMapper;
|
||||
import com.chinaweal.aiccs.org.service.AicorgService;
|
||||
import com.chinaweal.aicorg.model.AICUser;
|
||||
import com.chinaweal.youfool.framework.springboot.mybatis.plus.BaseServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -587,8 +589,13 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
|
|||
}
|
||||
}
|
||||
IPage<RepairTaskListDto> data = baseMapper.repairTaskQuery(page, paramMap);
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("deleted", "0");
|
||||
params.put("unittype", "1");
|
||||
for (RepairTaskListDto repairTaskListDto : data.getRecords()) {
|
||||
repairTaskListDto.setOrgName(tUsersMapper.queryOrgByUserid(repairTaskListDto.getSignuserid()));
|
||||
params.put("orgNumber", repairTaskListDto.getAreaCode());
|
||||
OrgUnits orgUnits = aicorgMapper.queryByOrgNumberMap(params);
|
||||
repairTaskListDto.setOrgName(orgUnits==null?"":orgUnits.getOrgUnitName());
|
||||
|
||||
if (BaseDataConstant.CREDIT_REPAIR_ILLEGAL_BIZ.equals(repairTaskListDto.getBustype())) {
|
||||
List<TSBizSerIllegalRem> tsBizSerIllegalRemList = tsBizSerIllegalRemService.selectbizRembizseq(repairTaskListDto.getBizseqid());
|
||||
|
|
@ -701,4 +708,50 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
|
|||
return getOne(new LambdaQueryWrapper<TSTaskList>().eq(TSTaskList::getBizseqid, bizId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RepairTaskStatisticDto> repairTaskStatistic(Map<String, Object> paramMap,AICUser aicUser) {
|
||||
//判断有没有受理机关的条件
|
||||
String orgNumber = (String) paramMap.get("orgNumber");
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("deleted", "0");
|
||||
params.put("unittype", "1");
|
||||
if(StringUtils.isEmpty(orgNumber)){
|
||||
params.put("orgNumber", aicUser.getRegionID());
|
||||
OrgUnits org = aicorgMapper.queryByOrgNumberMap(params);
|
||||
Integer orgLevel = org.getOrgLevel();
|
||||
//根据机构等级判断
|
||||
if (orgLevel == 1) { //省局
|
||||
paramMap.put("areaCode", StringUtils.substring(aicUser.getRegionID(), 0, 2)+"%");
|
||||
} else if (orgLevel == 2) { //市局
|
||||
paramMap.put("areaCode", StringUtils.substring(aicUser.getRegionID(), 0, 4)+"%");
|
||||
} else if (orgLevel == 3) { //区局
|
||||
paramMap.put("areaCode", StringUtils.substring(aicUser.getRegionID(), 0, 6)+"%");
|
||||
} else if (orgLevel >= 4) { //所
|
||||
paramMap.put("areaCode", StringUtils.substring(aicUser.getRegionID(), 0, 6)+"%");
|
||||
}
|
||||
}
|
||||
|
||||
boolean isGzrNum = paramMap.containsKey("gzrNumSwitch") && (boolean)paramMap.get("gzrNumSwitch");
|
||||
if (isGzrNum) {
|
||||
int gzrNum = (int) paramMap.get("gzrNum");
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
if (gzrNum < 0) {
|
||||
paramMap.put("gzrDate", LocalDateTime.now().format(formatter));
|
||||
} else {
|
||||
LocalDateTime gzrEndDate = gzrNum == 0 ? LocalDateTime.now().withHour(23).withMinute(59).withSecond(59) : HolidaysUtil.getNextWorkingDay(gzrNum);
|
||||
LocalDateTime gzrStartDate = gzrEndDate.withHour(0).withMinute(0).withSecond(0);
|
||||
paramMap.put("gzrStartDate", gzrStartDate.format(formatter));
|
||||
paramMap.put("gzrEndDate", gzrEndDate.format(formatter));
|
||||
}
|
||||
}
|
||||
|
||||
List<RepairTaskStatisticDto> repairTaskStatisticDtos = baseMapper.repairTaskStatistic(paramMap);
|
||||
for(RepairTaskStatisticDto dto : repairTaskStatisticDtos){
|
||||
params.put("orgNumber", dto.getOrgNumber());
|
||||
OrgUnits orgUnits = aicorgMapper.queryByOrgNumberMap(params);
|
||||
dto.setOrgName(orgUnits==null?"":orgUnits.getOrgUnitName());
|
||||
}
|
||||
return repairTaskStatisticDtos;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1494,25 +1494,73 @@
|
|||
ta.BUSNAME,
|
||||
ta.SIGNTIME,
|
||||
ta.BUSTYPE,
|
||||
case when ta.BUSTYPE = '33' then '严重违法失信名单信用修复' when ta.BUSTYPE = '7' then '企业经营异常名录信用修复' when ta.BUSTYPE = '12' then '个体户经营异常状态信用修复' when ta.BUSTYPE = '14' then '农专社经营异常名录信用修复' else '' end as busTypeName,
|
||||
case
|
||||
when ta.BUSTYPE = '33' then '严重违法失信名单信用修复'
|
||||
when ta.BUSTYPE = '7' then '企业经营异常名录信用修复'
|
||||
when ta.BUSTYPE = '12' then '个体户经营异常状态信用修复'
|
||||
when ta.BUSTYPE = '14' then '农专社经营异常名录信用修复'
|
||||
when ta.BUSTYPE = '27' then '行政处罚修复'
|
||||
else ''
|
||||
end as busTypeName,
|
||||
ta.BUSSTATUS,
|
||||
ta.SENDERTIME,
|
||||
ta.SENDERNAME,
|
||||
ta.SIGNLOGINNAME,
|
||||
ta.deadlineDate,
|
||||
ta.signuserid,
|
||||
ta.createTime
|
||||
FROM
|
||||
tstasklist ta
|
||||
ta.createTime,
|
||||
ta.area_code as areaCode
|
||||
FROM tstasklist ta
|
||||
JOIN MaxTaskList mt ON ta.TASKLISTID = mt.TASKLISTID AND mt.rn = 1
|
||||
<if test="customParamMap.orgNumber != null and customParamMap.orgNumber != ''">
|
||||
left join (
|
||||
select tu.userID, left(tog.orgNumber,6) as orgNumber
|
||||
from cxaicorg.t_users tu left join cxaicorg.t_orgunits tog on tu.orgUnitID = tog.orgUnitID
|
||||
) org on ta.SIGNUSERID = org.userID
|
||||
</if>
|
||||
<if test="customParamMap.orgNumber != null and customParamMap.orgNumber != ''">
|
||||
where org.orgNumber = #{customParamMap.orgNumber}
|
||||
WHERE ta.area_code = #{customParamMap.orgNumber}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="repairTaskStatistic" resultType="com.chinaweal.aiccs.aiccs.business.entity.dto.RepairTaskStatisticDto">
|
||||
WITH MaxTaskList AS (
|
||||
SELECT
|
||||
tta.TASKLISTID,
|
||||
tta.BIZSEQID
|
||||
FROM tstasklist tta
|
||||
WHERE tta.BUSSTATUS = '0'
|
||||
<if test="customParamMap.busType == null or customParamMap.busType == '' ">
|
||||
and tta.BUSTYPE in ('33','7','12','14','27')
|
||||
</if>
|
||||
<if test="customParamMap.busType != null and customParamMap.busType != '' ">
|
||||
and tta.BUSTYPE = #{customParamMap.busType}
|
||||
</if>
|
||||
<if test="customParamMap.searchName != null and customParamMap.searchName != '' ">
|
||||
and tta.BUSNAME = #{customParamMap.searchName}
|
||||
</if>
|
||||
<if test="customParamMap.sendertimestart != null and customParamMap.sendertimestart != ''">
|
||||
and date_format(tta.SENDERTIME, '%Y-%m-%d') >= #{customParamMap.sendertimestart}
|
||||
</if>
|
||||
<if test="customParamMap.sendertimeend != null and customParamMap.sendertimeend != ''">
|
||||
and date_format(tta.SENDERTIME, '%Y-%m-%d') <= #{customParamMap.sendertimeend}
|
||||
</if>
|
||||
<if test="customParamMap.gzrStartDate != null and customParamMap.gzrStartDate != '' ">
|
||||
and tta.deadlineDate between #{customParamMap.gzrStartDate} and #{customParamMap.gzrEndDate}
|
||||
</if>
|
||||
<if test="customParamMap.gzrDate != null and customParamMap.gzrDate != '' ">
|
||||
and tta.deadlineDate < #{customParamMap.gzrDate}
|
||||
</if>
|
||||
)
|
||||
SELECT
|
||||
ta.area_code as orgNumber,
|
||||
SUM(CASE WHEN ta.origin = '1' THEN 1 ELSE 0 END) as outerCount, -- 外网数量
|
||||
SUM(CASE WHEN ta.origin != '1' OR ta.origin IS NULL THEN 1 ELSE 0 END) as innerCount, -- 内网数量
|
||||
COUNT(*) as total -- 总数
|
||||
FROM tstasklist ta
|
||||
JOIN MaxTaskList mt ON ta.TASKLISTID = mt.TASKLISTID
|
||||
<if test="customParamMap.areaCode != null and customParamMap.areaCode != ''">
|
||||
WHERE ta.area_code like #{customParamMap.areaCode}
|
||||
</if>
|
||||
<if test="customParamMap.orgNumber != null and customParamMap.orgNumber != ''">
|
||||
WHERE ta.area_code = #{customParamMap.orgNumber}
|
||||
</if>
|
||||
GROUP BY ta.area_code
|
||||
ORDER BY ta.area_code
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue