模版实例的相关实现

This commit is contained in:
潘荣晟
2025-09-19 17:24:12 +08:00
parent 45d6f2822e
commit 00a1872b72
29 changed files with 757 additions and 99 deletions

View File

@@ -108,4 +108,5 @@ public class TemplateInstanceDataController implements BusinessControllerMarker
BeanUtils.toBean(list, TemplateInstanceDataRespVO.class));
}
}

View File

@@ -143,4 +143,29 @@ public class TmplTpController extends AbstractFileUploadController implements Bu
return success(true);
}
//表单预览
// @GetMapping("/preview")
// @Operation(summary = "表单预览",description = "传入模版分类的id")
// @PreAuthorize("@ss.hasPermission('bse:tmpl-tp:query')")
// public CommonResult< List<TmplFldRespVO>> preview(@Valid @RequestParam("id") Long id) {
// List<TmplFldRespVO> field = tmplTpService.getField(id);
// return success(field);
// }
// 字段编辑新增或者删除
@PostMapping("/field-edit")
@Operation(summary = "字段编辑新增或者删除")
@PreAuthorize("@ss.hasPermission('bse:tmpl-tp:update')")
public CommonResult<Boolean> fieldEdit(@Valid @RequestBody TmplTpEditOrDeleteReqVO reqVO) {
tmplTpService.fieldEdit(reqVO);
return success(true);
}
@PostMapping("/ltm-edit")
@Operation(summary = "条款编辑新增或者删除")
@PreAuthorize("@ss.hasPermission('bse:tmpl-tp:update')")
public CommonResult<Boolean> ltmEdit(@Valid @RequestBody TmplTpEditOrDeleteReqVO reqVO) {
tmplTpService.ltmEdit(reqVO);
return success(true);
}
}

View File

@@ -0,0 +1,27 @@
package cn.iocoder.yudao.module.base.controller.admin.templtp.vo;
import lombok.*;
import java.time.LocalDate;
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 static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 部门与实例关联分页 Request VO")
@Data
public class DepartmentInstanceRelativityPageReqVO extends PageParam {
@Schema(description = "部门主键", example = "2450")
private String companyDepartmentId;
@Schema(description = "模板实例主键", example = "17846")
private String templateInstanceId;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDate[] createTime;
}

View File

@@ -0,0 +1,31 @@
package cn.iocoder.yudao.module.base.controller.admin.templtp.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDate;
import java.util.*;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 部门与实例关联 Response VO")
@Data
@ExcelIgnoreUnannotated
public class DepartmentInstanceRelativityRespVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4864")
@ExcelProperty("主键")
private String id;
@Schema(description = "部门主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2450")
@ExcelProperty("部门主键")
private String companyDepartmentId;
@Schema(description = "模板实例主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17846")
@ExcelProperty("模板实例主键")
private String templateInstanceId;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDate createTime;
}

View File

@@ -0,0 +1,23 @@
package cn.iocoder.yudao.module.base.controller.admin.templtp.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 DepartmentInstanceRelativitySaveReqVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4864")
private String id;
@Schema(description = "部门主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2450")
@NotEmpty(message = "部门主键不能为空")
private String companyDepartmentId;
@Schema(description = "模板实例主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17846")
@NotEmpty(message = "模板实例主键不能为空")
private String templateInstanceId;
}

View File

@@ -14,13 +14,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
public class TemplateInstanceDataPageReqVO extends PageParam {
@Schema(description = "关联实例主键", example = "25824")
private String instanceId;
private String inscId;
@Schema(description = "字段标识;关联字段库")
private String fieldKey;
private String fldKy;
@Schema(description = "用户填写的值")
private String fieldValue;
private String fldVal;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)

View File

@@ -18,15 +18,15 @@ public class TemplateInstanceDataRespVO {
@Schema(description = "关联实例主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25824")
@ExcelProperty("关联实例主键")
private String instanceId;
private String inscId;
@Schema(description = "字段标识;关联字段库", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("字段标识;关联字段库")
private String fieldKey;
private String fldKy;
@Schema(description = "用户填写的值", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("用户填写的值")
private String fieldValue;
private String fldVal;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")

View File

@@ -14,14 +14,14 @@ public class TemplateInstanceDataSaveReqVO {
@Schema(description = "关联实例主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25824")
@NotEmpty(message = "关联实例主键不能为空")
private String instanceId;
private String inscId;
@Schema(description = "字段标识;关联字段库", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "字段标识;关联字段库不能为空")
private String fieldKey;
private String fldKy;
@Schema(description = "用户填写的值", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "用户填写的值不能为空")
private String fieldValue;
private String fldVal;
}

View File

@@ -14,31 +14,31 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
public class TemplateInstancePageReqVO extends PageParam {
@Schema(description = "分类树主键", example = "7804")
private Long typeId;
private Long tpId;
@Schema(description = "模板名称", example = "王五")
private String name;
@Schema(description = "模板编码")
private String coding;
private String cdg;
@Schema(description = "模板描述")
private String description;
private String dsp;
@Schema(description = "实例文件内容")
private String content;
private String cntt;
@Schema(description = "原始文件内容")
private String originalContent;
private String origCntt;
@Schema(description = "文件类型", example = "1")
private String fileType;
private String fileTp;
@Schema(description = "版本号;如v1.0")
private String version;
private String ver;
@Schema(description = "状态", example = "2")
private String status;
private String sts;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)

Some files were not shown because too many files have changed in this diff Show More