新增严重违法查询接口

This commit is contained in:
黎润豪 2026-01-29 17:31:23 +08:00
parent ef4fd523ef
commit eda9015eb3
2 changed files with 104 additions and 50 deletions

View File

@ -11,7 +11,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaweal.aiccs.aiccs.abnormal.entity.EBaseinfo;
import com.chinaweal.aiccs.aiccs.abnormal.entity.TSAbnList;
import com.chinaweal.aiccs.aiccs.abnormal.entity.TSWrit;
import com.chinaweal.aiccs.aiccs.abnormal.entity.excel.AbnListExcel;
import com.chinaweal.aiccs.aiccs.abnormal.service.EBaseinfoService;
import com.chinaweal.aiccs.aiccs.abnormal.service.TSAbnListService;
import com.chinaweal.aiccs.aiccs.abnormal.service.TSWritService;
@ -26,6 +25,7 @@ import com.chinaweal.aiccs.aiccs.seriousillegal.entity.TSBizSerIllegal;
import com.chinaweal.aiccs.aiccs.seriousillegal.entity.TSBizSerIllegalReas;
import com.chinaweal.aiccs.aiccs.seriousillegal.entity.TSForIllOperatingList;
import com.chinaweal.aiccs.aiccs.seriousillegal.entity.TSSerIllegalList;
import com.chinaweal.aiccs.aiccs.seriousillegal.entity.dto.IllegalListByPripIdParam;
import com.chinaweal.aiccs.aiccs.seriousillegal.entity.dto.TSBizSerIllegalVO;
import com.chinaweal.aiccs.aiccs.seriousillegal.excelDto.IllegalExcelDto;
import com.chinaweal.aiccs.aiccs.seriousillegal.service.TSBizSerIllegalService;
@ -37,6 +37,7 @@ import com.chinaweal.aiccs.common.base.controller.BaseController;
import com.chinaweal.aiccs.common.constant.Constant;
import com.chinaweal.aiccs.common.util.*;
import com.chinaweal.aicorg.model.AICUser;
import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery;
import com.chinaweal.youfool.framework.springboot.mybatis.plus.function.CustomWrapperPackingFunction;
import com.chinaweal.youfool.framework.springboot.mybatis.plus.page.PageRequestDto;
import com.chinaweal.youfool.framework.springboot.rest.RestResult;
@ -231,21 +232,22 @@ public class SerIllegalListController extends BaseController {
String searchName = StringUtils.tranObject(customParamMap.get("searchName"));
String abntime = StringUtils.tranObject(customParamMap.get("abntime"));
String serillrea = StringUtils.tranObject(customParamMap.get("serillrea"));
if(StringUtils.isNotBlank(searchUscc)){
if (StringUtils.isNotBlank(searchUscc)) {
//判断入参为统一码还是注册号
if(StringUtils.isUscc(searchUscc)){
wrapper.eq(TSSerIllegalList::getUniscid,searchUscc);
}else {
wrapper.eq(TSSerIllegalList::getRegno,searchUscc);
if (StringUtils.isUscc(searchUscc)) {
wrapper.eq(TSSerIllegalList::getUniscid, searchUscc);
} else {
wrapper.eq(TSSerIllegalList::getRegno, searchUscc);
}
}
if(StringUtils.isNotBlank(searchName)){
wrapper.like(TSSerIllegalList::getEntname,searchName);
}if(StringUtils.isNotBlank(abntime)){
wrapper.eq(TSSerIllegalList::getAbntime,abntime);
if (StringUtils.isNotBlank(searchName)) {
wrapper.like(TSSerIllegalList::getEntname, searchName);
}
if(StringUtils.isNotBlank(serillrea)){
wrapper.eq(TSSerIllegalList::getSerillrea,serillrea);
if (StringUtils.isNotBlank(abntime)) {
wrapper.eq(TSSerIllegalList::getAbntime, abntime);
}
if (StringUtils.isNotBlank(serillrea)) {
wrapper.eq(TSSerIllegalList::getSerillrea, serillrea);
}
// 判断是否查询现存名录
String exists = StringUtils.tranObject(customParamMap.get("exists"));
@ -510,10 +512,10 @@ public class SerIllegalListController extends BaseController {
}
@RequestMapping("list_by_bizseqidAndEntName")
public RestResult<List<TSBizSerIllegalVO>> getBizSpeListByBizSeqIdAndEntName(String bizSeqId,String entName) throws Exception {
public RestResult<List<TSBizSerIllegalVO>> getBizSpeListByBizSeqIdAndEntName(String bizSeqId, String entName) throws Exception {
AssertUtils.isNotBlank(bizSeqId);
List<TSBizSerIllegal> list = tsBizSerIllegalService.list(new LambdaQueryWrapper<TSBizSerIllegal>().eq(TSBizSerIllegal::getBizseq, bizSeqId)
.like(StringUtils.isNotBlank(entName),TSBizSerIllegal::getEntname,entName));
.like(StringUtils.isNotBlank(entName), TSBizSerIllegal::getEntname, entName));
List<TSBizSerIllegalVO> listVOList = new ArrayList<>();
list.forEach(each -> {
TSBizSerIllegalVO listVO = new TSBizSerIllegalVO();
@ -572,19 +574,20 @@ public class SerIllegalListController extends BaseController {
/**
* 获取统一严重违法失信企业待办列表分页
* @param request 请求
* @param pageRequestDto 分页参数与
* @return 获取结果
*
* @param request 请求
* @param pageRequestDto 分页参数与
* @return 获取结果
* @author lroyia
* @since 2021年4月19日 17:23:44
* @since 2021年4月19日 17:23:44
*/
@ApiOperation("获取统一严重违法失信企业待办列表分页")
@PostMapping("getUniIllegalTaskListPage")
public RestResult<?> getUniIllegalTaskListPage(HttpServletRequest request, @RequestBody PageRequestDto pageRequestDto){
public RestResult<?> getUniIllegalTaskListPage(HttpServletRequest request, @RequestBody PageRequestDto pageRequestDto) {
AssertUtils.isNotNull(pageRequestDto);
pageRequestDto.checkDefault(1, 10, null);
Map<String, Object> paramMap = pageRequestDto.getParamMap();
if(paramMap == null){
if (paramMap == null) {
paramMap = new HashMap<>();
}
AICUser curUser = getLoginUser(request);
@ -594,14 +597,15 @@ public class SerIllegalListController extends BaseController {
/**
* 获取严重违法失信企业个人待办总量
* @param request 请求
* @return 获取结果
*
* @param request 请求
* @return 获取结果
* @author lroyia
* @since 2021年4月19日 17:37:37
*/
@ApiOperation("查询严重违法失信企业个人待办总量")
@GetMapping("getIllegalTaskListCount")
public RestResult<?> getIllegalTaskListCount(HttpServletRequest request){
public RestResult<?> getIllegalTaskListCount(HttpServletRequest request) {
AICUser curUser = getLoginUser(request);
Map<String, Object> params = new HashMap<>();
params.put("curUserId", curUser.getPrimaryKey());
@ -610,30 +614,31 @@ public class SerIllegalListController extends BaseController {
/**
* 通过主体pripid获取主体相关严重违法失信企业名录信息
*
* @param pripid 主体pripid
* @return 查询结果
* @return 查询结果
* @author lroyia
* @since 2021年4月21日 15:25:20
* @since 2021年4月21日 15:25:20
*/
@GetMapping("listIllegalRecord")
@ApiOperation("通过主体pripid获取")
public RestResult<?> listIllegalRecord(@ApiParam("主体pripid") String pripid){
public RestResult<?> listIllegalRecord(@ApiParam("主体pripid") String pripid) {
AssertUtils.isNotBlank(pripid);
List<TSSerIllegalList> list = tsSerIllegalListService.list(new LambdaQueryWrapper<TSSerIllegalList>().eq(TSSerIllegalList::getPripid, pripid).orderByDesc(TSSerIllegalList::getAbntime));
if(CollectionUtils.isNotEmpty(list)){
if (CollectionUtils.isNotEmpty(list)) {
Map<String, TRBaseCode> moveInRea = baseCodeService.getBaseCodeMapFormCache("CD73");
Map<String, TRBaseCode> moveOutRea = baseCodeService.getBaseCodeMapFormCache("CD74");
for (TSSerIllegalList each : list) {
if(StringUtils.isNotBlank(each.getSerillrea())){
if (StringUtils.isNotBlank(each.getSerillrea())) {
TRBaseCode code = moveInRea.get(each.getSerillrea());
if(code != null){
if (code != null) {
each.setSerillreaString(code.getName());
}
}
if(StringUtils.isNotBlank(each.getRemexcpres())){
if (StringUtils.isNotBlank(each.getRemexcpres())) {
TRBaseCode code = moveOutRea.get(each.getRemexcpres());
if(code != null){
if (code != null) {
each.setRemexcpresString(code.getName());
}
}
@ -643,12 +648,12 @@ public class SerIllegalListController extends BaseController {
}
@RequestMapping("querySerllegaHistoryInfo")
public RestResult<?> querySerllegaHistoryInfo (String sapprovecode) {
public RestResult<?> querySerllegaHistoryInfo(String sapprovecode) {
return tsBizSerIllegalService.querySerllegaHistoryInfo(sapprovecode);
}
@RequestMapping("querySerllegaHistoryEnt")
public RestResult<?> querySerllegaHistoryEnt (@RequestBody PageRequestDto pageRequestDto) {
public RestResult<?> querySerllegaHistoryEnt(@RequestBody PageRequestDto pageRequestDto) {
return tsBizSerIllegalService.querySerllegaHistoryEnt(pageRequestDto);
}
@ -712,24 +717,24 @@ public class SerIllegalListController extends BaseController {
List<String> idsByParentId = areaSliceService.getIdsByParentId(sliceId); //获取所有子片区id
idsByParentId.add(sliceId); //加上父id
String values = ""; //拼接片区id
for(int i = 0; i < idsByParentId.size(); i++){
if (i == 0) values += "(" ;
for (int i = 0; i < idsByParentId.size(); i++) {
if (i == 0) values += "(";
values += "'" + idsByParentId.get(i) + "'";
if (i != idsByParentId.size() - 1) values += ",";
if (i == idsByParentId.size() - 1) values += ")";
if (i != idsByParentId.size() - 1) values += ",";
if (i == idsByParentId.size() - 1) values += ")";
}
queryWrapper.lambda().exists(String.format("select 1 from e_baseinfo e where tsserillegallist.pripid = e.pripid and e.sareacode_temp in %s", values));
}
}
// 主体类型
if (customParamMap.containsKey("entType")) {
String entType = customParamMap.get("entType").toString();
String entType = customParamMap.get("entType").toString();
if (StringUtils.isNotBlank(entType)) {
if(entType.equals("0")) //企业
if (entType.equals("0")) //企业
queryWrapper.lambda().exists("select 1 from e_baseinfo e where tsserillegallist.pripid = e.pripid and e.enttype not in ('8000','8100','8200','8300','9000','9100','9200','9910','99100','99101','99102','99103','9999')");
else if(entType.equals("1")) //个体户
else if (entType.equals("1")) //个体户
queryWrapper.lambda().exists("select 1 from e_baseinfo e where tsserillegallist.pripid = e.pripid and e.enttype in ('9910','99100','99101','99102','99103','9999')");
else if(entType.equals("2")) //农合
else if (entType.equals("2")) //农合
queryWrapper.lambda().exists("select 1 from e_baseinfo e where tsserillegallist.pripid = e.pripid and e.enttype in ('9100','9200')");
}
}
@ -741,6 +746,7 @@ public class SerIllegalListController extends BaseController {
/**
* 综合查询 - 严重违法失信名录导出
*
* @param pageRequestDto
* @param response
* @return
@ -779,24 +785,24 @@ public class SerIllegalListController extends BaseController {
List<String> idsByParentId = areaSliceService.getIdsByParentId(sliceId); //获取所有子片区id
idsByParentId.add(sliceId); //加上父id
String values = ""; //拼接片区id
for(int i = 0; i < idsByParentId.size(); i++){
if (i == 0) values += "(" ;
for (int i = 0; i < idsByParentId.size(); i++) {
if (i == 0) values += "(";
values += "'" + idsByParentId.get(i) + "'";
if (i != idsByParentId.size() - 1) values += ",";
if (i == idsByParentId.size() - 1) values += ")";
if (i != idsByParentId.size() - 1) values += ",";
if (i == idsByParentId.size() - 1) values += ")";
}
queryWrapper.lambda().exists(String.format("select 1 from e_baseinfo e where tsserillegallist.pripid = e.pripid and e.sareacode_temp in %s", values));
}
}
// 主体类型
if (customParamMap.containsKey("entType")) {
String entType = customParamMap.get("entType").toString();
String entType = customParamMap.get("entType").toString();
if (StringUtils.isNotBlank(entType)) {
if(entType.equals("0")) //企业
if (entType.equals("0")) //企业
queryWrapper.lambda().exists("select 1 from e_baseinfo e where tsserillegallist.pripid = e.pripid and e.enttype not in ('8000','8100','8200','8300','9000','9100','9200','9910','99100','99101','99102','99103','9999')");
else if(entType.equals("1")) //个体户
else if (entType.equals("1")) //个体户
queryWrapper.lambda().exists("select 1 from e_baseinfo e where tsserillegallist.pripid = e.pripid and e.enttype in ('9910','99100','99101','99102','99103','9999')");
else if(entType.equals("2")) //农合
else if (entType.equals("2")) //农合
queryWrapper.lambda().exists("select 1 from e_baseinfo e where tsserillegallist.pripid = e.pripid and e.enttype in ('9100','9200')");
}
}
@ -810,7 +816,7 @@ public class SerIllegalListController extends BaseController {
List<TSSerIllegalList> data = tsSerIllegalListService.list(wrapper);
// 转换为导出对象
List<IllegalExcelDto> rs = BeanUtil.copyToList(data, IllegalExcelDto.class);
List<IllegalExcelDto> rs = BeanUtil.copyToList(data, IllegalExcelDto.class);
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
@ -829,4 +835,19 @@ public class SerIllegalListController extends BaseController {
if (excelWriter != null) excelWriter.finish();
}
}
/**
* 查询市场主体的列严记录分页
*
* @param pageQuery 分页参数
* @return 分页结果
*/
@ApiOperation("查询市场主体的列严记录分页")
@PostMapping("getIllegalListByPripId")
public RestResult<IPage<TSSerIllegalList>> getIllegalListByPripId(@RequestBody @ApiParam(value = "分页参数", required = true) BaseQuery<IllegalListByPripIdParam> pageQuery) {
IllegalListByPripIdParam param = pageQuery.getEntity(IllegalListByPripIdParam.class);
return RestResult.ok(tsSerIllegalListService.lambdaQuery().eq(TSSerIllegalList::getPripid, param.getPripid())
.eq(StringUtils.isNotBlank(param.getOperationStatus()), TSSerIllegalList::getOperationStatus, param.getOperationStatus())
.page(new Page<>(pageQuery.getCurrent(), pageQuery.getSize())));
}
}

View File

@ -0,0 +1,33 @@
package com.chinaweal.aiccs.aiccs.seriousillegal.entity.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 市场主体列严记录分页查询参数
* @author lroyia
* @since 2026/1/29 16:48
**/
@Data
@Accessors(chain = true)
@ApiModel("市场主体列严记录分页查询参数")
public class IllegalListByPripIdParam implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 市场主体主键
*/
@ApiModelProperty(value = "市场主体主键", required = true)
private String pripid;
/**
* 记录状态
*/
@ApiModelProperty("记录状态")
private String operationStatus;
}