diff --git a/mdp-form/src/main/java/com/mdp/form/entity/FormField.java b/mdp-form/src/main/java/com/mdp/form/entity/FormField.java index 1d672f1..653ab42 100644 --- a/mdp-form/src/main/java/com/mdp/form/entity/FormField.java +++ b/mdp-form/src/main/java/com/mdp/form/entity/FormField.java @@ -1,19 +1,19 @@ -package com.mdp.form.entity; +package com.mdp.form.entity; +import lombok.Data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; /** - * 组织 com.qqkj 顶级模块 mdp 大模块 form 小模块
+ * 组织 com 顶级模块 mdp 大模块 form 小模块
* 实体 FormField所有属性名:
- * formId,id,fieldId,fieldTitle,secondCodeRow,fieldType,fieldLength,defaultValue,isMultiple,placeholder,isRequired,isFromBaseData,fieldIdCamel,remark,extFieldType,isCloneToFlow,flowFieldId,isBizKey,seqNo;
- * 表 FORM.form_field form_field的所有字段名:
- * form_id,id,field_id,field_title,second_code_row,field_type,field_length,default_value,is_multiple,placeholder,is_required,is_from_base_data,field_id_camel,remark,ext_field_type,is_clone_to_flow,flow_field_id,is_biz_key,seq_no;
+ * "formId","表单编号","id","主键","fieldId","字段编号对应数据库","fieldTitle","字段显示内容","dictCode","下拉时候关联的分组","fieldType","字段类型","fieldLength","字段长度","defaultValue","默认值","isMultiple","是否多选","placeholder","输入框占位文本","isRequired","是否必输","isDict","是否关联基础数据","fieldIdCamel","字段驼峰命名","remark","字段备注","extFieldType","扩展信息","toFlow","是否提交到工作流","flowFieldId","提交到工作流的变量编号","isBizKey","是否是业务主键111前面两个1代表创建人及创建部门,后面一个1代表字段本身,0为不是主键,如000代表该表单不设置主键,001代表字段本身作为主键,创建人创建部门不是主键,100代表创建人为唯一主键,110代表创建人创建部门为主键,其它字段联合主键的话,按字段顺序排序","seqNo","显示顺序","groupName","归属组名-用于解决多个tab页,或者多个子页面的问题";
* 当前主键(包括多主键):
* id;
*/ -@ApiModel(description="form_field") + @Data +@ApiModel(description="表单字段定义") public class FormField implements java.io.Serializable { private static final long serialVersionUID = 1L; @@ -32,7 +32,7 @@ public class FormField implements java.io.Serializable { String fieldTitle; @ApiModelProperty(notes="下拉时候关联的分组",allowEmptyValue=true,example="",allowableValues="") - String secondCodeRow; + String dictCode; @ApiModelProperty(notes="字段类型",allowEmptyValue=true,example="",allowableValues="") String fieldType; @@ -53,7 +53,7 @@ public class FormField implements java.io.Serializable { String isRequired; @ApiModelProperty(notes="是否关联基础数据",allowEmptyValue=true,example="",allowableValues="") - String isFromBaseData; + String isDict; @ApiModelProperty(notes="字段驼峰命名",allowEmptyValue=true,example="",allowableValues="") String fieldIdCamel; @@ -65,254 +65,31 @@ public class FormField implements java.io.Serializable { String extFieldType; @ApiModelProperty(notes="是否提交到工作流",allowEmptyValue=true,example="",allowableValues="") - String isCloneToFlow; + String toFlow; @ApiModelProperty(notes="提交到工作流的变量编号",allowEmptyValue=true,example="",allowableValues="") String flowFieldId; - @ApiModelProperty(notes="是否是业务主键",allowEmptyValue=true,example="",allowableValues="") + @ApiModelProperty(notes="是否是业务主键111前面两个1代表创建人及创建部门,后面一个1代表字段本身,0为不是主键,如000代表该表单不设置主键,001代表字段本身作为主键,创建人创建部门不是主键,100代表创建人为唯一主键,110代表创建人创建部门为主键,其它字段联合主键的话,按字段顺序排序",allowEmptyValue=true,example="",allowableValues="") String isBizKey; @ApiModelProperty(notes="显示顺序",allowEmptyValue=true,example="",allowableValues="") BigDecimal seqNo; + + @ApiModelProperty(notes="归属组名-用于解决多个tab页,或者多个子页面的问题",allowEmptyValue=true,example="",allowableValues="") + String groupName; - /**主键**/ + /** + *主键 + **/ public FormField(String id) { this.id = id; } - /**form_field**/ + /** + * 表单字段定义 + **/ public FormField() { } - - /** - * 表单编号 - **/ - public void setFormId(String formId) { - this.formId = formId; - } - /** - * 主键 - **/ - public void setId(String id) { - this.id = id; - } - /** - * 字段编号对应数据库 - **/ - public void setFieldId(String fieldId) { - this.fieldId = fieldId; - } - /** - * 字段显示内容 - **/ - public void setFieldTitle(String fieldTitle) { - this.fieldTitle = fieldTitle; - } - /** - * 下拉时候关联的分组 - **/ - public void setSecondCodeRow(String secondCodeRow) { - this.secondCodeRow = secondCodeRow; - } - /** - * 字段类型 - **/ - public void setFieldType(String fieldType) { - this.fieldType = fieldType; - } - /** - * 字段长度 - **/ - public void setFieldLength(BigDecimal fieldLength) { - this.fieldLength = fieldLength; - } - /** - * 默认值 - **/ - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; - } - /** - * 是否多选 - **/ - public void setIsMultiple(String isMultiple) { - this.isMultiple = isMultiple; - } - /** - * 输入框占位文本 - **/ - public void setPlaceholder(String placeholder) { - this.placeholder = placeholder; - } - /** - * 是否必输 - **/ - public void setIsRequired(String isRequired) { - this.isRequired = isRequired; - } - /** - * 是否关联基础数据 - **/ - public void setIsFromBaseData(String isFromBaseData) { - this.isFromBaseData = isFromBaseData; - } - /** - * 字段驼峰命名 - **/ - public void setFieldIdCamel(String fieldIdCamel) { - this.fieldIdCamel = fieldIdCamel; - } - /** - * 字段备注 - **/ - public void setRemark(String remark) { - this.remark = remark; - } - /** - * 扩展信息 - **/ - public void setExtFieldType(String extFieldType) { - this.extFieldType = extFieldType; - } - /** - * 是否提交到工作流 - **/ - public void setIsCloneToFlow(String isCloneToFlow) { - this.isCloneToFlow = isCloneToFlow; - } - /** - * 提交到工作流的变量编号 - **/ - public void setFlowFieldId(String flowFieldId) { - this.flowFieldId = flowFieldId; - } - /** - * 是否是业务主键 - **/ - public void setIsBizKey(String isBizKey) { - this.isBizKey = isBizKey; - } - /** - * 显示顺序 - **/ - public void setSeqNo(BigDecimal seqNo) { - this.seqNo = seqNo; - } - - /** - * 表单编号 - **/ - public String getFormId() { - return this.formId; - } - /** - * 主键 - **/ - public String getId() { - return this.id; - } - /** - * 字段编号对应数据库 - **/ - public String getFieldId() { - return this.fieldId; - } - /** - * 字段显示内容 - **/ - public String getFieldTitle() { - return this.fieldTitle; - } - /** - * 下拉时候关联的分组 - **/ - public String getSecondCodeRow() { - return this.secondCodeRow; - } - /** - * 字段类型 - **/ - public String getFieldType() { - return this.fieldType; - } - /** - * 字段长度 - **/ - public BigDecimal getFieldLength() { - return this.fieldLength; - } - /** - * 默认值 - **/ - public String getDefaultValue() { - return this.defaultValue; - } - /** - * 是否多选 - **/ - public String getIsMultiple() { - return this.isMultiple; - } - /** - * 输入框占位文本 - **/ - public String getPlaceholder() { - return this.placeholder; - } - /** - * 是否必输 - **/ - public String getIsRequired() { - return this.isRequired; - } - /** - * 是否关联基础数据 - **/ - public String getIsFromBaseData() { - return this.isFromBaseData; - } - /** - * 字段驼峰命名 - **/ - public String getFieldIdCamel() { - return this.fieldIdCamel; - } - /** - * 字段备注 - **/ - public String getRemark() { - return this.remark; - } - /** - * 扩展信息 - **/ - public String getExtFieldType() { - return this.extFieldType; - } - /** - * 是否提交到工作流 - **/ - public String getIsCloneToFlow() { - return this.isCloneToFlow; - } - /** - * 提交到工作流的变量编号 - **/ - public String getFlowFieldId() { - return this.flowFieldId; - } - /** - * 是否是业务主键 - **/ - public String getIsBizKey() { - return this.isBizKey; - } - /** - * 显示顺序 - **/ - public BigDecimal getSeqNo() { - return this.seqNo; - } } \ No newline at end of file diff --git a/mdp-form/src/main/resources/mybatis/mapper/mdp/form/dao/FormFieldMapper.xml b/mdp-form/src/main/resources/mybatis/mapper/mdp/form/dao/FormFieldMapper.xml index 6d4edb9..26e69e2 100644 --- a/mdp-form/src/main/resources/mybatis/mapper/mdp/form/dao/FormFieldMapper.xml +++ b/mdp-form/src/main/resources/mybatis/mapper/mdp/form/dao/FormFieldMapper.xml @@ -3,40 +3,38 @@ - - - - - - + + + + and (res.id) in + + ( #{item}) + + + + delete from FORM.form_field where form_id=#{formId} - + - + - select * from FORM.form_field res + select * from form_field res where res.id = #{id} - + - - insert into FORM.form_field( + + insert into form_field( ) values ( - #{formId},#{id},#{fieldId},#{fieldTitle},#{secondCodeRow},#{fieldType},#{fieldLength},#{defaultValue},#{isMultiple},#{placeholder},#{isRequired},#{isFromBaseData},#{fieldIdCamel},#{remark},#{extFieldType},#{isCloneToFlow},#{flowFieldId},#{isBizKey},#{seqNo} + #{formId},#{id},#{fieldId},#{fieldTitle},#{dictCode},#{fieldType},#{fieldLength},#{defaultValue},#{isMultiple},#{placeholder},#{isRequired},#{isDict},#{fieldIdCamel},#{remark},#{extFieldType},#{toFlow},#{flowFieldId},#{isBizKey},#{seqNo},#{groupName} ) - delete from FORM.form_field res + delete from form_field res @@ -81,13 +85,13 @@ - delete from FORM.form_field + delete from form_field where id = #{id} - update FORM.form_field + update form_field @@ -96,7 +100,7 @@ - update FORM.form_field + update form_field @@ -109,113 +113,128 @@ --> - - begin + - update FORM.form_field + update form_field set where id = #{item.id} - - ;end; + + + + + update form_field + + + + where (id) in + + ( #{item}) + + - delete from FORM.form_field - where id in - - #{item.id } - + delete from form_field + where + (id) in + + ( #{item.id} ) + - form_id,id,field_id,field_title,second_code_row,field_type,field_length,default_value,is_multiple,placeholder,is_required,is_from_base_data,field_id_camel,remark,ext_field_type,is_clone_to_flow,flow_field_id,is_biz_key,seq_no + form_id,id,field_id,field_title,dict_code,field_type,field_length,default_value,is_multiple,placeholder,is_required,is_dict,field_id_camel,remark,ext_field_type,to_flow,flow_field_id,is_biz_key,seq_no,group_name - + and res.form_id = #{formId} and res.id = #{id} and res.field_id = #{fieldId} and res.field_title = #{fieldTitle} - and res.second_code_row = #{secondCodeRow} + and res.dict_code = #{dictCode} and res.field_type = #{fieldType} and res.field_length = #{fieldLength} and res.default_value = #{defaultValue} and res.is_multiple = #{isMultiple} and res.placeholder = #{placeholder} and res.is_required = #{isRequired} - and res.is_from_base_data = #{isFromBaseData} + and res.is_dict = #{isDict} and res.field_id_camel = #{fieldIdCamel} and res.remark = #{remark} and res.ext_field_type = #{extFieldType} - and res.is_clone_to_flow = #{isCloneToFlow} + and res.to_flow = #{toFlow} and res.flow_field_id = #{flowFieldId} and res.is_biz_key = #{isBizKey} and res.seq_no = #{seqNo} + and res.group_name = #{groupName} form_id = #{formId}, field_id = #{fieldId}, field_title = #{fieldTitle}, - second_code_row = #{secondCodeRow}, + dict_code = #{dictCode}, field_type = #{fieldType}, field_length = #{fieldLength}, default_value = #{defaultValue}, is_multiple = #{isMultiple}, placeholder = #{placeholder}, is_required = #{isRequired}, - is_from_base_data = #{isFromBaseData}, + is_dict = #{isDict}, field_id_camel = #{fieldIdCamel}, remark = #{remark}, ext_field_type = #{extFieldType}, - is_clone_to_flow = #{isCloneToFlow}, + to_flow = #{toFlow}, flow_field_id = #{flowFieldId}, is_biz_key = #{isBizKey}, - seq_no = #{seqNo} + seq_no = #{seqNo}, + group_name = #{groupName} form_id = #{formId}, field_id = #{fieldId}, field_title = #{fieldTitle}, - second_code_row = #{secondCodeRow}, + dict_code = #{dictCode}, field_type = #{fieldType}, field_length = #{fieldLength}, default_value = #{defaultValue}, is_multiple = #{isMultiple}, placeholder = #{placeholder}, is_required = #{isRequired}, - is_from_base_data = #{isFromBaseData}, + is_dict = #{isDict}, field_id_camel = #{fieldIdCamel}, remark = #{remark}, ext_field_type = #{extFieldType}, - is_clone_to_flow = #{isCloneToFlow}, + to_flow = #{toFlow}, flow_field_id = #{flowFieldId}, is_biz_key = #{isBizKey}, seq_no = #{seqNo}, + group_name = #{groupName}, form_id = #{item.formId}, field_id = #{item.fieldId}, field_title = #{item.fieldTitle}, - second_code_row = #{item.secondCodeRow}, + dict_code = #{item.dictCode}, field_type = #{item.fieldType}, field_length = #{item.fieldLength}, default_value = #{item.defaultValue}, is_multiple = #{item.isMultiple}, placeholder = #{item.placeholder}, is_required = #{item.isRequired}, - is_from_base_data = #{item.isFromBaseData}, + is_dict = #{item.isDict}, field_id_camel = #{item.fieldIdCamel}, remark = #{item.remark}, ext_field_type = #{item.extFieldType}, - is_clone_to_flow = #{item.isCloneToFlow}, + to_flow = #{item.toFlow}, flow_field_id = #{item.flowFieldId}, is_biz_key = #{item.isBizKey}, - seq_no = #{item.seqNo} + seq_no = #{item.seqNo}, + group_name = #{item.groupName} \ No newline at end of file