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

提交

上级 ac9d86f8
package cn.ibizlab.core.data.model;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.ibatis.mapping.VendorDatabaseIdProvider;
import org.springframework.util.StringUtils;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonIgnoreProperties(ignoreUnknown = true)
public class POSchema {
private String name;
private String remarks;
private String dsType;
private List<Column> columns;
private List<ForeignKeyConstraint> foreignKeyConstraints;
@JsonIgnore
@JSONField(serialize = false)
private Map<String,Column> columnMaps;
public Map<String, Column> getColumnMaps() {
if(columns!=null&&columnMaps==null)
{
columnMaps=new LinkedHashMap<>();
columns.forEach(column -> {
columnMaps.put(column.getName().toLowerCase(),column);
if((!StringUtils.isEmpty(column.getAlias()))&&column.getAlias().equalsIgnoreCase(column.getName()))
columnMaps.put(column.getAlias().toLowerCase(),column);
});
}
return columnMaps;
}
public Column getColumn(String name)
{
if(getColumnMaps()!=null)
{
return columnMaps.get(name.toLowerCase());
}
return null;
}
@JsonIgnore
@JSONField(serialize = false)
private Column lastModifyColumn;
@JsonIgnore
@JSONField(serialize = false)
public Column getLastModifyField() {
if(columns!=null&&lastModifyColumn==null)
for(Column col:columns)
if(col.isLastModify())
{
lastModifyColumn=col;
return lastModifyColumn;
}
return lastModifyColumn;
}
@JsonIgnore
@JSONField(serialize = false)
private Column createTimeColumn;
@JsonIgnore
@JSONField(serialize = false)
public Column getCreateTimeColumn() {
if(columns!=null&&createTimeColumn==null)
for(Column col:columns)
if(col.isCreateTime())
{
createTimeColumn=col;
return createTimeColumn;
}
return createTimeColumn;
}
@JsonIgnore
@JSONField(serialize = false)
private Column tenantColumn;
@JsonIgnore
@JSONField(serialize = false)
public Column getTenantColumn() {
if(columns!=null&&tenantColumn==null)
for(Column col:columns)
if(col.isTenant())
{
tenantColumn=col;
return tenantColumn;
}
return tenantColumn;
}
@JsonIgnore
@JSONField(serialize = false)
private boolean logicValid=true;
@JsonIgnore
@JSONField(serialize = false)
public boolean isLogicValid()
{
if(logicValid&&logicValidColumn==null) {
if (columns != null) {
for (Column col:columns) {
if (col.isLogicValid()) {
logicValidColumn = col;
return logicValid;
}
}
}
logicValid = false;
}
return logicValid;
}
@JsonIgnore
@JSONField(serialize = false)
private Column logicValidColumn;
@JsonIgnore
@JSONField(serialize = false)
public Column getLogicValidColumn() {
if(logicValid&&logicValidColumn==null) {
if (columns != null) {
for (Column col:columns) {
if (col.isLogicValid()) {
logicValidColumn = col;
return logicValidColumn;
}
}
}
logicValid = false;
}
return logicValidColumn;
}
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonIgnoreProperties(ignoreUnknown = true)
public static class Column{
private String name;
private String remarks;
private String type;
private Integer length;
private Integer precision;
private String defaultValue;
private Boolean autoIncrement;
private String alias;
private String predefined;
private Boolean tenant;
@JsonIgnore
@JSONField(serialize = false)
public boolean isLogicValid()
{
return "LOGICVALID".equals(this.getPredefined());
}
@JsonIgnore
@JSONField(serialize = false)
public boolean isLastModify()
{
return "UPDATEDATE".equals(this.getPredefined());
}
@JsonIgnore
@JSONField(serialize = false)
public boolean isCreateTime()
{
return "CREATEDATE".equals(this.getPredefined());
}
@JsonIgnore
@JSONField(serialize = false)
public boolean isTenant()
{
return "TENANT".equals(this.getPredefined());
}
@JsonIgnore
@JSONField(serialize = false)
public boolean isText()
{
return this.getType().toUpperCase().indexOf("TEXT")>=0||this.getType().toUpperCase().indexOf("CHAR")>=0;
}
private Constraints constraints;
}
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonIgnoreProperties(ignoreUnknown = true)
public static class Constraints{
private Boolean nullable;
private Boolean primaryKey;
private String primaryKeyName;
private String foreignKeyName;
private String referencedTableName;
private String referencedColumnNames;
}
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonIgnoreProperties(ignoreUnknown = true)
public static class ForeignKeyConstraint{
private String baseColumnNames;
private String baseTableName;
private String constraintName;
private String referencedTableName;
private String referencedColumnNames;
private Boolean validate;
private String onUpdate;
private String onDelete;
}
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonIgnoreProperties(ignoreUnknown = true)
public static class Script{
private String name;
private String vendorProvider;
private String declare;
private String body;
private Map params;
}
public List<Script> scripts;
private static Map<String, String> provider = new HashMap<String, String>(){{
put("oracle", "oracle");
put("mysql", "mysql");
put("postgresql", "postgresql");
put("mppdb", "postgresql");
put("dm", "oracle");
put("dameng", "oracle");
put("gbase", "oracle");
put("h2", "mysql");
}};
public Script getScript(String name,String type)
{
if(scripts!=null)
{
String vendorProvider="mysql";
if((!StringUtils.isEmpty(type))&&provider.containsKey(type.toLowerCase()))
vendorProvider=provider.get(type.toLowerCase());
for(Script script:scripts)
{
if(name.equalsIgnoreCase(script.getName())&&(vendorProvider.equals(script.getVendorProvider())||StringUtils.isEmpty(script.getVendorProvider())))
return script;
}
}
return getDefaultQueryScript();
}
@JsonIgnore
@JSONField(serialize = false)
public Script defaultQueryScript;
@JsonIgnore
@JSONField(serialize = false)
public Script getDefaultQueryScript()
{
if(defaultQueryScript==null)
{
defaultQueryScript=new Script();
defaultQueryScript.setName("default");
String sql="select ";
if(columns!=null)
{
String cols="";
for(Column col:columns)
{
if(!StringUtils.isEmpty(cols))
cols+=",";
cols+=(col.getName());
if((!StringUtils.isEmpty(col.getAlias()))&&col.getAlias().equalsIgnoreCase(col.getName()))
cols+=(" as "+col.getAlias());
}
sql+=cols;
}
else
sql+=" * ";
sql += (" from "+name+" t ");
if(isLogicValid())
{
String defaultVal=this.getLogicValidColumn().getDefaultValue();
if(StringUtils.isEmpty(defaultVal))
defaultVal="1";
sql += " where t."+this.getLogicValidColumn().getName()+"=";
if(this.getLogicValidColumn().isText())
sql+=("'"+defaultVal+"'" );
else
sql+=(defaultVal+" ");
}
defaultQueryScript.setBody(sql);
}
return defaultQueryScript;
}
}
......@@ -122,7 +122,7 @@ public class PojoSchema {
public Map<String,PojoSchema> getProperties()
{
if(!"object".equals(this.type))
if(!Type.object.getCode().equals(this.type))
{
properties=null;
return properties;
......@@ -152,7 +152,7 @@ public class PojoSchema {
public Set<String> getRequired()
{
if(!"object".equals(this.type))
if(!Type.object.getCode().equals(this.type))
{
required=null;
return required;
......@@ -231,4 +231,36 @@ public class PojoSchema {
System.out.println(JSON.toJSONString(schema));
}
public static enum Type {
string("string", "字符"),
integer("integer", "整型"),
number("number", "数值"),
object("object", "对象"),
array("array", "数组");
public final String code;
public final String name;
private Type(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
@Override
public String toString() {
return "Type{" +
"code='" + code + '\'' +
", name='" + name + '\'' +
'}';
}
}
}
......@@ -18,34 +18,34 @@ public class TransUtils {
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()));
sub.setType(PojoSchema.Type.object.getCode()).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)
sub=new PojoSchema().setType(PojoSchema.Type.array.getCode()).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()));
sub=new PojoSchema().setType(PojoSchema.Type.array.getCode()).setName(property.getCode()).setTitle(property.getName()).setPropertyOrder(order)
.setItems(new PojoSchema().setType(PojoSchema.Type.string.getCode()).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()));
sub=new PojoSchema().setType(PojoSchema.Type.integer.getCode()).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()));
sub=new PojoSchema().setType(PojoSchema.Type.number.getCode()).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()));
sub=new PojoSchema().setType(PojoSchema.Type.string.getCode()).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()));
sub=new PojoSchema().setType(PojoSchema.Type.string.getCode()).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()));
sub=new PojoSchema().setType(PojoSchema.Type.string.getCode()).setName(property.getCode()).setTitle(property.getName()).setPropertyOrder(order).setOptions(new PojoOption().setAll(property.getExtensions()));
}
if(sub!=null)
......@@ -66,6 +66,48 @@ public class TransUtils {
return pojoSchema;
}
public static PojoModel PojoSchema2Model(PojoSchema pojoSchema)
{
PojoModel pojoModel=new PojoModel().setCode(pojoSchema.getName()).setName(pojoSchema.getTitle()).setRef(pojoSchema.getRef()).setExtensions(pojoSchema.getOptions());
for(String name:pojoSchema.getProperties().keySet())
{
PojoSchema sub=pojoSchema.getProperties().get(name);
PojoProperty property=new PojoProperty().setCode(name).setName(sub.getTitle()).setExtensions(new PojoOption().setAll(sub.getOptions()));
if(PojoSchema.Type.object.getCode().equals(sub.getType()))
{
property.setModel(PojoSchema2Model(sub)).setPropertyType(PojoModel.PropertyType.object);
}
else if(PojoSchema.Type.array.getCode().equals(sub.getType()))
{
PojoSchema subItems=sub.getItems();
if(subItems!=null&& PojoSchema.Type.object.getCode().equals(subItems.getType()))
property.setModel(PojoSchema2Model(subItems)).setPropertyType(PojoModel.PropertyType.nested);
else
property.setPropertyType(PojoModel.PropertyType.array);
}
else if(PojoSchema.Type.string.getCode().equals(sub.getType())&&(!StringUtils.isEmpty(sub.getFormat())))
{
if("date".equals(sub.getFormat())) property.setPropertyType(PojoModel.PropertyType.date);
else if("date-time".equals(sub.getFormat())) property.setPropertyType(PojoModel.PropertyType.datetime);
}
else {
property.setPropertyType(PojoModel.PropertyType.valueOf(sub.getType()));
if(sub.getOptions()!=null&&(!StringUtils.isEmpty(sub.getOptions().getDict())))
property.setDict(sub.getOptions().getDict());
}
if(pojoSchema.getRequired()!=null&&pojoSchema.getRequired().contains(name))
property.setRequired(true);
pojoModel.addProperty(property);
}
return pojoModel;
}
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\":{}}}]}";
......@@ -75,6 +117,9 @@ public class TransUtils {
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\"]}";
PojoModel model=PojoSchema2Model(schema);
System.out.println(JSON.toJSONString(model));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册