Compare commits
2 Commits
401b8c455f
...
7332eee6d0
| Author | SHA1 | Date |
|---|---|---|
|
|
7332eee6d0 | |
|
|
489b4f8fba |
|
|
@ -0,0 +1,28 @@
|
||||||
|
# XQ-20260327-008 失败报告
|
||||||
|
|
||||||
|
## 开发状态: ✅ 完成
|
||||||
|
|
||||||
|
## 编译检查状态: ⚠️ 无法执行
|
||||||
|
|
||||||
|
### 原因
|
||||||
|
当前环境中未安装 Maven 和 Java 编译器,无法执行 `mvn compile` 进行编译检查。
|
||||||
|
|
||||||
|
### 尝试次数
|
||||||
|
- 编译检查: 0次 (环境限制)
|
||||||
|
|
||||||
|
### 错误信息
|
||||||
|
```
|
||||||
|
/bin/bash: line 1: mvn: command not found
|
||||||
|
```
|
||||||
|
|
||||||
|
### 说明
|
||||||
|
代码已提交并推送至远端分支 `XQ-20260327-008`。由于环境限制,无法在本地执行编译验证。建议在有 Maven 环境的机器上进行以下验证:
|
||||||
|
|
||||||
|
1. 执行 `mvn compile` 检查编译是否通过
|
||||||
|
2. 执行 `mvn package` 进行完整打包测试
|
||||||
|
3. 在 IDE 中导入项目检查是否有语法错误
|
||||||
|
|
||||||
|
## 分支信息
|
||||||
|
- 分支名: `XQ-20260327-008`
|
||||||
|
- 远端地址: `http://47.107.61.133:3000/nm-project/aiccs-api`
|
||||||
|
- 推送状态: ✅ 已推送成功
|
||||||
|
|
@ -0,0 +1,113 @@
|
||||||
|
# XQ-20260327-008 开发思路与改动
|
||||||
|
|
||||||
|
## 一、开发思路
|
||||||
|
|
||||||
|
基于原有的行政处罚修复功能(TBizRemPunishmentController),新建一套外省行政处罚修复接口。主要区别在于:
|
||||||
|
1. 数据来源不同:本地表 → 跨省表QG_CASE_PUB_NBASEINFO
|
||||||
|
2. 主体信息查询不同:从EBaseinfo查询 → 从QG_CASE_PUB_NBASEINFO直接获取
|
||||||
|
3. 办结后处理不同:插入CASE_CRE_INFORMATION → 修改QG_CASE_PUB_NBASEINFO + 插入CR_E_CASE
|
||||||
|
|
||||||
|
## 二、代码改动清单
|
||||||
|
|
||||||
|
### 1. 新建实体类
|
||||||
|
|
||||||
|
#### 1.1 QG_CASE_PUB_NBASEINFO 实体
|
||||||
|
- **路径**: `src/main/java/com/chinaweal/aiccs/aiccs/punishment/entity/QgCasePubNbaseinfo.java`
|
||||||
|
- **说明**: 跨省行政处罚基本信息实体,对应表crgs.QG_CASE_PUB_NBASEINFO
|
||||||
|
- **主要字段**:
|
||||||
|
- `caseid`: 案件ID
|
||||||
|
- `entname`: 企业名称
|
||||||
|
- `uniscid`: 统一社会信用代码
|
||||||
|
- `regno`: 注册号
|
||||||
|
- `penDecNo`: 处罚决定书文号
|
||||||
|
- `penAuthCn`: 处罚机关中文
|
||||||
|
- `opflag`: 操作标志(修复时改为D)
|
||||||
|
- `pubDeadline`: 公示截止日期
|
||||||
|
- `sExtDatetime`: 时间戳
|
||||||
|
|
||||||
|
### 2. 新建Mapper
|
||||||
|
|
||||||
|
#### 2.1 QgCasePubNbaseinfoMapper
|
||||||
|
- **路径**: `src/main/java/com/chinaweal/aiccs/aiccs/punishment/mapper/QgCasePubNbaseinfoMapper.java`
|
||||||
|
- **接口**: `IQgCasePubNbaseinfoService`
|
||||||
|
|
||||||
|
#### 2.2 Mapper XML
|
||||||
|
- **路径**: `src/main/resources/mybatis/mapper/aiccs/punishment/QgCasePubNbaseinfoMapper.xml`
|
||||||
|
- **说明**: 包含分页查询、按ID查询、更新修复状态方法
|
||||||
|
|
||||||
|
### 3. 新建Service
|
||||||
|
|
||||||
|
#### 3.1 IQgCasePubNbaseinfoService
|
||||||
|
- **路径**: `src/main/java/com/chinaweal/aiccs/aiccs/punishment/service/IQgCasePubNbaseinfoService.java`
|
||||||
|
- **方法**:
|
||||||
|
- `searchByPage`: 分页查询跨省行政处罚信息
|
||||||
|
- `findById`: 根据ID查询
|
||||||
|
- `updateForRepair`: 更新修复状态(opflag='D', pubdeadline, S_EXT_DATETIME)
|
||||||
|
|
||||||
|
#### 3.2 QgCasePubNbaseinfoServiceImpl
|
||||||
|
- **路径**: `src/main/java/com/chinaweal/aiccs/aiccs/punishment/service/impl/QgCasePubNbaseinfoServiceImpl.java`
|
||||||
|
|
||||||
|
### 4. 新建Controller
|
||||||
|
|
||||||
|
#### 4.1 TBizRemPunishmentNController(外省行政处罚修复)
|
||||||
|
- **路径**: `src/main/java/com/chinaweal/aiccs/aiccs/punishment/controller/TBizRemPunishmentNController.java`
|
||||||
|
- **说明**: 外省行政处罚修复控制器,复用原有界面和流程
|
||||||
|
- **主要接口**(与原TBizRemPunishmentController对应):
|
||||||
|
- `punishmentList`: 查询外省行政处罚记录(走QG表)
|
||||||
|
- `startTask`: 启动待办(主体信息从QG表获取)
|
||||||
|
- `submitTask`: 提交待办(办结时修改QG表+插入CR_E_CASE)
|
||||||
|
|
||||||
|
### 5. 复用现有类
|
||||||
|
|
||||||
|
#### 5.1 复用实体
|
||||||
|
- `TBizRemPunishment`: 业务表(新增一个业务类型标识区分)
|
||||||
|
- `CrECase`: 跨省修复案例表(办结时插入)
|
||||||
|
|
||||||
|
#### 5.2 复用Service
|
||||||
|
- `ICrECaseService`: 插入CR_E_CASE表
|
||||||
|
- `TSTaskListService`: 工作流任务
|
||||||
|
- `TSAttachmentService`: 附件
|
||||||
|
- `TswrittemplateService`: 文书模板
|
||||||
|
- `TbIlcPunInfoQueryService`: 保持接口不变(实际不走这个)
|
||||||
|
|
||||||
|
## 三、接口设计
|
||||||
|
|
||||||
|
### 3.1 行政处罚记录查询(外省)
|
||||||
|
```
|
||||||
|
POST /punishment/tBizRemPunishmentN/punishmentList
|
||||||
|
```
|
||||||
|
- 复用原有查询页面
|
||||||
|
- 数据来源改为 `crgs.QG_CASE_PUB_NBASEINFO`
|
||||||
|
|
||||||
|
### 3.2 启动待办(外省)
|
||||||
|
```
|
||||||
|
POST /punishment/tBizRemPunishmentN/startTask
|
||||||
|
```
|
||||||
|
- 业务表ID: `TBizRemPunishment.id`(业务表共用)
|
||||||
|
- 主体信息从 `QG_CASE_PUB_NBASEINFO` 获取
|
||||||
|
- 工作流使用原流程
|
||||||
|
|
||||||
|
### 3.3 提交待办(外省)
|
||||||
|
```
|
||||||
|
POST /punishment/tBizRemPunishmentN/submitTask
|
||||||
|
```
|
||||||
|
- 办结时处理:
|
||||||
|
1. 更新 `crgs.QG_CASE_PUB_NBASEINFO`: opflag='D', pubdeadline=审批日期, S_EXT_DATETIME=审批日期
|
||||||
|
2. 插入 `AICCS.CR_E_CASE`
|
||||||
|
3. **不再**插入 `crgs.CASE_CRE_INFORMATION`
|
||||||
|
|
||||||
|
## 四、数据流差异
|
||||||
|
|
||||||
|
| 环节 | 原有流程 | 外省流程 |
|
||||||
|
|------|---------|---------|
|
||||||
|
| 主体信息获取 | EBaseinfo表 | QG_CASE_PUB_NBASEINFO表 |
|
||||||
|
| 行政处罚信息 | CASE_PUB_NBASEINFO表 | QG_CASE_PUB_NBASEINFO表 |
|
||||||
|
| 办结-主体表 | 无操作 | opflag='D' |
|
||||||
|
| 办结-公示表 | 插入CASE_CRE_INFORMATION | 修改QG表 + 插入CR_E_CASE |
|
||||||
|
|
||||||
|
## 五、注意事项
|
||||||
|
|
||||||
|
1. 工作流复用原有流程,不需要新建工作流
|
||||||
|
2. 业务表TBizRemPunishment共用,通过字段区分或新建业务类型
|
||||||
|
3. 附件、文书模板共用
|
||||||
|
4. 外省数据没有本地EBaseinfo,所以主体信息直接从QG表获取
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
# XQ-20260327-008 需求清单
|
||||||
|
|
||||||
|
## 任务概述
|
||||||
|
- **待办编号**: XQ-20260327-008
|
||||||
|
- **任务标题**: 内蒙信用监管-新增外单位行政处罚修复功能
|
||||||
|
- **需求方**: 周熙尧
|
||||||
|
- **执行人**: 黎润豪
|
||||||
|
- **截止日期**: 2026-04-02
|
||||||
|
|
||||||
|
## 功能需求
|
||||||
|
|
||||||
|
### 1. 新增跨省主体行政处罚修复功能
|
||||||
|
在原有的信用修复菜单下的行政处罚修复功能基础上,新增可查询外省的行政处罚信息数据。
|
||||||
|
|
||||||
|
### 2. 数据表变更
|
||||||
|
- **主表**: `crgs.QG_CASE_PUB_NBASEINFO` (跨省行政处罚基本信息表)
|
||||||
|
- **说明**: 跨省的主体数据无法在本地查询到,因此原流程中涉及查询主体信息的地方均需改为查询该表
|
||||||
|
|
||||||
|
### 3. 业务流程
|
||||||
|
- 业务流程复用原有的行政处罚修复流程
|
||||||
|
- 查询主体信息改用 `crgs.QG_CASE_PUB_NBASEINFO` 表
|
||||||
|
|
||||||
|
### 4. 流程办结后数据处理
|
||||||
|
流程办结后**不再**插入数据到 `crgs.CASE_CRE_INFORMATION`,而是:
|
||||||
|
|
||||||
|
#### 4.1 修改 `crgs.QG_CASE_PUB_NBASEINFO`
|
||||||
|
- `opflag` 改成 `D`
|
||||||
|
- `pubdeadline` 改为审批日期当天
|
||||||
|
- `S_EXT_DATETIME` 改为审批日期当天
|
||||||
|
|
||||||
|
#### 4.2 插入数据到 `AICCS.CR_E_CASE` 表
|
||||||
|
- 跨省主体修复信息同步表
|
||||||
|
|
||||||
|
## 参考类
|
||||||
|
- `com.chinaweal.aiccs.aiccs.punishment.controller.TBizRemPunishmentController`
|
||||||
|
- 原有行政处罚修复业务逻辑
|
||||||
|
|
||||||
|
## 技术要点
|
||||||
|
1. 复用原有行政处罚修复的流程和界面
|
||||||
|
2. 数据来源改为跨省表 `QG_CASE_PUB_NBASEINFO`
|
||||||
|
3. 办结后数据处理逻辑调整
|
||||||
|
|
@ -0,0 +1,286 @@
|
||||||
|
package com.chinaweal.aiccs.aiccs.punishment.controller;
|
||||||
|
|
||||||
|
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.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.punishment.entity.QgCasePubNbaseinfo;
|
||||||
|
import com.chinaweal.aiccs.aiccs.punishment.entity.TBizRemPunishment;
|
||||||
|
import com.chinaweal.aiccs.aiccs.punishment.service.ICrECaseService;
|
||||||
|
import com.chinaweal.aiccs.aiccs.punishment.service.IQgCasePubNbaseinfoService;
|
||||||
|
import com.chinaweal.aiccs.aiccs.punishment.service.ITBizRemPunishmentService;
|
||||||
|
import com.chinaweal.aiccs.aiccs.punishment.service.TswrittemplateService;
|
||||||
|
import com.chinaweal.aiccs.aiccs.writs.entity.Tswrittemplate;
|
||||||
|
import com.chinaweal.aiccs.common.base.controller.BaseController;
|
||||||
|
import com.chinaweal.aiccs.common.constant.BaseDataConstant;
|
||||||
|
import com.chinaweal.aiccs.common.util.*;
|
||||||
|
import com.chinaweal.aiccs.config.CommonConfig;
|
||||||
|
import com.chinaweal.aiccs.common.util.filestorage.FileStorageService;
|
||||||
|
import com.chinaweal.aicorg.model.AICUser;
|
||||||
|
import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery;
|
||||||
|
import com.chinaweal.youfool.framework.springboot.exception.custom.BusinessException;
|
||||||
|
import com.chinaweal.youfool.framework.springboot.mybatis.plus.page.PageRequestDto;
|
||||||
|
import com.chinaweal.youfool.framework.springboot.rest.RestResult;
|
||||||
|
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 io.swagger.annotations.*;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 外省行政处罚修复控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author developer
|
||||||
|
* @since 2026-03-30
|
||||||
|
*/
|
||||||
|
@Api(tags = "外省行政处罚修复控制器")
|
||||||
|
@ApiSort(1)
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/punishment/tBizRemPunishmentN")
|
||||||
|
@Slf4j
|
||||||
|
public class TBizRemPunishmentNController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITBizRemPunishmentService iTBizRemPunishmentService;
|
||||||
|
@Resource
|
||||||
|
private IQgCasePubNbaseinfoService qgCasePubNbaseinfoService;
|
||||||
|
@Resource
|
||||||
|
private ICrECaseService crECaseService;
|
||||||
|
@Resource
|
||||||
|
private TSTaskListService taskListService;
|
||||||
|
@Resource
|
||||||
|
private TSAttachmentService attachmentService;
|
||||||
|
@Resource
|
||||||
|
private TswrittemplateService tswrittemplateService;
|
||||||
|
@Resource
|
||||||
|
private FileStorageService fileStorageService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "1.新增外省行政处罚修复业务", position = 1)
|
||||||
|
@PostMapping("/save")
|
||||||
|
public RestResult<TBizRemPunishment> saveTBizRemPunishment(@RequestBody @Valid TBizRemPunishment tBizRemPunishment, BindingResult bindingResult) {
|
||||||
|
AssertUtils.isBndingValidit(bindingResult);
|
||||||
|
tBizRemPunishment = iTBizRemPunishmentService.saveTBizRemPunishment(tBizRemPunishment);
|
||||||
|
return RestResult.ok(tBizRemPunishment);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "2.删除外省行政处罚修复业务", position = 2)
|
||||||
|
@PostMapping("/delete")
|
||||||
|
public RestResult<String> removeTBizRemPunishment(@RequestParam @ApiParam("id") Serializable id) {
|
||||||
|
iTBizRemPunishmentService.removeById(id);
|
||||||
|
return RestResult.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "3.修改外省行政处罚修复业务", position = 3)
|
||||||
|
@PostMapping("/update")
|
||||||
|
public RestResult<String> updateTBizRemPunishment(@RequestBody @Valid TBizRemPunishment tBizRemPunishment, BindingResult bindingResult) {
|
||||||
|
AssertUtils.isBndingValidit(bindingResult);
|
||||||
|
iTBizRemPunishmentService.updateTBizRemPunishment(tBizRemPunishment);
|
||||||
|
return RestResult.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "4.查询外省行政处罚修复业务", position = 4)
|
||||||
|
@GetMapping("/get")
|
||||||
|
public RestResult<?> getTBizRemPunishment(@RequestParam @ApiParam("id") Serializable id) {
|
||||||
|
TBizRemPunishment tBizRemPunishment = iTBizRemPunishmentService.getById(id);
|
||||||
|
QgCasePubNbaseinfo qgCasePubNbaseinfo = qgCasePubNbaseinfoService.findById(tBizRemPunishment.getPunishmentId());
|
||||||
|
TSTaskList task = taskListService.getOne(new LambdaQueryWrapper<TSTaskList>()
|
||||||
|
.eq(TSTaskList::getBizseqid, tBizRemPunishment.getBizSeq()));
|
||||||
|
return RestResult.ok(new HashMap<String, Object>() {{
|
||||||
|
put("punishInfo", tBizRemPunishment);
|
||||||
|
put("qgPunInfo", qgCasePubNbaseinfo);
|
||||||
|
put("task", task);
|
||||||
|
}});
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "5.分页查询外省行政处罚修复业务", position = 5)
|
||||||
|
@PostMapping("/list")
|
||||||
|
public RestResult<IPage<TBizRemPunishment>> listTBizRemPunishment(@RequestBody BaseQuery<TBizRemPunishment> query) {
|
||||||
|
IPage<TBizRemPunishment> data = iTBizRemPunishmentService.listTBizRemPunishment(query);
|
||||||
|
return RestResult.ok(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "6.查询外省行政处罚记录", position = 6)
|
||||||
|
@PostMapping("/punishmentList")
|
||||||
|
public RestResult<IPage<?>> punishmentList(@RequestBody PageRequestDto pageRequestDto) {
|
||||||
|
// 获取当前用户所在辖区
|
||||||
|
AICUser curUser = SSOUtil.getUser();
|
||||||
|
|
||||||
|
// 设置查询参数,排除已修复的数据
|
||||||
|
pageRequestDto.getParamMap().put("excludeRepaired", true);
|
||||||
|
|
||||||
|
// 外省数据查询
|
||||||
|
IPage<QgCasePubNbaseinfo> iPage = qgCasePubNbaseinfoService.searchByPage(
|
||||||
|
new Page<>(pageRequestDto.getCurPage(), pageRequestDto.getPageSize()),
|
||||||
|
pageRequestDto.getParamMap());
|
||||||
|
return RestResult.ok(iPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "7.启动外省行政处罚修复待办", position = 7)
|
||||||
|
@PostMapping("/startTask")
|
||||||
|
public RestResult<?> startTask(@RequestBody TBizRemPunishment tBizRemPunishment) {
|
||||||
|
// 检查是否已有修复业务
|
||||||
|
Integer count = iTBizRemPunishmentService.lambdaQuery()
|
||||||
|
.eq(TBizRemPunishment::getPunishmentId, tBizRemPunishment.getPunishmentId()).count();
|
||||||
|
if (count > 0) {
|
||||||
|
throw new BusinessException("该行政处罚记录已有修复业务");
|
||||||
|
}
|
||||||
|
|
||||||
|
AICUser loginUser = SSOUtil.getUser();
|
||||||
|
Map<String, String> resultMap = new HashMap<>();
|
||||||
|
|
||||||
|
// 从跨省表获取处罚信息
|
||||||
|
QgCasePubNbaseinfo qgCasePubNbaseinfo = qgCasePubNbaseinfoService.findById(tBizRemPunishment.getPunishmentId());
|
||||||
|
if (qgCasePubNbaseinfo == null) {
|
||||||
|
throw new BusinessException("未找到对应的行政处罚记录");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 生成业务号
|
||||||
|
String bizSeq = IdUtil.simpleUUID();
|
||||||
|
tBizRemPunishment.setId(bizSeq);
|
||||||
|
tBizRemPunishment.setUserId(loginUser.getPrimaryKey());
|
||||||
|
tBizRemPunishment.setStatus("0");
|
||||||
|
tBizRemPunishment.setLinkType("1");
|
||||||
|
tBizRemPunishment.setBizSeq(bizSeq);
|
||||||
|
// 跨省主体的pripid从QG表获取
|
||||||
|
tBizRemPunishment.setPripid(qgCasePubNbaseinfo.getPripid());
|
||||||
|
this.iTBizRemPunishmentService.save(tBizRemPunishment);
|
||||||
|
|
||||||
|
// 启动工作流
|
||||||
|
TSTaskList tsTaskList = new TSTaskList();
|
||||||
|
tsTaskList.setBizseqid(bizSeq);
|
||||||
|
tsTaskList.setBustype(BaseDataConstant.BUSINESS_TYPE_REM_PUNISH);
|
||||||
|
tsTaskList.setBusname(qgCasePubNbaseinfo.getEntname());
|
||||||
|
// 新待办设置待办信息
|
||||||
|
tsTaskList = HandleWorkFlowUtil.createTaskList(tsTaskList, loginUser);
|
||||||
|
// 开始工作流
|
||||||
|
taskListService.startWorkFlow(tsTaskList, loginUser, FlowUtil.REM_PUNISH_WORKFLOW);
|
||||||
|
|
||||||
|
// 返回结果
|
||||||
|
resultMap.put("taskId", tsTaskList.getTasklistid());
|
||||||
|
resultMap.put("bizSeq", bizSeq);
|
||||||
|
resultMap.put("workflowId", tsTaskList.getWorkflowid());
|
||||||
|
return RestResult.ok(resultMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "8.提交外省行政处罚修复待办", position = 8)
|
||||||
|
@PostMapping("/submitTask")
|
||||||
|
public RestResult<?> submitTask(@RequestBody TBizRemPunishment tBizRemPunishment) {
|
||||||
|
List<TSTaskList> listTask = taskListService.selectByBizSeqID(tBizRemPunishment.getBizSeq());
|
||||||
|
AssertUtils.isTrue(!listTask.isEmpty(), ResultCode.DATA_NONE);
|
||||||
|
|
||||||
|
// 意见不能为空
|
||||||
|
if (StringUtils.isEmpty(tBizRemPunishment.getOpinion())) {
|
||||||
|
return RestResult.error(ResultCode.PARAM_IS_BLANK);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 业务不是处于审批状态时,需要有下一步操作人
|
||||||
|
if (!StringUtils.equals(tBizRemPunishment.getLinkType(), "2")
|
||||||
|
&& StringUtils.isEmpty(tBizRemPunishment.getNextPerformerids())) {
|
||||||
|
// 除非是不予受理或者是回退操作
|
||||||
|
if (!StringUtils.equals(tBizRemPunishment.getIsAccept(), "0")
|
||||||
|
&& !"returnRemPunish".equals(tBizRemPunishment.getNextNodeId())) {
|
||||||
|
return RestResult.error(ResultCode.PARAM_IS_BLANK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断文书模板是否有数据,除非是不予受理
|
||||||
|
Tswrittemplate tswrittemplate = null;
|
||||||
|
if (!StringUtils.equals(tBizRemPunishment.getIsAccept(), "0")) {
|
||||||
|
List<Tswrittemplate> tswrittemplateList = tswrittemplateService.list(new LambdaQueryWrapper<Tswrittemplate>()
|
||||||
|
.eq(Tswrittemplate::getIsTemplate, "0")
|
||||||
|
.eq(Tswrittemplate::getBizseq, tBizRemPunishment.getBizSeq()));
|
||||||
|
if (tswrittemplateList.isEmpty()) {
|
||||||
|
return RestResult.error(ResultCode.DATA_NONE);
|
||||||
|
}
|
||||||
|
tswrittemplate = tswrittemplateList.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用提交处理
|
||||||
|
iTBizRemPunishmentService.submitTaskN(tBizRemPunishment, listTask.get(0), tswrittemplate, qgCasePubNbaseinfoService, crECaseService);
|
||||||
|
return RestResult.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "9.上传附件", position = 9)
|
||||||
|
@PostMapping("/upload")
|
||||||
|
public RestResult<?> upload(MultipartFile[] files, String attachType, String id) throws IOException {
|
||||||
|
AICUser curUser = SSOUtil.getUser();
|
||||||
|
// 获得上传目录
|
||||||
|
String realPath = CommonConfig.getRemPunishmentPath() + File.separator + id;
|
||||||
|
|
||||||
|
for (MultipartFile multipartFile : files) {
|
||||||
|
String fileName = multipartFile.getOriginalFilename();
|
||||||
|
String ext = StringUtils.isNotBlank(fileName) && fileName.lastIndexOf(Constant.DOT) > -1 ? fileName.substring(fileName.lastIndexOf(Constant.DOT)) : StringUtils.EMPTY;
|
||||||
|
String virtualFileName = IdUtil.simpleUUID() + ext;
|
||||||
|
fileStorageService.writeFromStream(realPath, virtualFileName, multipartFile.getInputStream());
|
||||||
|
|
||||||
|
TSAttachment tsAttachment = new TSAttachment();
|
||||||
|
tsAttachment.setBizseq(id);
|
||||||
|
tsAttachment.setPripid(StringUtils.EMPTY);
|
||||||
|
tsAttachment.setFileext(ext);
|
||||||
|
tsAttachment.setFilename(fileName);
|
||||||
|
tsAttachment.setFileurl(realPath + File.separator + virtualFileName);
|
||||||
|
tsAttachment.setUploaddate(LocalDate.now());
|
||||||
|
tsAttachment.setUserid(curUser.getPrimaryKey());
|
||||||
|
tsAttachment.setUsername(curUser.getName());
|
||||||
|
tsAttachment.setAttachtype(attachType); // 1-信用修复决定审批表 2-准予信用修复决定文书 3-补充材料
|
||||||
|
attachmentService.save(tsAttachment);
|
||||||
|
}
|
||||||
|
|
||||||
|
return RestResult.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "10.附件回显", position = 10)
|
||||||
|
@GetMapping(value = "/listFile")
|
||||||
|
public RestResult<List<TSAttachment>> listFile(@RequestParam String id) {
|
||||||
|
AssertUtils.isNotBlank(id);
|
||||||
|
return RestResult.ok(attachmentService.lambdaQuery().eq(TSAttachment::getBizseq, id).list());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "11.材料文件下载", position = 11)
|
||||||
|
@GetMapping("/downloadFile")
|
||||||
|
public void uploadFile(@RequestParam String fileId, HttpServletResponse response) throws IOException {
|
||||||
|
TSAttachment tsAttachment = attachmentService.getById(fileId);
|
||||||
|
if (tsAttachment == null) {
|
||||||
|
throw new BusinessException("文件无法找到" + fileId);
|
||||||
|
}
|
||||||
|
response.setHeader("Content-Disposition", "attachment; filename=\"" + new String(tsAttachment.getFilename().getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1) + "\"");
|
||||||
|
fileStorageService.writeToStream(tsAttachment.getFileurl(), response.getOutputStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "12.附件删除", position = 12)
|
||||||
|
@GetMapping("/delFile")
|
||||||
|
public RestResult<?> delFile(@RequestParam String id) {
|
||||||
|
TSAttachment tsAttachmentModel = attachmentService.getById(id);
|
||||||
|
if (tsAttachmentModel == null) return RestResult.error(ResultCode.DATA_NONE);
|
||||||
|
String realPath = CommonConfig.getUploadPath() + File.separator + tsAttachmentModel.getTemppath();
|
||||||
|
try {
|
||||||
|
Files.delete(Paths.get(realPath));
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("删除文件异常", e);
|
||||||
|
}
|
||||||
|
attachmentService.removeById(id);
|
||||||
|
return RestResult.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,328 @@
|
||||||
|
package com.chinaweal.aiccs.aiccs.punishment.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
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;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 跨省行政处罚基本信息表 对应表 crgs.QG_CASE_PUB_NBASEINFO
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author developer
|
||||||
|
* @since 2026-03-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("QG_CASE_PUB_NBASEINFO")
|
||||||
|
@ApiModel(value = "QgCasePubNbaseinfo对象", description = "跨省行政处罚基本信息")
|
||||||
|
public class QgCasePubNbaseinfo extends Model<QgCasePubNbaseinfo> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "案件ID")
|
||||||
|
@TableId(value = "CASEID", type = IdType.INPUT)
|
||||||
|
private String caseid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "案件类型")
|
||||||
|
@TableField("ACTYPE")
|
||||||
|
private String actype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主体身份标识
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主体身份标识")
|
||||||
|
@TableField("PRIPID")
|
||||||
|
private String pripid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企业名称")
|
||||||
|
@TableField("ENTNAME")
|
||||||
|
private String entname;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一社会信用代码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "统一社会信用代码")
|
||||||
|
@TableField("UNISCID")
|
||||||
|
private String uniscid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "注册号")
|
||||||
|
@TableField("REGNO")
|
||||||
|
private String regno;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构证书代码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "机构证书代码")
|
||||||
|
@TableField("INSCERCODE")
|
||||||
|
private String inscercode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社会组织代码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社会组织代码")
|
||||||
|
@TableField("SOCORGCODE")
|
||||||
|
private String socorgcode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构代码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "组织机构代码")
|
||||||
|
@TableField("ORGCODE")
|
||||||
|
private String orgcode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 税务登记号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "税务登记号")
|
||||||
|
@TableField("TAXID")
|
||||||
|
private String taxid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法定代表人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "法定代表人")
|
||||||
|
@TableField("LEREP")
|
||||||
|
private String lerep;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 证件类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "证件类型")
|
||||||
|
@TableField("CERTYPE")
|
||||||
|
private String certype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 证件号码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "证件号码")
|
||||||
|
@TableField("CERNO")
|
||||||
|
private String cerNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
@TableField("NAME")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 违法当事人证件类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "违法当事人证件类型")
|
||||||
|
@TableField("AC_CERTYPE")
|
||||||
|
private String acCertype;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 违法当事人证件号码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "违法当事人证件号码")
|
||||||
|
@TableField("AC_CERNO")
|
||||||
|
private String acCerNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚决定书文号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "处罚决定书文号")
|
||||||
|
@TableField("PENDECNO")
|
||||||
|
private String penDecNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 违法行为类型代码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "违法行为类型代码")
|
||||||
|
@TableField("ILLEGACTTYPECODE")
|
||||||
|
private String illegActTypeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 违法行为类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "违法行为类型")
|
||||||
|
@TableField("ILLEGACTTYPE")
|
||||||
|
private String illegActType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主要违法事实
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主要违法事实")
|
||||||
|
@TableField("MAINILLEGFACT")
|
||||||
|
private String mainIllegFact;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚依据
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "处罚依据")
|
||||||
|
@TableField("PENBASIS")
|
||||||
|
private String penBasis;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚依据中文
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "处罚依据中文")
|
||||||
|
@TableField("PENBASIS_CN")
|
||||||
|
private String penBasisCn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚种类
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "处罚种类")
|
||||||
|
@TableField("PENTYPE")
|
||||||
|
private String penType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚种类中文
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "处罚种类中文")
|
||||||
|
@TableField("PENTYPE_CN")
|
||||||
|
private String penTypeCn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚金额
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "处罚金额")
|
||||||
|
@TableField("PENAM")
|
||||||
|
private BigDecimal penam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 没收违法所得金额
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "没收违法所得金额")
|
||||||
|
@TableField("FORFAM")
|
||||||
|
private BigDecimal forfam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚决定日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "处罚决定日期")
|
||||||
|
@TableField("PENDECISSDATE")
|
||||||
|
private Date penDecissDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚期限
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "处罚期限")
|
||||||
|
@TableField("PENPERI")
|
||||||
|
private Date penPeri;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚机关
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "处罚机关")
|
||||||
|
@TableField("PENAUTH")
|
||||||
|
private String penAuth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚机关中文
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "处罚机关中文")
|
||||||
|
@TableField("PENAUTH_CN")
|
||||||
|
private String penAuthCn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚机关统一社会信用代码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "处罚机关统一社会信用代码")
|
||||||
|
@TableField("PENAUTHUNISCID")
|
||||||
|
private String penAuthUniscid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处罚内容
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "处罚内容")
|
||||||
|
@TableField("PENCONTENT")
|
||||||
|
private String penContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 吊销许可证数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "吊销许可证数量")
|
||||||
|
@TableField("REVLICNUM")
|
||||||
|
private String revLicNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公示日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "公示日期")
|
||||||
|
@TableField("PUBLICDATE")
|
||||||
|
private Date publicDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公示截止日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "公示截止日期")
|
||||||
|
@TableField("PUBDEADLINE")
|
||||||
|
private Date pubDeadline;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据部门
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数据部门")
|
||||||
|
@TableField("DATADEPT")
|
||||||
|
private String dataDept;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据部门统一社会信用代码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数据部门统一社会信用代码")
|
||||||
|
@TableField("DATADEPTUNISCID")
|
||||||
|
private String dataDeptUniscid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
@TableField("REMARK")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作标志(修复时改为D)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "操作标志")
|
||||||
|
@TableField("OPFLAG")
|
||||||
|
private String opflag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内蒙数据中心时间戳
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "内蒙数据中心时间戳")
|
||||||
|
@TableField("S_EXT_DATETIME")
|
||||||
|
private LocalDateTime sExtDatetime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最后更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "最后更新时间")
|
||||||
|
@TableField("LASTUPDATETIME")
|
||||||
|
private Date lastUpdateTime;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Serializable pkVal() {
|
||||||
|
return this.caseid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.chinaweal.aiccs.aiccs.punishment.mapper;
|
||||||
|
|
||||||
|
import com.chinaweal.aiccs.aiccs.punishment.entity.QgCasePubNbaseinfo;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 跨省行政处罚基本信息表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author developer
|
||||||
|
* @since 2026-03-30
|
||||||
|
*/
|
||||||
|
public interface QgCasePubNbaseinfoMapper extends BaseMapper<QgCasePubNbaseinfo> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询跨省行政处罚信息
|
||||||
|
* @param page 分页参数
|
||||||
|
* @param params 查询参数
|
||||||
|
* @return 分页结果
|
||||||
|
*/
|
||||||
|
IPage<QgCasePubNbaseinfo> searchByPage(Page<QgCasePubNbaseinfo> page, @Param("params") Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询
|
||||||
|
* @param caseid 案件ID
|
||||||
|
* @return 跨省行政处罚信息
|
||||||
|
*/
|
||||||
|
QgCasePubNbaseinfo findById(@Param("caseid") String caseid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新修复状态
|
||||||
|
* @param caseid 案件ID
|
||||||
|
* @param approvalDate 审批日期
|
||||||
|
* @param now 当前时间戳
|
||||||
|
* @return 更新行数
|
||||||
|
*/
|
||||||
|
int updateForRepair(@Param("caseid") String caseid, @Param("approvalDate") java.util.Date approvalDate, @Param("now") LocalDateTime now);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.chinaweal.aiccs.aiccs.punishment.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
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.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 跨省行政处罚基本信息表 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author developer
|
||||||
|
* @since 2026-03-30
|
||||||
|
*/
|
||||||
|
public interface IQgCasePubNbaseinfoService extends IService<QgCasePubNbaseinfo> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询跨省行政处罚信息
|
||||||
|
* @param page 分页参数
|
||||||
|
* @param params 查询参数
|
||||||
|
* @return 分页结果
|
||||||
|
*/
|
||||||
|
IPage<QgCasePubNbaseinfo> searchByPage(Page<QgCasePubNbaseinfo> page, Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询
|
||||||
|
* @param caseid 案件ID
|
||||||
|
* @return 跨省行政处罚信息
|
||||||
|
*/
|
||||||
|
QgCasePubNbaseinfo findById(String caseid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新修复状态
|
||||||
|
* @param caseid 案件ID
|
||||||
|
* @param approvalDate 审批日期
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean updateForRepair(String caseid, java.util.Date approvalDate);
|
||||||
|
}
|
||||||
|
|
@ -2,7 +2,6 @@ package com.chinaweal.aiccs.aiccs.punishment.service;
|
||||||
|
|
||||||
import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList;
|
import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList;
|
||||||
import com.chinaweal.aiccs.aiccs.punishment.entity.TBizRemPunishment;
|
import com.chinaweal.aiccs.aiccs.punishment.entity.TBizRemPunishment;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.chinaweal.aiccs.aiccs.writs.entity.Tswrittemplate;
|
import com.chinaweal.aiccs.aiccs.writs.entity.Tswrittemplate;
|
||||||
import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery;
|
import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery;
|
||||||
import com.chinaweal.youfool.framework.springboot.mybatis.plus.BaseService;
|
import com.chinaweal.youfool.framework.springboot.mybatis.plus.BaseService;
|
||||||
|
|
@ -40,6 +39,17 @@ public interface ITBizRemPunishmentService extends BaseService<TBizRemPunishment
|
||||||
|
|
||||||
void submitTask(TBizRemPunishment tBizRemPunishment, TSTaskList tsTaskList, Tswrittemplate tswrittemplate);
|
void submitTask(TBizRemPunishment tBizRemPunishment, TSTaskList tsTaskList, Tswrittemplate tswrittemplate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交外省行政处罚修复待办
|
||||||
|
* @param tBizRemPunishment 业务信息
|
||||||
|
* @param tsTaskList 任务信息
|
||||||
|
* @param tswrittemplate 文书模板
|
||||||
|
* @param qgCasePubNbaseinfoService 跨省处罚信息服务
|
||||||
|
* @param crECaseService 跨省修复案例服务
|
||||||
|
*/
|
||||||
|
void submitTaskN(TBizRemPunishment tBizRemPunishment, TSTaskList tsTaskList, Tswrittemplate tswrittemplate,
|
||||||
|
IQgCasePubNbaseinfoService qgCasePubNbaseinfoService, ICrECaseService crECaseService);
|
||||||
|
|
||||||
List<TBizRemPunishment> selectbizRembizseq(String bizseqid);
|
List<TBizRemPunishment> selectbizRembizseq(String bizseqid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.chinaweal.aiccs.aiccs.punishment.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.chinaweal.aiccs.aiccs.punishment.entity.QgCasePubNbaseinfo;
|
||||||
|
import com.chinaweal.aiccs.aiccs.punishment.mapper.QgCasePubNbaseinfoMapper;
|
||||||
|
import com.chinaweal.aiccs.aiccs.punishment.service.IQgCasePubNbaseinfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 跨省行政处罚基本信息表 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author developer
|
||||||
|
* @since 2026-03-30
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class IQgCasePubNbaseinfoServiceImpl extends ServiceImpl<QgCasePubNbaseinfoMapper, QgCasePubNbaseinfo> implements IQgCasePubNbaseinfoService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<QgCasePubNbaseinfo> searchByPage(Page<QgCasePubNbaseinfo> page, Map<String, Object> params) {
|
||||||
|
return this.baseMapper.searchByPage(page, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public QgCasePubNbaseinfo findById(String caseid) {
|
||||||
|
return this.baseMapper.findById(caseid);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean updateForRepair(String caseid, java.util.Date approvalDate) {
|
||||||
|
int rows = this.baseMapper.updateForRepair(caseid, approvalDate, LocalDateTime.now());
|
||||||
|
return rows > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -254,6 +254,145 @@ public class TBizRemPunishmentServiceImpl extends BaseServiceImpl<TBizRemPunishm
|
||||||
.eq(TBizRemPunishment::getBizSeq, bizseqid));
|
.eq(TBizRemPunishment::getBizSeq, bizseqid));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void submitTaskN(TBizRemPunishment tBizRemPunishment, TSTaskList tsTaskList, Tswrittemplate tswrittemplate,
|
||||||
|
com.chinaweal.aiccs.aiccs.punishment.service.IQgCasePubNbaseinfoService qgCasePubNbaseinfoService,
|
||||||
|
com.chinaweal.aiccs.aiccs.punishment.service.ICrECaseService crECaseService) {
|
||||||
|
AICUser loginUser = SSOUtil.getUser();
|
||||||
|
//当前环节
|
||||||
|
String linkType = tBizRemPunishment.getLinkType();
|
||||||
|
String isAccept = tBizRemPunishment.getIsAccept();
|
||||||
|
String isAgreeRepair = tBizRemPunishment.getIsAgreeRepair();
|
||||||
|
String nextNodeID = tBizRemPunishment.getNextNodeId();
|
||||||
|
String nextPerformerids = StringUtils.isEmpty(tBizRemPunishment.getNextPerformerids()) ?
|
||||||
|
loginUser.getPrimaryKey() : tBizRemPunishment.getNextPerformerids(); //如果没有下一步操作人则存当前用户
|
||||||
|
String nextPerformerName = StringUtils.isEmpty(tBizRemPunishment.getNextPerformerName()) ?
|
||||||
|
loginUser.getName() : tBizRemPunishment.getNextPerformerName();
|
||||||
|
|
||||||
|
//封装意见表
|
||||||
|
String opinionContent = tBizRemPunishment.getOpinion();
|
||||||
|
TSOpinion opinion = createOpinion(opinionContent, tsTaskList, loginUser);
|
||||||
|
|
||||||
|
//外网申请的且不受理的情况下,意见值给到回退建议
|
||||||
|
if(StringUtils.equals(tsTaskList.getOrigin(),"1")
|
||||||
|
&& StringUtils.equals(isAccept,"0")){
|
||||||
|
tBizRemPunishment.setBackProposal(opinionContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
//不予受理的情况直接可以结束流程
|
||||||
|
if(StringUtils.equals(isAccept,"0")){
|
||||||
|
tBizRemPunishment.setStatus("3");
|
||||||
|
nextNodeID = "disagreeRemPunish";
|
||||||
|
tBizRemPunishment.setLinkType("3"); //设置下一环节
|
||||||
|
opinion.setOpiniontype("0")
|
||||||
|
.setIsagree("2");
|
||||||
|
} else { //予以受理的情况下再看下一节点
|
||||||
|
//根据当前下一步节点判断
|
||||||
|
if("handleRemPunish".equals(nextNodeID)){ //下一步是审核
|
||||||
|
tBizRemPunishment.setLinkType("0"); //设置下一环节
|
||||||
|
opinion.setOpiniontype("0")
|
||||||
|
.setIsagree("1");
|
||||||
|
} else if("approveRemPunish".equals(nextNodeID)){ //下一步是审批
|
||||||
|
tBizRemPunishment.setLinkType("2"); //设置下一环节
|
||||||
|
opinion.setOpiniontype("1")
|
||||||
|
.setIsagree("1");
|
||||||
|
} else if("endRemPunish".equals(nextNodeID)){ //下一步是结束流程
|
||||||
|
opinion.setOpiniontype("2");
|
||||||
|
//最后一步才设置业务状态为通过或者不通过
|
||||||
|
if(StringUtils.equals(isAgreeRepair,"0")){ //不予修复
|
||||||
|
//文书模板数据转为文书正式数据
|
||||||
|
this.handleTsWrit(tBizRemPunishment, tswrittemplate);
|
||||||
|
tBizRemPunishment.setStatus("3"); //设置业务状态为不通过
|
||||||
|
opinion.setIsagree("0");
|
||||||
|
} else { //准予修复
|
||||||
|
//文书模板数据转为文书正式数据
|
||||||
|
this.handleTsWrit(tBizRemPunishment, tswrittemplate);
|
||||||
|
//外省行政处罚修复:修改跨省表 + 插入跨省修复案例表
|
||||||
|
this.insertCrECase(tBizRemPunishment, qgCasePubNbaseinfoService, crECaseService);
|
||||||
|
tBizRemPunishment.setStatus("2"); //设置业务状态为通过
|
||||||
|
opinion.setIsagree("1");
|
||||||
|
}
|
||||||
|
tBizRemPunishment.setLinkType("3"); //设置下一环节为结束
|
||||||
|
} else if("returnRemPunish".equals(nextNodeID)){ //下一步是回退上一步
|
||||||
|
opinion.setIsagree("2");
|
||||||
|
if(StringUtils.equals(linkType,"0")){ //审核回退到受理
|
||||||
|
tBizRemPunishment.setLinkType("1"); //设置下一环节
|
||||||
|
opinion.setOpiniontype("1");
|
||||||
|
} else if(StringUtils.equals(linkType,"2")){ //审批回退到审核
|
||||||
|
tBizRemPunishment.setLinkType("0"); //设置下一环节
|
||||||
|
opinion.setOpiniontype("2");
|
||||||
|
} else { //无法回退
|
||||||
|
throw new RuntimeException("无法回退到上一步");
|
||||||
|
}
|
||||||
|
//通过意见表找出上一个节点的人
|
||||||
|
TSOpinion tsOpinion = tsOpinionService.getOne(new LambdaQueryWrapper<TSOpinion>()
|
||||||
|
.orderByDesc(TSOpinion::getHandledate) // 按 handledate 降序排列
|
||||||
|
.last("LIMIT 1"));
|
||||||
|
if(tsOpinion != null){
|
||||||
|
//取上一个节点的人
|
||||||
|
nextPerformerids = tsOpinion.getHandlerid();
|
||||||
|
nextPerformerName = tsOpinion.getHandler();
|
||||||
|
}
|
||||||
|
} else { //流程无法找到
|
||||||
|
throw new RuntimeException("流程无法找到");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//修改业务表
|
||||||
|
this.updateById(tBizRemPunishment);
|
||||||
|
|
||||||
|
// 流程推进
|
||||||
|
taskListService.updateWorkFlow(loginUser, opinion, tsTaskList,
|
||||||
|
nextNodeID, new String[]{ nextPerformerids }, new String[]{ nextPerformerName });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外省行政处罚修复 - 插入跨省修复案例表并更新跨省处罚表
|
||||||
|
* @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) {
|
||||||
|
// 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);
|
||||||
|
|
||||||
|
// 2. 获取跨省处罚信息用于插入CR_E_CASE
|
||||||
|
com.chinaweal.aiccs.aiccs.punishment.entity.QgCasePubNbaseinfo qgCasePubNbaseinfo =
|
||||||
|
qgCasePubNbaseinfoService.findById(tBizRemPunishment.getPunishmentId());
|
||||||
|
|
||||||
|
// 3. 插入跨省修复案例表
|
||||||
|
com.chinaweal.aiccs.aiccs.punishment.entity.CrECase crECase = new com.chinaweal.aiccs.aiccs.punishment.entity.CrECase();
|
||||||
|
crECase.setCasecreid(IdUtil.simpleUUID())
|
||||||
|
.setPripid(tBizRemPunishment.getPripid())
|
||||||
|
.setEntname(qgCasePubNbaseinfo != null ? qgCasePubNbaseinfo.getEntname() : "")
|
||||||
|
.setUniscid(qgCasePubNbaseinfo != null ? qgCasePubNbaseinfo.getUniscid() : "")
|
||||||
|
.setCaseid(tBizRemPunishment.getPunishmentId());
|
||||||
|
|
||||||
|
// 修复日期
|
||||||
|
LocalDateTime localDateTimeRepairDate = tBizRemPunishment.getRepairDate();
|
||||||
|
Date repairDate = Date.from(localDateTimeRepairDate.atZone(ZoneId.systemDefault()).toInstant());
|
||||||
|
LocalDate localDate = tBizRemPunishment.getApplyDate();
|
||||||
|
Date applyDate = Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
||||||
|
|
||||||
|
crECase.setRepairdate(applyDate)
|
||||||
|
.setRepauth(tBizRemPunishment.getRepairOrg())
|
||||||
|
.setRepauthcn(tBizRemPunishment.getRepairOrgCn())
|
||||||
|
.setRepdate(repairDate)
|
||||||
|
.setRepstate("1") // 修复状态:1-已修复
|
||||||
|
.setUploadtime(now)
|
||||||
|
.setEntrytype("0") // 录入方式:0-页面
|
||||||
|
.setPenauth(qgCasePubNbaseinfo != null ? qgCasePubNbaseinfo.getPenAuth() : "")
|
||||||
|
.setPenauthcn(qgCasePubNbaseinfo != null ? qgCasePubNbaseinfo.getPenAuthCn() : "")
|
||||||
|
.setPendecno(qgCasePubNbaseinfo != null ? qgCasePubNbaseinfo.getPenDecNo() : "")
|
||||||
|
.setRepairno(tBizRemPunishment.getRepairNo())
|
||||||
|
.setSExtDatetime(now);
|
||||||
|
|
||||||
|
crECaseService.save(crECase);
|
||||||
|
}
|
||||||
|
|
||||||
private TBizRemPunishment handleTsWrit(TBizRemPunishment tBizRemPunishment, Tswrittemplate tswrittemplate){
|
private TBizRemPunishment handleTsWrit(TBizRemPunishment tBizRemPunishment, Tswrittemplate tswrittemplate){
|
||||||
TSWrit tsWritModel = new TSWrit();
|
TSWrit tsWritModel = new TSWrit();
|
||||||
String tswritId = UUID.randomUUID().toString();
|
String tswritId = UUID.randomUUID().toString();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
<?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.chinaweal.aiccs.aiccs.punishment.mapper.QgCasePubNbaseinfoMapper">
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.chinaweal.aiccs.aiccs.punishment.entity.QgCasePubNbaseinfo">
|
||||||
|
<id column="CASEID" property="caseid" />
|
||||||
|
<result column="ACTYPE" property="actype" />
|
||||||
|
<result column="PRIPID" property="pripid" />
|
||||||
|
<result column="ENTNAME" property="entname" />
|
||||||
|
<result column="UNISCID" property="uniscid" />
|
||||||
|
<result column="REGNO" property="regno" />
|
||||||
|
<result column="INSCERCODE" property="inscercode" />
|
||||||
|
<result column="SOCORGCODE" property="socorgcode" />
|
||||||
|
<result column="ORGCODE" property="orgcode" />
|
||||||
|
<result column="TAXID" property="taxid" />
|
||||||
|
<result column="LEREP" property="lerep" />
|
||||||
|
<result column="CERTYPE" property="certype" />
|
||||||
|
<result column="CERNO" property="cerNo" />
|
||||||
|
<result column="NAME" property="name" />
|
||||||
|
<result column="AC_CERTYPE" property="acCertype" />
|
||||||
|
<result column="AC_CERNO" property="acCerNo" />
|
||||||
|
<result column="PENDECNO" property="penDecNo" />
|
||||||
|
<result column="ILLEGACTTYPECODE" property="illegActTypeCode" />
|
||||||
|
<result column="ILLEGACTTYPE" property="illegActType" />
|
||||||
|
<result column="MAINILLEGFACT" property="mainIllegFact" />
|
||||||
|
<result column="PENBASIS" property="penBasis" />
|
||||||
|
<result column="PENBASIS_CN" property="penBasisCn" />
|
||||||
|
<result column="PENTYPE" property="penType" />
|
||||||
|
<result column="PENTYPE_CN" property="penTypeCn" />
|
||||||
|
<result column="PENAM" property="penam" />
|
||||||
|
<result column="FORFAM" property="forfam" />
|
||||||
|
<result column="PENDECISSDATE" property="penDecissDate" />
|
||||||
|
<result column="PENPERI" property="penPeri" />
|
||||||
|
<result column="PENAUTH" property="penAuth" />
|
||||||
|
<result column="PENAUTH_CN" property="penAuthCn" />
|
||||||
|
<result column="PENAUTHUNISCID" property="penAuthUniscid" />
|
||||||
|
<result column="PENCONTENT" property="penContent" />
|
||||||
|
<result column="REVLICNUM" property="revLicNum" />
|
||||||
|
<result column="PUBLICDATE" property="publicDate" />
|
||||||
|
<result column="PUBDEADLINE" property="pubDeadline" />
|
||||||
|
<result column="DATADEPT" property="dataDept" />
|
||||||
|
<result column="DATADEPTUNISCID" property="dataDeptUniscid" />
|
||||||
|
<result column="REMARK" property="remark" />
|
||||||
|
<result column="OPFLAG" property="opflag" />
|
||||||
|
<result column="S_EXT_DATETIME" property="sExtDatetime" />
|
||||||
|
<result column="LASTUPDATETIME" property="lastUpdateTime" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 通用查询结果列 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
CASEID, ACTYPE, PRIPID, ENTNAME, UNISCID, REGNO, INSCERCODE, SOCORGCODE, ORGCODE, TAXID,
|
||||||
|
LEREP, CERTYPE, CERNO, NAME, AC_CERTYPE, AC_CERNO, PENDECNO, ILLEGACTTYPECODE, ILLEGACTTYPE,
|
||||||
|
MAINILLEGFACT, PENBASIS, PENBASIS_CN, PENTYPE, PENTYPE_CN, PENAM, FORFAM, PENDECISSDATE,
|
||||||
|
PENPERI, PENAUTH, PENAUTH_CN, PENAUTHUNISCID, PENCONTENT, REVLICNUM, PUBLICDATE, PUBDEADLINE,
|
||||||
|
DATADEPT, DATADEPTUNISCID, REMARK, OPFLAG, S_EXT_DATETIME, LASTUPDATETIME
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询跨省行政处罚信息 -->
|
||||||
|
<select id="searchByPage" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
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>
|
||||||
|
<!-- 只查询未修复的数据 -->
|
||||||
|
<if test="params.excludeRepaired != null and params.excludeRepaired == true">
|
||||||
|
AND (OPFLAG IS NULL OR OPFLAG != 'D')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据ID查询 -->
|
||||||
|
<select id="findById" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
FROM QG_CASE_PUB_NBASEINFO
|
||||||
|
WHERE CASEID = #{caseid}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 更新修复状态 -->
|
||||||
|
<update id="updateForRepair">
|
||||||
|
UPDATE QG_CASE_PUB_NBASEINFO
|
||||||
|
SET OPFLAG = 'D',
|
||||||
|
PUBDEADLINE = #{approvalDate},
|
||||||
|
S_EXT_DATETIME = #{now}
|
||||||
|
WHERE CASEID = #{caseid}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue