|
|
|
@ -5,8 +5,10 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
|
import com.engine.organization.entity.DeleteParam;
|
|
|
|
|
import com.engine.organization.entity.SelectOptionParam;
|
|
|
|
|
import com.engine.organization.entity.extend.bo.ExtendGroupBO;
|
|
|
|
|
import com.engine.organization.entity.extend.bo.ExtendInfoBO;
|
|
|
|
|
import com.engine.organization.entity.extend.param.ExtendFieldSearchParam;
|
|
|
|
|
import com.engine.organization.entity.extend.param.ExtendInfoFieldParam;
|
|
|
|
|
import com.engine.organization.entity.extend.param.ExtendTitleSaveParam;
|
|
|
|
|
import com.engine.organization.entity.extend.po.ExtendGroupPO;
|
|
|
|
@ -24,10 +26,12 @@ import com.engine.organization.util.OrganizationAssert;
|
|
|
|
|
import com.engine.organization.util.db.MapperProxyFactory;
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
import weaver.general.Util;
|
|
|
|
|
import weaver.systeminfo.SystemEnv;
|
|
|
|
|
import weaver.workflow.field.BrowserComInfo;
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Author weaver_cl
|
|
|
|
@ -92,7 +96,8 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
// 主表、主表拓展表为extend_title主键;明细表为extend_group主键
|
|
|
|
|
Long extendGroupId = jsonObject.getLong("groupId");
|
|
|
|
|
|
|
|
|
|
JSONArray records = (JSONArray) jsonObject.get("records");
|
|
|
|
|
JSONArray records = jsonObject.getJSONArray("records");
|
|
|
|
|
int updateCount = 0;
|
|
|
|
|
for (int i = 0; i < records.size(); i++) {
|
|
|
|
|
// 存在ID则更新 ,不存在ID则增加
|
|
|
|
|
ExtendInfoFieldParam infoFieldParam = JSONObject.toJavaObject((JSONObject) records.get(i), ExtendInfoFieldParam.class);
|
|
|
|
@ -101,15 +106,24 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
|
|
|
|
|
if (null != extendInfo.getId()) {
|
|
|
|
|
// 更新 extend_title数据
|
|
|
|
|
getExtendInfoMapper().updateExtendInfo(extendInfo);
|
|
|
|
|
|
|
|
|
|
updateCount += getExtendInfoMapper().updateExtendInfo(extendInfo);
|
|
|
|
|
} else {
|
|
|
|
|
// 新增extend_title数据
|
|
|
|
|
|
|
|
|
|
// 获取操作表最大id,生成字段名
|
|
|
|
|
Long maxId = getExtendInfoMapper().getMaxId();
|
|
|
|
|
extendInfo.setFieldName("field" + (maxId + 1));
|
|
|
|
|
updateCount += getExtendInfoMapper().insertExtendInfo(extendInfo);
|
|
|
|
|
// 新增表结构
|
|
|
|
|
getExtendInfoMapper().addTableColumn(extendInfo.getTableName(), extendInfo.getFieldName(), extendInfo.getFieldType());
|
|
|
|
|
// 明细表且为浏览按钮字段,添加span字段
|
|
|
|
|
if (null != extendGroup.getPid() && 3 == extendInfo.getControlType()) {
|
|
|
|
|
String dbType = infoFieldParam.getDbType("2", "");
|
|
|
|
|
getExtendInfoMapper().addTableColumn(extendInfo.getTableName(), extendInfo.getFieldName() + "span", dbType);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
return updateCount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -122,7 +136,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
String data = param.getData();
|
|
|
|
|
JSONObject jsonObject = JSON.parseObject(data);
|
|
|
|
|
Set<Long> ids = new HashSet<>();
|
|
|
|
|
JSONArray records = (JSONArray) jsonObject.get("records");
|
|
|
|
|
JSONArray records = jsonObject.getJSONArray("records");
|
|
|
|
|
for (int i = 0; i < records.size(); i++) {
|
|
|
|
|
ExtendTitlePO extendTitle = new ExtendTitlePO();
|
|
|
|
|
JSONObject object = (JSONObject) records.get(i);
|
|
|
|
@ -160,13 +174,13 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
Map<String, Object> datas = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
List<ExtendTitlePO> titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType());
|
|
|
|
|
ExtendTitlePO extendTitlePO = titlesByGroupID.stream().max(Comparator.comparing(ExtendTitlePO::getShowOrder)).get();
|
|
|
|
|
ExtendTitlePO extendTitlePO = titlesByGroupID.stream().max(Comparator.comparing(ExtendTitlePO::getShowOrder)).orElse(ExtendTitlePO.builder().showOrder(1).build());
|
|
|
|
|
Set<Long> ids = titlesByGroupID.stream().map(ExtendTitlePO::getId).collect(Collectors.toSet());
|
|
|
|
|
ExtendTitlePO extendTitle = new ExtendTitlePO();
|
|
|
|
|
extendTitle.setGroupId(param.getGroupType());
|
|
|
|
|
extendTitle.setIsShow(param.getIsShow());
|
|
|
|
|
extendTitle.setTitle(param.getGroupName());
|
|
|
|
|
extendTitle.setShowOrder(null == extendTitlePO ? 0 : extendTitlePO.getShowOrder() + 1);
|
|
|
|
|
extendTitle.setShowOrder(extendTitlePO.getShowOrder() + 1);
|
|
|
|
|
extendTitle.setCreator((long) user.getUID());
|
|
|
|
|
extendTitle.setCreateTime(new Date());
|
|
|
|
|
extendTitle.setDeleteType(0);
|
|
|
|
@ -183,12 +197,12 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
if (fieldTypeTreeParam.getId() == null) {
|
|
|
|
|
List<ExtendGroupPO> extendGroupPOList = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listGroupByPid(fieldTypeTreeParam.getParentId());
|
|
|
|
|
ExtendGroupPO extendGroup = extendGroupPOList.stream().max(Comparator.comparing(ExtendGroupPO::getShowOrder)).get();
|
|
|
|
|
ExtendGroupPO extendGroupPO = buildExtendGroupType(moduleTypeEnum, fieldTypeTreeParam,extendGroup.getShowOrder());
|
|
|
|
|
ExtendGroupPO extendGroupPO = buildExtendGroupType(moduleTypeEnum, fieldTypeTreeParam, extendGroup.getShowOrder());
|
|
|
|
|
MapperProxyFactory.getProxy(ExtendGroupMapper.class).insertIgnoreNull(extendGroupPO);
|
|
|
|
|
//默认新增title
|
|
|
|
|
List<ExtendTitlePO> titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(extendGroup.getId());
|
|
|
|
|
ExtendTitlePO extendTitle = titlesByGroupID.stream().max(Comparator.comparing(ExtendTitlePO::getShowOrder)).get();
|
|
|
|
|
ExtendTitlePO extendTitlePO = buildExtendTitleType(extendGroupPO,extendTitle.getShowOrder());
|
|
|
|
|
ExtendTitlePO extendTitlePO = buildExtendTitleType(extendGroupPO, extendTitle.getShowOrder());
|
|
|
|
|
MapperProxyFactory.getProxy(ExtendTitleMapper.class).insertIgnoreNull(extendTitlePO);
|
|
|
|
|
} else {
|
|
|
|
|
MapperProxyFactory.getProxy(ExtendGroupMapper.class).update(fieldTypeTreeParam.getId(), fieldTypeTreeParam.getName());
|
|
|
|
@ -202,9 +216,210 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> getFieldDefinedInfo(ExtendTitleSaveParam param) {
|
|
|
|
|
public Map<String, Object> getFieldDefinedInfo(ExtendFieldSearchParam param) {
|
|
|
|
|
Map<String, Object> returnMap = new HashMap<>();
|
|
|
|
|
List<Map<String, Object>> lsFieldInfo = new ArrayList<>();
|
|
|
|
|
Map<String, Object> fieldInfo;
|
|
|
|
|
Map<String, Object> recordInfo;
|
|
|
|
|
Map<String, Object> propsInfo;
|
|
|
|
|
Map<String, Object> comInfo;
|
|
|
|
|
List<Object> fieldTypeInfo;
|
|
|
|
|
List<Object> lsComDetialInfo;
|
|
|
|
|
Map<String, Object> comDetialInfo;
|
|
|
|
|
List<ExtendInfoPO> infoPOList = getExtendInfoMapper().listFields("", param.getGroupId(), "", "");
|
|
|
|
|
for (ExtendInfoPO extendInfoPO : infoPOList) {
|
|
|
|
|
Long fieldId = extendInfoPO.getId();
|
|
|
|
|
String fieldName = extendInfoPO.getFieldName();
|
|
|
|
|
String fieldLabel = extendInfoPO.getFieldNameDesc();
|
|
|
|
|
String fieldHtmlType = extendInfoPO.getControlType().toString();
|
|
|
|
|
String browserType = extendInfoPO.getBrowserType();
|
|
|
|
|
String customValue = extendInfoPO.getCustomValue();
|
|
|
|
|
String fieldStrLength = SelectOptionParam.getTextLength(customValue);
|
|
|
|
|
//自定义字段排序 标识rowKey
|
|
|
|
|
String fieldIdRowKey;
|
|
|
|
|
int showOrder = extendInfoPO.getShowOrder();
|
|
|
|
|
boolean isUsed = false;
|
|
|
|
|
// TODO 去除脏数据后调整为extendInfoPO.getId() > 0
|
|
|
|
|
// 系统字段id<0
|
|
|
|
|
boolean isSysField = extendInfoPO.getExtendGroupId() < 0;
|
|
|
|
|
if (isSysField) {
|
|
|
|
|
fieldIdRowKey = fieldId + "_hrm";
|
|
|
|
|
} else {
|
|
|
|
|
fieldIdRowKey = fieldId + "_cus";
|
|
|
|
|
}
|
|
|
|
|
if (!isSysField) {
|
|
|
|
|
isUsed = ExtendInfoBO.fieldIsUsed(extendInfoPO.getTableName(), extendInfoPO.getFieldName());
|
|
|
|
|
}
|
|
|
|
|
// TODO 去除脏数据后调整为extendInfoPO.getId() > 0
|
|
|
|
|
boolean allowHide = extendInfoPO.getExtendGroupId() > 0;
|
|
|
|
|
boolean allowModify = extendInfoPO.getExtendGroupId() > 0;
|
|
|
|
|
|
|
|
|
|
BrowserComInfo BrowserComInfo = new BrowserComInfo();
|
|
|
|
|
List<Object> fieldTypeObj = new ArrayList<>();
|
|
|
|
|
String fieldType = "";
|
|
|
|
|
switch (fieldHtmlType) {
|
|
|
|
|
case "1":
|
|
|
|
|
fieldTypeObj.add("input");
|
|
|
|
|
fieldType = SystemEnv.getHtmlLabelName(688, user.getLanguage());
|
|
|
|
|
switch (browserType) {
|
|
|
|
|
case "1":
|
|
|
|
|
fieldTypeObj.add("text");
|
|
|
|
|
fieldType += " " + SystemEnv.getHtmlLabelName(608, user.getLanguage());
|
|
|
|
|
fieldType += " " + SystemEnv.getHtmlLabelName(608, user.getLanguage()) + ":" + fieldStrLength;
|
|
|
|
|
fieldTypeObj.add(fieldStrLength);
|
|
|
|
|
break;
|
|
|
|
|
case "2":
|
|
|
|
|
fieldTypeObj.add("int");
|
|
|
|
|
fieldType += " " + SystemEnv.getHtmlLabelName(696, user.getLanguage());
|
|
|
|
|
break;
|
|
|
|
|
case "3":
|
|
|
|
|
fieldTypeObj.add("float");
|
|
|
|
|
fieldType += " " + SystemEnv.getHtmlLabelName(697, user.getLanguage());
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "2":
|
|
|
|
|
fieldTypeObj.add("textarea");
|
|
|
|
|
fieldType = SystemEnv.getHtmlLabelName(689, user.getLanguage());
|
|
|
|
|
break;
|
|
|
|
|
case "3": {
|
|
|
|
|
fieldTypeObj.add("browser");
|
|
|
|
|
List<Object> replaceDatas = new ArrayList<>();
|
|
|
|
|
Map<String, Object> tmp = new HashMap<>();
|
|
|
|
|
tmp.put("value", browserType);
|
|
|
|
|
tmp.put("valueSpan", SystemEnv.getHtmlLabelName(Util.getIntValue(BrowserComInfo.getBrowserlabelid(browserType), 0), user.getLanguage()));
|
|
|
|
|
Map<String, Object> tmp1 = new HashMap<>();
|
|
|
|
|
tmp1.put("id", browserType);
|
|
|
|
|
tmp1.put("name", SystemEnv.getHtmlLabelName(Util.getIntValue(BrowserComInfo.getBrowserlabelid(browserType), 0), user.getLanguage()));
|
|
|
|
|
replaceDatas.add(tmp1);
|
|
|
|
|
tmp.put("replaceDatas", replaceDatas);
|
|
|
|
|
fieldTypeObj.add(tmp);
|
|
|
|
|
fieldType = SystemEnv.getHtmlLabelName(695, user.getLanguage());
|
|
|
|
|
fieldType += " " + SystemEnv.getHtmlLabelName(Util.getIntValue(BrowserComInfo.getBrowserlabelid(browserType), 0), user.getLanguage());
|
|
|
|
|
if (browserType.equals("161") || browserType.equals("162") || browserType.equals("256") || browserType.equals("257")) {
|
|
|
|
|
tmp = new HashMap<>();
|
|
|
|
|
tmp.put("value", SelectOptionParam.getCustomBrowserId(customValue));
|
|
|
|
|
tmp.put("valueSpan", SelectOptionParam.getCustomBrowserValueSpan(customValue));
|
|
|
|
|
fieldTypeObj.add(tmp);
|
|
|
|
|
fieldType += " " + SelectOptionParam.getCustomBrowserValueSpan(customValue);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "4":
|
|
|
|
|
fieldTypeObj.add("check");
|
|
|
|
|
fieldType = SystemEnv.getHtmlLabelName(691, user.getLanguage());
|
|
|
|
|
break;
|
|
|
|
|
case "5": {
|
|
|
|
|
fieldTypeObj.add("select");
|
|
|
|
|
fieldTypeObj.add("select");
|
|
|
|
|
Map<String, Object> tmp = new HashMap<>();
|
|
|
|
|
tmp.put("datas", SelectOptionParam.getSelectFields(customValue));
|
|
|
|
|
tmp.put("sort", "horizontal");
|
|
|
|
|
fieldTypeObj.add(tmp);
|
|
|
|
|
fieldType = SystemEnv.getHtmlLabelName(690, user.getLanguage());
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "6":
|
|
|
|
|
fieldTypeObj.add("upload");
|
|
|
|
|
fieldTypeObj.add("file");
|
|
|
|
|
fieldType = SystemEnv.getHtmlLabelName(17616, user.getLanguage());
|
|
|
|
|
fieldType += " " + SystemEnv.getHtmlLabelName(20798, user.getLanguage());
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fieldInfo = new HashMap<>();
|
|
|
|
|
recordInfo = new HashMap<>();
|
|
|
|
|
recordInfo.put("id", "" + fieldId);
|
|
|
|
|
recordInfo.put("fieldlabel", fieldLabel);
|
|
|
|
|
recordInfo.put("fieldname", fieldName);
|
|
|
|
|
recordInfo.put("fieldType", fieldType);
|
|
|
|
|
recordInfo.put("fieldTypeObj", fieldTypeObj);
|
|
|
|
|
recordInfo.put("enable", extendInfoPO.getIsenable() + "");
|
|
|
|
|
recordInfo.put("required", extendInfoPO.getIsrequired() + "");
|
|
|
|
|
recordInfo.put("isModify", extendInfoPO.getEditShow() + "");
|
|
|
|
|
recordInfo.put("viewAttr", isUsed || isSysField ? 1 : 2);
|
|
|
|
|
recordInfo.put("key", "" + showOrder);
|
|
|
|
|
recordInfo.put("fieldidrowKey", fieldIdRowKey);
|
|
|
|
|
|
|
|
|
|
fieldInfo.put("record", recordInfo);
|
|
|
|
|
|
|
|
|
|
propsInfo = new HashMap<>();
|
|
|
|
|
Map<String, Object> checkPropsInfo = new HashMap<>();
|
|
|
|
|
Map<String, Object> checkPropsEnableInfo = new HashMap<>();
|
|
|
|
|
Map<String, Object> checkPropsRequiredInfo = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
//允许个人修改字段check框属性
|
|
|
|
|
Map<String, Object> checkPropsModifyInfo = new HashMap<>();
|
|
|
|
|
checkPropsEnableInfo.put("viewAttr", allowHide ? 2 : 1);
|
|
|
|
|
checkPropsModifyInfo.put("viewAttr", allowModify ? 2 : 1);
|
|
|
|
|
checkPropsRequiredInfo.put("viewAttr", allowHide ? 2 : 1);
|
|
|
|
|
|
|
|
|
|
checkPropsInfo.put("enable", checkPropsEnableInfo);
|
|
|
|
|
checkPropsInfo.put("required", checkPropsRequiredInfo);
|
|
|
|
|
checkPropsInfo.put("isModify", checkPropsModifyInfo);
|
|
|
|
|
propsInfo.put("checkProps", checkPropsInfo);
|
|
|
|
|
fieldInfo.put("props", propsInfo);
|
|
|
|
|
|
|
|
|
|
comInfo = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
lsComDetialInfo = new ArrayList<>();
|
|
|
|
|
comDetialInfo = new HashMap<>();
|
|
|
|
|
comDetialInfo.put("label", "");
|
|
|
|
|
if (isSysField) {
|
|
|
|
|
comDetialInfo.put("type", "TEXT");
|
|
|
|
|
} else {
|
|
|
|
|
comDetialInfo.put("type", "INPUT");
|
|
|
|
|
}
|
|
|
|
|
comDetialInfo.put("width", "15%");
|
|
|
|
|
comDetialInfo.put("key", "fieldlabel");
|
|
|
|
|
comDetialInfo.put("viewAttr", "3");
|
|
|
|
|
lsComDetialInfo.add(comDetialInfo);
|
|
|
|
|
comInfo.put("fieldlabel", lsComDetialInfo);
|
|
|
|
|
|
|
|
|
|
lsComDetialInfo = new ArrayList<>();
|
|
|
|
|
comDetialInfo = new HashMap<>();
|
|
|
|
|
comDetialInfo.put("label", "");
|
|
|
|
|
comDetialInfo.put("type", "TEXT");
|
|
|
|
|
comDetialInfo.put("width", "15%");
|
|
|
|
|
comDetialInfo.put("key", "fieldname");
|
|
|
|
|
comDetialInfo.put("viewAttr", "3");
|
|
|
|
|
lsComDetialInfo.add(comDetialInfo);
|
|
|
|
|
comInfo.put("fieldname", lsComDetialInfo);
|
|
|
|
|
|
|
|
|
|
lsComDetialInfo = new ArrayList<>();
|
|
|
|
|
comDetialInfo = new HashMap<>();
|
|
|
|
|
comDetialInfo.put("label", "");
|
|
|
|
|
comDetialInfo.put("type", fieldHtmlType.equals("5") ? "CUSTOMFIELD" : "TEXT");
|
|
|
|
|
comDetialInfo.put("width", "60%");
|
|
|
|
|
comDetialInfo.put("key", "fieldType");
|
|
|
|
|
lsComDetialInfo.add(comDetialInfo);
|
|
|
|
|
comInfo.put("fieldType", lsComDetialInfo);
|
|
|
|
|
|
|
|
|
|
fieldInfo.put("com", comInfo);
|
|
|
|
|
fieldInfo.put("isSysField", isSysField);
|
|
|
|
|
|
|
|
|
|
fieldTypeInfo = new ArrayList<>();
|
|
|
|
|
fieldTypeInfo.add("select");
|
|
|
|
|
fieldTypeInfo.add("select");
|
|
|
|
|
Map<String, Object> fieldTypeParamInfo = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
if (fieldHtmlType.equals("5")) {
|
|
|
|
|
|
|
|
|
|
fieldTypeParamInfo.put("datas", SelectOptionParam.getSelectFields(customValue));
|
|
|
|
|
fieldTypeParamInfo.put("sort", "horizontal");
|
|
|
|
|
fieldTypeInfo.add(fieldTypeParamInfo);
|
|
|
|
|
fieldInfo.put("fieldType", fieldTypeInfo);
|
|
|
|
|
}
|
|
|
|
|
lsFieldInfo.add(fieldInfo);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
returnMap.put("data", lsFieldInfo);
|
|
|
|
|
returnMap.put("encryptEnable", false);
|
|
|
|
|
// TODO 后续去除
|
|
|
|
|
returnMap.put("status", "1");
|
|
|
|
|
return returnMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -217,12 +432,12 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
List<Long> collect = MapperProxyFactory.getProxy(ExtendGroupMapper.class)
|
|
|
|
|
.listGroupByPid(fieldTypeTreeParam.getParentId()).stream().map(ExtendGroupPO::getId).collect(Collectors.toList());
|
|
|
|
|
Integer extendType = moduleTypeEnum.getValue();
|
|
|
|
|
List<ExtendGroupPO> extendGroupPOS = JSONArray.parseArray(fieldTypeTreeParam.getData(),ExtendGroupPO.class);
|
|
|
|
|
List<ExtendGroupPO> extendGroupPOS = JSONArray.parseArray(fieldTypeTreeParam.getData(), ExtendGroupPO.class);
|
|
|
|
|
|
|
|
|
|
List<Long> collect1 = extendGroupPOS.stream().map(ExtendGroupPO::getId).collect(Collectors.toList());
|
|
|
|
|
Set<Long> removeSet = new HashSet<>();
|
|
|
|
|
collect1.forEach(e->{
|
|
|
|
|
if(!collect.contains(e)){
|
|
|
|
|
collect1.forEach(e -> {
|
|
|
|
|
if (!collect.contains(e)) {
|
|
|
|
|
removeSet.add(e);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -233,25 +448,23 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
e.setExtendType(extendType);
|
|
|
|
|
e.setPid(fieldTypeTreeParam.getParentId());
|
|
|
|
|
e.setIsShow(fieldTypeTreeParam.getIsShow());
|
|
|
|
|
e.setShowOrder(showOrder+1);
|
|
|
|
|
e.setCreator((long)user.getUID());
|
|
|
|
|
e.setShowOrder(showOrder + 1);
|
|
|
|
|
e.setCreator((long) user.getUID());
|
|
|
|
|
e.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
|
|
|
|
|
e.setCreateTime(new Date());
|
|
|
|
|
e.setUpdateTime(new Date());
|
|
|
|
|
|
|
|
|
|
if (e.getId() == null){//新增
|
|
|
|
|
if (e.getId() == null) {//新增
|
|
|
|
|
MapperProxyFactory.getProxy(ExtendGroupMapper.class).insertIgnoreNull(e);
|
|
|
|
|
}else { //更新
|
|
|
|
|
MapperProxyFactory.getProxy(ExtendGroupMapper.class).updateNameAndOrder(e.getId(),e.getGroupName(),e.getShowOrder());
|
|
|
|
|
} else { //更新
|
|
|
|
|
MapperProxyFactory.getProxy(ExtendGroupMapper.class).updateNameAndOrder(e.getId(), e.getGroupName(), e.getShowOrder());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private ExtendTitlePO buildExtendTitleType(ExtendGroupPO extendGroupPO,Integer max) {
|
|
|
|
|
private ExtendTitlePO buildExtendTitleType(ExtendGroupPO extendGroupPO, Integer max) {
|
|
|
|
|
return ExtendTitlePO.builder()
|
|
|
|
|
.groupId(extendGroupPO.getId())
|
|
|
|
|
.title(extendGroupPO.getGroupName())
|
|
|
|
@ -264,7 +477,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ExtendGroupPO buildExtendGroupType(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam,Integer max) {
|
|
|
|
|
private ExtendGroupPO buildExtendGroupType(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam, Integer max) {
|
|
|
|
|
return ExtendGroupPO.builder()
|
|
|
|
|
.extendType(moduleTypeEnum.getValue())
|
|
|
|
|
.groupName(fieldTypeTreeParam.getName())
|
|
|
|
|