整合行政处罚信用修复
This commit is contained in:
parent
69c7344a47
commit
c50a5d2d37
|
|
@ -4,19 +4,19 @@ import cn.hutool.core.util.IdUtil;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chinaweal.aiccs.aiccs.abnormal.entity.EBaseinfo;
|
||||
import com.chinaweal.aiccs.aiccs.abnormal.entity.TSAttachment;
|
||||
import com.chinaweal.aiccs.aiccs.abnormal.service.TSAttachmentService;
|
||||
import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList;
|
||||
import com.chinaweal.aiccs.aiccs.business.service.TSTaskListService;
|
||||
import com.chinaweal.aiccs.aiccs.fraudreg.dto.FraudInfoDto;
|
||||
import com.chinaweal.aiccs.aiccs.punishment.entity.PunishmentUnionDto;
|
||||
import com.chinaweal.aiccs.aiccs.punishment.entity.TBizRemPunishment;
|
||||
import com.chinaweal.aiccs.aiccs.punishment.service.ITBizRemPunishmentService;
|
||||
import com.chinaweal.aiccs.aiccs.writs.entity.Tswrittemplate;
|
||||
import com.chinaweal.aiccs.aiccs.writs.service.TswrittemplateService;
|
||||
import com.chinaweal.aiccs.common.base.controller.BaseController;
|
||||
import com.chinaweal.aiccs.common.constant.Constant;
|
||||
import com.chinaweal.aiccs.common.util.StringUtils;
|
||||
import com.chinaweal.aiccs.common.util.filestorage.FileStorageService;
|
||||
import com.chinaweal.aiccs.common.util.valid.ValidGroup;
|
||||
import com.chinaweal.aiccs.config.CommonConfig;
|
||||
import com.chinaweal.aiccs.crgs.punish.entity.TbIlcPunInfoQuery;
|
||||
import com.chinaweal.aiccs.crgs.punish.service.TbIlcPunInfoQueryService;
|
||||
|
|
@ -29,21 +29,16 @@ import com.chinaweal.youfool.framework.springboot.rest.ResultCode;
|
|||
import com.chinaweal.youfool.framework.springboot.util.AssertUtils;
|
||||
import com.chinaweal.youfool.framework.sso.util.SSOUtil;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSort;
|
||||
import com.chinaweal.aiccs.aiccs.punishment.entity.TBizRemPunishment;
|
||||
import com.chinaweal.aiccs.aiccs.punishment.service.ITBizRemPunishmentService;
|
||||
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.ConstraintViolation;
|
||||
import javax.validation.Valid;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
|
@ -52,12 +47,8 @@ import java.nio.charset.StandardCharsets;
|
|||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
@ -133,22 +124,16 @@ public class TBizRemPunishmentController extends BaseController {
|
|||
|
||||
@ApiOperation(value = "6.查询行政处罚记录", position = 6)
|
||||
@PostMapping("/punishmentList")
|
||||
public RestResult<IPage<?>> punishmentList(@RequestBody PageRequestDto pageRequestDto) {
|
||||
public RestResult<IPage<PunishmentUnionDto>> punishmentList(@RequestBody PageRequestDto pageRequestDto) {
|
||||
AICUser curUser = SSOUtil.getUser();
|
||||
|
||||
//获取当前用户所在辖区
|
||||
String region = curUser.getRegionID();
|
||||
// if (curUser.getOrgName().indexOf("区") != -1) {
|
||||
// region=curUser.getOrgName().substring(curUser.getOrgName().indexOf("市") == -1? 0 : curUser.getOrgName().indexOf("市") + 1, curUser.getOrgName().indexOf("区"));
|
||||
// } else {
|
||||
// region="市";
|
||||
// }
|
||||
|
||||
//自治区的账号可以发起所有的行政处罚,主要是针对药监局的行政处罚
|
||||
if(!StringUtils.equals("150000",region)){
|
||||
pageRequestDto.getParamMap().put("region",region);
|
||||
// 自治区的账号可以发起所有的行政处罚,主要是针对药监局的行政处罚
|
||||
if (!StringUtils.equals("150000", region)) {
|
||||
pageRequestDto.getParamMap().put("region", region);
|
||||
}
|
||||
IPage<TbIlcPunInfoQuery> iPage = tbIlcPunInfoQueryService.searchByPage(new Page<>(pageRequestDto.getCurPage(), pageRequestDto.getPageSize()), pageRequestDto.getParamMap());
|
||||
IPage<PunishmentUnionDto> iPage = tbIlcPunInfoQueryService.searchUnionByPage(
|
||||
new Page<>(pageRequestDto.getCurPage(), pageRequestDto.getPageSize()),
|
||||
pageRequestDto.getParamMap());
|
||||
return RestResult.ok(iPage);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,101 @@
|
|||
package com.chinaweal.aiccs.aiccs.punishment.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
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 lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 行政处罚统一查询DTO(本省+外省UNION)
|
||||
*
|
||||
* @author chinaweal
|
||||
* @since 2026-04-02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "PunishmentUnionDto对象", description = "行政处罚统一查询DTO")
|
||||
public class PunishmentUnionDto extends Model<PunishmentUnionDto> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 案件ID
|
||||
*/
|
||||
@ApiModelProperty(value = "案件ID")
|
||||
private String caseId;
|
||||
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String entName;
|
||||
|
||||
/**
|
||||
* 统一社会信用代码
|
||||
*/
|
||||
@ApiModelProperty(value = "统一社会信用代码")
|
||||
private String uniscid;
|
||||
|
||||
/**
|
||||
* 注册号
|
||||
*/
|
||||
@ApiModelProperty(value = "注册号")
|
||||
private String regNo;
|
||||
|
||||
/**
|
||||
* 处罚决定书文号
|
||||
*/
|
||||
@ApiModelProperty(value = "处罚决定书文号")
|
||||
private String penDecNo;
|
||||
|
||||
/**
|
||||
* 处罚机关
|
||||
*/
|
||||
@ApiModelProperty(value = "处罚机关")
|
||||
private String penAuthCn;
|
||||
|
||||
/**
|
||||
* 处罚决定日期
|
||||
*/
|
||||
@JsonFormat(pattern = DateUtils.DATETIME_DEFAULT_FORMAT, timezone = "GMT+8")
|
||||
@ApiModelProperty(value = "处罚决定日期")
|
||||
private LocalDateTime penDecIssDate;
|
||||
|
||||
/**
|
||||
* 处罚内容
|
||||
*/
|
||||
@ApiModelProperty(value = "处罚内容")
|
||||
private String penContent;
|
||||
|
||||
/**
|
||||
* 罚款金额
|
||||
*/
|
||||
@ApiModelProperty(value = "罚款金额")
|
||||
private BigDecimal penam;
|
||||
|
||||
/**
|
||||
* 违法类型
|
||||
*/
|
||||
@ApiModelProperty(value = "违法类型")
|
||||
private String illegActType;
|
||||
|
||||
/**
|
||||
* 数据来源标识(本省/外省)
|
||||
*/
|
||||
@ApiModelProperty(value = "数据来源标识")
|
||||
private String dataSource;
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.caseId;
|
||||
}
|
||||
}
|
||||
|
|
@ -151,4 +151,11 @@ public class TBizRemPunishment extends SuperEntity {
|
|||
@TableField(exist = false)
|
||||
String nextPerformerName;
|
||||
|
||||
/**
|
||||
* 数据来源标识 本省/外省
|
||||
*/
|
||||
@ApiModelProperty(value = "数据来源标识")
|
||||
@TableField(exist = false)
|
||||
private String sourceType;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -41,5 +42,5 @@ public interface QgCasePubNbaseinfoMapper extends BaseMapper<QgCasePubNbaseinfo>
|
|||
* @param now 当前时间戳
|
||||
* @return 更新行数
|
||||
*/
|
||||
int updateForRepair(@Param("caseid") String caseid, @Param("approvalDate") java.util.Date approvalDate, @Param("now") LocalDateTime now);
|
||||
int updateForRepair(@Param("caseid") String caseid, @Param("approvalDate") LocalDate approvalDate, @Param("now") LocalDateTime now);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.chinaweal.aiccs.aiccs.punishment.entity.QgCasePubNbaseinfo;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -19,7 +20,8 @@ public interface IQgCasePubNbaseinfoService extends IService<QgCasePubNbaseinfo>
|
|||
|
||||
/**
|
||||
* 分页查询跨省行政处罚信息
|
||||
* @param page 分页参数
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param params 查询参数
|
||||
* @return 分页结果
|
||||
*/
|
||||
|
|
@ -27,6 +29,7 @@ public interface IQgCasePubNbaseinfoService extends IService<QgCasePubNbaseinfo>
|
|||
|
||||
/**
|
||||
* 根据ID查询
|
||||
*
|
||||
* @param caseid 案件ID
|
||||
* @return 跨省行政处罚信息
|
||||
*/
|
||||
|
|
@ -34,9 +37,10 @@ public interface IQgCasePubNbaseinfoService extends IService<QgCasePubNbaseinfo>
|
|||
|
||||
/**
|
||||
* 更新修复状态
|
||||
* @param caseid 案件ID
|
||||
*
|
||||
* @param caseid 案件ID
|
||||
* @param approvalDate 审批日期
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean updateForRepair(String caseid, java.util.Date approvalDate);
|
||||
boolean updateForRepair(String caseid, LocalDate approvalDate);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.chinaweal.aiccs.aiccs.punishment.mapper.QgCasePubNbaseinfoMapper;
|
|||
import com.chinaweal.aiccs.aiccs.punishment.service.IQgCasePubNbaseinfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -33,7 +34,7 @@ public class IQgCasePubNbaseinfoServiceImpl extends ServiceImpl<QgCasePubNbasein
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean updateForRepair(String caseid, java.util.Date approvalDate) {
|
||||
public boolean updateForRepair(String caseid, LocalDate approvalDate) {
|
||||
int rows = this.baseMapper.updateForRepair(caseid, approvalDate, LocalDateTime.now());
|
||||
return rows > 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,6 +73,10 @@ public class TBizRemPunishmentServiceImpl extends BaseServiceImpl<TBizRemPunishm
|
|||
private TSWritService tsWritService;
|
||||
@Autowired
|
||||
private TSOpinionService tsOpinionService;
|
||||
@Resource
|
||||
private com.chinaweal.aiccs.aiccs.punishment.service.IQgCasePubNbaseinfoService qgCasePubNbaseinfoService;
|
||||
@Resource
|
||||
private com.chinaweal.aiccs.aiccs.punishment.service.ICrECaseService crECaseService;
|
||||
|
||||
@Override
|
||||
public TBizRemPunishment saveTBizRemPunishment(TBizRemPunishment tBizRemPunishment) {
|
||||
|
|
@ -99,8 +103,29 @@ public class TBizRemPunishmentServiceImpl extends BaseServiceImpl<TBizRemPunishm
|
|||
public Map<String, String> startTask(TBizRemPunishment tBizRemPunishment) {
|
||||
AICUser loginUser = SSOUtil.getUser();
|
||||
Map<String, String> resultMap = new HashMap<>();
|
||||
String entName = "";
|
||||
|
||||
// 先查本省表
|
||||
TbIlcPunInfoQuery tbIlcPunInfoQuery = tbIlcPunInfoQueryService.findById(tBizRemPunishment.getPunishmentId());
|
||||
EBaseinfo eBaseInfo = eBaseInfoService.lambdaQuery().eq(EBaseinfo::getUniscid, tbIlcPunInfoQuery.getUniscid()).one();
|
||||
if (tbIlcPunInfoQuery != null) {
|
||||
// 本省案件
|
||||
tBizRemPunishment.setSourceType("本省");
|
||||
EBaseinfo eBaseInfo = eBaseInfoService.lambdaQuery().eq(EBaseinfo::getUniscid, tbIlcPunInfoQuery.getUniscid()).one();
|
||||
tBizRemPunishment.setPripid(eBaseInfo.getPripid());
|
||||
entName = eBaseInfo.getEntname();
|
||||
} else {
|
||||
// 查外省表
|
||||
com.chinaweal.aiccs.aiccs.punishment.entity.QgCasePubNbaseinfo qgCasePubNbaseinfo =
|
||||
qgCasePubNbaseinfoService.findById(tBizRemPunishment.getPunishmentId());
|
||||
if (qgCasePubNbaseinfo != null) {
|
||||
// 外省案件
|
||||
tBizRemPunishment.setSourceType("外省");
|
||||
tBizRemPunishment.setPripid(qgCasePubNbaseinfo.getPripid());
|
||||
entName = qgCasePubNbaseinfo.getEntname();
|
||||
} else {
|
||||
throw new RuntimeException("未找到对应的行政处罚记录");
|
||||
}
|
||||
}
|
||||
|
||||
String bizSeq = IdUtil.simpleUUID();
|
||||
tBizRemPunishment.setId(bizSeq);
|
||||
|
|
@ -108,14 +133,13 @@ public class TBizRemPunishmentServiceImpl extends BaseServiceImpl<TBizRemPunishm
|
|||
tBizRemPunishment.setStatus("0");
|
||||
tBizRemPunishment.setLinkType("1");
|
||||
tBizRemPunishment.setBizSeq(bizSeq);
|
||||
tBizRemPunishment.setPripid(eBaseInfo.getPripid());
|
||||
this.save(tBizRemPunishment);
|
||||
|
||||
// 启动工作流
|
||||
TSTaskList tsTaskList = new TSTaskList();
|
||||
tsTaskList.setBizseqid(bizSeq);
|
||||
tsTaskList.setBustype(BaseDataConstant.BUSINESS_TYPE_REM_PUNISH);
|
||||
tsTaskList.setBusname(eBaseInfo.getEntname());
|
||||
tsTaskList.setBusname(entName);
|
||||
//新待办 设置待办信息
|
||||
tsTaskList = HandleWorkFlowUtil.createTaskList(tsTaskList, loginUser);
|
||||
//开始工作流
|
||||
|
|
@ -179,8 +203,14 @@ public class TBizRemPunishmentServiceImpl extends BaseServiceImpl<TBizRemPunishm
|
|||
} else { //准予修复
|
||||
//文书模板数据转为文书正式数据
|
||||
this.handleTsWrit(tBizRemPunishment, tswrittemplate);
|
||||
//行政处罚信用修复信息插入数据
|
||||
insertCaseCreInformation(tBizRemPunishment);
|
||||
//根据数据来源判断处理方式
|
||||
if ("外省".equals(tBizRemPunishment.getSourceType())) {
|
||||
// 外省:更新QG表 + 插入CR_E_CASE
|
||||
this.insertCrECase(tBizRemPunishment);
|
||||
} else {
|
||||
// 本省:插入本地修复信息
|
||||
this.insertCaseCreInformation(tBizRemPunishment);
|
||||
}
|
||||
tBizRemPunishment.setStatus("2"); //设置业务状态为通过
|
||||
opinion.setIsagree("1");
|
||||
}
|
||||
|
|
@ -308,7 +338,7 @@ public class TBizRemPunishmentServiceImpl extends BaseServiceImpl<TBizRemPunishm
|
|||
//文书模板数据转为文书正式数据
|
||||
this.handleTsWrit(tBizRemPunishment, tswrittemplate);
|
||||
//外省行政处罚修复:修改跨省表 + 插入跨省修复案例表
|
||||
this.insertCrECase(tBizRemPunishment, qgCasePubNbaseinfoService, crECaseService);
|
||||
this.insertCrECase(tBizRemPunishment);
|
||||
tBizRemPunishment.setStatus("2"); //设置业务状态为通过
|
||||
opinion.setIsagree("1");
|
||||
}
|
||||
|
|
@ -348,16 +378,11 @@ public class TBizRemPunishmentServiceImpl extends BaseServiceImpl<TBizRemPunishm
|
|||
/**
|
||||
* 外省行政处罚修复 - 插入跨省修复案例表并更新跨省处罚表
|
||||
* @param tBizRemPunishment 业务信息
|
||||
* @param qgCasePubNbaseinfoService 跨省处罚信息服务
|
||||
* @param crECaseService 跨省修复案例服务
|
||||
*/
|
||||
private void insertCrECase(TBizRemPunishment tBizRemPunishment,
|
||||
com.chinaweal.aiccs.aiccs.punishment.service.IQgCasePubNbaseinfoService qgCasePubNbaseinfoService,
|
||||
com.chinaweal.aiccs.aiccs.punishment.service.ICrECaseService crECaseService) {
|
||||
private void insertCrECase(TBizRemPunishment tBizRemPunishment) {
|
||||
// 1. 更新跨省处罚表:opflag='D', pubdeadline=审批日期, S_EXT_DATETIME=审批日期
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
Date approvalDate = Date.from(now.atZone(ZoneId.systemDefault()).toInstant());
|
||||
qgCasePubNbaseinfoService.updateForRepair(tBizRemPunishment.getPunishmentId(), approvalDate);
|
||||
qgCasePubNbaseinfoService.updateForRepair(tBizRemPunishment.getPunishmentId(), now.toLocalDate());
|
||||
|
||||
// 2. 获取跨省处罚信息用于插入CR_E_CASE
|
||||
com.chinaweal.aiccs.aiccs.punishment.entity.QgCasePubNbaseinfo qgCasePubNbaseinfo =
|
||||
|
|
|
|||
|
|
@ -21,4 +21,6 @@ public interface TbIlcPunInfoQueryMapper extends BaseMapper<TbIlcPunInfoQuery> {
|
|||
IPage<TbIlcPunInfoQuery> searchByPage(Page<TbIlcPunInfoQuery> page, @Param("params") Map<String, Object> params);
|
||||
|
||||
TbIlcPunInfoQuery findById(@Param("id") String id);
|
||||
|
||||
IPage<com.chinaweal.aiccs.aiccs.punishment.entity.PunishmentUnionDto> searchUnionByPage(Page<?> page, @Param("params") Map<String, Object> params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,4 +20,6 @@ public interface TbIlcPunInfoQueryService extends BaseService<TbIlcPunInfoQuery>
|
|||
IPage<TbIlcPunInfoQuery> searchByPage(Page<TbIlcPunInfoQuery> page, Map<String, Object> params);
|
||||
|
||||
TbIlcPunInfoQuery findById(String id);
|
||||
|
||||
IPage<com.chinaweal.aiccs.aiccs.punishment.entity.PunishmentUnionDto> searchUnionByPage(Page<?> page, Map<String, Object> params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.chinaweal.aiccs.crgs.punish.service.impl;
|
|||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chinaweal.aiccs.aiccs.punishment.entity.PunishmentUnionDto;
|
||||
import com.chinaweal.aiccs.crgs.punish.entity.TbIlcPunInfoQuery;
|
||||
import com.chinaweal.aiccs.crgs.punish.mapper.TbIlcPunInfoQueryMapper;
|
||||
import com.chinaweal.aiccs.crgs.punish.service.TbIlcPunInfoQueryService;
|
||||
|
|
@ -34,4 +35,9 @@ public class TbIlcPunInfoQueryServiceImpl extends BaseServiceImpl<TbIlcPunInfoQu
|
|||
public TbIlcPunInfoQuery findById(String id) {
|
||||
return tbIlcPunInfoQueryMapper.findById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PunishmentUnionDto> searchUnionByPage(Page<?> page, Map<String, Object> params) {
|
||||
return tbIlcPunInfoQueryMapper.searchUnionByPage(page, params);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,4 +98,66 @@
|
|||
select <include refid="As_Base_Column_List"/> from case_pub_nbaseinfo where ACTYPE = '1' and CASEID = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 行政处罚记录UNION查询(本省+外省) -->
|
||||
<select id="searchUnionByPage" resultType="com.chinaweal.aiccs.aiccs.punishment.entity.PunishmentUnionDto">
|
||||
(
|
||||
SELECT
|
||||
CASEID AS caseId,
|
||||
ENTNAME AS entName,
|
||||
UNISCID AS uniscid,
|
||||
REGNO AS regNo,
|
||||
PENDECNO AS penDecNo,
|
||||
PENAUTH_CN AS penAuthCn,
|
||||
PENDECISSDATE AS penDecIssDate,
|
||||
PENCONTENT AS penContent,
|
||||
PENAM AS penam,
|
||||
ILLEGACTTYPE AS illegActType,
|
||||
'外省' AS dataSource
|
||||
FROM QG_CASE_PUB_NBASEINFO
|
||||
WHERE ACTYPE = '1'
|
||||
<if test="params.uniscid != null and params.uniscid != ''">
|
||||
AND (UNISCID = #{params.uniscid} OR REGNO = #{params.uniscid})
|
||||
</if>
|
||||
<if test="params.entname != null and params.entname != ''">
|
||||
AND ENTNAME LIKE '%' || #{params.entname} || '%'
|
||||
</if>
|
||||
<if test="params.penAuthCn != null and params.penAuthCn != ''">
|
||||
AND PENAUTH_CN = #{params.penAuthCn}
|
||||
</if>
|
||||
<if test="params.penDecNo != null and params.penDecNo != ''">
|
||||
AND PENDECNO = #{params.penDecNo}
|
||||
</if>
|
||||
AND (OPFLAG IS NULL OR OPFLAG != 'D')
|
||||
)
|
||||
UNION ALL
|
||||
(
|
||||
SELECT
|
||||
ID AS caseId,
|
||||
DSRMC AS entName,
|
||||
UNISCID AS uniscid,
|
||||
ZCH AS regNo,
|
||||
SBOOKCODE AS penDecNo,
|
||||
CFDJJG AS penAuthCn,
|
||||
CFJDSJ AS penDecIssDate,
|
||||
SPUNCONTENT AS penContent,
|
||||
PENAM AS penam,
|
||||
SGISTTYPENAME AS illegActType,
|
||||
'本省' AS dataSource
|
||||
FROM case_pub_nbaseinfo
|
||||
WHERE ACTYPE = '1'
|
||||
<if test="params.region != null and params.region != '' and params.region != '市'.toString()">
|
||||
AND PENAUTH LIKE concat(#{params.region}, '%')
|
||||
</if>
|
||||
<if test="params.uniscid != null and params.uniscid != ''">
|
||||
AND (UNISCID = #{params.uniscid} OR ZCH = #{params.uniscid})
|
||||
</if>
|
||||
<if test="params.entname != null and params.entname != ''">
|
||||
AND DSRMC LIKE concat('%', #{params.entname}, '%')
|
||||
</if>
|
||||
<if test="params.penAuthCn != null and params.penAuthCn != ''">
|
||||
AND CFDJJG = #{params.penAuthCn}
|
||||
</if>
|
||||
)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue