9 changed files with 577 additions and 0 deletions
@ -0,0 +1,66 @@ |
|||
package com.zdxt.enforcementcode.controller.app.enterprise; |
|||
|
|||
|
|||
import com.zdxt.enforcementcode.domain.dto.enterprise.AppLawEnforcementCaseQueryDTO; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppEnforcementRegistrationVo; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppLawEnforcementCaseVo; |
|||
import com.zdxt.enforcementcode.service.enterprise.IAppLawEnforcementCaseService; |
|||
import io.swagger.v3.oas.annotations.responses.ApiResponse; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.web.core.BaseController; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* 企业端-执法案件信息控制器 |
|||
*/ |
|||
@Tag(name = "企业端-执法案件信息") |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/app-ent/lawEnforcementCase") |
|||
public class AppEntLawEnforcementCaseController extends BaseController { |
|||
|
|||
|
|||
|
|||
@Autowired |
|||
private IAppLawEnforcementCaseService appLawEnforcementCaseService; |
|||
|
|||
/** |
|||
* 企业端-执法案件信息列表 |
|||
*/ |
|||
@ApiResponse(description = "企业端-执法案件信息列表") |
|||
@GetMapping("/list") |
|||
public TableDataInfo<AppLawEnforcementCaseVo> list(AppLawEnforcementCaseQueryDTO queryDTO, PageQuery pageQuery) { |
|||
return appLawEnforcementCaseService.selectAppLawEnforcementCaseList(queryDTO, pageQuery); |
|||
} |
|||
|
|||
/** |
|||
* 企业端-执法案件信息详情 |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@ApiResponse(description = "企业端-执法案件信息详情") |
|||
@GetMapping("/lawCasedetail") |
|||
public AppLawEnforcementCaseVo lawCasedetail(AppLawEnforcementCaseQueryDTO dto) { |
|||
return appLawEnforcementCaseService.selectAppLawEnforcementCaseById(dto); |
|||
} |
|||
|
|||
/** |
|||
* 企业端-执法信息详情 |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@ApiResponse(description = "企业端-执法信息详情") |
|||
@GetMapping("/lawDetail") |
|||
public AppEnforcementRegistrationVo lawDetail(AppLawEnforcementCaseQueryDTO dto) { |
|||
return appLawEnforcementCaseService.selectAppLawEnforcementLawDetailById(dto); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
package com.zdxt.enforcementcode.domain.dto.enterprise; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
public class AppLawEnforcementCaseQueryDTO { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
private String id; |
|||
/** |
|||
* 执法时间 |
|||
*/ |
|||
private Date lawEnforcementTime; |
|||
/** |
|||
* 执法类型 |
|||
*/ |
|||
private Integer lawEnforcementType; |
|||
/** |
|||
* 统一社会信用代码 |
|||
*/ |
|||
private String socialCreditCode; |
|||
/** |
|||
* 当事人证件号码 |
|||
*/ |
|||
private String idNumber; |
|||
} |
|||
@ -0,0 +1,138 @@ |
|||
package com.zdxt.enforcementcode.domain.vo.enterprise; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class AppLawEnforcementCaseVo { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 案件编号 |
|||
*/ |
|||
private String caseCode; |
|||
/** |
|||
* 案件名称 |
|||
*/ |
|||
private String caseName; |
|||
/** |
|||
* 执法时间 |
|||
*/ |
|||
private Data lawEnforcementTime; |
|||
/** |
|||
* 执法类型 |
|||
*/ |
|||
private Integer lawEnforcementType; |
|||
/** |
|||
* 执法单位 |
|||
*/ |
|||
private String lawEnforcementUnit; |
|||
/** |
|||
* 统一社会信用代码 |
|||
*/ |
|||
private String socialCreditCode; |
|||
|
|||
/** |
|||
* 当事人类型 |
|||
*/ |
|||
private String partyType; |
|||
/** |
|||
* 当事人证件号码 |
|||
*/ |
|||
private String idNumber; |
|||
|
|||
/** |
|||
* 行政强制类型 |
|||
*/ |
|||
private String enforcementType; |
|||
|
|||
/** |
|||
* 决定文书名称 |
|||
*/ |
|||
private String decisionDocumentName; |
|||
|
|||
/** |
|||
* 决定文书号 |
|||
*/ |
|||
private String decisionDocumentNumber; |
|||
|
|||
/** |
|||
* 行政检查类型 |
|||
*/ |
|||
private String administrativeCheckType; |
|||
|
|||
/** |
|||
* 行政检查类型名称 |
|||
*/ |
|||
private String administrativeCheckTypeName; |
|||
|
|||
/** |
|||
* 决定日期 |
|||
*/ |
|||
private Data decisionDate; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 行政检查结果 |
|||
*/ |
|||
private String administrativeCheckResult; |
|||
|
|||
/** |
|||
* 行政检查决定 |
|||
*/ |
|||
private String administrativeCheckDecision; |
|||
|
|||
/** |
|||
* 执法主体名称 |
|||
*/ |
|||
private String lawEnforcementSubjectName; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 行政强制措施理由 |
|||
*/ |
|||
private String enforcementReason; |
|||
|
|||
/** |
|||
* 依据 |
|||
*/ |
|||
private String basis; |
|||
|
|||
/** |
|||
* 事实 |
|||
*/ |
|||
private String fact; |
|||
/** |
|||
* 处罚依据 |
|||
*/ |
|||
private String penaltyBasis; |
|||
|
|||
/** |
|||
* 处罚类别 |
|||
*/ |
|||
private String penaltyCategory; |
|||
/** |
|||
* 处罚金额 |
|||
*/ |
|||
private String penaltyAmount; |
|||
/** |
|||
* 没收金额 |
|||
*/ |
|||
private String collectionAmount; |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
@ -0,0 +1,46 @@ |
|||
package com.zdxt.enforcementcode.mapper.enterprise; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.zdxt.enforcementcode.domain.dto.enterprise.AppLawEnforcementCaseQueryDTO; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppLawEnforcementCaseVo; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* 企业端-执法案件Mapper接口 |
|||
*/ |
|||
public interface AppLawEnforcementCaseMapper { |
|||
|
|||
/** |
|||
* 查询企业端-执法案件列表 |
|||
* |
|||
* @param dto 查询条件 |
|||
* @param page 分页参数 |
|||
* @return 企业端-执法案件列表 |
|||
*/ |
|||
IPage<AppLawEnforcementCaseVo> selectAppLawEnforcementCaseList(@Param("dto") AppLawEnforcementCaseQueryDTO dto, @Param("page") Page<AppLawEnforcementCaseVo> page); |
|||
|
|||
/** |
|||
* 查询企业端-行政检查案件详情 |
|||
* |
|||
* @param id 主键 |
|||
* @return 企业端-执法案件 |
|||
*/ |
|||
AppLawEnforcementCaseVo selectAppLawEnforcementCaseCheckById(@Param("id") String id); |
|||
|
|||
/** |
|||
* 查询企业端-行政强制案件详情 |
|||
* |
|||
* @param id 主键 |
|||
* @return 企业端-执法案件 |
|||
*/ |
|||
AppLawEnforcementCaseVo selectAppLawEnforcementCaseCompulsoryById(@Param("id") String id); |
|||
|
|||
/** |
|||
* 查询企业端-行政处罚案件详情 |
|||
* |
|||
* @param id 主键 |
|||
* @return 企业端-执法案件 |
|||
*/ |
|||
AppLawEnforcementCaseVo selectAppLawEnforcementCasePunishmentById(@Param("id") String id); |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
package com.zdxt.enforcementcode.service.enterprise; |
|||
|
|||
import com.zdxt.enforcementcode.domain.dto.enterprise.AppLawEnforcementCaseQueryDTO; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppEnforcementRegistrationVo; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppLawEnforcementCaseVo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
|
|||
public interface IAppLawEnforcementCaseService { |
|||
|
|||
/** |
|||
* 企业端-执法案件列表 |
|||
* @param queryDTO |
|||
* @param pageQuery |
|||
* @return |
|||
*/ |
|||
TableDataInfo<AppLawEnforcementCaseVo> selectAppLawEnforcementCaseList(AppLawEnforcementCaseQueryDTO queryDTO, PageQuery pageQuery); |
|||
|
|||
/** |
|||
* 企业端-执法案件详情 |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
AppLawEnforcementCaseVo selectAppLawEnforcementCaseById(AppLawEnforcementCaseQueryDTO dto); |
|||
|
|||
/** |
|||
* 企业端-执法信息详情 |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
AppEnforcementRegistrationVo selectAppLawEnforcementLawDetailById(AppLawEnforcementCaseQueryDTO dto); |
|||
} |
|||
@ -0,0 +1,89 @@ |
|||
package com.zdxt.enforcementcode.service.enterprise.impl; |
|||
|
|||
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.zdxt.enforcementcode.common.commonenum.LawTypeEnum; |
|||
import com.zdxt.enforcementcode.domain.EnforcementRegistration; |
|||
import com.zdxt.enforcementcode.domain.ZdxtFile; |
|||
import com.zdxt.enforcementcode.domain.dto.enterprise.AppLawEnforcementCaseQueryDTO; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppEnforcementRegistrationVo; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppLawEnforcementCaseVo; |
|||
import com.zdxt.enforcementcode.mapper.ZdxtFileMapper; |
|||
import com.zdxt.enforcementcode.mapper.enterprise.AppEnforcementRegistrationMapper; |
|||
import com.zdxt.enforcementcode.mapper.enterprise.AppLawEnforcementCaseMapper; |
|||
import com.zdxt.enforcementcode.service.enterprise.IAppLawEnforcementCaseService; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class AppLawEnforcementCaseServiceImpl implements IAppLawEnforcementCaseService { |
|||
|
|||
|
|||
@Autowired |
|||
private AppLawEnforcementCaseMapper appLawEnforcementCaseMapper; |
|||
|
|||
@Autowired |
|||
private AppEnforcementRegistrationMapper appEnforcementRegistrationMapper; |
|||
|
|||
@Autowired |
|||
private ZdxtFileMapper zdxtFileMapper; |
|||
|
|||
/** |
|||
* 企业端-查询案件列表 |
|||
* @param queryDTO |
|||
* @param pageQuery |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public TableDataInfo<AppLawEnforcementCaseVo> selectAppLawEnforcementCaseList(AppLawEnforcementCaseQueryDTO queryDTO, PageQuery pageQuery) { |
|||
Page<AppLawEnforcementCaseVo> page = pageQuery.build(); |
|||
IPage<AppLawEnforcementCaseVo> result = appLawEnforcementCaseMapper.selectAppLawEnforcementCaseList(queryDTO, page); |
|||
return TableDataInfo.build(result); |
|||
} |
|||
|
|||
/** |
|||
* 企业端-查询案件详情 |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public AppLawEnforcementCaseVo selectAppLawEnforcementCaseById(AppLawEnforcementCaseQueryDTO dto) { |
|||
Integer type = dto.getLawEnforcementType(); |
|||
|
|||
if (LawTypeEnum.ADMIN_CHECK.getKey().equals(type)) { |
|||
return appLawEnforcementCaseMapper.selectAppLawEnforcementCaseCheckById(dto.getId()); |
|||
} else if (LawTypeEnum.ADMIN_PUNISH.getKey().equals(type)) { |
|||
return appLawEnforcementCaseMapper.selectAppLawEnforcementCasePunishmentById(dto.getId()); |
|||
} else { |
|||
return appLawEnforcementCaseMapper.selectAppLawEnforcementCaseCompulsoryById(dto.getId()); |
|||
} |
|||
} |
|||
/** |
|||
* 企业端-查询案执法信息详情 |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public AppEnforcementRegistrationVo selectAppLawEnforcementLawDetailById(AppLawEnforcementCaseQueryDTO dto) { |
|||
// 1. 查询执法登记主信息
|
|||
LambdaQueryWrapper<EnforcementRegistration> lqw = new LambdaQueryWrapper<EnforcementRegistration>() |
|||
.eq(EnforcementRegistration::getLawCaseId, dto.getId()) |
|||
.eq(EnforcementRegistration::getLawEnforceCategory, dto.getLawEnforcementType()); |
|||
|
|||
AppEnforcementRegistrationVo vo = appEnforcementRegistrationMapper.selectVoOne(lqw); |
|||
|
|||
// 2. 如果有主信息,则关联查询附件列表
|
|||
if (vo != null && vo.getId() != null) { |
|||
LambdaQueryWrapper<ZdxtFile> fileLqw = new LambdaQueryWrapper<ZdxtFile>() |
|||
.eq(ZdxtFile::getBusinessId, vo.getId()); |
|||
vo.setFileList(zdxtFileMapper.selectVoList(fileLqw)); |
|||
} |
|||
|
|||
return vo; |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,159 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.zdxt.enforcementcode.mapper.enterprise.AppLawEnforcementCaseMapper"> |
|||
|
|||
<select id="selectAppLawEnforcementCaseList" resultType="com.zdxt.enforcementcode.domain.vo.enterprise.AppLawEnforcementCaseVo"> |
|||
<!-- 行政检查 --> |
|||
select |
|||
t1.c601000 as id, |
|||
t1.C601002 as caseName, |
|||
t1.C601005 as lawEnforcementTime, |
|||
'1' as lawEnforcementType, |
|||
t1.c601024 as lawEnforcementUnit, |
|||
t1.c601025 as socialCreditCode, |
|||
t2.C601034 as idNumber |
|||
from |
|||
xzjcjbxx025711 t1 |
|||
left join XZJCDSRXX016987 t2 |
|||
on t1.c601000 = t2.c601000 |
|||
<where> |
|||
<if test="dto.idNumber!=null and dto.idNumber!=''"> |
|||
and t2.C601034 =#{dto.idNumber} |
|||
</if> |
|||
</where> |
|||
union all |
|||
<!-- 行政强制 --> |
|||
select |
|||
t1.c301000 as id, |
|||
t1.c301002 as caseName, |
|||
t2.c302007 as lawEnforcementTime, |
|||
'4' as lawEnforcementType, |
|||
t1.c301004 as lawEnforcementUnit, |
|||
t1.c301005 as socialCreditCode, |
|||
t3.c301010 as idNumber |
|||
from |
|||
XZQZJBXX173774 t1 |
|||
left join XZQZCSXX274939 t2 on |
|||
t1.c301000 = t2.c301000 |
|||
left join XZQZDSRXX997874 t3 on |
|||
t1.c301000 = t3.c301000 |
|||
<where> |
|||
<if test="dto.idNumber!=null and dto.idNumber!=''"> |
|||
and t3.c301010 =#{dto.idNumber} |
|||
</if> |
|||
</where> |
|||
union all |
|||
<!-- 行政处罚 --> |
|||
select |
|||
t1.c201000 as id, |
|||
t1.c201002 as caseName, |
|||
t2.c206013 as lawEnforcementTime, |
|||
'2' as lawEnforcementType, |
|||
t1.c201003 as lawEnforcementUnit, |
|||
t1.c201004 as socialCreditCode, |
|||
t3.c201016 as idNumber |
|||
from |
|||
XZCFAJJBXX026705 t1 |
|||
left join xzcfajjdxx778518 t2 on |
|||
t1.c201000 = t2.c201000 |
|||
left join XZCFAJDSRXX594019 t3 on |
|||
t1.c201000 = t3.c201000 |
|||
<where> |
|||
<if test="dto.idNumber!=null and dto.idNumber!=''"> |
|||
and t3.c201016 =#{dto.idNumber} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 执法案件-行政检查明细 --> |
|||
<select id="selectAppLawEnforcementCaseCheckById" resultType="com.zdxt.enforcementcode.domain.vo.enterprise.AppLawEnforcementCaseVo"> |
|||
select |
|||
t1.c601000 as id, |
|||
t1.c601001 as caseCode, |
|||
t1.c601002 as caseName, |
|||
t2.c601031 as partyType, |
|||
t1.c601013 as decisionDocumentName, |
|||
t1.c601012 as decisionDocumentNumber, |
|||
t1.c601010 as administrativeCheckType, |
|||
t3.dict_label as administrativeCheckTypeName, |
|||
t1.C601005 as decisionDate, |
|||
t1.c601015_1 as content, |
|||
t1.c601015 as administrativeCheckResult, |
|||
t1.c601017 as administrativeCheckDecision, |
|||
t1.c601024 as lawEnforcementSubjectName, |
|||
'' as remark |
|||
from xzjcjbxx025711 t1 |
|||
left join XZJCDSRXX016987 t2 |
|||
on t1.c601000 =t2.c601000 |
|||
left join sys_dict_data t3 |
|||
on t1.c601010 = t3.dict_value and t3.dict_type ='check_category' |
|||
<where> |
|||
<if test="id!=null and id!=''"> |
|||
and t1.c601000=#{id} |
|||
</if> |
|||
</where> |
|||
|
|||
</select> |
|||
|
|||
<!-- 执法案件-行政强制明细 --> |
|||
<select id="selectAppLawEnforcementCaseCompulsoryById" resultType="com.zdxt.enforcementcode.domain.vo.enterprise.AppLawEnforcementCaseVo"> |
|||
select |
|||
t1.c301000 as id, |
|||
t1.c301003 as caseCode, |
|||
t1.c301002 as caseName, |
|||
t3.c301007 as partyType, |
|||
t2.c302002 as enforcementType, |
|||
t2.c302009 as decisionDocumentName, |
|||
t2.c302008 as decisionDocumentNumber, |
|||
t2.c302010 as enforcementReason, |
|||
t2.c302005 as basis, |
|||
t2.c303024 as content, |
|||
t1.c301004 as lawEnforcementSubjectName, |
|||
t2.c302011 as decisionDate, |
|||
'' as remark |
|||
from |
|||
XZQZJBXX173774 t1 |
|||
left join XZQZCSXX274939 t2 on |
|||
t1.c301000 = t2.c301000 |
|||
left join XZQZDSRXX997874 t3 on |
|||
t1.c301000 = t3.c301000 |
|||
<where> |
|||
<if test="id!=null and id!=''"> |
|||
and t1.c301000=#{id} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
<!-- 执法案件-行政处罚明细 --> |
|||
<select id="selectAppLawEnforcementCasePunishmentById" resultType="com.zdxt.enforcementcode.domain.vo.enterprise.AppLawEnforcementCaseVo"> |
|||
select |
|||
t1.c201000 as id, |
|||
t1.c201001 as caseCode, |
|||
t1.c201002 as caseName, |
|||
t3.c201013 as partyType, |
|||
t2.c206015 as decisionDocumentName, |
|||
t2.c206014 as decisionDocumentNumber, |
|||
t2.c206008 as basis, |
|||
t2.c206007 as fact, |
|||
t2.c206009 as penaltyBasis, |
|||
t2.c206011 as penaltyCategory, |
|||
t2.c206012 as content, |
|||
t2.c206012_1 as penaltyAmount, |
|||
t2.c206012_2 as collectionAmount, |
|||
t2.c206013 as decisionDate, |
|||
t1.c201003 as lawEnforcementSubjectName, |
|||
t2.c206025 as remark |
|||
from |
|||
XZCFAJJBXX026705 t1 |
|||
left join xzcfajjdxx778518 t2 on |
|||
t1.c201000 = t2.c201000 |
|||
left join XZCFAJDSRXX594019 t3 on |
|||
t1.c201000 = t3.c201000 |
|||
<where> |
|||
<if test="id!=null and id!=''"> |
|||
and t1.c201000=#{id} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
</mapper> |
|||
Loading…
Reference in new issue