feat(emergency): 急救宣教资源管理模块多项优化
- 新增版本历史isCurrent标记,编辑/回滚时正确维护当前版本 - 审核记录独立表(QH_EME_FIRST_AID_RESOURCE_AUDIT),保留完整审核轨迹 - 审计表auditStatus沿用10/11/12,资源表保留冗余快照 - 标签挂载到分类下(parentId),同分类内名称唯一 - 分类/标签编辑时校验name唯一性 - 导出状态改用文本(statusText),审核通过+已下架正确显示 - 审核状态/驳回原因支持null更新(FieldStrategy.IGNORED) - Controller POST接口统一使用@RequestBody接收参数
This commit is contained in:
+1
@@ -32,6 +32,7 @@ public interface FirstAidConstants {
|
||||
/** 已驳回 */
|
||||
Integer AUDIT_STATUS_REJECTED = 12;
|
||||
|
||||
|
||||
// ========== 发布状态 ==========
|
||||
/** 草稿 */
|
||||
Integer STATUS_DRAFT = 0;
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.renkang.emergency.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 通用ID入参DTO
|
||||
* 用于单参数POST操作接口(删除/审核/上下架/收藏/回滚等)
|
||||
*
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-06-24
|
||||
*/
|
||||
@Data
|
||||
public class IdDTO {
|
||||
|
||||
private String id;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.renkang.emergency.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 批量推送入参DTO
|
||||
*
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-06-24
|
||||
*/
|
||||
@Data
|
||||
public class PushBatchSendDTO {
|
||||
|
||||
/** 工单ID(必填) */
|
||||
private String orderId;
|
||||
|
||||
/** 资源ID列表(方式一:指定ID) */
|
||||
private List<String> resourceIds;
|
||||
|
||||
/** 筛选条件(方式二:按条件批量推送),与 resourceIds 二选一 */
|
||||
private PushFilterDTO filterParams;
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.renkang.emergency.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 推送资源筛选条件DTO
|
||||
*
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-06-24
|
||||
*/
|
||||
@Data
|
||||
public class PushFilterDTO {
|
||||
|
||||
private String keyword;
|
||||
|
||||
private String categoryId;
|
||||
|
||||
private String contentType;
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.renkang.emergency.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 审核驳回入参DTO
|
||||
*
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-06-24
|
||||
*/
|
||||
@Data
|
||||
public class RejectDTO {
|
||||
|
||||
private String id;
|
||||
|
||||
private String reason;
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.renkang.emergency.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 急救宣教推送记录
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-06-24
|
||||
*/
|
||||
@Data
|
||||
@TableName("QH_EME_FIRST_AID_PUSH_RECORD")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(title = "first_aid_push_record对象", description = "急救宣教推送记录")
|
||||
public class FirstAidPushRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(title = "id")
|
||||
private String id;
|
||||
|
||||
@Schema(title = "资源ID")
|
||||
private String resourceId;
|
||||
|
||||
@Schema(title = "资源标题")
|
||||
private String resourceTitle;
|
||||
|
||||
@Schema(title = "关联应急工单ID")
|
||||
private String orderId;
|
||||
|
||||
@Schema(title = "推送目标用户ID")
|
||||
private String targetUserId;
|
||||
|
||||
@Schema(title = "推送人")
|
||||
private String pushBy;
|
||||
|
||||
@Schema(title = "推送人ID")
|
||||
private String pushById;
|
||||
|
||||
@Schema(title = "推送时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pushTime;
|
||||
|
||||
@Schema(title = "租户ID")
|
||||
private String tenantId;
|
||||
}
|
||||
+11
@@ -92,17 +92,23 @@ public class FirstAidResource implements Serializable {
|
||||
/** 审核状态(null=无审核,10=待审核,11=已通过,12=已驳回) */
|
||||
@Excel(name = "审核状态", width = 15, dicCode = "first_aid_audit_status")
|
||||
@Schema(title = "审核状态(null=无审核,10=待审核,11=已通过,12=已驳回)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Integer auditStatus;
|
||||
|
||||
/** 驳回原因 */
|
||||
@Excel(name = "驳回原因", width = 30)
|
||||
@Schema(title = "驳回原因")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String auditRejectReason;
|
||||
|
||||
/** 审核人 */
|
||||
@Schema(title = "审核人")
|
||||
private String auditBy;
|
||||
|
||||
/** 审核人ID */
|
||||
@Schema(title = "审核人ID")
|
||||
private String auditById;
|
||||
|
||||
/** 审核时间 */
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@@ -174,4 +180,9 @@ public class FirstAidResource implements Serializable {
|
||||
@TableField(exist = false)
|
||||
@Schema(title = "复合状态(0=草稿,1=已发布,2=已下架,10=待审核,11=已通过,12=已驳回)")
|
||||
private Integer combinedStatus;
|
||||
|
||||
/** 当前工单下是否已推送(非持久字段) */
|
||||
@TableField(exist = false)
|
||||
@Schema(title = "当前工单下是否已推送")
|
||||
private Boolean pushed;
|
||||
}
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.renkang.emergency.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 急救宣教资源审核记录
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-06-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("QH_EME_FIRST_AID_RESOURCE_AUDIT")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(title = "first_aid_resource_audit对象", description = "急救宣教资源审核记录")
|
||||
public class FirstAidResourceAudit implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(title = "id")
|
||||
private String id;
|
||||
|
||||
/** 资源ID */
|
||||
@Schema(title = "资源ID")
|
||||
private String resourceId;
|
||||
|
||||
/** 审核状态(10=待审核, 11=已通过, 12=已驳回) */
|
||||
@Schema(title = "审核状态")
|
||||
private Integer auditStatus;
|
||||
|
||||
/** 驳回原因 */
|
||||
@Schema(title = "驳回原因")
|
||||
private String auditRejectReason;
|
||||
|
||||
/** 审核人 */
|
||||
@Schema(title = "审核人")
|
||||
private String auditBy;
|
||||
|
||||
/** 审核人ID */
|
||||
@Schema(title = "审核人ID")
|
||||
private String auditById;
|
||||
|
||||
/** 审核时间 */
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "审核时间")
|
||||
private Date auditTime;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/** 资源标题(非持久字段,查询时填充) */
|
||||
@TableField(exist = false)
|
||||
@Schema(title = "资源标题")
|
||||
private String resourceTitle;
|
||||
}
|
||||
+4
@@ -58,4 +58,8 @@ public class FirstAidResourceVersion implements Serializable {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "创建时间")
|
||||
private java.util.Date createTime;
|
||||
|
||||
/** 是否当前版本(true=当前版本, false=历史快照) */
|
||||
@Schema(title = "是否当前版本")
|
||||
private Boolean isCurrent;
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.renkang.emergency.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.renkang.emergency.dto.PushBatchSendDTO;
|
||||
import com.renkang.emergency.dto.PushFilterDTO;
|
||||
import com.renkang.emergency.entity.FirstAidResource;
|
||||
|
||||
/**
|
||||
* @Description: 急救宣教推送Service
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-06-24
|
||||
*/
|
||||
public interface IFirstAidPushService {
|
||||
|
||||
/**
|
||||
* 查询可推送资源列表(已发布+已审核),并标记当前工单下是否已推送
|
||||
*/
|
||||
IPage<FirstAidResource> queryResourceList(String orderId, PushFilterDTO filter, Page<FirstAidResource> page);
|
||||
|
||||
/**
|
||||
* 推送单条资源
|
||||
*/
|
||||
void send(String resourceId, String orderId);
|
||||
|
||||
/**
|
||||
* 批量推送
|
||||
*/
|
||||
int batchSend(PushBatchSendDTO dto);
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.renkang.emergency.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 急救宣教资源-导出VO
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-06-24
|
||||
*/
|
||||
@Data
|
||||
public class FirstAidResourceExportVO {
|
||||
|
||||
@Excel(name = "标题", width = 30)
|
||||
private String title;
|
||||
|
||||
@Excel(name = "摘要", width = 30)
|
||||
private String summary;
|
||||
|
||||
@Excel(name = "分类", width = 15)
|
||||
private String categoryName;
|
||||
|
||||
@Excel(name = "类型", width = 15, dicCode = "first_aid_content_type")
|
||||
private String contentType;
|
||||
|
||||
@Excel(name = "标签", width = 30)
|
||||
private String tagNames;
|
||||
|
||||
@Excel(name = "状态", width = 15)
|
||||
private String statusText;
|
||||
|
||||
@Excel(name = "阅读/收藏", width = 15)
|
||||
private String viewFavorite;
|
||||
|
||||
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
}
|
||||
Reference in New Issue
Block a user