更新 knowledge.md
This commit is contained in:
46
knowledge.md
46
knowledge.md
@@ -353,7 +353,7 @@ meeting_with_room_dto无uuid,为待创建DTO。meeting_base_dto和meeting_room
|
||||
}
|
||||
}
|
||||
```
|
||||
- **JSON结构描述:** VO用json结构表示,用于理解含义或作为创建、更新VO工具参数。字段含义:expandList为正向替换,reverseExpandList为反向注入,extendFieldList为来自派生源DTO的字段,customFieldList为自定义字段。expandList中,foreignKeyInThisEntity为本表外键字段名,voFieldName为替换后字段名;reverseExpandList中,foreignKeyInOtherEntity为他表外键字段名,voFieldName为注入后字段名;customFieldList中,uuid为自定义字段UUID(创建时不填,更新时需传入定位);typeUuid为类结构UUID(type为List且innerType=Enum、Eo时包含);extendFieldList中,name为派生源dto中的字段名,若DTO字段非DTO类型则VO字段类型与DTO一致,若DTO字段为DTO或List<DTO>类型,由于VO字段不能为DTO,**必须**将DTO转换为VO,所以extendFieldList会有**vo结构**表示该字段DTO类型派生出的VO定义,注意:该VO字段中的VO类型必须派生自继承的DTO字段类型!
|
||||
- **JSON结构描述:** VO用json结构表示,用于理解含义或作为创建、更新VO工具参数。字段含义:expandList为正向替换,reverseExpandList为反向注入,extendFieldList为来自派生源DTO的字段,customFieldList为自定义字段。expandList中,foreignKeyInThisEntity为本表外键字段名,voFieldName为替换后字段名;reverseExpandList中,foreignKeyInOtherEntity为他表外键字段名,voFieldName为注入后字段名;customFieldList中,uuid为自定义字段UUID(创建时不填,更新时需传入定位);typeUuid为类结构UUID(type为List且innerType=Enum、Eo时包含);extendFieldList中,name为派生源dto中的字段名,若DTO字段非DTO类型则VO字段类型与DTO一致,若DTO字段为DTO或List<DTO>类型,由于VO字段不能为DTO,**必须**将DTO转换为VO,所以extendFieldList会有**vo结构**表示该字段DTO类型派生出的VO定义,注意:该VO字段中的VO类型必须派生自继承的DTO字段类型!无根VO不包含fromEntity、fromDto、fromDtoUuid字段;派生自DTO的VO必包含fromEntity和fromDtoUuid字段!
|
||||
|
||||
示例:系统中存在meeting_detail_dto
|
||||
```
|
||||
@@ -701,7 +701,6 @@ meeting_with_room_and_agenda_wo示例:
|
||||
- **排序字段来源**:只能来源自根WO(不包括列表WO属性),以及根WO扩展出的非列表属性的WO字段。排序字段是从根节点到当前属性的路径,例如:ADto包含BDto bDto,BDto有name属性,排序字段路径为:bDto.name
|
||||
- 提取需求中的查询信息,以输入的查询对象作为上下文,构建查询语句
|
||||
- 如有列表属性过滤需求:提取需求中的过滤信息,针对可过滤字段(列表属性)分别创建过滤条件。过滤条件不能使用列表属性作为查询条件属性(不能使用contains语法)。属性字段是从根节点属性到当前属性的路径
|
||||
- 自定义字段:可以添加自定字段,对度方案生成产物Qto对象进行扩展 (注意,自定义字段不能用于查询语法, 自定义字段主要用与参数传递)
|
||||
- **查询语法和过滤语法**
|
||||
- 基本语法格式:属性名 操作符 变量或常量,变量格式为#变量名;枚举类型常量用单引号包围,例如:'MALE'
|
||||
- 数值、时间类型属性操作符:!=, ==, >, <, <=, >=, in, notIn, isNullOrNot
|
||||
@@ -717,7 +716,8 @@ meeting_with_room_and_agenda_wo示例:
|
||||
- 查询条件中的入参可在运行时传入或不传入值,不传入值表示该参数相关条件不起作用;基于这种动态效果,多条件联合查询可优先使用AND
|
||||
- 使用点号(.)访问当前对象的单值对象类型子属性,可多个点号组合访问嵌套单值对象属性
|
||||
- 查询条件中的属性必须是当前查询对象的属性或单值对象属性或单值对象子属性
|
||||
- 注意:带#的参数不能出现在表达式的左侧:例如: query": "patient_id == #patientId AND (appointment_status == #appointmentStatus OR #appointmentStatus isNull)", #appointmentStatus isNull 是错误的语法,因为#appointmentStatus 是参数
|
||||
- 禁止使用filter语法
|
||||
- 禁止使用has语法
|
||||
- 语法定义:使用 lezer 定义了如下语法
|
||||
<code>
|
||||
@top Program { expression? }
|
||||
@@ -804,9 +804,9 @@ meeting_with_room_and_agenda_wo示例:
|
||||
"uuid": {"type":"string","description":"读服务设计元素的uuid,创建时不传入,在更新的时候必须传入"},
|
||||
"woId": {"type":"string","description":"查询对象的uuid,作为查询服务的上下文,创建的时候必须指定,更新的时候不传递"},
|
||||
"description": {"type":"string","description":"描述读方案的功能,长度限制在256个字符内"},
|
||||
"supportCount": {"type":"boolean", "description":"是否需要生成计数接口"},
|
||||
"supportPagination": {"type":"boolean", "description":"是否需要分页"},
|
||||
"supportQueryAll":{"type":"boolean","description":"如果不需要分页,一次性返回部数据"},
|
||||
"generateCountApi": {"type":"boolean", "description":"是否需要生成计数接口"},
|
||||
"supportPaginate": {"type":"boolean", "description":"是否需要分页"},
|
||||
"supportUnPage":{"type":"boolean", "description":"如果不需要分页,一次性返回部数据,则返回true"},
|
||||
"supportWaterfall":{"type":"boolean","description":"是否需要瀑布流"},
|
||||
"query":{"type":"string","description":"查询语句,符合前述语法定义"},
|
||||
"voOrDtoId":{"type":"string","description":"返回数据对象(VO或DTO)的uuid,创建的时候必须指定,更新的时候不传递"},
|
||||
@@ -826,40 +826,6 @@ meeting_with_room_and_agenda_wo示例:
|
||||
}
|
||||
}
|
||||
},
|
||||
"customField": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"description": "自定义字段名称",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "字段名称,英文下划线分割,不超过32字符"
|
||||
},
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "字段类型为Enum或Eo时必填,对应的Enum或Eo标识符"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "字段类型:String,Integer,Long,Float,Double,Boolean,Date,Eo,Enum,BigDecimal,List"
|
||||
},
|
||||
"innerUuid": {
|
||||
"type": "string",
|
||||
"description": "当innerType为Eo或Enum时,对应的标识符"
|
||||
},
|
||||
"innerType": {
|
||||
"type": "string",
|
||||
"description": "List元素类型:String,Integer,Long,Float,Double,Boolean,Date,Eo,Enum,BigDecimal"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"type"
|
||||
]
|
||||
},
|
||||
"description": "自定义字段列表"
|
||||
}
|
||||
"required":["name","description","query"]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user