增加分页查询
This commit is contained in:
parent
921557fed5
commit
cb5cebaa47
|
|
@ -36,6 +36,8 @@ import com.chinaweal.aiccs.aiccs.revoke.Vo.TsbizrevlistExcelVo;
|
||||||
import com.chinaweal.aiccs.aiccs.revoke.entity.*;
|
import com.chinaweal.aiccs.aiccs.revoke.entity.*;
|
||||||
import com.chinaweal.aiccs.aiccs.revoke.entity.dto.*;
|
import com.chinaweal.aiccs.aiccs.revoke.entity.dto.*;
|
||||||
import com.chinaweal.aiccs.aiccs.revoke.service.*;
|
import com.chinaweal.aiccs.aiccs.revoke.service.*;
|
||||||
|
import com.chinaweal.aiccs.aiccs.security.dto.PenaltyCaseInfoQueryDTO;
|
||||||
|
import com.chinaweal.aiccs.aiccs.security.entity.PenaltyCaseInfo;
|
||||||
import com.chinaweal.aiccs.aiccs.system.entity.TRBaseCode;
|
import com.chinaweal.aiccs.aiccs.system.entity.TRBaseCode;
|
||||||
import com.chinaweal.aiccs.aiccs.system.service.TRBaseCodeService;
|
import com.chinaweal.aiccs.aiccs.system.service.TRBaseCodeService;
|
||||||
import com.chinaweal.aiccs.common.base.controller.BaseController;
|
import com.chinaweal.aiccs.common.base.controller.BaseController;
|
||||||
|
|
@ -163,6 +165,8 @@ public class TsbizrevlistController extends BaseController {
|
||||||
private OrgUM orgUM;
|
private OrgUM orgUM;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisService redisService;
|
private RedisService redisService;
|
||||||
|
@Autowired
|
||||||
|
private com.chinaweal.aiccs.aiccs.security.service.IPenaltyCaseInfoService penaltyCaseInfoService;
|
||||||
|
|
||||||
private static final String REDIS_KEY_ENABLE_PREFIX = "revoke:batch:enable:";
|
private static final String REDIS_KEY_ENABLE_PREFIX = "revoke:batch:enable:";
|
||||||
private static final String REDIS_KEY_DISABLE_PREFIX = "revoke:batch:disable:";
|
private static final String REDIS_KEY_DISABLE_PREFIX = "revoke:batch:disable:";
|
||||||
|
|
@ -1764,6 +1768,7 @@ public class TsbizrevlistController extends BaseController {
|
||||||
if (queryDto == null) {
|
if (queryDto == null) {
|
||||||
queryDto = new UnrevokedEntQueryDto();
|
queryDto = new UnrevokedEntQueryDto();
|
||||||
}
|
}
|
||||||
|
AssertUtils.isNotBlank(queryDto.getCaseid());
|
||||||
|
|
||||||
// 构建分页对象
|
// 构建分页对象
|
||||||
Page<EBaseinfo> page = new Page<>(query.getCurrent(), query.getSize());
|
Page<EBaseinfo> page = new Page<>(query.getCurrent(), query.getSize());
|
||||||
|
|
@ -1774,7 +1779,8 @@ public class TsbizrevlistController extends BaseController {
|
||||||
|
|
||||||
// 排除已吊销的市场主体(通过子查询排除)
|
// 排除已吊销的市场主体(通过子查询排除)
|
||||||
wrapper.notExists("SELECT 1 FROM revokelist r WHERE r.PRIPID = e_baseinfo.PRIPID AND r.STATE = '1'");
|
wrapper.notExists("SELECT 1 FROM revokelist r WHERE r.PRIPID = e_baseinfo.PRIPID AND r.STATE = '1'");
|
||||||
wrapper.exists("SELECT 1 FROM PENALTY_ENT_INFO p WHERE p.PRIPID = e_baseinfo.PRIPID AND p.FLG_DELETED != '1'");
|
wrapper.exists(String.format("SELECT 1 FROM PENALTY_ENT_INFO p WHERE p.PRIPID = e_baseinfo.PRIPID" +
|
||||||
|
" AND p.FLG_DELETED != '1' and p.CASEID = '%s'", queryDto.getCaseid()));
|
||||||
|
|
||||||
// 条件查询
|
// 条件查询
|
||||||
if (StringUtils.isNotBlank(queryDto.getEntname())) {
|
if (StringUtils.isNotBlank(queryDto.getEntname())) {
|
||||||
|
|
@ -1808,5 +1814,64 @@ public class TsbizrevlistController extends BaseController {
|
||||||
return RestResult.error(ResultCode.BUSINESS_LOGIC_ERROR, "查询失败:" + e.getMessage());
|
return RestResult.error(ResultCode.BUSINESS_LOGIC_ERROR, "查询失败:" + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件信息分页查询
|
||||||
|
*
|
||||||
|
* @param baseQuery 分页和筛选参数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation("案件信息分页查询")
|
||||||
|
@PostMapping("/getPenaltyCaseInfoPage")
|
||||||
|
public RestResult<IPage<PenaltyCaseInfo>> getPenaltyCaseInfoPage(@RequestBody BaseQuery<PenaltyCaseInfoQueryDTO> baseQuery) {
|
||||||
|
try {
|
||||||
|
AssertUtils.isNotNull(baseQuery);
|
||||||
|
|
||||||
|
PenaltyCaseInfoQueryDTO queryDTO = baseQuery.getEntity(PenaltyCaseInfoQueryDTO.class);
|
||||||
|
|
||||||
|
LambdaQueryWrapper<PenaltyCaseInfo> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
if (queryDTO != null) {
|
||||||
|
// 案件名称
|
||||||
|
if (StringUtils.isNotBlank(queryDTO.getCasename())) {
|
||||||
|
wrapper.like(PenaltyCaseInfo::getCasename, queryDTO.getCasename());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 案由
|
||||||
|
if (StringUtils.isNotBlank(queryDTO.getCaseintroduction())) {
|
||||||
|
wrapper.like(PenaltyCaseInfo::getCaseintroduction, queryDTO.getCaseintroduction());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 违法行为
|
||||||
|
if (StringUtils.isNotBlank(queryDTO.getIllegality())) {
|
||||||
|
wrapper.like(PenaltyCaseInfo::getIllegality, queryDTO.getIllegality());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处罚决定机关
|
||||||
|
if (StringUtils.isNotBlank(queryDTO.getPenaltyorg())) {
|
||||||
|
wrapper.like(PenaltyCaseInfo::getPenaltyorg, queryDTO.getPenaltyorg());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处罚决定日期范围
|
||||||
|
if (queryDTO.getPenaltydateStart() != null) {
|
||||||
|
wrapper.ge(PenaltyCaseInfo::getPenaltydate, queryDTO.getPenaltydateStart());
|
||||||
|
}
|
||||||
|
if (queryDTO.getPenaltydateEnd() != null) {
|
||||||
|
wrapper.le(PenaltyCaseInfo::getPenaltydate, queryDTO.getPenaltydateEnd());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 默认查询未删除的记录
|
||||||
|
wrapper.eq(PenaltyCaseInfo::getFlgDeleted, "0");
|
||||||
|
|
||||||
|
// 按创建时间倒序
|
||||||
|
wrapper.orderByDesc(PenaltyCaseInfo::getCreateTime);
|
||||||
|
|
||||||
|
return RestResult.ok(penaltyCaseInfoService.page(new Page<>(baseQuery.getCurrent(), baseQuery.getSize()), wrapper));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("查询案件信息列表失败", e);
|
||||||
|
return RestResult.error(ResultCode.BUSINESS_LOGIC_ERROR, "查询失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,4 +49,10 @@ public class UnrevokedEntQueryDto implements Serializable {
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "登记机关")
|
@ApiModelProperty(value = "登记机关")
|
||||||
private String regorg;
|
private String regorg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "案件id", required = true)
|
||||||
|
private String caseid;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package com.chinaweal.aiccs.aiccs.security.dto;
|
||||||
|
|
||||||
|
import com.chinaweal.aiccs.common.util.DateUtils;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件信息查询DTO
|
||||||
|
* @author lroyia
|
||||||
|
* @since 2026/2/25
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@ApiModel("案件信息查询DTO")
|
||||||
|
public class PenaltyCaseInfoQueryDTO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("案件名称")
|
||||||
|
private String casename;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案由
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("案由")
|
||||||
|
private String caseintroduction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 违法行为
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("违法行为")
|
||||||
|
private String illegality;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚决定机关
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("处罚决定机关")
|
||||||
|
private String penaltyorg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚决定日期-开始
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_DEFAULT_FORMAT, timezone = "GMT+8")
|
||||||
|
@ApiModelProperty("处罚决定日期-开始")
|
||||||
|
private LocalDate penaltydateStart;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚决定日期-结束
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_DEFAULT_FORMAT, timezone = "GMT+8")
|
||||||
|
@ApiModelProperty("处罚决定日期-结束")
|
||||||
|
private LocalDate penaltydateEnd;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue