feat(prison): 新增评估报告等模块,集成问卷与危险评估功能
核心变更: 1. 新增模块 - 评估报告模块 (evaluationreport): 报告生成与编辑 - 快捷评语模块 (quickcomment): 常用评语管理 - 报告模板模块 (reporttemplate): 报告模板配置 - 预警模块 (warning): 风险预警功能 - 风险模块 (risk): 风险分析功能 - 情况模块 (situation): 服刑情况跟踪 2. 功能增强 - 危险评估模块完善: 支持多种评估方法 - 问卷模块重构: 调查问卷整合到答题记录 - 罪犯模块: 新增Workbench工作台页面 - 计分考核: 新增计分规则管理 3. 枚举与配置 - 新增评估相关枚举: AssessmentType, EvaluationCycle等 - 统一风险等级枚举 - 更新字典数据类型常量 4. 数据库 - 新增 evaluation_report.sql - 新增 report_module.sql - 新增 prison_situation_warning_risk.sql Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
dc65ef8d24
commit
f6b0410fda
@ -58,7 +58,9 @@ VALUES
|
||||
(201201, 1, '单选', '1', 'primary', '', 'prison_question_type', '0', '单选题', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201202, 2, '多选', '2', 'success', '', 'prison_question_type', '0', '多选题', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201203, 3, '填空', '3', 'warning', '', 'prison_question_type', '0', '填空题', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201204, 4, '评分', '4', 'info', '', 'prison_question_type', '0', '评分题', 'admin', NOW(), 'admin', NOW(), 0);
|
||||
(201204, 4, '评分', '4', 'info', '', 'prison_question_type', '0', '评分题', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201205, 5, '日期', '5', 'primary', '', 'prison_question_type', '0', '日期选择题', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201206, 6, '数字', '6', 'success', '', 'prison_question_type', '0', '数字输入题', 'admin', NOW(), 'admin', NOW(), 0);
|
||||
|
||||
-- 6. 问卷状态 (prison_questionnaire_status)
|
||||
INSERT IGNORE INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted)
|
||||
@ -86,9 +88,11 @@ VALUES (2014, '消费类型', 'prison_consumption_type', '0', '消费记录类
|
||||
|
||||
INSERT IGNORE INTO system_dict_data (id, sort, label, value, color_type, css_class, dict_type, status, remark, creator, create_time, updater, update_time, deleted)
|
||||
VALUES
|
||||
(201401, 1, '存款', '1', 'success', '', 'prison_consumption_type', '0', '存款', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201402, 2, '消费', '2', 'primary', '', 'prison_consumption_type', '0', '消费', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201403, 3, '转账', '3', 'warning', '', 'prison_consumption_type', '0', '转账', 'admin', NOW(), 'admin', NOW(), 0);
|
||||
(201401, 1, '购物', '1', 'success', '', 'prison_consumption_type', '0', '购物消费', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201402, 2, '餐饮', '2', 'primary', '', 'prison_consumption_type', '0', '餐饮消费', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201403, 3, '医疗', '3', 'warning', '', 'prison_consumption_type', '0', '医疗消费', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201404, 4, '通讯', '4', 'info', '', 'prison_consumption_type', '0', '通讯消费', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201405, 5, '其他', '5', 'primary', '', 'prison_consumption_type', '0', '其他消费', 'admin', NOW(), 'admin', NOW(), 0);
|
||||
|
||||
-- 8. 消费状态 (prison_consumption_status)
|
||||
INSERT IGNORE INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted)
|
||||
@ -105,9 +109,10 @@ VALUES (2016, '评估类型', 'prison_assessment_type', '0', '危险评估类型
|
||||
|
||||
INSERT IGNORE INTO system_dict_data (id, sort, label, value, color_type, css_class, dict_type, status, remark, creator, create_time, updater, update_time, deleted)
|
||||
VALUES
|
||||
(201601, 1, '入狱评估', '1', 'primary', '', 'prison_assessment_type', '0', '入狱时评估', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201601, 1, '入监评估', '1', 'primary', '', 'prison_assessment_type', '0', '入监时评估', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201602, 2, '定期评估', '2', 'success', '', 'prison_assessment_type', '0', '定期评估', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201603, 3, '专项评估', '3', 'warning', '', 'prison_assessment_type', '0', '专项评估', 'admin', NOW(), 'admin', NOW(), 0);
|
||||
(201603, 3, '专项评估', '3', 'warning', '', 'prison_assessment_type', '0', '专项评估', 'admin', NOW(), 'admin', NOW(), 0),
|
||||
(201604, 4, '出监评估', '4', 'info', '', 'prison_assessment_type', '0', '出监时评估', 'admin', NOW(), 'admin', NOW(), 0);
|
||||
|
||||
-- 10. 考核等级 (prison_score_level)
|
||||
INSERT IGNORE INTO system_dict_type (id, name, type, status, remark, creator, create_time, updater, update_time, deleted)
|
||||
|
||||
@ -72,6 +72,21 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
@ -12,6 +12,7 @@ import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
@ -110,7 +111,45 @@ public class PrisonAreaController {
|
||||
@RequestParam(value = "level", required = false) Integer level,
|
||||
@RequestParam(value = "status", required = false) Integer status) {
|
||||
List<AreaDO> tree = areaService.getAreaTree(name, type, level, status);
|
||||
return success(BeanUtils.toBean(tree, AreaRespVO.class));
|
||||
return success(convertTreeToRespVO(tree));
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归转换 AreaDO 树形结构到 AreaRespVO
|
||||
*/
|
||||
private List<AreaRespVO> convertTreeToRespVO(List<AreaDO> areas) {
|
||||
if (areas == null || areas.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<AreaRespVO> result = new ArrayList<>();
|
||||
for (AreaDO area : areas) {
|
||||
result.add(convertToRespVO(area));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归转换单个 AreaDO 到 AreaRespVO
|
||||
*/
|
||||
private AreaRespVO convertToRespVO(AreaDO area) {
|
||||
AreaRespVO resp = new AreaRespVO();
|
||||
resp.setId(area.getId());
|
||||
resp.setName(area.getName());
|
||||
resp.setCode(area.getCode());
|
||||
resp.setParentId(area.getParentId());
|
||||
resp.setLevel(area.getLevel());
|
||||
resp.setType(area.getType());
|
||||
resp.setCapacity(area.getCapacity());
|
||||
resp.setCurrentCount(area.getCurrentCount());
|
||||
resp.setSort(area.getSort());
|
||||
resp.setStatus(area.getStatus());
|
||||
resp.setRemark(area.getRemark());
|
||||
resp.setCreateTime(area.getCreateTime());
|
||||
// 递归设置子节点
|
||||
if (area.getChildren() != null && !area.getChildren().isEmpty()) {
|
||||
resp.setChildren(convertTreeToRespVO(area.getChildren()));
|
||||
}
|
||||
return resp;
|
||||
}
|
||||
|
||||
@GetMapping("/children")
|
||||
|
||||
@ -5,6 +5,7 @@ import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
@ -59,10 +60,10 @@ public class AreaRespVO {
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "子监区列表,仅一级监区返回")
|
||||
@JsonIgnore
|
||||
private List<AreaRespVO> children;
|
||||
|
||||
}
|
||||
@ -87,6 +87,8 @@ public class PrisonCellController {
|
||||
return success(null);
|
||||
}
|
||||
CellRespVO respVO = BeanUtils.toBean(cell, CellRespVO.class);
|
||||
// 显式设置创建时间(因为继承字段可能未正确复制)
|
||||
respVO.setCreateTime(cell.getCreateTime());
|
||||
// 填充监区名称
|
||||
if (cell.getAreaId() != null) {
|
||||
AreaDO area = areaMapper.selectById(cell.getAreaId());
|
||||
@ -104,6 +106,18 @@ public class PrisonCellController {
|
||||
return success(cellService.getCellPage(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得监室列表")
|
||||
public CommonResult<List<CellRespVO>> getCellList(
|
||||
@RequestParam(value = "areaId", required = false) Long areaId,
|
||||
@RequestParam(value = "status", required = false) Integer status) {
|
||||
CellPageReqVO pageReqVO = new CellPageReqVO();
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
pageReqVO.setAreaId(areaId);
|
||||
pageReqVO.setStatus(status);
|
||||
return success(cellService.getCellPage(pageReqVO).getList());
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出监室信息 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('prison:cell:export')")
|
||||
|
||||
@ -5,6 +5,7 @@ import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 监室信息 Response VO")
|
||||
@ -54,6 +55,7 @@ public class CellRespVO {
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -17,7 +17,6 @@ import java.io.IOException;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
@ -26,10 +25,8 @@ import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.consumption.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.consumption.ConsumptionDO;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.consumption.ConsumptionDetailDO;
|
||||
import cn.iocoder.yudao.module.prison.service.consumption.ConsumptionService;
|
||||
import cn.iocoder.yudao.module.prison.convert.consumption.ConsumptionConvert;
|
||||
import cn.iocoder.yudao.module.prison.convert.consumption.ConsumptionDetailConvert;
|
||||
|
||||
@Tag(name = "管理后台 - 消费订单")
|
||||
@ -79,24 +76,14 @@ public class PrisonConsumptionController {
|
||||
@Parameter(name = "id", description = "订单编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('prison:consumption:query')")
|
||||
public CommonResult<ConsumptionRespVO> getConsumption(@RequestParam("id") Long id) {
|
||||
ConsumptionDO consumption = consumptionService.getConsumption(id);
|
||||
if (consumption == null) {
|
||||
return success(null);
|
||||
}
|
||||
// 转换主表数据
|
||||
ConsumptionRespVO respVO = ConsumptionConvert.INSTANCE.convert(consumption);
|
||||
// 查询并转换明细列表
|
||||
List<ConsumptionDetailDO> detailList = consumptionService.getConsumptionDetailList(id);
|
||||
respVO.setDetails(ConsumptionDetailConvert.INSTANCE.convertListResp(detailList));
|
||||
return success(respVO);
|
||||
return success(consumptionService.getConsumption(id));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得消费订单分页")
|
||||
@PreAuthorize("@ss.hasPermission('prison:consumption:query')")
|
||||
public CommonResult<PageResult<ConsumptionRespVO>> getConsumptionPage(@Valid ConsumptionPageReqVO pageReqVO) {
|
||||
PageResult<ConsumptionDO> pageResult = consumptionService.getConsumptionPage(pageReqVO);
|
||||
return success(ConsumptionConvert.INSTANCE.convertPage(pageResult));
|
||||
return success(consumptionService.getConsumptionPage(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/detail-list")
|
||||
@ -116,10 +103,9 @@ public class PrisonConsumptionController {
|
||||
public void exportConsumptionExcel(@Valid ConsumptionPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ConsumptionDO> list = consumptionService.getConsumptionPage(pageReqVO).getList();
|
||||
List<ConsumptionRespVO> list = consumptionService.getConsumptionPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "消费订单.xls", "数据", ConsumptionRespVO.class,
|
||||
ConsumptionConvert.INSTANCE.convertList(list));
|
||||
ExcelUtils.write(response, "消费订单.xls", "数据", ConsumptionRespVO.class, list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -25,6 +25,15 @@ public class ConsumptionPageReqVO extends PageParam {
|
||||
@Size(max = 50, message = "罪犯编号长度不能超过50个字符")
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "罪犯姓名", example = "张三")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "监区ID", example = "1")
|
||||
private Long prisonAreaId;
|
||||
|
||||
@Schema(description = "监室ID", example = "1")
|
||||
private Long prisonCellId;
|
||||
|
||||
@Schema(description = "类型:1-购物 2-餐饮 3-医疗 4-通讯 5-其他", example = "1")
|
||||
@Min(value = 1, message = "类型最小值为1")
|
||||
@Max(value = 5, message = "类型最大值为5")
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 消费订单 Response VO")
|
||||
@ -25,6 +26,24 @@ public class ConsumptionRespVO {
|
||||
@ExcelProperty("罪犯编号")
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "罪犯姓名", example = "张三")
|
||||
@ExcelProperty("罪犯姓名")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "监区ID", example = "1")
|
||||
private Long prisonAreaId;
|
||||
|
||||
@Schema(description = "监区名称", example = "一监区")
|
||||
@ExcelProperty("监区")
|
||||
private String prisonAreaName;
|
||||
|
||||
@Schema(description = "监室ID", example = "1")
|
||||
private Long prisonCellId;
|
||||
|
||||
@Schema(description = "监室名称", example = "101监室")
|
||||
@ExcelProperty("监室")
|
||||
private String prisonCellName;
|
||||
|
||||
@Schema(description = "订单号")
|
||||
@ExcelProperty("订单号")
|
||||
private String orderNo;
|
||||
@ -43,6 +62,7 @@ public class ConsumptionRespVO {
|
||||
|
||||
@Schema(description = "交易时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("交易时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime tradeTime;
|
||||
|
||||
@Schema(description = "状态:1-成功 2-失败", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ -55,8 +75,14 @@ public class ConsumptionRespVO {
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@ExcelProperty("更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "消费明细列表")
|
||||
private List<ConsumptionDetailRespVO> details;
|
||||
|
||||
|
||||
@ -16,8 +16,8 @@ public class ProvinceChartVO {
|
||||
@Schema(description = "省份名称", example = "河南省")
|
||||
private String province;
|
||||
|
||||
@Schema(description = "省份编码", example = "41")
|
||||
private Integer provinceCode;
|
||||
@Schema(description = "省份名称/编码", example = "河南省或上海")
|
||||
private String provinceCode;
|
||||
|
||||
@Schema(description = "人数", example = "156")
|
||||
private Integer count;
|
||||
|
||||
@ -0,0 +1,387 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.evaluationreport.*;
|
||||
import cn.iocoder.yudao.module.prison.service.evaluationreport.EvaluationReportService;
|
||||
|
||||
@Tag(name = "管理后台 - 评估报告")
|
||||
@RestController
|
||||
@RequestMapping("/prison/evaluation-report")
|
||||
@Validated
|
||||
public class EvaluationReportController {
|
||||
|
||||
@Resource
|
||||
private EvaluationReportService evaluationReportService;
|
||||
|
||||
// ========== 模板管理 ==========
|
||||
|
||||
@PostMapping("/template/create")
|
||||
@Operation(summary = "创建评估模板")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:template:create')")
|
||||
public CommonResult<Long> createTemplate(@Valid @RequestBody EvaluationTemplateSaveReqVO createReqVO) {
|
||||
return success(evaluationReportService.createTemplate(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/template/update")
|
||||
@Operation(summary = "更新评估模板")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:template:update')")
|
||||
public CommonResult<Boolean> updateTemplate(@Valid @RequestBody EvaluationTemplateSaveReqVO updateReqVO) {
|
||||
evaluationReportService.updateTemplate(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/template/delete")
|
||||
@Operation(summary = "删除评估模板")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:template:delete')")
|
||||
public CommonResult<Boolean> deleteTemplate(@NotNull(message = "编号不能为空") @RequestParam("id") Long id) {
|
||||
evaluationReportService.deleteTemplate(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/template/delete-list")
|
||||
@Operation(summary = "批量删除评估模板")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:template:delete')")
|
||||
public CommonResult<Boolean> deleteTemplateList(@NotEmpty(message = "编号列表不能为空") @RequestParam("ids") List<Long> ids) {
|
||||
evaluationReportService.deleteTemplateListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/template/get")
|
||||
@Operation(summary = "获得评估模板")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:template:query')")
|
||||
public CommonResult<EvaluationTemplateRespVO> getTemplate(@RequestParam("id") Long id) {
|
||||
EvaluationTemplateDO template = evaluationReportService.getTemplate(id);
|
||||
return success(BeanUtils.toBean(template, EvaluationTemplateRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/template/page")
|
||||
@Operation(summary = "获得评估模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:template:query')")
|
||||
public CommonResult<PageResult<EvaluationTemplateRespVO>> getTemplatePage(@Valid EvaluationTemplatePageReqVO pageReqVO) {
|
||||
PageResult<EvaluationTemplateDO> pageResult = evaluationReportService.getTemplatePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, EvaluationTemplateRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/template/list-enabled")
|
||||
@Operation(summary = "获取启用的模板列表")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:template:query')")
|
||||
public CommonResult<List<EvaluationTemplateRespVO>> getEnabledTemplateList() {
|
||||
List<EvaluationTemplateDO> list = evaluationReportService.getEnabledTemplateList();
|
||||
return success(BeanUtils.toBean(list, EvaluationTemplateRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/template/export-excel")
|
||||
@Operation(summary = "导出评估模板 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:template:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportTemplateExcel(@Valid EvaluationTemplatePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<EvaluationTemplateDO> list = evaluationReportService.getTemplatePage(pageReqVO).getList();
|
||||
ExcelUtils.write(response, "评估模板.xlsx", "数据", EvaluationTemplateRespVO.class,
|
||||
BeanUtils.toBean(list, EvaluationTemplateRespVO.class));
|
||||
}
|
||||
|
||||
// ========== 维度配置管理 ==========
|
||||
|
||||
@PostMapping("/dimension/create")
|
||||
@Operation(summary = "创建评估维度")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:dimension:create')")
|
||||
public CommonResult<Long> createDimension(@Valid @RequestBody EvaluationDimensionSaveReqVO createReqVO) {
|
||||
return success(evaluationReportService.createDimension(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/dimension/update")
|
||||
@Operation(summary = "更新评估维度")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:dimension:update')")
|
||||
public CommonResult<Boolean> updateDimension(@Valid @RequestBody EvaluationDimensionSaveReqVO updateReqVO) {
|
||||
evaluationReportService.updateDimension(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/dimension/delete")
|
||||
@Operation(summary = "删除评估维度")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:dimension:delete')")
|
||||
public CommonResult<Boolean> deleteDimension(@NotNull(message = "编号不能为空") @RequestParam("id") Long id) {
|
||||
evaluationReportService.deleteDimension(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/dimension/delete-list")
|
||||
@Operation(summary = "批量删除评估维度")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:dimension:delete')")
|
||||
public CommonResult<Boolean> deleteDimensionList(@NotEmpty(message = "编号列表不能为空") @RequestParam("ids") List<Long> ids) {
|
||||
evaluationReportService.deleteDimensionListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/dimension/get")
|
||||
@Operation(summary = "获得评估维度")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:dimension:query')")
|
||||
public CommonResult<EvaluationDimensionRespVO> getDimension(@RequestParam("id") Long id) {
|
||||
EvaluationDimensionDO dimension = evaluationReportService.getDimension(id);
|
||||
return success(BeanUtils.toBean(dimension, EvaluationDimensionRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/dimension/page")
|
||||
@Operation(summary = "获得评估维度分页")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:dimension:query')")
|
||||
public CommonResult<PageResult<EvaluationDimensionRespVO>> getDimensionPage(@Valid EvaluationDimensionPageReqVO pageReqVO) {
|
||||
PageResult<EvaluationDimensionDO> pageResult = evaluationReportService.getDimensionPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, EvaluationDimensionRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/dimension/list-by-template")
|
||||
@Operation(summary = "根据模板ID获取维度列表")
|
||||
@Parameter(name = "templateId", description = "模板ID", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:dimension:query')")
|
||||
public CommonResult<List<EvaluationDimensionRespVO>> getDimensionsByTemplateId(@RequestParam("templateId") Long templateId) {
|
||||
List<EvaluationDimensionDO> list = evaluationReportService.getDimensionsByTemplateId(templateId);
|
||||
return success(BeanUtils.toBean(list, EvaluationDimensionRespVO.class));
|
||||
}
|
||||
|
||||
// ========== 评估报告管理 ==========
|
||||
|
||||
@PostMapping("/report/create")
|
||||
@Operation(summary = "创建评估报告")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:report:create')")
|
||||
public CommonResult<Long> createReport(@Valid @RequestBody EvaluationReportSaveReqVO createReqVO) {
|
||||
return success(evaluationReportService.createReport(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/report/update")
|
||||
@Operation(summary = "更新评估报告")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:report:update')")
|
||||
public CommonResult<Boolean> updateReport(@Valid @RequestBody EvaluationReportSaveReqVO updateReqVO) {
|
||||
evaluationReportService.updateReport(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/report/delete")
|
||||
@Operation(summary = "删除评估报告")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:report:delete')")
|
||||
public CommonResult<Boolean> deleteReport(@NotNull(message = "编号不能为空") @RequestParam("id") Long id) {
|
||||
evaluationReportService.deleteReport(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/report/delete-list")
|
||||
@Operation(summary = "批量删除评估报告")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:report:delete')")
|
||||
public CommonResult<Boolean> deleteReportList(@NotEmpty(message = "编号列表不能为空") @RequestParam("ids") List<Long> ids) {
|
||||
evaluationReportService.deleteReportListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/report/get")
|
||||
@Operation(summary = "获得评估报告")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:report:query')")
|
||||
public CommonResult<EvaluationReportRespVO> getReport(@RequestParam("id") Long id) {
|
||||
EvaluationReportDO report = evaluationReportService.getReport(id);
|
||||
return success(BeanUtils.toBean(report, EvaluationReportRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/report/page")
|
||||
@Operation(summary = "获得评估报告分页")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:report:query')")
|
||||
public CommonResult<PageResult<EvaluationReportRespVO>> getReportPage(@Valid EvaluationReportPageReqVO pageReqVO) {
|
||||
PageResult<EvaluationReportDO> pageResult = evaluationReportService.getReportPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, EvaluationReportRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/report/get-by-report-no")
|
||||
@Operation(summary = "根据报告编号获取报告")
|
||||
@Parameter(name = "reportNo", description = "报告编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:report:query')")
|
||||
public CommonResult<EvaluationReportRespVO> getReportByReportNo(@RequestParam("reportNo") String reportNo) {
|
||||
EvaluationReportDO report = evaluationReportService.getReportByReportNo(reportNo);
|
||||
return success(BeanUtils.toBean(report, EvaluationReportRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/report/list-by-prisoner")
|
||||
@Operation(summary = "根据罪犯ID获取报告列表")
|
||||
@Parameter(name = "prisonerId", description = "罪犯ID", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:report:query')")
|
||||
public CommonResult<List<EvaluationReportRespVO>> getReportsByPrisonerId(@RequestParam("prisonerId") Long prisonerId) {
|
||||
List<EvaluationReportDO> list = evaluationReportService.getReportsByPrisonerId(prisonerId);
|
||||
return success(BeanUtils.toBean(list, EvaluationReportRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/report/submit")
|
||||
@Operation(summary = "提交报告审核")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:report:update')")
|
||||
public CommonResult<Boolean> submitReport(@RequestParam("id") Long id) {
|
||||
evaluationReportService.submitReport(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/report/audit")
|
||||
@Operation(summary = "审核报告")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:report:audit')")
|
||||
public CommonResult<Boolean> auditReport(@Valid @RequestBody EvaluationReportAuditReqVO auditReqVO) {
|
||||
evaluationReportService.auditReport(auditReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/report/void")
|
||||
@Operation(summary = "作废报告")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:report:void')")
|
||||
public CommonResult<Boolean> voidReport(@RequestParam("id") Long id) {
|
||||
evaluationReportService.voidReport(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/report/export-excel")
|
||||
@Operation(summary = "导出评估报告 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:report:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportReportExcel(@Valid EvaluationReportPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<EvaluationReportDO> list = evaluationReportService.getReportPage(pageReqVO).getList();
|
||||
ExcelUtils.write(response, "评估报告.xlsx", "数据", EvaluationReportRespVO.class,
|
||||
BeanUtils.toBean(list, EvaluationReportRespVO.class));
|
||||
}
|
||||
|
||||
// ========== 维度数据管理 ==========
|
||||
|
||||
@PostMapping("/dimension-data/create")
|
||||
@Operation(summary = "创建维度数据")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:dimension-data:create')")
|
||||
public CommonResult<Long> createDimensionData(@Valid @RequestBody EvaluationDimensionDataSaveReqVO createReqVO) {
|
||||
return success(evaluationReportService.createDimensionData(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/dimension-data/update")
|
||||
@Operation(summary = "更新维度数据")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:dimension-data:update')")
|
||||
public CommonResult<Boolean> updateDimensionData(@Valid @RequestBody EvaluationDimensionDataSaveReqVO updateReqVO) {
|
||||
evaluationReportService.updateDimensionData(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/dimension-data/delete")
|
||||
@Operation(summary = "删除维度数据")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:dimension-data:delete')")
|
||||
public CommonResult<Boolean> deleteDimensionData(@NotNull(message = "编号不能为空") @RequestParam("id") Long id) {
|
||||
evaluationReportService.deleteDimensionData(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/dimension-data/list-by-report")
|
||||
@Operation(summary = "根据报告ID获取维度数据列表")
|
||||
@Parameter(name = "reportId", description = "报告ID", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:dimension-data:query')")
|
||||
public CommonResult<List<EvaluationDimensionDataRespVO>> getDimensionDataListByReportId(@RequestParam("reportId") Long reportId) {
|
||||
List<EvaluationDimensionDataDO> list = evaluationReportService.getDimensionDataListByReportId(reportId);
|
||||
return success(BeanUtils.toBean(list, EvaluationDimensionDataRespVO.class));
|
||||
}
|
||||
|
||||
// ========== 快捷评语库管理 ==========
|
||||
|
||||
@PostMapping("/comment/create")
|
||||
@Operation(summary = "创建快捷评语")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:comment:create')")
|
||||
public CommonResult<Long> createComment(@Valid @RequestBody ReportCommentSaveReqVO createReqVO) {
|
||||
return success(evaluationReportService.createComment(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/comment/update")
|
||||
@Operation(summary = "更新快捷评语")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:comment:update')")
|
||||
public CommonResult<Boolean> updateComment(@Valid @RequestBody ReportCommentSaveReqVO updateReqVO) {
|
||||
evaluationReportService.updateComment(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/comment/delete")
|
||||
@Operation(summary = "删除快捷评语")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:comment:delete')")
|
||||
public CommonResult<Boolean> deleteComment(@NotNull(message = "编号不能为空") @RequestParam("id") Long id) {
|
||||
evaluationReportService.deleteComment(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/comment/delete-list")
|
||||
@Operation(summary = "批量删除快捷评语")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:comment:delete')")
|
||||
public CommonResult<Boolean> deleteCommentList(@NotEmpty(message = "编号列表不能为空") @RequestParam("ids") List<Long> ids) {
|
||||
evaluationReportService.deleteCommentListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/comment/get")
|
||||
@Operation(summary = "获得快捷评语")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:comment:query')")
|
||||
public CommonResult<ReportCommentRespVO> getComment(@RequestParam("id") Long id) {
|
||||
ReportCommentDO comment = evaluationReportService.getComment(id);
|
||||
return success(BeanUtils.toBean(comment, ReportCommentRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/comment/page")
|
||||
@Operation(summary = "获得快捷评语分页")
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:comment:query')")
|
||||
public CommonResult<PageResult<ReportCommentRespVO>> getCommentPage(@Valid ReportCommentPageReqVO pageReqVO) {
|
||||
PageResult<ReportCommentDO> pageResult = evaluationReportService.getCommentPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ReportCommentRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/comment/list-by-type-level")
|
||||
@Operation(summary = "根据类型和等级获取评语列表")
|
||||
@Parameter(name = "commentType", description = "评语类型", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:comment:query')")
|
||||
public CommonResult<List<ReportCommentRespVO>> getCommentsByTypeAndLevel(
|
||||
@RequestParam("commentType") Integer commentType,
|
||||
@RequestParam(value = "level", required = false) Integer level) {
|
||||
List<ReportCommentDO> list = evaluationReportService.getCommentsByTypeAndLevel(commentType, level);
|
||||
return success(BeanUtils.toBean(list, ReportCommentRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/comment/list-by-dimension")
|
||||
@Operation(summary = "根据维度ID获取评语列表")
|
||||
@Parameter(name = "dimensionId", description = "维度ID", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:evaluation-report:comment:query')")
|
||||
public CommonResult<List<ReportCommentRespVO>> getCommentsByDimensionId(@RequestParam("dimensionId") Long dimensionId) {
|
||||
List<ReportCommentDO> list = evaluationReportService.getCommentsByDimensionId(dimensionId);
|
||||
return success(BeanUtils.toBean(list, ReportCommentRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 报告维度数据分页 Request VO")
|
||||
@Data
|
||||
public class EvaluationDimensionDataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "报告ID")
|
||||
private Long reportId;
|
||||
|
||||
@Schema(description = "维度ID")
|
||||
private Long dimensionId;
|
||||
|
||||
@Schema(description = "维度类型")
|
||||
private Integer dimensionType;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 报告维度数据 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EvaluationDimensionDataRespVO {
|
||||
|
||||
@Schema(description = "数据ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19443")
|
||||
@ExcelProperty("数据ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("报告ID")
|
||||
private Long reportId;
|
||||
|
||||
@Schema(description = "维度ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("维度ID")
|
||||
private Long dimensionId;
|
||||
|
||||
@Schema(description = "维度名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("维度名称")
|
||||
private String dimensionName;
|
||||
|
||||
@Schema(description = "维度编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("维度编码")
|
||||
private String dimensionCode;
|
||||
|
||||
@Schema(description = "维度类型:1-心理测评 2-行为表现 3-教育改造 4-劳动表现 5-人际交往 6-自评/他评")
|
||||
@ExcelProperty("维度类型")
|
||||
private Integer dimensionType;
|
||||
|
||||
@Schema(description = "得分", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("得分")
|
||||
private BigDecimal score;
|
||||
|
||||
@Schema(description = "满分")
|
||||
@ExcelProperty("满分")
|
||||
private BigDecimal fullScore;
|
||||
|
||||
@Schema(description = "权重得分")
|
||||
@ExcelProperty("权重得分")
|
||||
private BigDecimal weightedScore;
|
||||
|
||||
@Schema(description = "评级:1-优秀 2-良好 3-一般 4-较差")
|
||||
@ExcelProperty("评级")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "维度结论")
|
||||
@ExcelProperty("维度结论")
|
||||
private String conclusion;
|
||||
|
||||
@Schema(description = "维度评语")
|
||||
@ExcelProperty("维度评语")
|
||||
private String comment;
|
||||
|
||||
@Schema(description = "AI分析内容")
|
||||
private String aiAnalysis;
|
||||
|
||||
@Schema(description = "回答详情(JSON格式)")
|
||||
private String answerDetails;
|
||||
|
||||
@Schema(description = "排序")
|
||||
@ExcelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 报告维度数据新增/修改 Request VO")
|
||||
@Data
|
||||
public class EvaluationDimensionDataSaveReqVO {
|
||||
|
||||
@Schema(description = "数据ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "报告ID不能为空")
|
||||
private Long reportId;
|
||||
|
||||
@Schema(description = "维度ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "维度ID不能为空")
|
||||
private Long dimensionId;
|
||||
|
||||
@Schema(description = "维度名称")
|
||||
private String dimensionName;
|
||||
|
||||
@Schema(description = "维度编码")
|
||||
private String dimensionCode;
|
||||
|
||||
@Schema(description = "维度类型:1-心理测评 2-行为表现 3-教育改造 4-劳动表现 5-人际交往 6-自评/他评")
|
||||
private Integer dimensionType;
|
||||
|
||||
@Schema(description = "得分", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "得分不能为空")
|
||||
private BigDecimal score;
|
||||
|
||||
@Schema(description = "满分")
|
||||
private BigDecimal fullScore;
|
||||
|
||||
@Schema(description = "权重得分")
|
||||
private BigDecimal weightedScore;
|
||||
|
||||
@Schema(description = "评级:1-优秀 2-良好 3-一般 4-较差")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "维度结论")
|
||||
private String conclusion;
|
||||
|
||||
@Schema(description = "维度评语")
|
||||
private String comment;
|
||||
|
||||
@Schema(description = "AI分析内容")
|
||||
private String aiAnalysis;
|
||||
|
||||
@Schema(description = "回答详情(JSON格式)")
|
||||
private String answerDetails;
|
||||
|
||||
@Schema(description = "排序")
|
||||
@Min(value = 0, message = "排序不能为负数")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 评估维度分页 Request VO")
|
||||
@Data
|
||||
public class EvaluationDimensionPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "模板ID")
|
||||
private Long templateId;
|
||||
|
||||
@Schema(description = "维度名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "维度编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "维度类型:1-心理测评 2-行为表现 3-教育改造 4-劳动表现 5-人际交往 6-自评/他评")
|
||||
private Integer dimensionType;
|
||||
|
||||
@Schema(description = "评估方式:1-问卷测评 2-量表评分 3-行为观察 4-AI分析 5-综合评定")
|
||||
private Integer evaluationMethod;
|
||||
|
||||
@Schema(description = "状态:1-启用 2-禁用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 评估维度 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EvaluationDimensionRespVO {
|
||||
|
||||
@Schema(description = "维度ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19443")
|
||||
@ExcelProperty("维度ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("模板ID")
|
||||
private Long templateId;
|
||||
|
||||
@Schema(description = "维度名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("维度名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "维度编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("维度编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "维度描述")
|
||||
@ExcelProperty("维度描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "维度类型:1-心理测评 2-行为表现 3-教育改造 4-劳动表现 5-人际交往 6-自评/他评", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("维度类型")
|
||||
private Integer dimensionType;
|
||||
|
||||
@Schema(description = "权重(百分比)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("权重")
|
||||
private BigDecimal weight;
|
||||
|
||||
@Schema(description = "评分规则:1-分值越高越好 2-分值越低越好 3-区间评分", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("评分规则")
|
||||
private Integer scoreRule;
|
||||
|
||||
@Schema(description = "最大分值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("最大分值")
|
||||
private BigDecimal maxScore;
|
||||
|
||||
@Schema(description = "最小分值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("最小分值")
|
||||
private BigDecimal minScore;
|
||||
|
||||
@Schema(description = "及格分值")
|
||||
@ExcelProperty("及格分值")
|
||||
private BigDecimal passScore;
|
||||
|
||||
@Schema(description = "评估方式:1-问卷测评 2-量表评分 3-行为观察 4-AI分析 5-综合评定", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("评估方式")
|
||||
private Integer evaluationMethod;
|
||||
|
||||
@Schema(description = "问题列表(JSON格式)")
|
||||
private String questions;
|
||||
|
||||
@Schema(description = "排序")
|
||||
@ExcelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态:1-启用 2-禁用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 评估维度新增/修改 Request VO")
|
||||
@Data
|
||||
public class EvaluationDimensionSaveReqVO {
|
||||
|
||||
@Schema(description = "维度ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "模板ID不能为空")
|
||||
private Long templateId;
|
||||
|
||||
@Schema(description = "维度名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "维度名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "维度编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "维度编码不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "维度描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "维度类型:1-心理测评 2-行为表现 3-教育改造 4-劳动表现 5-人际交往 6-自评/他评", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "维度类型不能为空")
|
||||
private Integer dimensionType;
|
||||
|
||||
@Schema(description = "权重(百分比)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "权重不能为空")
|
||||
private BigDecimal weight;
|
||||
|
||||
@Schema(description = "评分规则:1-分值越高越好 2-分值越低越好 3-区间评分", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "评分规则不能为空")
|
||||
private Integer scoreRule;
|
||||
|
||||
@Schema(description = "最大分值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "最大分值不能为空")
|
||||
private BigDecimal maxScore;
|
||||
|
||||
@Schema(description = "最小分值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "最小分值不能为空")
|
||||
private BigDecimal minScore;
|
||||
|
||||
@Schema(description = "及格分值")
|
||||
private BigDecimal passScore;
|
||||
|
||||
@Schema(description = "评估方式:1-问卷测评 2-量表评分 3-行为观察 4-AI分析 5-综合评定", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "评估方式不能为空")
|
||||
private Integer evaluationMethod;
|
||||
|
||||
@Schema(description = "问题列表(JSON格式)")
|
||||
private String questions;
|
||||
|
||||
@Schema(description = "排序")
|
||||
@Min(value = 0, message = "排序不能为负数")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态:1-启用 2-禁用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 评估报告审核 Request VO")
|
||||
@Data
|
||||
public class EvaluationReportAuditReqVO {
|
||||
|
||||
@Schema(description = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "报告ID不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "审核状态:3-已审核 4-已作废", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "审核状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "审核意见")
|
||||
private String auditOpinion;
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 评估报告分页 Request VO")
|
||||
@Data
|
||||
public class EvaluationReportPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "罪犯ID")
|
||||
private Long prisonerId;
|
||||
|
||||
@Schema(description = "罪犯编号")
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "罪犯姓名")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "模板ID")
|
||||
private Long templateId;
|
||||
|
||||
@Schema(description = "评估类型:1-心理评估 2-危险性评估 3-改造表现评估 4-综合评估")
|
||||
private Integer evaluationType;
|
||||
|
||||
@Schema(description = "评估周期:1-月评 2-季评 3-半年评 4-年终评 5-入监评估 6-出监评估")
|
||||
private Integer evaluationCycle;
|
||||
|
||||
@Schema(description = "评级:1-优秀 2-良好 3-一般 4-较差 5-危险")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "风险等级:1-低风险 2-中风险 3-高风险 4-极高风险")
|
||||
private Integer riskLevel;
|
||||
|
||||
@Schema(description = "报告状态:1-草稿 2-待审核 3-已审核 4-已作废")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "监区ID")
|
||||
private Long areaId;
|
||||
|
||||
@Schema(description = "评估日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] evaluationDate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,134 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 评估报告 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EvaluationReportRespVO {
|
||||
|
||||
@Schema(description = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19443")
|
||||
@ExcelProperty("报告ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报告编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("报告编号")
|
||||
private String reportNo;
|
||||
|
||||
@Schema(description = "罪犯ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("罪犯ID")
|
||||
private Long prisonerId;
|
||||
|
||||
@Schema(description = "罪犯编号")
|
||||
@ExcelProperty("罪犯编号")
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "罪犯姓名")
|
||||
@ExcelProperty("罪犯姓名")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "模板ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("模板ID")
|
||||
private Long templateId;
|
||||
|
||||
@Schema(description = "模板名称")
|
||||
@ExcelProperty("模板名称")
|
||||
private String templateName;
|
||||
|
||||
@Schema(description = "评估类型:1-心理评估 2-危险性评估 3-改造表现评估 4-综合评估", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("评估类型")
|
||||
private Integer evaluationType;
|
||||
|
||||
@Schema(description = "评估周期:1-月评 2-季评 3-半年评 4-年终评 5-入监评估 6-出监评估", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("评估周期")
|
||||
private Integer evaluationCycle;
|
||||
|
||||
@Schema(description = "评估日期")
|
||||
@ExcelProperty("评估日期")
|
||||
private LocalDateTime evaluationDate;
|
||||
|
||||
@Schema(description = "评估人员ID")
|
||||
private Long evaluatorId;
|
||||
|
||||
@Schema(description = "评估人员姓名")
|
||||
@ExcelProperty("评估人员")
|
||||
private String evaluatorName;
|
||||
|
||||
@Schema(description = "监区ID")
|
||||
private Long areaId;
|
||||
|
||||
@Schema(description = "监区名称")
|
||||
@ExcelProperty("监区名称")
|
||||
private String areaName;
|
||||
|
||||
@Schema(description = "总分")
|
||||
@ExcelProperty("总分")
|
||||
private BigDecimal totalScore;
|
||||
|
||||
@Schema(description = "评级:1-优秀 2-良好 3-一般 4-较差 5-危险", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("评级")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "风险等级:1-低风险 2-中风险 3-高风险 4-极高风险")
|
||||
@ExcelProperty("风险等级")
|
||||
private Integer riskLevel;
|
||||
|
||||
@Schema(description = "风险得分")
|
||||
@ExcelProperty("风险得分")
|
||||
private BigDecimal riskScore;
|
||||
|
||||
@Schema(description = "AI生成状态:1-待生成 2-生成中 3-已完成 4-生成失败")
|
||||
@ExcelProperty("AI生成状态")
|
||||
private Integer aiStatus;
|
||||
|
||||
@Schema(description = "AI生成内容")
|
||||
private String aiContent;
|
||||
|
||||
@Schema(description = "AI生成报告内容")
|
||||
private String aiReportContent;
|
||||
|
||||
@Schema(description = "报告状态:1-草稿 2-待审核 3-已审核 4-已作废", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("报告状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "审核人ID")
|
||||
private Long auditorId;
|
||||
|
||||
@Schema(description = "审核人姓名")
|
||||
@ExcelProperty("审核人")
|
||||
private String auditorName;
|
||||
|
||||
@Schema(description = "审核时间")
|
||||
@ExcelProperty("审核时间")
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
@Schema(description = "审核意见")
|
||||
@ExcelProperty("审核意见")
|
||||
private String auditOpinion;
|
||||
|
||||
@Schema(description = "报告结论")
|
||||
@ExcelProperty("报告结论")
|
||||
private String conclusion;
|
||||
|
||||
@Schema(description = "改造建议")
|
||||
@ExcelProperty("改造建议")
|
||||
private String suggestions;
|
||||
|
||||
@Schema(description = "报告PDF路径")
|
||||
private String pdfPath;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 评估报告新增/修改 Request VO")
|
||||
@Data
|
||||
public class EvaluationReportSaveReqVO {
|
||||
|
||||
@Schema(description = "报告ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "罪犯ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "罪犯ID不能为空")
|
||||
private Long prisonerId;
|
||||
|
||||
@Schema(description = "罪犯编号")
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "罪犯姓名")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "模板ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "模板ID不能为空")
|
||||
private Long templateId;
|
||||
|
||||
@Schema(description = "模板名称")
|
||||
private String templateName;
|
||||
|
||||
@Schema(description = "评估类型:1-心理评估 2-危险性评估 3-改造表现评估 4-综合评估", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "评估类型不能为空")
|
||||
private Integer evaluationType;
|
||||
|
||||
@Schema(description = "评估周期:1-月评 2-季评 3-半年评 4-年终评 5-入监评估 6-出监评估", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "评估周期不能为空")
|
||||
private Integer evaluationCycle;
|
||||
|
||||
@Schema(description = "评估日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "评估日期不能为空")
|
||||
private LocalDateTime evaluationDate;
|
||||
|
||||
@Schema(description = "评估人员ID")
|
||||
private Long evaluatorId;
|
||||
|
||||
@Schema(description = "评估人员姓名")
|
||||
private String evaluatorName;
|
||||
|
||||
@Schema(description = "监区ID")
|
||||
private Long areaId;
|
||||
|
||||
@Schema(description = "监区名称")
|
||||
private String areaName;
|
||||
|
||||
@Schema(description = "总分")
|
||||
private BigDecimal totalScore;
|
||||
|
||||
@Schema(description = "评级:1-优秀 2-良好 3-一般 4-较差 5-危险")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "风险等级:1-低风险 2-中风险 3-高风险 4-极高风险")
|
||||
private Integer riskLevel;
|
||||
|
||||
@Schema(description = "风险得分")
|
||||
private BigDecimal riskScore;
|
||||
|
||||
@Schema(description = "AI生成状态:1-待生成 2-生成中 3-已完成 4-生成失败")
|
||||
private Integer aiStatus;
|
||||
|
||||
@Schema(description = "AI生成内容")
|
||||
private String aiContent;
|
||||
|
||||
@Schema(description = "AI生成报告内容")
|
||||
private String aiReportContent;
|
||||
|
||||
@Schema(description = "报告状态:1-草稿 2-待审核 3-已审核 4-已作废")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "报告结论")
|
||||
private String conclusion;
|
||||
|
||||
@Schema(description = "改造建议")
|
||||
private String suggestions;
|
||||
|
||||
@Schema(description = "报告PDF路径")
|
||||
private String pdfPath;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 评估模板分页 Request VO")
|
||||
@Data
|
||||
public class EvaluationTemplatePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "模板名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模板编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "模板类型:1-心理评估 2-危险性评估 3-改造表现评估 4-综合评估")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "评估周期:1-月评 2-季评 3-半年评 4-年终评 5-入监评估 6-出监评估")
|
||||
private Integer evaluationCycle;
|
||||
|
||||
@Schema(description = "状态:1-启用 2-禁用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否允许AI生成:1-是 2-否")
|
||||
private Integer aiEnabled;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 评估模板 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EvaluationTemplateRespVO {
|
||||
|
||||
@Schema(description = "模板ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19443")
|
||||
@ExcelProperty("模板ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("模板名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("模板编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "模板类型:1-心理评估 2-危险性评估 3-改造表现评估 4-综合评估", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("模板类型")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "描述")
|
||||
@ExcelProperty("描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "适用人群")
|
||||
@ExcelProperty("适用人群")
|
||||
private String applicableCrowd;
|
||||
|
||||
@Schema(description = "评估周期:1-月评 2-季评 3-半年评 4-年终评 5-入监评估 6-出监评估", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("评估周期")
|
||||
private Integer evaluationCycle;
|
||||
|
||||
@Schema(description = "状态:1-启用 2-禁用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否允许AI生成:1-是 2-否")
|
||||
@ExcelProperty("允许AI生成")
|
||||
private Integer aiEnabled;
|
||||
|
||||
@Schema(description = "AI提示词")
|
||||
private String aiPrompt;
|
||||
|
||||
@Schema(description = "报告封面图")
|
||||
private String coverImage;
|
||||
|
||||
@Schema(description = "排序")
|
||||
@ExcelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 评估模板新增/修改 Request VO")
|
||||
@Data
|
||||
public class EvaluationTemplateSaveReqVO {
|
||||
|
||||
@Schema(description = "模板ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "模板名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "模板编码不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "模板类型:1-心理评估 2-危险性评估 3-改造表现评估 4-综合评估", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "模板类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "适用人群")
|
||||
private String applicableCrowd;
|
||||
|
||||
@Schema(description = "评估周期:1-月评 2-季评 3-半年评 4-年终评 5-入监评估 6-出监评估", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "评估周期不能为空")
|
||||
private Integer evaluationCycle;
|
||||
|
||||
@Schema(description = "状态:1-启用 2-禁用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否允许AI生成:1-是 2-否")
|
||||
private Integer aiEnabled;
|
||||
|
||||
@Schema(description = "AI提示词")
|
||||
private String aiPrompt;
|
||||
|
||||
@Schema(description = "报告封面图")
|
||||
private String coverImage;
|
||||
|
||||
@Schema(description = "排序")
|
||||
@Min(value = 0, message = "排序不能为负数")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 快捷评语分页 Request VO")
|
||||
@Data
|
||||
public class ReportCommentPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "评语内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "评语类型:1-心理评语 2-行为表现评语 3-教育改造评语 4-劳动表现评语 5-综合评语 6-风险提示 7-建议措施")
|
||||
private Integer commentType;
|
||||
|
||||
@Schema(description = "适用维度")
|
||||
private Long dimensionId;
|
||||
|
||||
@Schema(description = "评级等级:1-优秀 2-良好 3-一般 4-较差 5-危险")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "状态:1-启用 2-禁用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 快捷评语 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ReportCommentRespVO {
|
||||
|
||||
@Schema(description = "评语ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19443")
|
||||
@ExcelProperty("评语ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "评语内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("评语内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "评语类型:1-心理评语 2-行为表现评语 3-教育改造评语 4-劳动表现评语 5-综合评语 6-风险提示 7-建议措施", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("评语类型")
|
||||
private Integer commentType;
|
||||
|
||||
@Schema(description = "适用维度(关联维度表)")
|
||||
@ExcelProperty("维度ID")
|
||||
private Long dimensionId;
|
||||
|
||||
@Schema(description = "维度名称")
|
||||
@ExcelProperty("维度名称")
|
||||
private String dimensionName;
|
||||
|
||||
@Schema(description = "评级等级:1-优秀 2-良好 3-一般 4-较差 5-危险")
|
||||
@ExcelProperty("评级")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "标签(逗号分隔)")
|
||||
@ExcelProperty("标签")
|
||||
private String tags;
|
||||
|
||||
@Schema(description = "使用次数")
|
||||
@ExcelProperty("使用次数")
|
||||
private Integer useCount;
|
||||
|
||||
@Schema(description = "状态:1-启用 2-禁用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "排序")
|
||||
@ExcelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 快捷评语新增/修改 Request VO")
|
||||
@Data
|
||||
public class ReportCommentSaveReqVO {
|
||||
|
||||
@Schema(description = "评语ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "评语内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "评语内容不能为空")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "评语类型:1-心理评语 2-行为表现评语 3-教育改造评语 4-劳动表现评语 5-综合评语 6-风险提示 7-建议措施", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "评语类型不能为空")
|
||||
private Integer commentType;
|
||||
|
||||
@Schema(description = "适用维度(关联维度表)")
|
||||
private Long dimensionId;
|
||||
|
||||
@Schema(description = "维度名称")
|
||||
private String dimensionName;
|
||||
|
||||
@Schema(description = "评级等级:1-优秀 2-良好 3-一般 4-较差 5-危险")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "标签(逗号分隔)")
|
||||
private String tags;
|
||||
|
||||
@Schema(description = "状态:1-启用 2-禁用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "排序")
|
||||
@Min(value = 0, message = "排序不能为负数")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -98,17 +98,17 @@ public class PrisonerController {
|
||||
if (prisoner == null) {
|
||||
return success(null);
|
||||
}
|
||||
PrisonerRespVO vo = convertToRespVO(prisoner);
|
||||
PrisonerRespVO vo = PrisonerConvert.INSTANCE.convert(prisoner);
|
||||
// 设置监区名称
|
||||
if (prisoner.getPrisonAreaId() != null) {
|
||||
cn.iocoder.yudao.module.prison.dal.dataobject.area.AreaDO area = areaMapper.selectById(prisoner.getPrisonAreaId());
|
||||
AreaDO area = areaMapper.selectById(prisoner.getPrisonAreaId());
|
||||
if (area != null) {
|
||||
vo.setPrisonAreaName(area.getName());
|
||||
}
|
||||
}
|
||||
// 设置监室名称
|
||||
if (prisoner.getPrisonCellId() != null) {
|
||||
cn.iocoder.yudao.module.prison.dal.dataobject.cell.CellDO cell = cellMapper.selectById(prisoner.getPrisonCellId());
|
||||
CellDO cell = cellMapper.selectById(prisoner.getPrisonCellId());
|
||||
if (cell != null) {
|
||||
vo.setPrisonCellName(cell.getName());
|
||||
}
|
||||
@ -116,73 +116,6 @@ public class PrisonerController {
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将 PrisonerDO 转换为 PrisonerRespVO
|
||||
*/
|
||||
private PrisonerRespVO convertToRespVO(PrisonerDO prisoner) {
|
||||
PrisonerRespVO vo = new PrisonerRespVO();
|
||||
vo.setId(prisoner.getId());
|
||||
vo.setPrisonerNo(prisoner.getPrisonerNo());
|
||||
vo.setName(prisoner.getName());
|
||||
vo.setBirthday(prisoner.getBirthday());
|
||||
vo.setIdCard(prisoner.getIdCard());
|
||||
vo.setEthnicity(prisoner.getEthnicity());
|
||||
vo.setNativePlace(prisoner.getNativePlace());
|
||||
if (prisoner.getEducation() != null) {
|
||||
vo.setEducation(prisoner.getEducation().getValue());
|
||||
}
|
||||
vo.setOccupation(prisoner.getOccupation());
|
||||
vo.setAddress(prisoner.getAddress());
|
||||
vo.setCrime(prisoner.getCrime());
|
||||
vo.setSentenceYears(prisoner.getSentenceYears());
|
||||
vo.setSentenceMonths(prisoner.getSentenceMonths());
|
||||
vo.setLifeImprisonment(prisoner.getLifeImprisonment());
|
||||
vo.setDeathSentenceReprieve(prisoner.getDeathSentenceReprieve());
|
||||
vo.setCourtName(prisoner.getCourtName());
|
||||
vo.setJudgmentDate(prisoner.getJudgmentDate());
|
||||
vo.setJudgmentNo(prisoner.getJudgmentNo());
|
||||
vo.setOriginalSentence(prisoner.getOriginalSentence());
|
||||
vo.setImprisonmentDate(prisoner.getImprisonmentDate());
|
||||
vo.setReleaseDate(prisoner.getReleaseDate());
|
||||
vo.setReleaseType(prisoner.getReleaseType());
|
||||
vo.setReleaseReason(prisoner.getReleaseReason());
|
||||
vo.setPhoto(prisoner.getPhoto());
|
||||
vo.setPrisonAreaId(prisoner.getPrisonAreaId());
|
||||
vo.setPrisonCellId(prisoner.getPrisonCellId());
|
||||
if (prisoner.getStatus() != null) {
|
||||
vo.setStatus(prisoner.getStatus().getValue());
|
||||
vo.setStatusName(prisoner.getStatus().getName());
|
||||
}
|
||||
vo.setRemark(prisoner.getRemark());
|
||||
vo.setCreateTime(prisoner.getCreateTime() != null ? prisoner.getCreateTime().toString() : null);
|
||||
|
||||
// 设置性别
|
||||
if (prisoner.getGender() != null) {
|
||||
vo.setGender(prisoner.getGender().getValue());
|
||||
vo.setGenderName(prisoner.getGender().getName());
|
||||
}
|
||||
|
||||
// 设置监管等级
|
||||
if (prisoner.getSupervisionLevel() != null) {
|
||||
vo.setSupervisionLevel(prisoner.getSupervisionLevel().getValue());
|
||||
vo.setSupervisionLevelName(prisoner.getSupervisionLevel().getName());
|
||||
}
|
||||
|
||||
// 设置风险等级
|
||||
if (prisoner.getRiskLevel() != null) {
|
||||
vo.setRiskLevel(prisoner.getRiskLevel().getValue());
|
||||
String[] riskLabels = {"", "低风险", "中风险", "高风险", "极高风险"};
|
||||
Integer value = prisoner.getRiskLevel().getValue();
|
||||
if (value >= 1 && value <= 4) {
|
||||
vo.setRiskLevelName(riskLabels[value]);
|
||||
} else {
|
||||
vo.setRiskLevelName(prisoner.getRiskLevel().getName());
|
||||
}
|
||||
}
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获取服刑人员分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('prison:prisoner:read')")
|
||||
|
||||
@ -23,7 +23,7 @@ public class PrisonerPageReqVO extends PageParam {
|
||||
@Schema(description = "姓名", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "性别", example = "1")
|
||||
@Schema(description = "性别,参见 GenderEnum 枚举:0-未知 1-男 2-女", example = "1")
|
||||
private Integer gender;
|
||||
|
||||
@Schema(description = "身份证号", example = "310101199001011234")
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.prisoner.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@ -22,13 +23,14 @@ public class PrisonerRespVO {
|
||||
@Schema(description = "姓名", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "性别", example = "1")
|
||||
@Schema(description = "性别,参见 GenderEnum 枚举:0-未知 1-男 2-女", example = "1")
|
||||
private Integer gender;
|
||||
|
||||
@Schema(description = "性别名称", example = "男")
|
||||
private String genderName;
|
||||
|
||||
@Schema(description = "出生日期", example = "1990-01-01")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate birthday;
|
||||
|
||||
@Schema(description = "身份证号", example = "310101199001011234")
|
||||
@ -71,6 +73,7 @@ public class PrisonerRespVO {
|
||||
private String courtName;
|
||||
|
||||
@Schema(description = "判决日期", example = "2023-01-15")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate judgmentDate;
|
||||
|
||||
@Schema(description = "判决书编号", example = "(2023)沪01刑初123号")
|
||||
@ -80,14 +83,19 @@ public class PrisonerRespVO {
|
||||
private String originalSentence;
|
||||
|
||||
@Schema(description = "入狱日期", example = "2024-01-01")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate imprisonmentDate;
|
||||
|
||||
@Schema(description = "释放日期", example = "2027-07-01")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate releaseDate;
|
||||
|
||||
@Schema(description = "释放类型", example = "1")
|
||||
private Integer releaseType;
|
||||
|
||||
@Schema(description = "释放类型名称", example = "刑满释放")
|
||||
private String releaseTypeName;
|
||||
|
||||
@Schema(description = "释放原因", example = "刑满释放")
|
||||
private String releaseReason;
|
||||
|
||||
@ -109,6 +117,9 @@ public class PrisonerRespVO {
|
||||
@Schema(description = "监区ID", example = "1")
|
||||
private Long prisonAreaId;
|
||||
|
||||
@Schema(description = "分区ID", example = "1")
|
||||
private Long subAreaId;
|
||||
|
||||
@Schema(description = "监区名称", example = "一监区")
|
||||
private String prisonAreaName;
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ public class PrisonerSaveReqVO {
|
||||
@Size(max = 50, message = "姓名长度不能超过50")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "性别", example = "1", required = true)
|
||||
@Schema(description = "性别,参见 GenderEnum 枚举:0-未知 1-男 2-女", example = "1", required = true)
|
||||
@NotNull(message = "性别不能为空")
|
||||
private Integer gender;
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ import java.io.IOException;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
@ -28,6 +27,7 @@ import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.question.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.question.QuestionDO;
|
||||
import cn.iocoder.yudao.module.prison.service.question.QuestionService;
|
||||
import cn.iocoder.yudao.module.prison.convert.question.QuestionConvert;
|
||||
|
||||
@Tag(name = "管理后台 - 问卷问题")
|
||||
@RestController
|
||||
@ -41,6 +41,7 @@ public class PrisonQuestionController {
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建问卷问题")
|
||||
@PreAuthorize("@ss.hasPermission('prison:question:create')")
|
||||
@ApiAccessLog(operateType = CREATE)
|
||||
public CommonResult<Long> createQuestion(@Valid @RequestBody QuestionSaveReqVO createReqVO) {
|
||||
return success(questionService.createQuestion(createReqVO));
|
||||
}
|
||||
@ -48,6 +49,7 @@ public class PrisonQuestionController {
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新问卷问题")
|
||||
@PreAuthorize("@ss.hasPermission('prison:question:update')")
|
||||
@ApiAccessLog(operateType = UPDATE)
|
||||
public CommonResult<Boolean> updateQuestion(@Valid @RequestBody QuestionSaveReqVO updateReqVO) {
|
||||
questionService.updateQuestion(updateReqVO);
|
||||
return success(true);
|
||||
@ -57,6 +59,7 @@ public class PrisonQuestionController {
|
||||
@Operation(summary = "删除问卷问题")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:question:delete')")
|
||||
@ApiAccessLog(operateType = DELETE)
|
||||
public CommonResult<Boolean> deleteQuestion(@NotNull(message = "编号不能为空") @RequestParam("id") Long id) {
|
||||
questionService.deleteQuestion(id);
|
||||
return success(true);
|
||||
@ -65,7 +68,8 @@ public class PrisonQuestionController {
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除问卷问题")
|
||||
@PreAuthorize("@ss.hasPermission('prison:question:delete')")
|
||||
@PreAuthorize("@ss.hasPermission('prison:question:delete')")
|
||||
@ApiAccessLog(operateType = DELETE)
|
||||
public CommonResult<Boolean> deleteQuestionList(@NotEmpty(message = "编号列表不能为空") @RequestParam("ids") List<Long> ids) {
|
||||
questionService.deleteQuestionListByIds(ids);
|
||||
return success(true);
|
||||
@ -77,7 +81,7 @@ public class PrisonQuestionController {
|
||||
@PreAuthorize("@ss.hasPermission('prison:question:query')")
|
||||
public CommonResult<QuestionRespVO> getQuestion(@RequestParam("id") Long id) {
|
||||
QuestionDO question = questionService.getQuestion(id);
|
||||
return success(BeanUtils.toBean(question, QuestionRespVO.class));
|
||||
return success(QuestionConvert.INSTANCE.convert(question));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ -85,12 +89,13 @@ public class PrisonQuestionController {
|
||||
@PreAuthorize("@ss.hasPermission('prison:question:query')")
|
||||
public CommonResult<PageResult<QuestionRespVO>> getQuestionPage(@Valid QuestionPageReqVO pageReqVO) {
|
||||
PageResult<QuestionDO> pageResult = questionService.getQuestionPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, QuestionRespVO.class));
|
||||
return success(QuestionConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@PostMapping("/batch-update")
|
||||
@Operation(summary = "批量更新问卷问题")
|
||||
@PreAuthorize("@ss.hasPermission('prison:question:update')")
|
||||
@ApiAccessLog(operateType = UPDATE)
|
||||
public CommonResult<Boolean> batchUpdateQuestion(@Valid @RequestBody QuestionBatchUpdateReqVO reqVO) {
|
||||
// 转换为 Service 需要的格式
|
||||
List<QuestionSaveReqVO> updateList = new ArrayList<>();
|
||||
@ -116,7 +121,7 @@ public class PrisonQuestionController {
|
||||
List<QuestionDO> list = questionService.getQuestionPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "问卷问题.xls", "数据", QuestionRespVO.class,
|
||||
BeanUtils.toBean(list, QuestionRespVO.class));
|
||||
QuestionConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
}
|
||||
@ -6,6 +6,7 @@ import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 问卷问题 Response VO")
|
||||
@ -82,6 +83,7 @@ public class QuestionRespVO {
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@ -17,7 +17,6 @@ import java.io.IOException;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
@ -28,6 +27,7 @@ import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.questionnaire.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.questionnaire.QuestionnaireDO;
|
||||
import cn.iocoder.yudao.module.prison.service.questionnaire.QuestionnaireService;
|
||||
import cn.iocoder.yudao.module.prison.convert.questionnaire.QuestionnaireConvert;
|
||||
|
||||
@Tag(name = "管理后台 - 问卷模板")
|
||||
@RestController
|
||||
@ -41,6 +41,7 @@ public class PrisonQuestionnaireController {
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建问卷模板")
|
||||
@PreAuthorize("@ss.hasPermission('prison:questionnaire:create')")
|
||||
@ApiAccessLog(operateType = CREATE)
|
||||
public CommonResult<Long> createQuestionnaire(@Valid @RequestBody QuestionnaireSaveReqVO createReqVO) {
|
||||
return success(questionnaireService.createQuestionnaire(createReqVO));
|
||||
}
|
||||
@ -48,6 +49,7 @@ public class PrisonQuestionnaireController {
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新问卷模板")
|
||||
@PreAuthorize("@ss.hasPermission('prison:questionnaire:update')")
|
||||
@ApiAccessLog(operateType = UPDATE)
|
||||
public CommonResult<Boolean> updateQuestionnaire(@Valid @RequestBody QuestionnaireSaveReqVO updateReqVO) {
|
||||
questionnaireService.updateQuestionnaire(updateReqVO);
|
||||
return success(true);
|
||||
@ -57,6 +59,7 @@ public class PrisonQuestionnaireController {
|
||||
@Operation(summary = "删除问卷模板")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:questionnaire:delete')")
|
||||
@ApiAccessLog(operateType = DELETE)
|
||||
public CommonResult<Boolean> deleteQuestionnaire(@NotNull(message = "编号不能为空") @RequestParam("id") Long id) {
|
||||
questionnaireService.deleteQuestionnaire(id);
|
||||
return success(true);
|
||||
@ -66,6 +69,7 @@ public class PrisonQuestionnaireController {
|
||||
@Parameter(name = "ids", description = "编号列表", required = true)
|
||||
@Operation(summary = "批量删除问卷模板")
|
||||
@PreAuthorize("@ss.hasPermission('prison:questionnaire:delete')")
|
||||
@ApiAccessLog(operateType = DELETE)
|
||||
public CommonResult<Boolean> deleteQuestionnaireList(@NotEmpty(message = "编号列表不能为空") @RequestParam("ids") List<Long> ids) {
|
||||
questionnaireService.deleteQuestionnaireListByIds(ids);
|
||||
return success(true);
|
||||
@ -77,7 +81,7 @@ public class PrisonQuestionnaireController {
|
||||
@PreAuthorize("@ss.hasPermission('prison:questionnaire:query')")
|
||||
public CommonResult<QuestionnaireRespVO> getQuestionnaire(@RequestParam("id") Long id) {
|
||||
QuestionnaireDO questionnaire = questionnaireService.getQuestionnaire(id);
|
||||
return success(BeanUtils.toBean(questionnaire, QuestionnaireRespVO.class));
|
||||
return success(QuestionnaireConvert.INSTANCE.convert(questionnaire));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ -85,7 +89,7 @@ public class PrisonQuestionnaireController {
|
||||
@PreAuthorize("@ss.hasPermission('prison:questionnaire:query')")
|
||||
public CommonResult<PageResult<QuestionnaireRespVO>> getQuestionnairePage(@Valid QuestionnairePageReqVO pageReqVO) {
|
||||
PageResult<QuestionnaireDO> pageResult = questionnaireService.getQuestionnairePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, QuestionnaireRespVO.class));
|
||||
return success(QuestionnaireConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@ -98,7 +102,7 @@ public class PrisonQuestionnaireController {
|
||||
List<QuestionnaireDO> list = questionnaireService.getQuestionnairePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "问卷模板.xls", "数据", QuestionnaireRespVO.class,
|
||||
BeanUtils.toBean(list, QuestionnaireRespVO.class));
|
||||
QuestionnaireConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
}
|
||||
@ -6,6 +6,7 @@ import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 问卷模板 Response VO")
|
||||
@ -43,6 +44,7 @@ public class QuestionnaireRespVO {
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
// ==================== 新增字段 ====================
|
||||
|
||||
@ -18,7 +18,6 @@ import java.math.BigDecimal;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
@ -29,6 +28,7 @@ import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.questionnairerecord.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.questionnairerecord.QuestionnaireRecordDO;
|
||||
import cn.iocoder.yudao.module.prison.service.questionnairerecord.QuestionnaireRecordService;
|
||||
import cn.iocoder.yudao.module.prison.convert.questionnairerecord.QuestionnaireRecordConvert;
|
||||
|
||||
@Tag(name = "管理后台 - 问卷答题记录/测评记录")
|
||||
@RestController
|
||||
@ -65,10 +65,10 @@ public class PrisonQuestionnaireRecordController {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete-list")
|
||||
@DeleteMapping("/delete-list")
|
||||
@Operation(summary = "批量删除问卷答题记录")
|
||||
@PreAuthorize("@ss.hasPermission('prison:questionnaire-record:delete')")
|
||||
public CommonResult<Boolean> deleteQuestionnaireRecordList(@NotEmpty(message = "编号列表不能为空") @RequestBody List<Long> ids) {
|
||||
public CommonResult<Boolean> deleteQuestionnaireRecordList(@NotEmpty(message = "编号列表不能为空") @RequestParam("ids") List<Long> ids) {
|
||||
questionnaireRecordService.deleteQuestionnaireRecordListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
@ -79,7 +79,7 @@ public class PrisonQuestionnaireRecordController {
|
||||
@PreAuthorize("@ss.hasPermission('prison:questionnaire-record:query')")
|
||||
public CommonResult<QuestionnaireRecordRespVO> getQuestionnaireRecord(@NotNull(message = "编号不能为空") @RequestParam("id") Long id) {
|
||||
QuestionnaireRecordDO questionnaireRecord = questionnaireRecordService.getQuestionnaireRecord(id);
|
||||
return success(BeanUtils.toBean(questionnaireRecord, QuestionnaireRecordRespVO.class));
|
||||
return success(QuestionnaireRecordConvert.INSTANCE.convert(questionnaireRecord));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ -87,7 +87,7 @@ public class PrisonQuestionnaireRecordController {
|
||||
@PreAuthorize("@ss.hasPermission('prison:questionnaire-record:query')")
|
||||
public CommonResult<PageResult<QuestionnaireRecordRespVO>> getQuestionnaireRecordPage(@Valid QuestionnaireRecordPageReqVO pageReqVO) {
|
||||
PageResult<QuestionnaireRecordDO> pageResult = questionnaireRecordService.getQuestionnaireRecordPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, QuestionnaireRecordRespVO.class));
|
||||
return success(QuestionnaireRecordConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@ -100,7 +100,7 @@ public class PrisonQuestionnaireRecordController {
|
||||
List<QuestionnaireRecordDO> list = questionnaireRecordService.getQuestionnaireRecordPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "问卷答题记录.xls", "数据", QuestionnaireRecordRespVO.class,
|
||||
BeanUtils.toBean(list, QuestionnaireRecordRespVO.class));
|
||||
QuestionnaireRecordConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
// ==================== 测评执行相关 ====================
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
/**
|
||||
@ -56,14 +57,22 @@ public class QuestionnaireRecordRespVO {
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@ExcelProperty("开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "UTC")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "结束时间")
|
||||
@ExcelProperty("结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "UTC")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "答题时间")
|
||||
@ExcelProperty("答题时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "UTC")
|
||||
private LocalDateTime answerTime;
|
||||
|
||||
@Schema(description = "截止日期")
|
||||
@ExcelProperty("截止日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "UTC")
|
||||
private LocalDateTime deadline;
|
||||
|
||||
// ==================== 评分信息 ====================
|
||||
@ -103,6 +112,7 @@ public class QuestionnaireRecordRespVO {
|
||||
|
||||
@Schema(description = "评阅时间")
|
||||
@ExcelProperty("评阅时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "UTC")
|
||||
private LocalDateTime evaluateTime;
|
||||
|
||||
// ==================== 统计信息 ====================
|
||||
@ -126,6 +136,7 @@ public class QuestionnaireRecordRespVO {
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "UTC")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.quickcomment;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.quickcomment.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.service.quickcomment.CommentCategoryService;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.quickcomment.CommentCategoryDO;
|
||||
|
||||
@Tag(name = "管理后台 - 快捷评语分类")
|
||||
@RestController
|
||||
@RequestMapping("/prison/quick-comment/category")
|
||||
@Validated
|
||||
public class CommentCategoryController {
|
||||
|
||||
@Resource
|
||||
private CommentCategoryService commentCategoryService;
|
||||
|
||||
@PostMapping("/init")
|
||||
@Operation(summary = "初始化快捷评语分类和评语(预置数据)")
|
||||
@PreAuthorize("@ss.hasPermission('prison:comment-category:create')")
|
||||
public CommonResult<Integer> initCategories() {
|
||||
int count = commentCategoryService.initCategories();
|
||||
return success(count);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "查询分类列表")
|
||||
public CommonResult<List<CommentCategoryDO>> getCategoryList(CommentCategorySaveReqVO reqVO) {
|
||||
return success(commentCategoryService.getCategoryList(reqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得分类详情")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
public CommonResult<CommentCategoryDO> getCategory(@RequestParam("id") Long id) {
|
||||
return success(commentCategoryService.getCategory(id));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,115 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.quickcomment;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.quickcomment.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.quickcomment.QuickCommentDO;
|
||||
import cn.iocoder.yudao.module.prison.service.quickcomment.QuickCommentService;
|
||||
|
||||
@Tag(name = "管理后台 - 快捷评语")
|
||||
@RestController
|
||||
@RequestMapping("/prison/quick-comment")
|
||||
@Validated
|
||||
public class QuickCommentController {
|
||||
|
||||
@Resource
|
||||
private QuickCommentService quickCommentService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建快捷评语")
|
||||
@PreAuthorize("@ss.hasPermission('prison:quick-comment:create')")
|
||||
public CommonResult<Long> createQuickComment(@Valid @RequestBody QuickCommentSaveReqVO createReqVO) {
|
||||
return success(quickCommentService.createQuickComment(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新快捷评语")
|
||||
@PreAuthorize("@ss.hasPermission('prison:quick-comment:update')")
|
||||
public CommonResult<Boolean> updateQuickComment(@Valid @RequestBody QuickCommentSaveReqVO updateReqVO) {
|
||||
quickCommentService.updateQuickComment(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除快捷评语")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:quick-comment:delete')")
|
||||
public CommonResult<Boolean> deleteQuickComment(@NotNull(message = "编号不能为空") @RequestParam("id") Long id) {
|
||||
quickCommentService.deleteQuickComment(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Operation(summary = "批量删除快捷评语")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:quick-comment:delete')")
|
||||
public CommonResult<Boolean> deleteQuickCommentList(@NotEmpty(message = "编号列表不能为空") @RequestParam("ids") List<Long> ids) {
|
||||
quickCommentService.deleteQuickCommentListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得快捷评语详情")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('prison:quick-comment:query')")
|
||||
public CommonResult<QuickCommentRespVO> getQuickComment(@RequestParam("id") Long id) {
|
||||
QuickCommentDO comment = quickCommentService.getQuickComment(id);
|
||||
if (comment == null) {
|
||||
return success(null);
|
||||
}
|
||||
return success(BeanUtils.toBean(comment, QuickCommentRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得快捷评语分页")
|
||||
@PreAuthorize("@ss.hasPermission('prison:quick-comment:query')")
|
||||
public CommonResult<PageResult<QuickCommentRespVO>> getQuickCommentPage(@Valid QuickCommentPageReqVO pageReqVO) {
|
||||
return success(quickCommentService.getQuickCommentPage(pageReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/import")
|
||||
@Operation(summary = "导入快捷评语")
|
||||
@PreAuthorize("@ss.hasPermission('prison:quick-comment:import')")
|
||||
public CommonResult<Integer> importComments(@RequestBody Map<String, Object> params) {
|
||||
Long categoryId = Long.valueOf(params.get("categoryId").toString());
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> contents = (List<String>) params.get("contents");
|
||||
int count = quickCommentService.importComments(categoryId, contents);
|
||||
return success(count);
|
||||
}
|
||||
|
||||
@GetMapping("/export")
|
||||
@Operation(summary = "导出快捷评语 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('prison:quick-comment:export')")
|
||||
public void exportQuickCommentExcel(@Valid QuickCommentPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<QuickCommentRespVO> list = quickCommentService.getQuickCommentPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "快捷评语.xls", "数据", QuickCommentRespVO.class, list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.quickcomment.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 快捷评语分类分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CommentCategoryPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "分类名称", example = "入监综合评估")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "评估类型:1-入监 2-定期 3-出监 4-减刑 5-专项", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "状态:0-停用 1-启用", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.quickcomment.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 快捷评语分类 Response VO")
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CommentCategoryRespVO {
|
||||
|
||||
@Schema(description = "分类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "分类名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "评估类型:1-入监 2-定期 3-出监 4-减刑 5-专项")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态:0-停用 1-启用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.quickcomment.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 快捷评语分类新增/修改 Request VO")
|
||||
@Data
|
||||
public class CommentCategorySaveReqVO {
|
||||
|
||||
@Schema(description = "分类ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "分类名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "评估类型:1-入监 2-定期 3-出监 4-减刑 5-专项", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "评估类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态:0-停用 1-启用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.quickcomment.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
@Schema(description = "管理后台 - 快捷评语分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class QuickCommentPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "分类ID")
|
||||
private Long categoryId;
|
||||
|
||||
@Schema(description = "评语内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "状态:0-停用 1-启用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.quickcomment.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
@Schema(description = "管理后台 - 快捷评语 Response VO")
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class QuickCommentRespVO {
|
||||
|
||||
@Schema(description = "评语ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "分类ID")
|
||||
private Long categoryId;
|
||||
|
||||
@Schema(description = "分类名称")
|
||||
private String categoryName;
|
||||
|
||||
@Schema(description = "评语内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "使用次数")
|
||||
private Integer usageCount;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态:0-停用 1-启用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.quickcomment.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 快捷评语新增/修改 Request VO")
|
||||
@Data
|
||||
public class QuickCommentSaveReqVO {
|
||||
|
||||
@Schema(description = "评语ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "分类ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "分类ID不能为空")
|
||||
private Long categoryId;
|
||||
|
||||
@Schema(description = "评语内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "评语内容不能为空")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态:0-停用 1-启用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.prison.controller.admin.release.vo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@ -45,6 +46,7 @@ public class ReleaseRespVO {
|
||||
private String judgmentNo;
|
||||
|
||||
@Schema(description = "实际释放日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
|
||||
private LocalDate actualReleaseDate;
|
||||
|
||||
@Schema(description = "交接人")
|
||||
|
||||
@ -0,0 +1,102 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.report;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.report.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.report.ReportDO;
|
||||
import cn.iocoder.yudao.module.prison.service.report.ReportService;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.report.vo.ReportConvert;
|
||||
|
||||
@Tag(name = "管理后台 - 评估报告")
|
||||
@RestController
|
||||
@RequestMapping("/prison/report")
|
||||
@Validated
|
||||
public class ReportController {
|
||||
|
||||
@Resource
|
||||
private ReportService reportService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建评估报告")
|
||||
@PreAuthorize("@ss.hasPermission('prison:report:create')")
|
||||
public CommonResult<Long> createReport(@Valid @RequestBody ReportSaveReqVO createReqVO) {
|
||||
return success(reportService.createReport(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新评估报告")
|
||||
@PreAuthorize("@ss.hasPermission('prison:report:update')")
|
||||
public CommonResult<Boolean> updateReport(@Valid @RequestBody ReportSaveReqVO updateReqVO) {
|
||||
reportService.updateReport(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除评估报告")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:report:delete')")
|
||||
public CommonResult<Boolean> deleteReport(@NotNull(message = "编号不能为空") @RequestParam("id") Long id) {
|
||||
reportService.deleteReport(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Operation(summary = "批量删除评估报告")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:report:delete')")
|
||||
public CommonResult<Boolean> deleteReportList(@NotEmpty(message = "编号列表不能为空") @RequestParam("ids") List<Long> ids) {
|
||||
reportService.deleteReportListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得评估报告详情")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('prison:report:query')")
|
||||
public CommonResult<ReportRespVO> getReport(@RequestParam("id") Long id) {
|
||||
return success(ReportConvert.INSTANCE.convert(reportService.getReport(id)));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得评估报告分页")
|
||||
@PreAuthorize("@ss.hasPermission('prison:report:query')")
|
||||
public CommonResult<PageResult<ReportRespVO>> getReportPage(@Valid ReportPageReqVO pageReqVO) {
|
||||
PageResult<ReportDO> pageResult = reportService.getReportPage(pageReqVO);
|
||||
return success(ReportConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出评估报告 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('prison:report:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportReportExcel(@Valid ReportPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ReportRespVO> list = ReportConvert.INSTANCE.convertList(reportService.getReportPage(pageReqVO).getList());
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "评估报告.xls", "数据", ReportRespVO.class, list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.report.vo;
|
||||
import java.util.List;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.report.ReportDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface ReportConvert {
|
||||
ReportConvert INSTANCE = Mappers.getMapper(ReportConvert.class);
|
||||
|
||||
ReportDO convert(ReportSaveReqVO bean);
|
||||
|
||||
ReportRespVO convert(ReportDO bean);
|
||||
|
||||
List<ReportRespVO> convertList(List<ReportDO> list);
|
||||
|
||||
PageResult<ReportRespVO> convertPage(PageResult<ReportDO> page);
|
||||
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.report.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
@Schema(description = "管理后台 - 评估报告分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ReportPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "报告编号")
|
||||
private String reportNo;
|
||||
|
||||
@Schema(description = "罪犯ID")
|
||||
private Long prisonerId;
|
||||
|
||||
@Schema(description = "罪犯编号")
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "罪犯姓名")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "模板ID")
|
||||
private Long templateId;
|
||||
|
||||
@Schema(description = "风险等级:1-低风险 2-中风险 3-高风险 4-极高风险")
|
||||
private Integer riskLevel;
|
||||
|
||||
@Schema(description = "状态:1-草稿 2-待审核 3-已通过 4-已退回")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "报告日期")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDateTime[] reportDate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,126 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.report.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 评估报告 Response VO")
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ReportRespVO {
|
||||
|
||||
@Schema(description = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报告编号")
|
||||
private String reportNo;
|
||||
|
||||
@Schema(description = "罪犯ID")
|
||||
private Long prisonerId;
|
||||
|
||||
@Schema(description = "罪犯编号")
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "罪犯姓名")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "监区ID")
|
||||
private Long prisonAreaId;
|
||||
|
||||
@Schema(description = "监区名称")
|
||||
private String prisonAreaName;
|
||||
|
||||
@Schema(description = "监室ID")
|
||||
private Long prisonCellId;
|
||||
|
||||
@Schema(description = "监室名称")
|
||||
private String prisonCellName;
|
||||
|
||||
@Schema(description = "模板ID")
|
||||
private Long templateId;
|
||||
|
||||
@Schema(description = "模板名称")
|
||||
private String templateName;
|
||||
|
||||
@Schema(description = "报告标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "报告日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
|
||||
private java.time.LocalDate reportDate;
|
||||
|
||||
@Schema(description = "维度内容,JSON格式")
|
||||
private String dimensions;
|
||||
|
||||
@Schema(description = "综合结论")
|
||||
private String conclusion;
|
||||
|
||||
@Schema(description = "改造建议")
|
||||
private String suggestions;
|
||||
|
||||
@Schema(description = "风险等级:1-低风险 2-中风险 3-高风险 4-极高风险")
|
||||
private Integer riskLevel;
|
||||
|
||||
@Schema(description = "附件列表,JSON格式")
|
||||
private String attachments;
|
||||
|
||||
@Schema(description = "状态:1-草稿 2-待审核 3-已通过 4-已退回")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "数字签名")
|
||||
private String signature;
|
||||
|
||||
@Schema(description = "报告指纹")
|
||||
private String fingerprint;
|
||||
|
||||
@Schema(description = "提交人ID")
|
||||
private Long submitterId;
|
||||
|
||||
@Schema(description = "提交人姓名")
|
||||
private String submitterName;
|
||||
|
||||
@Schema(description = "提交时间")
|
||||
private LocalDateTime submitTime;
|
||||
|
||||
@Schema(description = "审核人ID")
|
||||
private Long reviewerId;
|
||||
|
||||
@Schema(description = "审核人姓名")
|
||||
private String reviewerName;
|
||||
|
||||
@Schema(description = "审核时间")
|
||||
private LocalDateTime reviewTime;
|
||||
|
||||
@Schema(description = "审核意见")
|
||||
private String reviewComment;
|
||||
|
||||
@Schema(description = "是否已归档")
|
||||
private Boolean archived;
|
||||
|
||||
@Schema(description = "归档时间")
|
||||
private LocalDateTime archivedTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private String updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.report.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 评估报告新增/修改 Request VO")
|
||||
@Data
|
||||
public class ReportSaveReqVO {
|
||||
|
||||
@Schema(description = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "报告编号")
|
||||
private String reportNo;
|
||||
|
||||
@Schema(description = "罪犯ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "罪犯ID不能为空")
|
||||
private Long prisonerId;
|
||||
|
||||
@Schema(description = "罪犯编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "罪犯编号不能为空")
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "罪犯姓名")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "模板ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "模板ID不能为空")
|
||||
private Long templateId;
|
||||
|
||||
@Schema(description = "模板名称")
|
||||
private String templateName;
|
||||
|
||||
@Schema(description = "报告标题", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "报告标题不能为空")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "报告日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "报告日期不能为空")
|
||||
private java.time.LocalDate reportDate;
|
||||
|
||||
@Schema(description = "维度内容,JSON格式")
|
||||
private String dimensions;
|
||||
|
||||
@Schema(description = "综合结论")
|
||||
private String conclusion;
|
||||
|
||||
@Schema(description = "改造建议")
|
||||
private String suggestions;
|
||||
|
||||
@Schema(description = "风险等级:1-低风险 2-中风险 3-高风险 4-极高风险")
|
||||
private Integer riskLevel;
|
||||
|
||||
@Schema(description = "附件列表,JSON格式")
|
||||
private String attachments;
|
||||
|
||||
@Schema(description = "状态:1-草稿 2-待审核 3-已通过 4-已退回", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,129 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.reporttemplate;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.reporttemplate.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.reporttemplate.ReportTemplateDO;
|
||||
import cn.iocoder.yudao.module.prison.service.reporttemplate.ReportTemplateService;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.reporttemplate.vo.ReportTemplateConvert;
|
||||
|
||||
@Tag(name = "管理后台 - 评估报告模板")
|
||||
@RestController
|
||||
@RequestMapping("/prison/report-template")
|
||||
@Validated
|
||||
public class ReportTemplateController {
|
||||
|
||||
@Resource
|
||||
private ReportTemplateService reportTemplateService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建评估报告模板")
|
||||
@PreAuthorize("@ss.hasPermission('prison:report-template:create')")
|
||||
public CommonResult<Long> createReportTemplate(@Valid @RequestBody ReportTemplateSaveReqVO createReqVO) {
|
||||
return success(reportTemplateService.createReportTemplate(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新评估报告模板")
|
||||
@PreAuthorize("@ss.hasPermission('prison:report-template:update')")
|
||||
public CommonResult<Boolean> updateReportTemplate(@Valid @RequestBody ReportTemplateSaveReqVO updateReqVO) {
|
||||
reportTemplateService.updateReportTemplate(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除评估报告模板")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:report-template:delete')")
|
||||
public CommonResult<Boolean> deleteReportTemplate(@NotNull(message = "编号不能为空") @RequestParam("id") Long id) {
|
||||
reportTemplateService.deleteReportTemplate(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Operation(summary = "批量删除评估报告模板")
|
||||
@Parameter(name = "ids", description = "编号列表", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:report-template:delete')")
|
||||
public CommonResult<Boolean> deleteReportTemplateList(@NotEmpty(message = "编号列表不能为空") @RequestParam("ids") List<Long> ids) {
|
||||
reportTemplateService.deleteReportTemplateListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得评估报告模板详情")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('prison:report-template:query')")
|
||||
public CommonResult<ReportTemplateRespVO> getReportTemplate(@RequestParam("id") Long id) {
|
||||
return success(ReportTemplateConvert.INSTANCE.convert(reportTemplateService.getReportTemplate(id)));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得评估报告模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('prison:report-template:query')")
|
||||
public CommonResult<PageResult<ReportTemplateRespVO>> getReportTemplatePage(@Valid ReportTemplatePageReqVO pageReqVO) {
|
||||
PageResult<ReportTemplateDO> pageResult = reportTemplateService.getReportTemplatePage(pageReqVO);
|
||||
return success(ReportTemplateConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出评估报告模板 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('prison:report-template:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportReportTemplateExcel(@Valid ReportTemplatePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ReportTemplateRespVO> list = ReportTemplateConvert.INSTANCE.convertList(reportTemplateService.getReportTemplatePage(pageReqVO).getList());
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "评估报告模板.xls", "数据", ReportTemplateRespVO.class, list);
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@Operation(summary = "复制评估报告模板")
|
||||
@Parameter(name = "id", description = "模板ID", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:report-template:create')")
|
||||
public CommonResult<Long> copyReportTemplate(@RequestParam("id") Long id) {
|
||||
return success(reportTemplateService.copyReportTemplate(id));
|
||||
}
|
||||
|
||||
@PutMapping("/update-status")
|
||||
@Operation(summary = "更新评估报告模板状态")
|
||||
@PreAuthorize("@ss.hasPermission('prison:report-template:update')")
|
||||
public CommonResult<Boolean> updateReportTemplateStatus(
|
||||
@RequestParam("id") Long id,
|
||||
@RequestParam("status") Integer status) {
|
||||
reportTemplateService.updateReportTemplateStatus(id, status);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/set-default")
|
||||
@Operation(summary = "设为默认模板")
|
||||
@Parameter(name = "id", description = "模板ID", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('prison:report-template:update')")
|
||||
public CommonResult<Boolean> setReportTemplateDefault(@RequestParam("id") Long id) {
|
||||
reportTemplateService.setReportTemplateDefault(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.reporttemplate.vo;
|
||||
import java.util.List;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.reporttemplate.ReportTemplateDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface ReportTemplateConvert {
|
||||
ReportTemplateConvert INSTANCE = Mappers.getMapper(ReportTemplateConvert.class);
|
||||
|
||||
ReportTemplateDO convert(ReportTemplateSaveReqVO bean);
|
||||
|
||||
ReportTemplateRespVO convert(ReportTemplateDO bean);
|
||||
|
||||
List<ReportTemplateRespVO> convertList(List<ReportTemplateDO> list);
|
||||
|
||||
PageResult<ReportTemplateRespVO> convertPage(PageResult<ReportTemplateDO> page);
|
||||
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.reporttemplate.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
@Schema(description = "管理后台 - 评估报告模板分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ReportTemplatePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "模板名称", example = "入监综合评估模板")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模板类型:1-入监综合评估 2-定期考核报告 3-出监评估 4-减刑假释建议 5-专项评估")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "状态:0-停用 1-启用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否默认")
|
||||
private Boolean isDefault;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.reporttemplate.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 评估报告模板 Response VO")
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ReportTemplateRespVO {
|
||||
|
||||
@Schema(description = "模板ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板名称", example = "入监综合评估模板")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模板类型:1-入监综合评估 2-定期考核报告 3-出监评估 4-减刑假释建议 5-专项评估")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "报告标题格式")
|
||||
private String titleFormat;
|
||||
|
||||
@Schema(description = "评估维度配置,JSON格式")
|
||||
private String dimensions;
|
||||
|
||||
@Schema(description = "AI提示词配置,JSON格式")
|
||||
private String aiPromptConfig;
|
||||
|
||||
@Schema(description = "样式配置,JSON格式")
|
||||
private String styleConfig;
|
||||
|
||||
@Schema(description = "状态:0-停用 1-启用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否默认")
|
||||
private Boolean isDefault;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private String updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.reporttemplate.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 评估报告模板新增/修改 Request VO")
|
||||
@Data
|
||||
public class ReportTemplateSaveReqVO {
|
||||
|
||||
@Schema(description = "模板ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "入监综合评估模板")
|
||||
@NotEmpty(message = "模板名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模板类型:1-入监综合评估 2-定期考核报告 3-出监评估 4-减刑假释建议 5-专项评估", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "模板类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "报告标题格式", example = "{prisoner_name}入监综合评估报告")
|
||||
private String titleFormat;
|
||||
|
||||
@Schema(description = "评估维度配置,JSON格式")
|
||||
private String dimensions;
|
||||
|
||||
@Schema(description = "AI提示词配置,JSON格式")
|
||||
private String aiPromptConfig;
|
||||
|
||||
@Schema(description = "样式配置,JSON格式")
|
||||
private String styleConfig;
|
||||
|
||||
@Schema(description = "状态:0-停用 1-启用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "是否默认")
|
||||
private Boolean isDefault;
|
||||
|
||||
@Schema(description = "备注", example = "用于新入监罪犯的综合评估")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.risk;
|
||||
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.risk.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.risk.RiskDO;
|
||||
import cn.iocoder.yudao.module.prison.service.risk.RiskService;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.convert.risk.RiskConvert;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 管理后台 - 风险评估 Controller
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Tag(name = "管理后台 - 风险评估")
|
||||
@RestController
|
||||
@RequestMapping("/prison/risk")
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
public class RiskController {
|
||||
|
||||
private final RiskService riskService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建风险评估")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk:create')")
|
||||
public CommonResult<Long> create(@Valid @RequestBody RiskSaveReqVO createReqVO) {
|
||||
return success(riskService.createRisk(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新风险评估")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk:update')")
|
||||
public CommonResult<Boolean> update(@Valid @RequestBody RiskSaveReqVO updateReqVO) {
|
||||
riskService.updateRisk(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除风险评估")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk:delete')")
|
||||
public CommonResult<Boolean> delete(@RequestParam("id") Long id) {
|
||||
riskService.deleteRisk(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Operation(summary = "批量删除风险评估")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk:delete')")
|
||||
public CommonResult<Boolean> deleteList(@RequestParam("ids") List<Long> ids) {
|
||||
riskService.deleteRiskListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "查询风险评估详情")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk:query')")
|
||||
public CommonResult<RiskRespVO> get(@RequestParam("id") Long id) {
|
||||
RiskDO risk = riskService.getRisk(id);
|
||||
return success(RiskConvert.INSTANCE.convert(risk));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "分页查询风险评估")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk:query')")
|
||||
public CommonResult<PageResult<RiskRespVO>> page(@Valid RiskPageReqVO pageReqVO) {
|
||||
PageResult<RiskDO> pageResult = riskService.getRiskPage(pageReqVO);
|
||||
return success(RiskConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出风险评估 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk:export')")
|
||||
public void exportExcel(@Valid RiskPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws Exception {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<RiskDO> list = riskService.getRiskPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "风险评估.xls", "风险评估数据", RiskRespVO.class,
|
||||
RiskConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.risk.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 管理后台 - 风险评估分页 Request VO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Schema(description = "管理后台 - 风险评估分页 Request VO")
|
||||
@Data
|
||||
public class RiskPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "关联罪犯ID", example = "12345")
|
||||
private Long prisonerId;
|
||||
|
||||
@Schema(description = "罪犯编号", example = "ZF2024001")
|
||||
private String prisonerCode;
|
||||
|
||||
@Schema(description = "罪犯姓名", example = "张三")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "评估类型:1-入监评估 2-定期评估 3-专项评估 4-出监评估", example = "1")
|
||||
private Integer assessmentType;
|
||||
|
||||
@Schema(description = "风险等级:1-低风险 2-中风险 3-高风险 4-极高风险", example = "2")
|
||||
private Integer riskLevel;
|
||||
|
||||
@Schema(description = "评估人")
|
||||
private String assessor;
|
||||
|
||||
@Schema(description = "精神状态评估", example = "精神状态正常")
|
||||
private String mentalState;
|
||||
|
||||
@Schema(description = "脱逃风险评估", example = "脱逃风险低")
|
||||
private String escapeRisk;
|
||||
|
||||
@Schema(description = "暴力倾向评估", example = "无暴力倾向")
|
||||
private String violenceRisk;
|
||||
|
||||
@Schema(description = "抗改风险评估", example = "配合改造")
|
||||
private String revoltRisk;
|
||||
|
||||
@Schema(description = "自杀自伤风险评估", example = "无自伤倾向")
|
||||
private String selfHarmRisk;
|
||||
|
||||
@Schema(description = "评估日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate[] assessmentDate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.risk.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
/**
|
||||
* 管理后台 - 风险评估 Response VO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Schema(description = "管理后台 - 风险评估 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class RiskRespVO {
|
||||
|
||||
@Schema(description = "评估ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19443")
|
||||
@ExcelProperty("评估ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联罪犯ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12345")
|
||||
@ExcelProperty("罪犯ID")
|
||||
private Long prisonerId;
|
||||
|
||||
@Schema(description = "罪犯编号", example = "ZF2024001")
|
||||
@ExcelProperty("罪犯编号")
|
||||
private String prisonerCode;
|
||||
|
||||
@Schema(description = "罪犯姓名", example = "张三")
|
||||
@ExcelProperty("罪犯姓名")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "评估类型:1-入监评估 2-定期评估 3-专项评估 4-出监评估", example = "1")
|
||||
@ExcelProperty("评估类型")
|
||||
private Integer assessmentType;
|
||||
|
||||
@Schema(description = "评估日期")
|
||||
@ExcelProperty("评估日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
|
||||
private LocalDate assessmentDate;
|
||||
|
||||
@Schema(description = "综合风险得分(0-100)", example = "75.5")
|
||||
@ExcelProperty("综合得分")
|
||||
private BigDecimal overallScore;
|
||||
|
||||
@Schema(description = "风险等级:1-低风险 2-中风险 3-高风险 4-极高风险", example = "2")
|
||||
@ExcelProperty("风险等级")
|
||||
private Integer riskLevel;
|
||||
|
||||
@Schema(description = "精神状态评估", example = "精神状态正常")
|
||||
@ExcelProperty("精神状态")
|
||||
private String mentalState;
|
||||
|
||||
@Schema(description = "脱逃风险评估", example = "脱逃风险低")
|
||||
@ExcelProperty("脱逃风险")
|
||||
private String escapeRisk;
|
||||
|
||||
@Schema(description = "暴力倾向评估", example = "无暴力倾向")
|
||||
@ExcelProperty("暴力倾向")
|
||||
private String violenceRisk;
|
||||
|
||||
@Schema(description = "抗改风险评估", example = "配合改造")
|
||||
@ExcelProperty("抗改风险")
|
||||
private String revoltRisk;
|
||||
|
||||
@Schema(description = "自杀自伤风险评估", example = "无自伤倾向")
|
||||
@ExcelProperty("自伤风险")
|
||||
private String selfHarmRisk;
|
||||
|
||||
@Schema(description = "评估建议", example = "建议加强心理辅导")
|
||||
@ExcelProperty("评估建议")
|
||||
private String recommendation;
|
||||
|
||||
@Schema(description = "评估人")
|
||||
@ExcelProperty("评估人")
|
||||
private String assessor;
|
||||
|
||||
@Schema(description = "评估方式:1-心理测评 2-行为观察 3-面谈评估 4-综合评估", example = "4")
|
||||
@ExcelProperty("评估方式")
|
||||
private Integer assessMethod;
|
||||
|
||||
@Schema(description = "评估项目得分(JSON格式存储)")
|
||||
@ExcelProperty("项目得分")
|
||||
private String itemScores;
|
||||
|
||||
@Schema(description = "评估结论", example = "综合评估为中风险")
|
||||
@ExcelProperty("评估结论")
|
||||
private String conclusion;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.risk.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 管理后台 - 风险评估新增/修改 Request VO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Schema(description = "管理后台 - 风险评估新增/修改 Request VO")
|
||||
@Data
|
||||
public class RiskSaveReqVO {
|
||||
|
||||
@Schema(description = "评估ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19443")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联罪犯ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12345")
|
||||
@NotNull(message = "罪犯ID不能为空")
|
||||
private Long prisonerId;
|
||||
|
||||
@Schema(description = "罪犯编号", example = "ZF2024001")
|
||||
private String prisonerCode;
|
||||
|
||||
@Schema(description = "罪犯姓名", example = "张三")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "评估类型:1-入监评估 2-定期评估 3-专项评估 4-出监评估", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "评估类型不能为空")
|
||||
private Integer assessmentType;
|
||||
|
||||
@Schema(description = "评估日期")
|
||||
private LocalDate assessmentDate;
|
||||
|
||||
@Schema(description = "综合风险得分(0-100)", example = "75.5")
|
||||
private BigDecimal overallScore;
|
||||
|
||||
@Schema(description = "风险等级:1-低风险 2-中风险 3-高风险 4-极高风险", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotNull(message = "风险等级不能为空")
|
||||
private Integer riskLevel;
|
||||
|
||||
@Schema(description = "精神状态评估", example = "精神状态正常")
|
||||
private String mentalState;
|
||||
|
||||
@Schema(description = "脱逃风险评估", example = "脱逃风险低")
|
||||
private String escapeRisk;
|
||||
|
||||
@Schema(description = "暴力倾向评估", example = "无暴力倾向")
|
||||
private String violenceRisk;
|
||||
|
||||
@Schema(description = "抗改风险评估", example = "配合改造")
|
||||
private String revoltRisk;
|
||||
|
||||
@Schema(description = "自杀自伤风险评估", example = "无自伤倾向")
|
||||
private String selfHarmRisk;
|
||||
|
||||
@Schema(description = "评估建议", example = "建议加强心理辅导")
|
||||
private String recommendation;
|
||||
|
||||
@Schema(description = "评估人")
|
||||
private String assessor;
|
||||
|
||||
@Schema(description = "评估方式:1-心理测评 2-行为观察 3-面谈评估 4-综合评估", example = "4")
|
||||
private Integer assessMethod;
|
||||
|
||||
@Schema(description = "评估项目得分(JSON格式存储)", example = "[{\"itemId\":1,\"itemName\":\"项目名称\",\"score\":85,\"weight\":0.2}]")
|
||||
private String itemScores;
|
||||
|
||||
@Schema(description = "评估结论", example = "综合评估为中风险")
|
||||
private String conclusion;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,102 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.riskassessment;
|
||||
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.riskassessment.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.service.riskassessment.RiskAssessmentService;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 管理后台 - 危险评估 Controller
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Tag(name = "管理后台 - 危险评估")
|
||||
@RestController
|
||||
@RequestMapping("/prison/risk-assessment")
|
||||
@Validated
|
||||
public class RiskAssessmentController {
|
||||
|
||||
@Resource
|
||||
private RiskAssessmentService riskAssessmentService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建危险评估")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk-assessment:create')")
|
||||
public CommonResult<Long> create(@Valid @RequestBody RiskAssessmentSaveReqVO createReqVO) {
|
||||
return success(riskAssessmentService.createRiskAssessment(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新危险评估")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk-assessment:update')")
|
||||
public CommonResult<Boolean> update(@Valid @RequestBody RiskAssessmentSaveReqVO updateReqVO) {
|
||||
riskAssessmentService.updateRiskAssessment(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除危险评估")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk-assessment:delete')")
|
||||
public CommonResult<Boolean> delete(@RequestParam("id") Long id) {
|
||||
riskAssessmentService.deleteRiskAssessment(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Operation(summary = "批量删除危险评估")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk-assessment:delete')")
|
||||
public CommonResult<Boolean> deleteList(@RequestParam("ids") List<Long> ids) {
|
||||
riskAssessmentService.deleteRiskAssessmentListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "查询危险评估详情")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk-assessment:query')")
|
||||
public CommonResult<RiskAssessmentRespVO> get(@RequestParam("id") Long id) {
|
||||
RiskAssessmentRespVO respVO = riskAssessmentService.getRiskAssessment(id);
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "分页查询危险评估")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk-assessment:query')")
|
||||
public CommonResult<PageResult<RiskAssessmentRespVO>> page(@Valid RiskAssessmentPageReqVO pageReqVO) {
|
||||
PageResult<RiskAssessmentRespVO> voResult = riskAssessmentService.getRiskAssessmentPage(pageReqVO);
|
||||
return success(voResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出危险评估 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('prison:risk-assessment:export')")
|
||||
public void exportExcel(@Valid RiskAssessmentPageReqVO pageReqVO,
|
||||
HttpServletResponse response) {
|
||||
try {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<RiskAssessmentRespVO> list = riskAssessmentService.getRiskAssessmentPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "危险评估.xls", "危险评估数据", RiskAssessmentRespVO.class, list);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("导出失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -21,6 +21,9 @@ public class RiskAssessmentPageReqVO extends PageParam {
|
||||
@Schema(description = "罪犯编号")
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "罪犯姓名", example = "张三")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "评估类型:1-入狱评估 2-定期评估 3-专项评估", example = "2")
|
||||
private Integer assessmentType;
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 危险评估 Response VO")
|
||||
@ -26,12 +27,17 @@ public class RiskAssessmentRespVO {
|
||||
@ExcelProperty("罪犯编号")
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "罪犯姓名", example = "张三")
|
||||
@ExcelProperty("罪犯姓名")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "评估类型:1-入狱评估 2-定期评估 3-专项评估", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("评估类型:1-入狱评估 2-定期评估 3-专项评估")
|
||||
private Integer assessmentType;
|
||||
|
||||
@Schema(description = "评估日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("评估日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
|
||||
private LocalDate assessmentDate;
|
||||
|
||||
@Schema(description = "暴力倾向得分")
|
||||
@ -72,6 +78,7 @@ public class RiskAssessmentRespVO {
|
||||
|
||||
@Schema(description = "下次评估日期")
|
||||
@ExcelProperty("下次评估日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
|
||||
private LocalDate nextAssessmentDate;
|
||||
|
||||
@Schema(description = "状态:1-待审核 2-已通过", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ -84,6 +91,7 @@ public class RiskAssessmentRespVO {
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -39,7 +39,7 @@ public class RiskAssessmentSaveReqVO {
|
||||
@Schema(description = "自杀倾向得分")
|
||||
private BigDecimal suicideScore;
|
||||
|
||||
@Schema(description = "综合得分")
|
||||
@Schema(description = "综合得分", hidden = true)
|
||||
private BigDecimal totalScore;
|
||||
|
||||
@Schema(description = "风险等级:1-低风险 2-中风险 3-高风险 4-极高风险", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@ -17,7 +17,6 @@ import java.io.IOException;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
@ -26,7 +25,6 @@ import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.score.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.score.ScoreDO;
|
||||
import cn.iocoder.yudao.module.prison.service.score.ScoreService;
|
||||
|
||||
@Tag(name = "管理后台 - 计分考核")
|
||||
@ -76,16 +74,14 @@ public class PrisonScoreController {
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('prison:score:query')")
|
||||
public CommonResult<ScoreRespVO> getScore(@RequestParam("id") Long id) {
|
||||
ScoreDO score = scoreService.getScore(id);
|
||||
return success(BeanUtils.toBean(score, ScoreRespVO.class));
|
||||
return success(scoreService.getScore(id));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得计分考核分页")
|
||||
@PreAuthorize("@ss.hasPermission('prison:score:query')")
|
||||
public CommonResult<PageResult<ScoreRespVO>> getScorePage(@Valid ScorePageReqVO pageReqVO) {
|
||||
PageResult<ScoreDO> pageResult = scoreService.getScorePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ScoreRespVO.class));
|
||||
return success(scoreService.getScorePage(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@ -95,10 +91,9 @@ public class PrisonScoreController {
|
||||
public void exportScoreExcel(@Valid ScorePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ScoreDO> list = scoreService.getScorePage(pageReqVO).getList();
|
||||
List<ScoreRespVO> list = scoreService.getScorePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "计分考核.xls", "数据", ScoreRespVO.class,
|
||||
BeanUtils.toBean(list, ScoreRespVO.class));
|
||||
ExcelUtils.write(response, "计分考核.xls", "数据", ScoreRespVO.class, list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -20,6 +20,15 @@ public class ScorePageReqVO extends PageParam {
|
||||
@Schema(description = "罪犯编号")
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "罪犯姓名", example = "张三")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "监区ID", example = "1")
|
||||
private Long prisonAreaId;
|
||||
|
||||
@Schema(description = "监室ID", example = "1")
|
||||
private Long prisonCellId;
|
||||
|
||||
@Schema(description = "考核年份")
|
||||
private Integer year;
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 计分考核 Response VO")
|
||||
@ -25,6 +26,24 @@ public class ScoreRespVO {
|
||||
@ExcelProperty("罪犯编号")
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "罪犯姓名", example = "张三")
|
||||
@ExcelProperty("罪犯姓名")
|
||||
private String prisonerName;
|
||||
|
||||
@Schema(description = "监区ID", example = "1")
|
||||
private Long prisonAreaId;
|
||||
|
||||
@Schema(description = "监区名称", example = "一监区")
|
||||
@ExcelProperty("监区")
|
||||
private String prisonAreaName;
|
||||
|
||||
@Schema(description = "监室ID", example = "1")
|
||||
private Long prisonCellId;
|
||||
|
||||
@Schema(description = "监室名称", example = "101监室")
|
||||
@ExcelProperty("监室")
|
||||
private String prisonCellName;
|
||||
|
||||
@Schema(description = "考核年份", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("考核年份")
|
||||
private Integer year;
|
||||
@ -71,6 +90,12 @@ public class ScoreRespVO {
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@ExcelProperty("更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@ -5,6 +5,7 @@ import lombok.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 考核记录明细 Response VO
|
||||
@ -27,6 +28,7 @@ public class ScoreDetailRespVO {
|
||||
private String prisonerNo;
|
||||
|
||||
@Schema(description = "记录日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
|
||||
private LocalDate recordDate;
|
||||
|
||||
@Schema(description = "规则ID")
|
||||
@ -60,6 +62,7 @@ public class ScoreDetailRespVO {
|
||||
private String statusName;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@ -5,6 +5,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.scorerule.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.scorerule.ScoreRuleDO;
|
||||
import cn.iocoder.yudao.module.prison.enums.ScoreRuleCategoryEnum;
|
||||
import cn.iocoder.yudao.module.prison.enums.ScoreRuleStatusEnum;
|
||||
import cn.iocoder.yudao.module.prison.service.scorerule.ScoreRuleService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@ -70,7 +72,7 @@ public class ScoreRuleController {
|
||||
@PreAuthorize("@ss.hasPermission('prison:score-rule:query')")
|
||||
public CommonResult<ScoreRuleRespVO> getScoreRule(@RequestParam("id") Long id) {
|
||||
ScoreRuleDO scoreRule = scoreRuleService.getScoreRule(id);
|
||||
return success(BeanUtils.toBean(scoreRule, ScoreRuleRespVO.class));
|
||||
return success(convertToRespVO(scoreRule));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ -79,7 +81,7 @@ public class ScoreRuleController {
|
||||
public CommonResult<PageResult<ScoreRuleRespVO>> getScoreRulePage(@Valid ScoreRulePageReqVO pageReqVO) {
|
||||
PageResult<ScoreRuleDO> pageResult = scoreRuleService.getScoreRulePage(pageReqVO);
|
||||
List<ScoreRuleRespVO> list = pageResult.getList().stream()
|
||||
.map(item -> BeanUtils.toBean(item, ScoreRuleRespVO.class))
|
||||
.map(this::convertToRespVO)
|
||||
.collect(Collectors.toList());
|
||||
return success(new PageResult<>(list, pageResult.getTotal()));
|
||||
}
|
||||
@ -91,8 +93,21 @@ public class ScoreRuleController {
|
||||
@RequestParam("category") Integer category) {
|
||||
List<ScoreRuleDO> list = scoreRuleService.getScoreRuleListByCategory(category);
|
||||
return success(list.stream()
|
||||
.map(item -> BeanUtils.toBean(item, ScoreRuleRespVO.class))
|
||||
.map(this::convertToRespVO)
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 将 DO 转换为 RespVO,并填充枚举名称
|
||||
*/
|
||||
private ScoreRuleRespVO convertToRespVO(ScoreRuleDO scoreRule) {
|
||||
if (scoreRule == null) {
|
||||
return null;
|
||||
}
|
||||
ScoreRuleRespVO respVO = BeanUtils.toBean(scoreRule, ScoreRuleRespVO.class);
|
||||
respVO.setCategoryName(ScoreRuleCategoryEnum.getName(scoreRule.getCategory()));
|
||||
respVO.setStatusName(ScoreRuleStatusEnum.getName(scoreRule.getStatus()));
|
||||
return respVO;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,112 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.situation;
|
||||
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.situation.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.situation.SituationDO;
|
||||
import cn.iocoder.yudao.module.prison.service.situation.SituationService;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.convert.situation.SituationConvert;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 管理后台 - 狱情收集 Controller
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Tag(name = "管理后台 - 狱情收集")
|
||||
@RestController
|
||||
@RequestMapping("/prison/situation")
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
public class SituationController {
|
||||
|
||||
private final SituationService situationService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建狱情收集")
|
||||
@PreAuthorize("@ss.hasPermission('prison:situation:create')")
|
||||
public CommonResult<Long> create(@Valid @RequestBody SituationSaveReqVO createReqVO) {
|
||||
return success(situationService.createSituation(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新狱情收集")
|
||||
@PreAuthorize("@ss.hasPermission('prison:situation:update')")
|
||||
public CommonResult<Boolean> update(@Valid @RequestBody SituationSaveReqVO updateReqVO) {
|
||||
situationService.updateSituation(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除狱情收集")
|
||||
@PreAuthorize("@ss.hasPermission('prison:situation:delete')")
|
||||
public CommonResult<Boolean> delete(@RequestParam("id") Long id) {
|
||||
situationService.deleteSituation(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Operation(summary = "批量删除狱情收集")
|
||||
@PreAuthorize("@ss.hasPermission('prison:situation:delete')")
|
||||
public CommonResult<Boolean> deleteList(@RequestParam("ids") List<Long> ids) {
|
||||
situationService.deleteSituationListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "查询狱情收集详情")
|
||||
@PreAuthorize("@ss.hasPermission('prison:situation:query')")
|
||||
public CommonResult<SituationRespVO> get(@RequestParam("id") Long id) {
|
||||
SituationDO situation = situationService.getSituation(id);
|
||||
return success(SituationConvert.INSTANCE.convert(situation));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "分页查询狱情收集")
|
||||
@PreAuthorize("@ss.hasPermission('prison:situation:query')")
|
||||
public CommonResult<PageResult<SituationRespVO>> page(@Valid SituationPageReqVO pageReqVO) {
|
||||
PageResult<SituationDO> pageResult = situationService.getSituationPage(pageReqVO);
|
||||
return success(SituationConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "查询狱情收集列表")
|
||||
@PreAuthorize("@ss.hasPermission('prison:situation:query')")
|
||||
public CommonResult<List<SituationRespVO>> list(@Valid SituationPageReqVO pageReqVO) {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<SituationDO> list = situationService.getSituationPage(pageReqVO).getList();
|
||||
return success(SituationConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出狱情收集 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('prison:situation:export')")
|
||||
public void exportExcel(@Valid SituationPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws Exception {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<SituationDO> list = situationService.getSituationPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "狱情收集.xls", "狱情收集数据", SituationRespVO.class,
|
||||
SituationConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.situation.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 管理后台 - 狱情收集分页 Request VO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Schema(description = "管理后台 - 狱情收集分页 Request VO")
|
||||
@Data
|
||||
public class SituationPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "标题", example = "发现可疑物品")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "分类:1-监管安全 2-教育改造 3-生活卫生 4-生产安全 5-狱内案件 6-其他", example = "1")
|
||||
private Integer category;
|
||||
|
||||
@Schema(description = "等级:1-一般 2-重要 3-紧急", example = "1")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "来源:1-民警报告 2-监控系统 3-举报 4-罪犯自首 5-其他", example = "1")
|
||||
private Integer source;
|
||||
|
||||
@Schema(description = "处理状态:1-待处理 2-处理中 3-已处理", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "关联监区ID")
|
||||
private Long areaId;
|
||||
|
||||
@Schema(description = "关联监室ID")
|
||||
private Long cellId;
|
||||
|
||||
@Schema(description = "报告人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "处理人")
|
||||
private String handler;
|
||||
|
||||
@Schema(description = "发生时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] occurTime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.situation.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
/**
|
||||
* 管理后台 - 狱情收集 Response VO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Schema(description = "管理后台 - 狱情收集 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class SituationRespVO {
|
||||
|
||||
@Schema(description = "狱情ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19443")
|
||||
@ExcelProperty("狱情ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "发现可疑物品")
|
||||
@ExcelProperty("标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "详情内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("详情内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "分类:1-监管安全 2-教育改造 3-生活卫生 4-生产安全 5-狱内案件 6-其他", example = "1")
|
||||
@ExcelProperty("分类")
|
||||
private Integer category;
|
||||
|
||||
@Schema(description = "等级:1-一般 2-重要 3-紧急", example = "1")
|
||||
@ExcelProperty("等级")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "来源:1-民警报告 2-监控系统 3-举报 4-罪犯自首 5-其他", example = "1")
|
||||
@ExcelProperty("来源")
|
||||
private Integer source;
|
||||
|
||||
@Schema(description = "处理状态:1-待处理 2-处理中 3-已处理", example = "1")
|
||||
@ExcelProperty("处理状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "关联监区ID")
|
||||
@ExcelProperty("关联监区ID")
|
||||
private Long areaId;
|
||||
|
||||
@Schema(description = "关联监室ID")
|
||||
@ExcelProperty("关联监室ID")
|
||||
private Long cellId;
|
||||
|
||||
@Schema(description = "报告人")
|
||||
@ExcelProperty("报告人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "处理人")
|
||||
@ExcelProperty("处理人")
|
||||
private String handler;
|
||||
|
||||
@Schema(description = "处理时间")
|
||||
@ExcelProperty("处理时间")
|
||||
private LocalDateTime handleTime;
|
||||
|
||||
@Schema(description = "处理结果")
|
||||
@ExcelProperty("处理结果")
|
||||
private String handleResult;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "发生时间")
|
||||
@ExcelProperty("发生时间")
|
||||
private LocalDateTime occurTime;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.situation.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 管理后台 - 狱情收集新增/修改 Request VO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Schema(description = "管理后台 - 狱情收集新增/修改 Request VO")
|
||||
@Data
|
||||
public class SituationSaveReqVO {
|
||||
|
||||
@Schema(description = "狱情ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19443")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "发现可疑物品")
|
||||
@NotEmpty(message = "标题不能为空")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "详情内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "详情内容不能为空")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "分类:1-监管安全 2-教育改造 3-生活卫生 4-生产安全 5-狱内案件 6-其他", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "分类不能为空")
|
||||
private Integer category;
|
||||
|
||||
@Schema(description = "等级:1-一般 2-重要 3-紧急", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "等级不能为空")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "来源:1-民警报告 2-监控系统 3-举报 4-罪犯自首 5-其他", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "来源不能为空")
|
||||
private Integer source;
|
||||
|
||||
@Schema(description = "处理状态:1-待处理 2-处理中 3-已处理", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "处理状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "关联监区ID")
|
||||
private Long areaId;
|
||||
|
||||
@Schema(description = "关联监室ID")
|
||||
private Long cellId;
|
||||
|
||||
@Schema(description = "报告人")
|
||||
private String reporter;
|
||||
|
||||
@Schema(description = "处理人")
|
||||
private String handler;
|
||||
|
||||
@Schema(description = "处理时间")
|
||||
private java.time.LocalDateTime handleTime;
|
||||
|
||||
@Schema(description = "处理结果")
|
||||
private String handleResult;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "发生时间")
|
||||
private java.time.LocalDateTime occurTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.warning;
|
||||
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.warning.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.warning.WarningDO;
|
||||
import cn.iocoder.yudao.module.prison.service.warning.WarningService;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.convert.warning.WarningConvert;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 管理后台 - 预警信息 Controller
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Tag(name = "管理后台 - 预警信息")
|
||||
@RestController
|
||||
@RequestMapping("/prison/warning")
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
public class WarningController {
|
||||
|
||||
private final WarningService warningService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建预警信息")
|
||||
@PreAuthorize("@ss.hasPermission('prison:warning:create')")
|
||||
public CommonResult<Long> create(@Valid @RequestBody WarningSaveReqVO createReqVO) {
|
||||
return success(warningService.createWarning(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新预警信息")
|
||||
@PreAuthorize("@ss.hasPermission('prison:warning:update')")
|
||||
public CommonResult<Boolean> update(@Valid @RequestBody WarningSaveReqVO updateReqVO) {
|
||||
warningService.updateWarning(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除预警信息")
|
||||
@PreAuthorize("@ss.hasPermission('prison:warning:delete')")
|
||||
public CommonResult<Boolean> delete(@RequestParam("id") Long id) {
|
||||
warningService.deleteWarning(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Operation(summary = "批量删除预警信息")
|
||||
@PreAuthorize("@ss.hasPermission('prison:warning:delete')")
|
||||
public CommonResult<Boolean> deleteList(@RequestParam("ids") List<Long> ids) {
|
||||
warningService.deleteWarningListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "查询预警信息详情")
|
||||
@PreAuthorize("@ss.hasPermission('prison:warning:query')")
|
||||
public CommonResult<WarningRespVO> get(@RequestParam("id") Long id) {
|
||||
WarningDO warning = warningService.getWarning(id);
|
||||
return success(WarningConvert.INSTANCE.convert(warning));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "分页查询预警信息")
|
||||
@PreAuthorize("@ss.hasPermission('prison:warning:query')")
|
||||
public CommonResult<PageResult<WarningRespVO>> page(@Valid WarningPageReqVO pageReqVO) {
|
||||
PageResult<WarningDO> pageResult = warningService.getWarningPage(pageReqVO);
|
||||
return success(WarningConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出预警信息 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('prison:warning:export')")
|
||||
public void exportExcel(@Valid WarningPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws Exception {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<WarningDO> list = warningService.getWarningPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "预警信息.xls", "预警信息数据", WarningRespVO.class,
|
||||
WarningConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.warning.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 管理后台 - 预警信息分页 Request VO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Schema(description = "管理后台 - 预警信息分页 Request VO")
|
||||
@Data
|
||||
public class WarningPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "预警标题", example = "发现可疑物品")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "预警类型:1-安全预警 2-监管预警 3-改造预警 4-生产预警 5-生活卫生预警 6-其他", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "预警等级:1-一般 2-重要 3-紧急 4-严重", example = "1")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "预警状态:1-待核实 2-已核实 3-已处置 4-已解除", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "预警来源:1-民警报告 2-监控系统 3-举报 4-罪犯自首 5-智能分析 6-其他", example = "1")
|
||||
private Integer source;
|
||||
|
||||
@Schema(description = "关联狱情ID")
|
||||
private Long situationId;
|
||||
|
||||
@Schema(description = "关联监区ID")
|
||||
private Long areaId;
|
||||
|
||||
@Schema(description = "关联监室ID")
|
||||
private Long cellId;
|
||||
|
||||
@Schema(description = "核实人")
|
||||
private String verifier;
|
||||
|
||||
@Schema(description = "处置人")
|
||||
private String handler;
|
||||
|
||||
@Schema(description = "解除人")
|
||||
private String releaser;
|
||||
|
||||
@Schema(description = "预警时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] alertTime;
|
||||
|
||||
@Schema(description = "发生时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] occurTime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,123 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.warning.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
/**
|
||||
* 管理后台 - 预警信息 Response VO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Schema(description = "管理后台 - 预警信息 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WarningRespVO {
|
||||
|
||||
@Schema(description = "预警ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19443")
|
||||
@ExcelProperty("预警ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "预警标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "发现可疑物品")
|
||||
@ExcelProperty("预警标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "预警内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("预警内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "预警类型:1-安全预警 2-监管预警 3-改造预警 4-生产预警 5-生活卫生预警 6-其他", example = "1")
|
||||
@ExcelProperty("预警类型")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "预警等级:1-一般 2-重要 3-紧急 4-严重", example = "1")
|
||||
@ExcelProperty("预警等级")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "预警状态:1-待核实 2-已核实 3-已处置 4-已解除", example = "1")
|
||||
@ExcelProperty("预警状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "预警来源:1-民警报告 2-监控系统 3-举报 4-罪犯自首 5-智能分析 6-其他", example = "1")
|
||||
@ExcelProperty("预警来源")
|
||||
private Integer source;
|
||||
|
||||
@Schema(description = "关联狱情ID")
|
||||
@ExcelProperty("关联狱情ID")
|
||||
private Long situationId;
|
||||
|
||||
@Schema(description = "关联监区ID")
|
||||
@ExcelProperty("关联监区ID")
|
||||
private Long areaId;
|
||||
|
||||
@Schema(description = "关联监室ID")
|
||||
@ExcelProperty("关联监室ID")
|
||||
private Long cellId;
|
||||
|
||||
@Schema(description = "预警时间")
|
||||
@ExcelProperty("预警时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime alertTime;
|
||||
|
||||
@Schema(description = "核实时间")
|
||||
@ExcelProperty("核实时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime verifyTime;
|
||||
|
||||
@Schema(description = "核实人")
|
||||
@ExcelProperty("核实人")
|
||||
private String verifier;
|
||||
|
||||
@Schema(description = "核实结果")
|
||||
@ExcelProperty("核实结果")
|
||||
private String verifyResult;
|
||||
|
||||
@Schema(description = "处置时间")
|
||||
@ExcelProperty("处置时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime handleTime;
|
||||
|
||||
@Schema(description = "处置人")
|
||||
@ExcelProperty("处置人")
|
||||
private String handler;
|
||||
|
||||
@Schema(description = "处置方式")
|
||||
@ExcelProperty("处置方式")
|
||||
private String handleMethod;
|
||||
|
||||
@Schema(description = "处置结果")
|
||||
@ExcelProperty("处置结果")
|
||||
private String handleResult;
|
||||
|
||||
@Schema(description = "解除时间")
|
||||
@ExcelProperty("解除时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime releaseTime;
|
||||
|
||||
@Schema(description = "解除人")
|
||||
@ExcelProperty("解除人")
|
||||
private String releaser;
|
||||
|
||||
@Schema(description = "解除原因")
|
||||
@ExcelProperty("解除原因")
|
||||
private String releaseReason;
|
||||
|
||||
@Schema(description = "发生时间")
|
||||
@ExcelProperty("发生时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime occurTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,92 @@
|
||||
package cn.iocoder.yudao.module.prison.controller.admin.warning.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 管理后台 - 预警信息新增/修改 Request VO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Schema(description = "管理后台 - 预警信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class WarningSaveReqVO {
|
||||
|
||||
@Schema(description = "预警ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19443")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "预警标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "发现可疑物品")
|
||||
@NotEmpty(message = "预警标题不能为空")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "预警内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "预警内容不能为空")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "预警类型:1-安全预警 2-监管预警 3-改造预警 4-生产预警 5-生活卫生预警 6-其他", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "预警类型不能为空")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "预警等级:1-一般 2-重要 3-紧急 4-严重", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "预警等级不能为空")
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "预警状态:1-待核实 2-已核实 3-已处置 4-已解除", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "预警状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "预警来源:1-民警报告 2-监控系统 3-举报 4-罪犯自首 5-智能分析 6-其他", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "预警来源不能为空")
|
||||
private Integer source;
|
||||
|
||||
@Schema(description = "关联狱情ID")
|
||||
private Long situationId;
|
||||
|
||||
@Schema(description = "关联监区ID")
|
||||
private Long areaId;
|
||||
|
||||
@Schema(description = "关联监室ID")
|
||||
private Long cellId;
|
||||
|
||||
@Schema(description = "预警时间")
|
||||
private java.time.LocalDateTime alertTime;
|
||||
|
||||
@Schema(description = "核实时间")
|
||||
private java.time.LocalDateTime verifyTime;
|
||||
|
||||
@Schema(description = "核实人")
|
||||
private String verifier;
|
||||
|
||||
@Schema(description = "核实结果")
|
||||
private String verifyResult;
|
||||
|
||||
@Schema(description = "处置时间")
|
||||
private java.time.LocalDateTime handleTime;
|
||||
|
||||
@Schema(description = "处置人")
|
||||
private String handler;
|
||||
|
||||
@Schema(description = "处置方式")
|
||||
private String handleMethod;
|
||||
|
||||
@Schema(description = "处置结果")
|
||||
private String handleResult;
|
||||
|
||||
@Schema(description = "解除时间")
|
||||
private java.time.LocalDateTime releaseTime;
|
||||
|
||||
@Schema(description = "解除人")
|
||||
private String releaser;
|
||||
|
||||
@Schema(description = "解除原因")
|
||||
private String releaseReason;
|
||||
|
||||
@Schema(description = "发生时间")
|
||||
private java.time.LocalDateTime occurTime;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.prison.convert.evaluationreport;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.evaluationreport.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.evaluationreport.*;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 评估报告 Convert
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Mapper
|
||||
public interface EvaluationReportConvert {
|
||||
|
||||
EvaluationReportConvert INSTANCE = Mappers.getMapper(EvaluationReportConvert.class);
|
||||
|
||||
// ========== 模板 ==========
|
||||
|
||||
EvaluationTemplateDO convert(EvaluationTemplateSaveReqVO bean);
|
||||
EvaluationTemplateRespVO convert(EvaluationTemplateDO bean);
|
||||
List<EvaluationTemplateRespVO> convertTemplateList(List<EvaluationTemplateDO> list);
|
||||
PageResult<EvaluationTemplateRespVO> convertTemplatePage(PageResult<EvaluationTemplateDO> page);
|
||||
|
||||
// ========== 维度 ==========
|
||||
|
||||
EvaluationDimensionDO convert(EvaluationDimensionSaveReqVO bean);
|
||||
EvaluationDimensionRespVO convert(EvaluationDimensionDO bean);
|
||||
List<EvaluationDimensionRespVO> convertDimensionList(List<EvaluationDimensionDO> list);
|
||||
PageResult<EvaluationDimensionRespVO> convertDimensionPage(PageResult<EvaluationDimensionDO> page);
|
||||
|
||||
// ========== 报告 ==========
|
||||
|
||||
EvaluationReportDO convert(EvaluationReportSaveReqVO bean);
|
||||
EvaluationReportRespVO convert(EvaluationReportDO bean);
|
||||
List<EvaluationReportRespVO> convertReportList(List<EvaluationReportDO> list);
|
||||
PageResult<EvaluationReportRespVO> convertReportPage(PageResult<EvaluationReportDO> page);
|
||||
|
||||
// ========== 维度数据 ==========
|
||||
|
||||
EvaluationDimensionDataDO convert(EvaluationDimensionDataSaveReqVO bean);
|
||||
EvaluationDimensionDataRespVO convert(EvaluationDimensionDataDO bean);
|
||||
List<EvaluationDimensionDataRespVO> convertDimensionDataList(List<EvaluationDimensionDataDO> list);
|
||||
|
||||
// ========== 评语 ==========
|
||||
|
||||
ReportCommentDO convert(ReportCommentSaveReqVO bean);
|
||||
ReportCommentRespVO convert(ReportCommentDO bean);
|
||||
List<ReportCommentRespVO> convertCommentList(List<ReportCommentDO> list);
|
||||
PageResult<ReportCommentRespVO> convertCommentPage(PageResult<ReportCommentDO> page);
|
||||
|
||||
}
|
||||
@ -3,10 +3,12 @@ package cn.iocoder.yudao.module.prison.convert.prisoner;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.prisoner.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.PrisonerDO;
|
||||
import cn.iocoder.yudao.module.prison.enums.EducationEnum;
|
||||
import cn.iocoder.yudao.module.prison.enums.GenderEnum;
|
||||
import cn.iocoder.yudao.module.prison.enums.SupervisionLevelEnum;
|
||||
import cn.iocoder.yudao.module.prison.enums.PrisonerStatusEnum;
|
||||
import cn.iocoder.yudao.module.prison.enums.ReleaseTypeEnum;
|
||||
import cn.iocoder.yudao.module.prison.enums.RiskLevelEnum;
|
||||
import cn.iocoder.yudao.module.prison.enums.SupervisionLevelEnum;
|
||||
import org.mapstruct.AfterMapping;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
@ -52,6 +54,80 @@ public interface PrisonerConvert {
|
||||
return value != null ? PrisonerStatusEnum.fromValue(value) : null;
|
||||
}
|
||||
|
||||
// 枚举值转换工具方法
|
||||
@Named("genderToValue")
|
||||
default Integer genderToValue(GenderEnum gender) {
|
||||
return gender != null ? gender.getValue() : null;
|
||||
}
|
||||
|
||||
@Named("educationToValue")
|
||||
default Integer educationToValue(EducationEnum education) {
|
||||
return education != null ? education.getValue() : null;
|
||||
}
|
||||
|
||||
@Named("supervisionLevelToValue")
|
||||
default Integer supervisionLevelToValue(SupervisionLevelEnum level) {
|
||||
return level != null ? level.getValue() : null;
|
||||
}
|
||||
|
||||
@Named("riskLevelToValue")
|
||||
default Integer riskLevelToValue(RiskLevelEnum level) {
|
||||
return level != null ? level.getValue() : null;
|
||||
}
|
||||
|
||||
@Named("releaseTypeToValue")
|
||||
default Integer releaseTypeToValue(ReleaseTypeEnum type) {
|
||||
return type != null ? type.getValue() : null;
|
||||
}
|
||||
|
||||
@Named("statusToValue")
|
||||
default Integer statusToValue(PrisonerStatusEnum status) {
|
||||
return status != null ? status.getValue() : null;
|
||||
}
|
||||
|
||||
// 枚举名称转换工具方法
|
||||
@Named("genderToName")
|
||||
default String genderToName(GenderEnum gender) {
|
||||
return gender != null ? gender.getName() : null;
|
||||
}
|
||||
|
||||
@Named("educationToName")
|
||||
default String educationToName(EducationEnum education) {
|
||||
return education != null ? education.getName() : null;
|
||||
}
|
||||
|
||||
@Named("supervisionLevelToName")
|
||||
default String supervisionLevelToName(SupervisionLevelEnum level) {
|
||||
return level != null ? level.getName() : null;
|
||||
}
|
||||
|
||||
@Named("riskLevelToName")
|
||||
default String riskLevelToName(RiskLevelEnum level) {
|
||||
return level != null ? level.getName() : null;
|
||||
}
|
||||
|
||||
@Named("releaseTypeToName")
|
||||
default String releaseTypeToName(ReleaseTypeEnum type) {
|
||||
return type != null ? type.getName() : null;
|
||||
}
|
||||
|
||||
@Named("statusToName")
|
||||
default String statusToName(PrisonerStatusEnum status) {
|
||||
return status != null ? status.getName() : null;
|
||||
}
|
||||
|
||||
@Mapping(target = "gender", source = "gender", qualifiedByName = "genderToValue")
|
||||
@Mapping(target = "genderName", source = "gender", qualifiedByName = "genderToName")
|
||||
@Mapping(target = "education", source = "education", qualifiedByName = "educationToValue")
|
||||
@Mapping(target = "educationName", source = "education", qualifiedByName = "educationToName")
|
||||
@Mapping(target = "supervisionLevel", source = "supervisionLevel", qualifiedByName = "supervisionLevelToValue")
|
||||
@Mapping(target = "supervisionLevelName", source = "supervisionLevel", qualifiedByName = "supervisionLevelToName")
|
||||
@Mapping(target = "riskLevel", source = "riskLevel", qualifiedByName = "riskLevelToValue")
|
||||
@Mapping(target = "riskLevelName", source = "riskLevel", qualifiedByName = "riskLevelToName")
|
||||
@Mapping(target = "releaseType", source = "releaseType", qualifiedByName = "releaseTypeToValue")
|
||||
@Mapping(target = "releaseTypeName", source = "releaseType", qualifiedByName = "releaseTypeToName")
|
||||
@Mapping(target = "status", source = "status", qualifiedByName = "statusToValue")
|
||||
@Mapping(target = "statusName", source = "status", qualifiedByName = "statusToName")
|
||||
PrisonerRespVO convert(PrisonerDO bean);
|
||||
|
||||
List<PrisonerRespVO> convertList(List<PrisonerDO> list);
|
||||
@ -62,42 +138,4 @@ public interface PrisonerConvert {
|
||||
|
||||
List<PrisonerExcelVO> convertExcelListFromRespVO(List<PrisonerRespVO> list);
|
||||
|
||||
@AfterMapping
|
||||
default void afterConvert(PrisonerDO source, PrisonerRespVO target) {
|
||||
// 设置性别
|
||||
if (source.getGender() != null) {
|
||||
target.setGender(source.getGender().getValue());
|
||||
target.setGenderName(source.getGender().getName());
|
||||
}
|
||||
// 设置监管等级
|
||||
if (source.getSupervisionLevel() != null) {
|
||||
target.setSupervisionLevel(source.getSupervisionLevel().getValue());
|
||||
target.setSupervisionLevelName(source.getSupervisionLevel().getName());
|
||||
}
|
||||
// 设置风险等级
|
||||
if (source.getRiskLevel() != null) {
|
||||
target.setRiskLevel(source.getRiskLevel().getValue());
|
||||
// 风险等级标签
|
||||
String[] riskLabels = {"", "低风险", "中风险", "高风险", "极高风险"};
|
||||
Integer value = source.getRiskLevel().getValue();
|
||||
if (value >= 1 && value <= 4) {
|
||||
target.setRiskLevelName(riskLabels[value]);
|
||||
}
|
||||
}
|
||||
// 设置状态
|
||||
if (source.getStatus() != null) {
|
||||
target.setStatus(source.getStatus().getValue());
|
||||
target.setStatusName(source.getStatus().getName());
|
||||
}
|
||||
}
|
||||
|
||||
@AfterMapping
|
||||
default void afterConvertPage(PageResult<PrisonerDO> page, PageResult<PrisonerRespVO> result) {
|
||||
if (page.getList() != null) {
|
||||
for (int i = 0; i < page.getList().size(); i++) {
|
||||
afterConvert(page.getList().get(i), result.getList().get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.prison.convert.question;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.question.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.question.QuestionDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 问卷问题 Convert
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Mapper
|
||||
public interface QuestionConvert {
|
||||
|
||||
QuestionConvert INSTANCE = Mappers.getMapper(QuestionConvert.class);
|
||||
|
||||
QuestionDO convert(QuestionSaveReqVO bean);
|
||||
|
||||
QuestionRespVO convert(QuestionDO bean);
|
||||
|
||||
List<QuestionRespVO> convertList(List<QuestionDO> list);
|
||||
|
||||
PageResult<QuestionRespVO> convertPage(PageResult<QuestionDO> page);
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.prison.convert.questionnaire;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.questionnaire.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.questionnaire.QuestionnaireDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 问卷模板 Convert
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Mapper
|
||||
public interface QuestionnaireConvert {
|
||||
|
||||
QuestionnaireConvert INSTANCE = Mappers.getMapper(QuestionnaireConvert.class);
|
||||
|
||||
QuestionnaireDO convert(QuestionnaireSaveReqVO bean);
|
||||
|
||||
QuestionnaireRespVO convert(QuestionnaireDO bean);
|
||||
|
||||
List<QuestionnaireRespVO> convertList(List<QuestionnaireDO> list);
|
||||
|
||||
PageResult<QuestionnaireRespVO> convertPage(PageResult<QuestionnaireDO> page);
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.prison.convert.questionnairerecord;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.questionnairerecord.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.questionnairerecord.QuestionnaireRecordDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 问卷答题记录 Convert
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Mapper
|
||||
public interface QuestionnaireRecordConvert {
|
||||
|
||||
QuestionnaireRecordConvert INSTANCE = Mappers.getMapper(QuestionnaireRecordConvert.class);
|
||||
|
||||
QuestionnaireRecordDO convert(QuestionnaireRecordSaveReqVO bean);
|
||||
|
||||
QuestionnaireRecordRespVO convert(QuestionnaireRecordDO bean);
|
||||
|
||||
List<QuestionnaireRecordRespVO> convertList(List<QuestionnaireRecordDO> list);
|
||||
|
||||
PageResult<QuestionnaireRecordRespVO> convertPage(PageResult<QuestionnaireRecordDO> page);
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.prison.convert.risk;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.risk.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.risk.RiskDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 风险评估 Convert
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Mapper
|
||||
public interface RiskConvert {
|
||||
|
||||
RiskConvert INSTANCE = Mappers.getMapper(RiskConvert.class);
|
||||
|
||||
RiskDO convert(RiskSaveReqVO bean);
|
||||
|
||||
RiskRespVO convert(RiskDO bean);
|
||||
|
||||
List<RiskRespVO> convertList(List<RiskDO> list);
|
||||
|
||||
PageResult<RiskRespVO> convertPage(PageResult<RiskDO> page);
|
||||
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.prison.convert.riskassessment;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.riskassessment.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.riskassessment.RiskAssessmentDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 危险评估 Convert - 手动实现
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Component
|
||||
public class RiskAssessmentConvert {
|
||||
|
||||
public RiskAssessmentRespVO convert(RiskAssessmentDO bean) {
|
||||
if (bean == null) {
|
||||
return null;
|
||||
}
|
||||
RiskAssessmentRespVO respVO = new RiskAssessmentRespVO();
|
||||
respVO.setId(bean.getId());
|
||||
respVO.setPrisonerId(bean.getPrisonerId());
|
||||
respVO.setPrisonerNo(bean.getPrisonerNo());
|
||||
respVO.setAssessmentType(bean.getAssessmentType());
|
||||
respVO.setAssessmentDate(bean.getAssessmentDate());
|
||||
respVO.setViolenceScore(bean.getViolenceScore());
|
||||
respVO.setEscapeScore(bean.getEscapeScore());
|
||||
respVO.setSuicideScore(bean.getSuicideScore());
|
||||
respVO.setTotalScore(bean.getTotalScore());
|
||||
respVO.setRiskLevel(bean.getRiskLevel());
|
||||
respVO.setRiskFactors(bean.getRiskFactors());
|
||||
respVO.setSuggestions(bean.getSuggestions());
|
||||
respVO.setAssessorId(bean.getAssessorId());
|
||||
respVO.setAssessorName(bean.getAssessorName());
|
||||
respVO.setNextAssessmentDate(bean.getNextAssessmentDate());
|
||||
respVO.setStatus(bean.getStatus());
|
||||
respVO.setRemark(bean.getRemark());
|
||||
respVO.setCreateTime(bean.getCreateTime());
|
||||
return respVO;
|
||||
}
|
||||
|
||||
public List<RiskAssessmentRespVO> convertList(List<RiskAssessmentDO> list) {
|
||||
if (list == null) {
|
||||
return null;
|
||||
}
|
||||
List<RiskAssessmentRespVO> result = new ArrayList<>(list.size());
|
||||
for (RiskAssessmentDO item : list) {
|
||||
result.add(convert(item));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public PageResult<RiskAssessmentRespVO> convertPage(PageResult<RiskAssessmentDO> page) {
|
||||
if (page == null) {
|
||||
return null;
|
||||
}
|
||||
return new PageResult<>(convertList(page.getList()), page.getTotal());
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.prison.convert.situation;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.situation.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.situation.SituationDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 狱情收集 Convert
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Mapper
|
||||
public interface SituationConvert {
|
||||
|
||||
SituationConvert INSTANCE = Mappers.getMapper(SituationConvert.class);
|
||||
|
||||
SituationDO convert(SituationSaveReqVO bean);
|
||||
|
||||
SituationRespVO convert(SituationDO bean);
|
||||
|
||||
List<SituationRespVO> convertList(List<SituationDO> list);
|
||||
|
||||
PageResult<SituationRespVO> convertPage(PageResult<SituationDO> page);
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.prison.convert.warning;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.prison.controller.admin.warning.vo.*;
|
||||
import cn.iocoder.yudao.module.prison.dal.dataobject.warning.WarningDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预警信息 Convert
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@Mapper
|
||||
public interface WarningConvert {
|
||||
|
||||
WarningConvert INSTANCE = Mappers.getMapper(WarningConvert.class);
|
||||
|
||||
WarningDO convert(WarningSaveReqVO bean);
|
||||
|
||||
WarningRespVO convert(WarningDO bean);
|
||||
|
||||
List<WarningRespVO> convertList(List<WarningDO> list);
|
||||
|
||||
PageResult<WarningRespVO> convertPage(PageResult<WarningDO> page);
|
||||
|
||||
}
|
||||
@ -135,7 +135,7 @@ public class PrisonerDO extends BaseDO {
|
||||
/**
|
||||
* 释放类型:1-刑满 2-假释 3-暂予监外执行 4-减刑 5-移交 6-死亡
|
||||
*/
|
||||
private Integer releaseType;
|
||||
private ReleaseTypeEnum releaseType;
|
||||
|
||||
/**
|
||||
* 释放原因
|
||||
|
||||
@ -46,6 +46,7 @@ public class ConsumptionDO extends BaseDO {
|
||||
/**
|
||||
* 订单总金额
|
||||
*/
|
||||
@TableField("total_amount")
|
||||
private BigDecimal totalAmount;
|
||||
/**
|
||||
* 账户余额(消费后)
|
||||
|
||||
@ -53,6 +53,7 @@ public class ConsumptionDetailDO extends BaseDO {
|
||||
/**
|
||||
* 小计金额
|
||||
*/
|
||||
@TableField("subtotal")
|
||||
private BigDecimal subtotal;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,87 @@
|
||||
package cn.iocoder.yudao.module.prison.dal.dataobject.evaluationreport;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 评估维度配置 DO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@TableName("prison_evaluation_dimension")
|
||||
@KeySequence("prison_evaluation_dimension_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EvaluationDimensionDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 维度ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private Long templateId;
|
||||
/**
|
||||
* 维度名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 维度编码
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 维度描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 维度类型:1-心理测评 2-行为表现 3-教育改造 4-劳动表现 5-人际交往 6-自评/他评
|
||||
*/
|
||||
private Integer dimensionType;
|
||||
/**
|
||||
* 权重(百分比)
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
* 评分规则:1-分值越高越好 2-分值越低越好 3-区间评分
|
||||
*/
|
||||
private Integer scoreRule;
|
||||
/**
|
||||
* 最大分值
|
||||
*/
|
||||
private BigDecimal maxScore;
|
||||
/**
|
||||
* 最小分值
|
||||
*/
|
||||
private BigDecimal minScore;
|
||||
/**
|
||||
* 及格分值
|
||||
*/
|
||||
private BigDecimal passScore;
|
||||
/**
|
||||
* 评估方式:1-问卷测评 2-量表评分 3-行为观察 4-AI分析 5-综合评定
|
||||
*/
|
||||
private Integer evaluationMethod;
|
||||
/**
|
||||
* 问题列表(JSON格式)
|
||||
*/
|
||||
private String questions;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 是否启用:1-启用 2-禁用
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package cn.iocoder.yudao.module.prison.dal.dataobject.evaluationreport;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 报告维度数据 DO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@TableName("prison_evaluation_dimension_data")
|
||||
@KeySequence("prison_evaluation_dimension_data_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EvaluationDimensionDataDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 数据ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 报告ID
|
||||
*/
|
||||
private Long reportId;
|
||||
/**
|
||||
* 维度ID
|
||||
*/
|
||||
private Long dimensionId;
|
||||
/**
|
||||
* 维度名称
|
||||
*/
|
||||
private String dimensionName;
|
||||
/**
|
||||
* 维度编码
|
||||
*/
|
||||
private String dimensionCode;
|
||||
/**
|
||||
* 维度类型
|
||||
*/
|
||||
private Integer dimensionType;
|
||||
/**
|
||||
* 得分
|
||||
*/
|
||||
private BigDecimal score;
|
||||
/**
|
||||
* 满分
|
||||
*/
|
||||
private BigDecimal fullScore;
|
||||
/**
|
||||
* 权重得分
|
||||
*/
|
||||
private BigDecimal weightedScore;
|
||||
/**
|
||||
* 评级:1-优秀 2-良好 3-一般 4-较差
|
||||
*/
|
||||
private Integer level;
|
||||
/**
|
||||
* 维度结论
|
||||
*/
|
||||
private String conclusion;
|
||||
/**
|
||||
* 维度评语
|
||||
*/
|
||||
private String comment;
|
||||
/**
|
||||
* AI分析内容
|
||||
*/
|
||||
private String aiAnalysis;
|
||||
/**
|
||||
* 回答详情(JSON格式)
|
||||
*/
|
||||
private String answerDetails;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@ -0,0 +1,147 @@
|
||||
package cn.iocoder.yudao.module.prison.dal.dataobject.evaluationreport;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 评估报告 DO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@TableName("prison_evaluation_report")
|
||||
@KeySequence("prison_evaluation_report_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EvaluationReportDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 报告ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 报告编号
|
||||
*/
|
||||
private String reportNo;
|
||||
/**
|
||||
* 罪犯ID
|
||||
*/
|
||||
private Long prisonerId;
|
||||
/**
|
||||
* 罪犯编号
|
||||
*/
|
||||
private String prisonerNo;
|
||||
/**
|
||||
* 罪犯姓名
|
||||
*/
|
||||
private String prisonerName;
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private Long templateId;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
/**
|
||||
* 评估类型:1-心理评估 2-危险性评估 3-改造表现评估 4-综合评估
|
||||
*/
|
||||
private Integer evaluationType;
|
||||
/**
|
||||
* 评估周期:1-月评 2-季评 3-半年评 4-年终评 5-入监评估 6-出监评估
|
||||
*/
|
||||
private Integer evaluationCycle;
|
||||
/**
|
||||
* 评估日期
|
||||
*/
|
||||
private LocalDateTime evaluationDate;
|
||||
/**
|
||||
* 评估人员ID
|
||||
*/
|
||||
private Long evaluatorId;
|
||||
/**
|
||||
* 评估人员姓名
|
||||
*/
|
||||
private String evaluatorName;
|
||||
/**
|
||||
* 监区ID
|
||||
*/
|
||||
private Long areaId;
|
||||
/**
|
||||
* 监区名称
|
||||
*/
|
||||
private String areaName;
|
||||
/**
|
||||
* 总分
|
||||
*/
|
||||
private BigDecimal totalScore;
|
||||
/**
|
||||
* 评级:1-优秀 2-良好 3-一般 4-较差 5-危险
|
||||
*/
|
||||
private Integer level;
|
||||
/**
|
||||
* 风险等级:1-低风险 2-中风险 3-高风险 4-极高风险
|
||||
*/
|
||||
private Integer riskLevel;
|
||||
/**
|
||||
* 风险得分
|
||||
*/
|
||||
private BigDecimal riskScore;
|
||||
/**
|
||||
* AI生成状态:1-待生成 2-生成中 3-已完成 4-生成失败
|
||||
*/
|
||||
private Integer aiStatus;
|
||||
/**
|
||||
* AI生成内容
|
||||
*/
|
||||
private String aiContent;
|
||||
/**
|
||||
* AI生成报告内容
|
||||
*/
|
||||
private String aiReportContent;
|
||||
/**
|
||||
* 报告状态:1-草稿 2-待审核 3-已审核 4-已作废
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private Long auditorId;
|
||||
/**
|
||||
* 审核人姓名
|
||||
*/
|
||||
private String auditorName;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime auditTime;
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
private String auditOpinion;
|
||||
/**
|
||||
* 报告结论
|
||||
*/
|
||||
private String conclusion;
|
||||
/**
|
||||
* 改造建议
|
||||
*/
|
||||
private String suggestions;
|
||||
/**
|
||||
* 报告PDF路径
|
||||
*/
|
||||
private String pdfPath;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package cn.iocoder.yudao.module.prison.dal.dataobject.evaluationreport;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
|
||||
/**
|
||||
* 评估报告模板 DO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@TableName("prison_evaluation_template")
|
||||
@KeySequence("prison_evaluation_template_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EvaluationTemplateDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 模板编码
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 模板类型:1-心理评估 2-危险性评估 3-改造表现评估 4-综合评估
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 适用人群
|
||||
*/
|
||||
private String applicableCrowd;
|
||||
/**
|
||||
* 评估周期类型:1-月评 2-季评 3-半年评 4-年终评 5-入监评估 6-出监评估
|
||||
*/
|
||||
private Integer evaluationCycle;
|
||||
/**
|
||||
* 状态:1-启用 2-禁用
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 是否允许AI生成:1-是 2-否
|
||||
*/
|
||||
private Integer aiEnabled;
|
||||
/**
|
||||
* AI提示词
|
||||
*/
|
||||
private String aiPrompt;
|
||||
/**
|
||||
* 报告封面图
|
||||
*/
|
||||
private String coverImage;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package cn.iocoder.yudao.module.prison.dal.dataobject.evaluationreport;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 快捷评语库 DO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@TableName("prison_report_comment")
|
||||
@KeySequence("prison_report_comment_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ReportCommentDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 评语ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 评语内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 评语类型:1-心理评语 2-行为表现评语 3-教育改造评语 4-劳动表现评语 5-综合评语 6-风险提示 7-建议措施
|
||||
*/
|
||||
private Integer commentType;
|
||||
/**
|
||||
* 适用维度(关联维度表)
|
||||
*/
|
||||
private Long dimensionId;
|
||||
/**
|
||||
* 维度名称
|
||||
*/
|
||||
private String dimensionName;
|
||||
/**
|
||||
* 评级等级:1-优秀 2-良好 3-一般 4-较差 5-危险
|
||||
*/
|
||||
private Integer level;
|
||||
/**
|
||||
* 标签(逗号分隔)
|
||||
*/
|
||||
private String tags;
|
||||
/**
|
||||
* 使用次数
|
||||
*/
|
||||
private Integer useCount;
|
||||
/**
|
||||
* 状态:1-启用 2-禁用
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -71,6 +71,10 @@ public class QuestionnaireRecordDO extends BaseDO {
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 答题时间
|
||||
*/
|
||||
private LocalDateTime answerTime;
|
||||
/**
|
||||
* 截止日期
|
||||
*/
|
||||
|
||||
@ -0,0 +1,50 @@
|
||||
package cn.iocoder.yudao.module.prison.dal.dataobject.quickcomment;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 快捷评语分类 DO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@TableName("prison_comment_category")
|
||||
@KeySequence("prison_comment_category_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CommentCategoryDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 分类ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 评估类型:1-入监 2-定期 3-出监 4-减刑 5-专项
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 状态:0-停用 1-启用
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.prison.dal.dataobject.quickcomment;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 快捷评语 DO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@TableName("prison_quick_comment")
|
||||
@KeySequence("prison_quick_comment_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class QuickCommentDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 评语ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 分类ID
|
||||
*/
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 评语内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 使用次数
|
||||
*/
|
||||
private Integer usageCount;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 状态:0-停用 1-启用
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@ -0,0 +1,166 @@
|
||||
package cn.iocoder.yudao.module.prison.dal.dataobject.report;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDate;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 评估报告 DO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@TableName("prison_report")
|
||||
@KeySequence("prison_report_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ReportDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 报告ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 报告编号
|
||||
*/
|
||||
private String reportNo;
|
||||
|
||||
/**
|
||||
* 罪犯ID
|
||||
*/
|
||||
private Long prisonerId;
|
||||
|
||||
/**
|
||||
* 罪犯编号
|
||||
*/
|
||||
private String prisonerNo;
|
||||
|
||||
/**
|
||||
* 罪犯姓名
|
||||
*/
|
||||
private String prisonerName;
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
private Long templateId;
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String templateName;
|
||||
|
||||
/**
|
||||
* 报告标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 报告日期
|
||||
*/
|
||||
private LocalDate reportDate;
|
||||
|
||||
/**
|
||||
* 维度内容,JSON格式
|
||||
*/
|
||||
private String dimensions;
|
||||
|
||||
/**
|
||||
* 综合结论
|
||||
*/
|
||||
private String conclusion;
|
||||
|
||||
/**
|
||||
* 改造建议
|
||||
*/
|
||||
private String suggestions;
|
||||
|
||||
/**
|
||||
* 风险等级:1-低风险 2-中风险 3-高风险 4-极高风险
|
||||
*/
|
||||
private Integer riskLevel;
|
||||
|
||||
/**
|
||||
* 附件列表,JSON格式
|
||||
*/
|
||||
private String attachments;
|
||||
|
||||
/**
|
||||
* 状态:1-草稿 2-待审核 3-已通过 4-已退回
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 数字签名
|
||||
*/
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 报告指纹
|
||||
*/
|
||||
private String fingerprint;
|
||||
|
||||
/**
|
||||
* 提交人ID
|
||||
*/
|
||||
private Long submitterId;
|
||||
|
||||
/**
|
||||
* 提交人姓名
|
||||
*/
|
||||
private String submitterName;
|
||||
|
||||
/**
|
||||
* 提交时间
|
||||
*/
|
||||
private LocalDateTime submitTime;
|
||||
|
||||
/**
|
||||
* 审核人ID
|
||||
*/
|
||||
private Long reviewerId;
|
||||
|
||||
/**
|
||||
* 审核人姓名
|
||||
*/
|
||||
private String reviewerName;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime reviewTime;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
private String reviewComment;
|
||||
|
||||
/**
|
||||
* 是否已归档
|
||||
*/
|
||||
private Boolean archived;
|
||||
|
||||
/**
|
||||
* 归档时间
|
||||
*/
|
||||
private LocalDateTime archivedTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package cn.iocoder.yudao.module.prison.dal.dataobject.reporttemplate;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 评估报告模板 DO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@TableName("prison_report_template")
|
||||
@KeySequence("prison_report_template_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ReportTemplateDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 模板ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 模板类型:1-入监综合评估 2-定期考核报告 3-出监评估 4-减刑假释建议 5-专项评估
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 报告标题格式
|
||||
*/
|
||||
private String titleFormat;
|
||||
|
||||
/**
|
||||
* 评估维度配置,JSON格式
|
||||
*/
|
||||
private String dimensions;
|
||||
|
||||
/**
|
||||
* AI提示词配置,JSON格式
|
||||
*/
|
||||
private String aiPromptConfig;
|
||||
|
||||
/**
|
||||
* 样式配置,JSON格式
|
||||
*/
|
||||
private String styleConfig;
|
||||
|
||||
/**
|
||||
* 状态:0-停用 1-启用
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否默认
|
||||
*/
|
||||
private Boolean isDefault;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -0,0 +1,124 @@
|
||||
package cn.iocoder.yudao.module.prison.dal.dataobject.risk;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 风险评估 DO
|
||||
*
|
||||
* @author xlcp
|
||||
*/
|
||||
@TableName("prison_risk")
|
||||
@KeySequence("prison_risk_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RiskDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 评估ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 关联罪犯ID
|
||||
*/
|
||||
private Long prisonerId;
|
||||
|
||||
/**
|
||||
* 罪犯编号
|
||||
*/
|
||||
@TableField("prisoner_no")
|
||||
private String prisonerCode;
|
||||
|
||||
/**
|
||||
* 罪犯姓名
|
||||
*/
|
||||
@TableField("prisoner_name")
|
||||
private String prisonerName;
|
||||
|
||||
/**
|
||||
* 评估类型:1-入监评估 2-定期评估 3-专项评估 4-出监评估
|
||||
*/
|
||||
private Integer assessmentType;
|
||||
|
||||
/**
|
||||
* 评估日期
|
||||
*/
|
||||
private LocalDate assessmentDate;
|
||||
|
||||
/**
|
||||
* 综合风险得分(0-100)
|
||||
*/
|
||||
private BigDecimal overallScore;
|
||||
|
||||
/**
|
||||
* 风险等级:1-低风险 2-中风险 3-高风险 4-极高风险
|
||||
*/
|
||||
private Integer riskLevel;
|
||||
|
||||
/**
|
||||
* 精神状态评估
|
||||
*/
|
||||
private String mentalState;
|
||||
|
||||
/**
|
||||
* 脱逃风险评估
|
||||
*/
|
||||
private String escapeRisk;
|
||||
|
||||
/**
|
||||
* 暴力倾向评估
|
||||
*/
|
||||
private String violenceRisk;
|
||||
|
||||
/**
|
||||
* 抗改风险评估
|
||||
*/
|
||||
private String revoltRisk;
|
||||
|
||||
/**
|
||||
* 自杀自伤风险评估
|
||||
*/
|
||||
private String selfHarmRisk;
|
||||
|
||||
/**
|
||||
* 评估建议
|
||||
*/
|
||||
private String recommendation;
|
||||
|
||||
/**
|
||||
* 评估人
|
||||
*/
|
||||
private String assessor;
|
||||
|
||||
/**
|
||||
* 评估方式:1-心理测评 2-行为观察 3-面谈评估 4-综合评估
|
||||
*/
|
||||
private Integer assessMethod;
|
||||
|
||||
/**
|
||||
* 评估项目得分(JSON格式存储)
|
||||
* 结构:[{itemId: 1, itemName: "项目名称", score: 85, weight: 0.2}]
|
||||
*/
|
||||
private String itemScores;
|
||||
|
||||
/**
|
||||
* 评估结论
|
||||
*/
|
||||
private String conclusion;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user