分组删除 新增自定义字段
parent
a3c4fd5c21
commit
7c02e9bc61
@ -0,0 +1,92 @@
|
||||
package com.engine.organization.entity.extend.param;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import weaver.general.Util;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/06/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ExtendInfoFieldParam {
|
||||
private String id;
|
||||
// field_name
|
||||
private String fieldname;
|
||||
// field_name_desc
|
||||
private String fieldlabel;
|
||||
|
||||
private Object fieldType;
|
||||
|
||||
private ExtendInfoTypeParam infoTypeParam;
|
||||
|
||||
private String enable;
|
||||
|
||||
private String required;
|
||||
|
||||
private String isModify;
|
||||
|
||||
private String key;
|
||||
|
||||
public String getControlType() {
|
||||
JSONArray fieldType = (JSONArray) this.getFieldType();
|
||||
ExtendInfoTypeParam infoTypeParam = new ExtendInfoTypeParam();
|
||||
String fieldHtmlType = Util.null2String(fieldType.get(0));
|
||||
if (fieldHtmlType.equals("input")) {
|
||||
fieldHtmlType = "1";
|
||||
} else if (fieldHtmlType.equals("textarea")) {
|
||||
fieldHtmlType = "2";
|
||||
} else if (fieldHtmlType.equals("browser")) {
|
||||
fieldHtmlType = "3";
|
||||
} else if (fieldHtmlType.equals("check")) {
|
||||
fieldHtmlType = "4";
|
||||
} else if (fieldHtmlType.equals("select")) {
|
||||
fieldHtmlType = "5";
|
||||
} else if (fieldHtmlType.equals("upload")) {
|
||||
fieldHtmlType = "6";
|
||||
}
|
||||
return fieldHtmlType;
|
||||
}
|
||||
|
||||
public String getBrowserType(String controlType) {
|
||||
String browserType = "1";
|
||||
JSONArray fieldType = (JSONArray) this.getFieldType();
|
||||
if (fieldType.size() > 1) {
|
||||
browserType = Util.null2String(fieldType.get(1));
|
||||
}
|
||||
if (controlType.equals("1")) {
|
||||
if (browserType.equals("text")) {
|
||||
browserType = "1";
|
||||
} else if (browserType.equals("int")) {
|
||||
browserType = "2";
|
||||
} else if (browserType.equals("float")) {
|
||||
browserType = "3";
|
||||
} else if (browserType.equals("file")) {
|
||||
browserType = "1";
|
||||
}
|
||||
}
|
||||
if (controlType.equals("2")) {
|
||||
browserType = "1";
|
||||
} else if (controlType.equals("3")) {
|
||||
browserType = Util.null2String(((JSONObject) fieldType.get(1)).get("value"));
|
||||
} else if (controlType.equals("4")) {
|
||||
browserType = "1";
|
||||
} else if (controlType.equals("5")) {
|
||||
browserType = "1";
|
||||
} else if (controlType.equals("6")) {
|
||||
if (browserType.equals("file")) {
|
||||
browserType = "1";
|
||||
}
|
||||
}
|
||||
return browserType;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.engine.organization.entity.extend.param;
|
||||
|
||||
import com.engine.hrm.entity.FieldSelectOptionBean;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/06/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ExtendInfoTypeParam {
|
||||
private String fieldHtmlType;
|
||||
private String fieldType;
|
||||
private Object otherParam;
|
||||
private List<FieldSelectOptionBean> lsSelectOption;
|
||||
}
|
Loading…
Reference in New Issue