模版编制的相关实现
This commit is contained in:
@@ -167,7 +167,14 @@ public class TemplateInstanceController extends AbstractFileUploadController {
|
|||||||
@PostMapping("/create-version")
|
@PostMapping("/create-version")
|
||||||
@Operation(summary = "创建版本")
|
@Operation(summary = "创建版本")
|
||||||
@PreAuthorize("@ss.hasPermission('bse:template-instance:create-version')")
|
@PreAuthorize("@ss.hasPermission('bse:template-instance:create-version')")
|
||||||
public CommonResult<TemplateInstanceRespVO> createVersion(@Valid @NotEmpty(message = "模版实例") String id) {
|
public CommonResult<TemplateInstanceRespVO> createVersion(@Valid @NotEmpty(message = "模版实例id不能为空") String id) {
|
||||||
return success(templateInstanceService.createVersion(id));
|
return success(templateInstanceService.createVersion(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//通过模版编码查看历史版本
|
||||||
|
@GetMapping("/list-by-template-cdg")
|
||||||
|
@Operation(summary = "通过模版编码(cdg)查看历史版本",description = "通过模版编码查看历史版本,已按照发布时间和创建时间降序排序")
|
||||||
|
public CommonResult<List<TemplateInstanceRespVO>> listByTemplateCode(@RequestParam("cdg") @Valid @NotEmpty(message = "模版编号不能为空") String templateCode) {
|
||||||
|
return success(templateInstanceService.listByCdg(templateCode));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,5 +31,4 @@ public class TemplateInstanceDataRespVO {
|
|||||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@ExcelProperty("创建时间")
|
@ExcelProperty("创建时间")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,4 +32,8 @@ public class TemplateInstanceItemRespVO {
|
|||||||
@ExcelProperty("创建时间")
|
@ExcelProperty("创建时间")
|
||||||
private LocalDate createTime;
|
private LocalDate createTime;
|
||||||
|
|
||||||
|
@Schema(description = "条款名", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("条款名")
|
||||||
|
private String itmName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ public class TemplateInstanceRespVO {
|
|||||||
@ExcelProperty("创建时间")
|
@ExcelProperty("创建时间")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "发布时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("发布时间")
|
||||||
|
private LocalDateTime publishTime;
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "使用部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
|
@Schema(description = "使用部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
|
||||||
private List<String> deptIds;
|
private List<String> deptIds;
|
||||||
@Schema(description = "实例字段;这个是实例字段绑定的字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
|
@Schema(description = "实例字段;这个是实例字段绑定的字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
|
||||||
|
|||||||
@@ -68,6 +68,12 @@ public class TemplateInstanceDO extends BusinessBaseDO {
|
|||||||
* 状态
|
* 状态
|
||||||
*/
|
*/
|
||||||
private String sts;
|
private String sts;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime publishTime;
|
||||||
// /**
|
// /**
|
||||||
// * 公司编号
|
// * 公司编号
|
||||||
// */
|
// */
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ public interface TemplateInstanceService {
|
|||||||
|
|
||||||
void setDisableOrEnable(@Valid DisableEnableReqVO reqVO);
|
void setDisableOrEnable(@Valid DisableEnableReqVO reqVO);
|
||||||
|
|
||||||
TemplateInstanceRespVO createVersion(@Valid @NotEmpty(message = "模版实例") String id);
|
TemplateInstanceRespVO createVersion(@Valid @NotEmpty(message = "模版实例id不能为空") String id);
|
||||||
|
|
||||||
Map<String, Object> getVersion(String id);
|
Map<String, Object> getVersion(String id);
|
||||||
|
|
||||||
|
List<TemplateInstanceRespVO> listByCdg(String cdg);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user