提交 ac9d86f8 编写于 作者: sq3536's avatar sq3536

提交

上级 b894a61d
......@@ -8,6 +8,8 @@ import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import cn.ibizlab.core.data.model.PojoSchema;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
......@@ -94,7 +96,7 @@ public class DOModel extends EntityBase implements Serializable {
@JSONField(name = "schema")
@JsonProperty("schema")
@ApiModelProperty("定义")
private String schema;
private PojoSchema schema;
/**
* 模型
......
package cn.ibizlab.core.data.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import cn.ibizlab.core.data.model.PojoModel;
import cn.ibizlab.core.data.model.PojoSchema;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.util.domain.EntityBase;
import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* [业务实体] 对象
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("业务实体")
public class DOSchema extends EntityBase implements Serializable {
/**
* 标识
*/
@DEField(isKeyField = true)
@JSONField(name = "id")
@JsonProperty("id")
@ApiModelProperty("标识")
private String id;
/**
* 名称
*/
@JSONField(name = "name")
@JsonProperty("name")
@ApiModelProperty("名称")
private String name;
/**
* 名称
*/
@JSONField(name = "title")
@JsonProperty("title")
@ApiModelProperty("名称")
private String title;
/**
* 系统
*/
@JSONField(name = "systemId")
@JsonProperty("systemId")
@ApiModelProperty("系统")
private String systemId;
/**
* 包名
*/
@JSONField(name = "packageName")
@JsonProperty("packageName")
@ApiModelProperty("包名")
private String packageName;
/**
* 描述
*/
@JSONField(name = "description")
@JsonProperty("description")
@ApiModelProperty("描述")
private String description;
/**
* 定义
*/
@JSONField(name = "schema")
@JsonProperty("schema")
@ApiModelProperty("定义")
private PojoSchema schema;
/**
* 模型
*/
@JSONField(name = "model")
@JsonProperty("model")
@ApiModelProperty("模型")
private String model;
/**
* 存储
*/
@JSONField(name = "poModels")
@JsonProperty("poModels")
@ApiModelProperty("存储")
private String poModels;
}
......@@ -8,6 +8,8 @@ import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import cn.ibizlab.core.data.model.PojoSchema;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
......@@ -94,7 +96,7 @@ public class DTOModel extends EntityBase implements Serializable {
@JSONField(name = "schema")
@JsonProperty("schema")
@ApiModelProperty("定义")
private String schema;
private PojoSchema schema;
/**
* 模型
......
package cn.ibizlab.core.data.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import cn.ibizlab.core.data.model.PojoModel;
import cn.ibizlab.core.data.model.PojoSchema;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.util.domain.EntityBase;
import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.enums.DupCheck;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* [数据传输对象] 对象
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("数据传输对象")
public class DTOSchema extends EntityBase implements Serializable {
/**
* 标识
*/
@DEField(isKeyField = true)
@JSONField(name = "id")
@JsonProperty("id")
@ApiModelProperty("标识")
private String id;
/**
* 名称
*/
@JSONField(name = "name")
@JsonProperty("name")
@ApiModelProperty("名称")
private String name;
/**
* 名称
*/
@JSONField(name = "title")
@JsonProperty("title")
@ApiModelProperty("名称")
private String title;
/**
* 系统
*/
@JSONField(name = "systemId")
@JsonProperty("systemId")
@ApiModelProperty("系统")
private String systemId;
/**
* 包名
*/
@JSONField(name = "packageName")
@JsonProperty("packageName")
@ApiModelProperty("包名")
private String packageName;
/**
* 描述
*/
@JSONField(name = "description")
@JsonProperty("description")
@ApiModelProperty("描述")
private String description;
/**
* 定义
*/
@JSONField(name = "schema")
@JsonProperty("schema")
@ApiModelProperty("定义")
private PojoSchema schema;
/**
* 模型
*/
@JSONField(name = "model")
@JsonProperty("model")
@ApiModelProperty("模型")
private String model;
/**
* 映射
*/
@JSONField(name = "mapping")
@JsonProperty("mapping")
@ApiModelProperty("映射")
private String mapping;
}
......@@ -19,6 +19,8 @@ import java.util.*;
@JsonIgnoreProperties(ignoreUnknown = true)
public class PojoModel
{
@JSONField(ordinal = 0)
private String ref;
@JSONField(ordinal = 1)
private String id;
@JSONField(ordinal = 2)
......@@ -30,7 +32,7 @@ public class PojoModel
@JSONField(ordinal = 5)
private List<PojoProperty> propertyList;
@JSONField(ordinal = 6)
private Map<String, Object> extensions=new HashMap<>();
private Map<String, Object> extensions;
public PojoModel setPropertyList(List<PojoProperty> propertyList) {
if (propertyList != null)
......
......@@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.springframework.util.StringUtils;
import java.util.Map;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonIgnoreProperties(ignoreUnknown = true)
public class PojoOption extends DataObj{
......@@ -17,21 +19,23 @@ public class PojoOption extends DataObj{
return this;
}
public PojoOption setAll(Map map)
{
if(map!=null)
this.putAll(map);
else if(this.size()==0)
return null;
return this;
}
public String getName() {
return this.getStringValue("name");
return this.getStringValue("name",this.getStringValue("code_name"));
}
public PojoOption setName(String name) {
return this.set("name",name);
}
public String getCode() {
return this.getStringValue("code");
}
public PojoOption setCode(String code) {
return this.set("code",code);
}
public Boolean isLogicValid() {
return this.getBooleanValue("logicValid");
......@@ -59,6 +63,15 @@ public class PojoOption extends DataObj{
return this.set("logicdelval",logicdelval);
}
public String getFieldName() {
return this.getStringValue("field_name");
}
public PojoOption setFieldName(String code) {
return this.set("field_name",code);
}
public String getRelationName() {
return this.getStringValue("relation_name");
}
......
......@@ -15,6 +15,7 @@ import org.springframework.util.ObjectUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Getter
@Setter
......@@ -56,6 +57,9 @@ public class PojoProperty
@JSONField(ordinal = 8)
private PojoModel model;
@JSONField(ordinal = 9)
private Map<String, Object> extensions;
public PojoModel getModel()
{
if (propertyType != null && propertyType.equals(PojoModel.PropertyType.recursion) && ownerModel != null) {
......
......@@ -31,18 +31,6 @@ public class PojoSchema {
@JSONField(ordinal = 2)
private String type;
@JSONField(serialize = false)
@JsonIgnore
private String code;
@JSONField(serialize = false)
@JsonIgnore
public String getCode()
{
if(code==null)
code=this.getOptions()==null?this.getName():this.getOptions().getCode();
return code;
}
@JSONField(serialize = false)
@JsonIgnore
......@@ -70,6 +58,7 @@ public class PojoSchema {
}
@JSONField(ordinal = 3)
private String title;
......@@ -82,6 +71,16 @@ public class PojoSchema {
@JSONField(ordinal = 6)
private PojoOption options;
public PojoSchema setOptions(PojoOption options)
{
if(options==null)
return this;
if(this.options!=null)
options.putAll(this.options);
this.options=options;
return this;
}
@JSONField(ordinal = 7)
private String ref;
......
package cn.ibizlab.core.data.model;
import com.alibaba.fastjson.JSON;
import org.springframework.util.StringUtils;
public class TransUtils {
public static PojoSchema PojoModel2Schema(PojoModel pojoModel)
{
PojoSchema pojoSchema=new PojoSchema().setName(pojoModel.getCode()).setType("object").setTitle(pojoModel.getName()).setId(pojoModel.getId()).setRef(pojoModel.getRef()).setOptions(new PojoOption().setAll(pojoModel.getExtensions()));
int order=1;
for(PojoProperty property:pojoModel.getPropertyList()){
PojoSchema sub=null;
if(PojoModel.PropertyType.object.equals(property.getPropertyType())) {
property.setRequired(false);
if (property.getModel() != null ) {
sub=PojoModel2Schema(property.getModel());
sub.setType("object").setName(property.getCode()).setTitle(property.getName()).setPropertyOrder(order).setOptions(new PojoOption().setAll(property.getExtensions()));
}
}
else if(PojoModel.PropertyType.nested.equals(property.getPropertyType())) {
property.setRequired(false);
if (property.getModel() != null ) {
sub=new PojoSchema().setType("array").setName(property.getCode()).setTitle(property.getName()).setPropertyOrder(order)
.setItems(PojoModel2Schema(property.getModel())).setOptions(new PojoOption().setAll(property.getExtensions()));
}
}
else if(PojoModel.PropertyType.array.equals(property.getPropertyType())) {
sub=new PojoSchema().setType("array").setName(property.getCode()).setTitle(property.getName()).setPropertyOrder(order)
.setItems(new PojoSchema().setType("string").setTitle(property.getName())).setOptions(new PojoOption().setAll(property.getExtensions()));
}
else if(PojoModel.PropertyType.integer.equals(property.getPropertyType())) {
sub=new PojoSchema().setType("integer").setName(property.getCode()).setTitle(property.getName()).setPropertyOrder(order).setOptions(new PojoOption().setAll(property.getExtensions()));
}
else if(PojoModel.PropertyType.number.equals(property.getPropertyType())) {
sub=new PojoSchema().setType("number").setName(property.getCode()).setTitle(property.getName()).setPropertyOrder(order).setOptions(new PojoOption().setAll(property.getExtensions()));
}
else if(PojoModel.PropertyType.date.equals(property.getPropertyType())) {
sub=new PojoSchema().setType("string").setFormat("date").setName(property.getCode()).setTitle(property.getName()).setPropertyOrder(order).setOptions(new PojoOption().setAll(property.getExtensions()));
}
else if(PojoModel.PropertyType.datetime.equals(property.getPropertyType())) {
sub=new PojoSchema().setType("string").setFormat("date-time").setName(property.getCode()).setTitle(property.getName()).setPropertyOrder(order).setOptions(new PojoOption().setAll(property.getExtensions()));
}
else{
sub=new PojoSchema().setType("string").setName(property.getCode()).setTitle(property.getName()).setPropertyOrder(order).setOptions(new PojoOption().setAll(property.getExtensions()));
}
if(sub!=null)
{
if(property.getRequired())
sub.getOptions().setNullable(false);
if(!StringUtils.isEmpty(property.getDict()))
sub.getOptions().setDict(property.getDict());
pojoSchema.addProperties(sub.getName(),sub);
}
order++;
}
return pojoSchema;
}
public static void main(String[] args) {
String str="{\"code\":\"CaseInfo\",\"name\":\"案件基本信息\",\"group\":\"0预处理/2.预处理接口\",\"propertyList\":[{\"code\":\"send_id\",\"name\":\"请求ID标识\",\"required\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"req_type\",\"name\":\"业务请求类型\",\"required\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"ajbh\",\"name\":\"公共案件编号\",\"required\":true,\"uniqueKeys\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"ajmc\",\"name\":\"公共案件名称\",\"required\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"ab\",\"name\":\"案由代码\",\"required\":false,\"uniqueKeys\":false,\"dict\":\"案由\",\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"gajgysrdh\",\"name\":\"移送人电话\",\"required\":false,\"uniqueKeys\":false,\"dict\":\"\",\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"case_status\",\"name\":\"案件状态\",\"required\":true,\"dict\":\"案件类型\",\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"CaseSuspect_List\",\"name\":\"嫌疑人自然人信息列表\",\"required\":false,\"defaultValue\":\"\",\"propertyType\":\"nested\",\"model\":{\"code\":\"CaseSuspect\",\"name\":\"嫌疑人自然人信息\",\"group\":\"0预处理/2.预处理接口\",\"propertyList\":[{\"code\":\"rybh\",\"name\":\"人员编号\",\"required\":true,\"uniqueKeys\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"rybs\",\"name\":\"公安人员标识\",\"required\":true,\"uniqueKeys\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"xm\",\"name\":\"姓名\",\"required\":true,\"uniqueKeys\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"SuspectCoercive_List\",\"name\":\"嫌疑人强制措施信息列表\",\"required\":false,\"defaultValue\":\"\",\"propertyType\":\"nested\",\"model\":{\"code\":\"SuspectCoercive\",\"name\":\"嫌疑人强制措施信息\",\"group\":\"0预处理/2.预处理接口\",\"propertyList\":[{\"code\":\"gabs\",\"name\":\"公安唯一标识\",\"required\":true,\"uniqueKeys\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"cslb\",\"name\":\"强制措施种类代码\",\"required\":false,\"uniqueKeys\":true,\"dict\":\"强制措施种类\",\"defaultValue\":\"\",\"propertyType\":\"string\"}],\"extensions\":{}}}],\"extensions\":{}}},{\"code\":\"SuspectCompany_List\",\"name\":\"涉案单位信息列表\",\"required\":false,\"defaultValue\":\"\",\"propertyType\":\"nested\",\"model\":{\"code\":\"SuspectCompany\",\"name\":\"涉案人单位信息\",\"group\":\"0预处理/2.预处理接口\",\"propertyList\":[{\"code\":\"gabs\",\"name\":\"公安唯一标识\",\"required\":true,\"uniqueKeys\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"dwmc\",\"name\":\"单位名称\",\"required\":false,\"uniqueKeys\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"}],\"extensions\":{}}},{\"code\":\"CaseSHR_List\",\"name\":\"受害人列表\",\"required\":false,\"defaultValue\":\"\",\"propertyType\":\"nested\",\"model\":{\"code\":\"CaseSHR\",\"name\":\"受害人基本信息\",\"group\":\"0预处理/2.预处理接口\",\"propertyList\":[{\"code\":\"xm\",\"name\":\"姓名\",\"required\":false,\"uniqueKeys\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"}],\"extensions\":{}}},{\"code\":\"CaseSAWP_List\",\"name\":\"涉案物品列表\",\"required\":false,\"defaultValue\":\"\",\"propertyType\":\"nested\",\"model\":{\"code\":\"CaseSAWP\",\"name\":\"涉案物品信息\",\"group\":\"0预处理/2.预处理接口\",\"propertyList\":[{\"code\":\"sawpmc\",\"name\":\"名称\",\"required\":false,\"uniqueKeys\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"}],\"extensions\":{}}},{\"code\":\"CaseStatus_List\",\"name\":\"案件移送记录列表\",\"required\":false,\"defaultValue\":\"\",\"propertyType\":\"object\",\"model\":{\"code\":\"CaseStatus\",\"name\":\"提请逮捕移送记录\",\"group\":\"0预处理/2.预处理接口\",\"propertyList\":[{\"code\":\"send_dept\",\"name\":\"发送部门代码\",\"required\":true,\"dict\":\"单位\",\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"send_deptname\",\"name\":\"发送部门名称\",\"required\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"receive_dept\",\"name\":\"接收部门代码\",\"required\":true,\"dict\":\"单位\",\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"receive_deptname\",\"name\":\"接收部门名称\",\"required\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"send_time\",\"name\":\"发送时间\",\"required\":false,\"defaultValue\":\"\",\"propertyType\":\"date\"},{\"code\":\"send_type\",\"name\":\"移送状态\",\"required\":true,\"uniqueKeys\":true,\"dict\":\"案件类型\",\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"send_type_zh\",\"name\":\"移送状态名称\",\"required\":true,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"wh_zh\",\"name\":\"文书名称\",\"required\":false,\"defaultValue\":\"\",\"propertyType\":\"string\"},{\"code\":\"wh\",\"name\":\"移送文书文号\",\"required\":false,\"defaultValue\":\"\",\"propertyType\":\"string\"}],\"extensions\":{}}}]}";
PojoModel pojoModel= JSON.parseObject(str,PojoModel.class);
PojoSchema schema=PojoModel2Schema(pojoModel);
System.out.println(JSON.toJSONString(schema));
String str1="{\"type\":\"object\",\"title\":\"案件基本信息\",\"options\":{\"name\":\"CaseInfo\"},\"properties\":{\"send_id\":{\"type\":\"string\",\"title\":\"请求ID标识\",\"propertyOrder\":1,\"options\":{\"nullable\":false,\"name\":\"send_id\"}},\"req_type\":{\"type\":\"string\",\"title\":\"业务请求类型\",\"propertyOrder\":2,\"options\":{\"nullable\":false,\"name\":\"req_type\"}},\"ajbh\":{\"type\":\"string\",\"title\":\"公共案件编号\",\"propertyOrder\":3,\"options\":{\"nullable\":false,\"name\":\"ajbh\"}},\"ajmc\":{\"type\":\"string\",\"title\":\"公共案件名称\",\"propertyOrder\":4,\"options\":{\"nullable\":false,\"name\":\"ajmc\"}},\"ab\":{\"type\":\"string\",\"title\":\"案由代码\",\"propertyOrder\":5,\"options\":{\"name\":\"ab\",\"dict\":\"案由\"}},\"gajgysrdh\":{\"type\":\"string\",\"title\":\"移送人电话\",\"propertyOrder\":6,\"options\":{\"name\":\"gajgysrdh\"}},\"case_status\":{\"type\":\"string\",\"title\":\"案件状态\",\"propertyOrder\":7,\"options\":{\"nullable\":false,\"name\":\"case_status\",\"dict\":\"案件类型\"}},\"CaseSuspect_List\":{\"type\":\"array\",\"title\":\"嫌疑人自然人信息列表\",\"propertyOrder\":8,\"options\":{\"name\":\"CaseSuspect_List\"},\"items\":{\"type\":\"object\",\"title\":\"嫌疑人自然人信息\",\"options\":{\"name\":\"CaseSuspect\"},\"properties\":{\"rybh\":{\"type\":\"string\",\"title\":\"人员编号\",\"propertyOrder\":1,\"options\":{\"nullable\":false,\"name\":\"rybh\"}},\"rybs\":{\"type\":\"string\",\"title\":\"公安人员标识\",\"propertyOrder\":2,\"options\":{\"nullable\":false,\"name\":\"rybs\"}},\"xm\":{\"type\":\"string\",\"title\":\"姓名\",\"propertyOrder\":3,\"options\":{\"nullable\":false,\"name\":\"xm\"}},\"SuspectCoercive_List\":{\"type\":\"array\",\"title\":\"嫌疑人强制措施信息列表\",\"propertyOrder\":4,\"options\":{\"name\":\"SuspectCoercive_List\"},\"items\":{\"type\":\"object\",\"title\":\"嫌疑人强制措施信息\",\"options\":{\"name\":\"SuspectCoercive\"},\"properties\":{\"gabs\":{\"type\":\"string\",\"title\":\"公安唯一标识\",\"propertyOrder\":1,\"options\":{\"nullable\":false,\"name\":\"gabs\"}},\"cslb\":{\"type\":\"string\",\"title\":\"强制措施种类代码\",\"propertyOrder\":2,\"options\":{\"name\":\"cslb\",\"dict\":\"强制措施种类\"}}},\"required\":[\"gabs\"]}}},\"required\":[\"rybh\",\"rybs\",\"xm\"]}},\"SuspectCompany_List\":{\"type\":\"array\",\"title\":\"涉案单位信息列表\",\"propertyOrder\":9,\"options\":{\"name\":\"SuspectCompany_List\"},\"items\":{\"type\":\"object\",\"title\":\"涉案人单位信息\",\"options\":{\"name\":\"SuspectCompany\"},\"properties\":{\"gabs\":{\"type\":\"string\",\"title\":\"公安唯一标识\",\"propertyOrder\":1,\"options\":{\"nullable\":false,\"name\":\"gabs\"}},\"dwmc\":{\"type\":\"string\",\"title\":\"单位名称\",\"propertyOrder\":2,\"options\":{\"name\":\"dwmc\"}}},\"required\":[\"gabs\"]}},\"CaseSHR_List\":{\"type\":\"array\",\"title\":\"受害人列表\",\"propertyOrder\":10,\"options\":{\"name\":\"CaseSHR_List\"},\"items\":{\"type\":\"object\",\"title\":\"受害人基本信息\",\"options\":{\"name\":\"CaseSHR\"},\"properties\":{\"xm\":{\"type\":\"string\",\"title\":\"姓名\",\"propertyOrder\":1,\"options\":{\"name\":\"xm\"}}},\"required\":[]}},\"CaseSAWP_List\":{\"type\":\"array\",\"title\":\"涉案物品列表\",\"propertyOrder\":11,\"options\":{\"name\":\"CaseSAWP_List\"},\"items\":{\"type\":\"object\",\"title\":\"涉案物品信息\",\"options\":{\"name\":\"CaseSAWP\"},\"properties\":{\"sawpmc\":{\"type\":\"string\",\"title\":\"名称\",\"propertyOrder\":1,\"options\":{\"name\":\"sawpmc\"}}},\"required\":[]}},\"CaseStatus_List\":{\"type\":\"object\",\"title\":\"案件移送记录列表\",\"propertyOrder\":12,\"options\":{\"name\":\"CaseStatus_List\"},\"properties\":{\"send_dept\":{\"type\":\"string\",\"title\":\"发送部门代码\",\"propertyOrder\":1,\"options\":{\"nullable\":false,\"name\":\"send_dept\",\"dict\":\"单位\"}},\"send_deptname\":{\"type\":\"string\",\"title\":\"发送部门名称\",\"propertyOrder\":2,\"options\":{\"nullable\":false,\"name\":\"send_deptname\"}},\"receive_dept\":{\"type\":\"string\",\"title\":\"接收部门代码\",\"propertyOrder\":3,\"options\":{\"nullable\":false,\"name\":\"receive_dept\",\"dict\":\"单位\"}},\"receive_deptname\":{\"type\":\"string\",\"title\":\"接收部门名称\",\"propertyOrder\":4,\"options\":{\"nullable\":false,\"name\":\"receive_deptname\"}},\"send_time\":{\"type\":\"string\",\"title\":\"发送时间\",\"propertyOrder\":5,\"options\":{\"name\":\"send_time\"},\"format\":\"date\"},\"send_type\":{\"type\":\"string\",\"title\":\"移送状态\",\"propertyOrder\":6,\"options\":{\"nullable\":false,\"name\":\"send_type\",\"dict\":\"案件类型\"}},\"send_type_zh\":{\"type\":\"string\",\"title\":\"移送状态名称\",\"propertyOrder\":7,\"options\":{\"nullable\":false,\"name\":\"send_type_zh\"}},\"wh_zh\":{\"type\":\"string\",\"title\":\"文书名称\",\"propertyOrder\":8,\"options\":{\"name\":\"wh_zh\"}},\"wh\":{\"type\":\"string\",\"title\":\"移送文书文号\",\"propertyOrder\":9,\"options\":{\"name\":\"wh\"}}},\"required\":[\"send_dept\",\"send_deptname\",\"receive_dept\",\"receive_deptname\",\"send_type\",\"send_type_zh\"]}},\"required\":[\"send_id\",\"req_type\",\"ajbh\",\"ajmc\",\"case_status\"]}";
}
}
......@@ -8,6 +8,8 @@ import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import cn.ibizlab.core.data.model.PojoSchema;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
......@@ -100,7 +102,7 @@ public class DOModelDTO extends DTOBase implements Serializable {
@JsonProperty("schema")
@Size(min = 0, max = 1048576, message = "内容长度必须小于等于[1048576]")
@ApiModelProperty("定义")
private String schema;
private PojoSchema schema;
/**
* 属性 [MODEL]
......@@ -166,7 +168,7 @@ public class DOModelDTO extends DTOBase implements Serializable {
/**
* 设置 [SCHEMA]
*/
public void setSchema(String schema){
public void setSchema(PojoSchema schema){
this.schema = schema ;
this.modify("schema",schema);
}
......
package cn.ibizlab.api.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import cn.ibizlab.core.data.model.PojoModel;
import cn.ibizlab.core.data.model.PojoSchema;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 服务DTO对象[DOSchemaDTO]
*/
@Data
@ApiModel("业务实体")
public class DOSchemaDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [ID]
*
*/
@JSONField(name = "id")
@JsonProperty("id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("标识")
private String id;
/**
* 属性 [NAME]
*
*/
@JSONField(name = "name")
@JsonProperty("name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("名称")
private String name;
/**
* 属性 [TITLE]
*
*/
@JSONField(name = "title")
@JsonProperty("title")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("名称")
private String title;
/**
* 属性 [SYSTEMID]
*
*/
@JSONField(name = "systemid")
@JsonProperty("systemid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("系统")
private String systemId;
/**
* 属性 [PACKAGENAME]
*
*/
@JSONField(name = "packagename")
@JsonProperty("packagename")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("包名")
private String packageName;
/**
* 属性 [DESCRIPTION]
*
*/
@JSONField(name = "description")
@JsonProperty("description")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("描述")
private String description;
/**
* 属性 [SCHEMA]
*
*/
@JSONField(name = "schema")
@JsonProperty("schema")
@Size(min = 0, max = 1048576, message = "内容长度必须小于等于[1048576]")
@ApiModelProperty("定义")
private PojoSchema schema;
/**
* 属性 [MODEL]
*
*/
@JSONField(name = "model")
@JsonProperty("model")
@Size(min = 0, max = 1048576, message = "内容长度必须小于等于[1048576]")
@ApiModelProperty("模型")
private String model;
/**
* 属性 [POMODELS]
*
*/
@JSONField(name = "pomodels")
@JsonProperty("pomodels")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("存储")
private String poModels;
/**
* 设置 [NAME]
*/
public void setName(String name){
this.name = name ;
this.modify("name",name);
}
/**
* 设置 [TITLE]
*/
public void setTitle(String title){
this.title = title ;
this.modify("title",title);
}
/**
* 设置 [SYSTEMID]
*/
public void setSystemId(String systemId){
this.systemId = systemId ;
this.modify("systemid",systemId);
}
/**
* 设置 [PACKAGENAME]
*/
public void setPackageName(String packageName){
this.packageName = packageName ;
this.modify("packagename",packageName);
}
/**
* 设置 [DESCRIPTION]
*/
public void setDescription(String description){
this.description = description ;
this.modify("description",description);
}
/**
* 设置 [SCHEMA]
*/
public void setSchema(PojoSchema schema){
this.schema = schema ;
this.modify("schema",schema);
}
/**
* 设置 [MODEL]
*/
public void setModel(String model){
this.model = model ;
this.modify("model",model);
}
/**
* 设置 [POMODELS]
*/
public void setPoModels(String poModels){
this.poModels = poModels ;
this.modify("pomodels",poModels);
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册