- SvcFormVo 增 refItems(ItemBrief: id/itemCode/title/siteCode/status),referenced 同源派生;仅 list 填充,versions/get 不带 - ServiceItemRepository.findBySchIdAndFormCodeIsNotNull 一次查全量按 formCode 内存分组,替代逐表单 count 的 N+1 - ServiceFormServiceTest 5 用例(未绑定/单绑/跨站点/多版本聚合/分组不串) - 前端配套(svc-hall-front 另推):绑定明细弹窗+直达事项编辑、发布未绑定引导、schema 预览、事项编辑页草稿表单提示
This commit is contained in:
@@ -355,6 +355,8 @@ public final class SvcModels {
|
||||
private String schemaJson;
|
||||
private LocalDateTime publishTime;
|
||||
private Boolean referenced;
|
||||
/** 绑定本表单的事项明细(仅 list 填充;表单页反查使用位置) */
|
||||
private List<ItemBrief> refItems;
|
||||
|
||||
public static SvcFormVo of(com.yunhai.svchall.entity.ServiceForm form, Boolean referenced) {
|
||||
SvcFormVo vo = new SvcFormVo();
|
||||
@@ -368,6 +370,26 @@ public final class SvcModels {
|
||||
vo.setReferenced(referenced);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/** 表单绑定事项的摘要行(表单 sch 级共享,跨站点绑定如实展示站点) */
|
||||
@Data
|
||||
public static class ItemBrief {
|
||||
private Integer id;
|
||||
private String itemCode;
|
||||
private String title;
|
||||
private String siteCode;
|
||||
private Integer status;
|
||||
|
||||
public static ItemBrief of(com.yunhai.svchall.entity.ServiceItem item) {
|
||||
ItemBrief brief = new ItemBrief();
|
||||
brief.setId(item.getId());
|
||||
brief.setItemCode(item.getItemCode());
|
||||
brief.setTitle(item.getTitle());
|
||||
brief.setSiteCode(item.getSiteCode());
|
||||
brief.setStatus(item.getStatus());
|
||||
return brief;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===== 办件 =====
|
||||
|
||||
Reference in New Issue
Block a user