|
|
|
@ -10,6 +10,7 @@ import com.engine.organization.entity.extend.po.ExtendGroupPO;
|
|
|
|
|
import com.engine.organization.entity.extend.po.ExtendTitlePO;
|
|
|
|
|
import com.engine.organization.entity.fieldset.param.FieldTypeTreeParam;
|
|
|
|
|
import com.engine.organization.entity.fieldset.vo.TypeTreeVO;
|
|
|
|
|
import com.engine.organization.enums.DeleteTypeEnum;
|
|
|
|
|
import com.engine.organization.enums.ModuleTypeEnum;
|
|
|
|
|
import com.engine.organization.mapper.extend.ExtendGroupMapper;
|
|
|
|
|
import com.engine.organization.mapper.extend.ExtendInfoMapper;
|
|
|
|
@ -147,11 +148,27 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
return datas;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void addTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
|
|
|
|
|
buildExtentGroup(moduleTypeEnum,fieldTypeTreeParam);
|
|
|
|
|
public void changeTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
|
|
|
|
|
if (fieldTypeTreeParam.getId() == null) {
|
|
|
|
|
ExtendGroupPO extendGroupPO = buildExtentGroupType(moduleTypeEnum, fieldTypeTreeParam);
|
|
|
|
|
MapperProxyFactory.getProxy(ExtendGroupMapper.class).insertIgnoreNull(extendGroupPO);
|
|
|
|
|
}else {
|
|
|
|
|
MapperProxyFactory.getProxy(ExtendGroupMapper.class).update(fieldTypeTreeParam.getId(),fieldTypeTreeParam.getName());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void buildExtentGroup(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
|
|
|
|
|
|
|
|
|
|
private ExtendGroupPO buildExtentGroupType(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
|
|
|
|
|
return ExtendGroupPO.builder()
|
|
|
|
|
.extendType(moduleTypeEnum.getValue())
|
|
|
|
|
.groupName(fieldTypeTreeParam.getName())
|
|
|
|
|
.creator((long) user.getUID())
|
|
|
|
|
.deleteType(DeleteTypeEnum.NOT_DELETED.getValue())
|
|
|
|
|
.createTime(new Date())
|
|
|
|
|
.updateTime(new Date())
|
|
|
|
|
.pid(fieldTypeTreeParam.getParentid())
|
|
|
|
|
.isShow(fieldTypeTreeParam.getIsShow() == null ? "1" : fieldTypeTreeParam.getIsShow()).build();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|