|
|
|
@ -59,7 +59,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
@Override
|
|
|
|
|
public List<TypeTreeVO> getTree(ModuleTypeEnum moduleTypeEnum) {
|
|
|
|
|
Integer extendType = moduleTypeEnum.getValue();
|
|
|
|
|
List<ExtendGroupPO> extendGroupPOS = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listByType(extendType);
|
|
|
|
|
List<ExtendGroupPO> extendGroupPOS = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listByType(extendType,null);
|
|
|
|
|
return ExtendGroupBO.buildTypeTree(extendGroupPOS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -69,7 +69,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
Map<String, Object> datas = new HashMap<>();
|
|
|
|
|
Long groupId = Long.parseLong(groupType);
|
|
|
|
|
String tableName = ExtendGroupBO.getTableNameByGroupPO(getExtendGroupMapper().getGroupById(groupId));
|
|
|
|
|
List<ExtendTitlePO> extendTitleList = getExtendTitleMapper().getTitlesByGroupID(groupId);
|
|
|
|
|
List<ExtendTitlePO> extendTitleList = getExtendTitleMapper().getTitlesByGroupID(groupId,null);
|
|
|
|
|
List<Map<String, Object>> tabs = new ArrayList<>();
|
|
|
|
|
int idx = 1;
|
|
|
|
|
for (ExtendTitlePO extendTitle : extendTitleList) {
|
|
|
|
@ -135,7 +135,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
Map<String, Object> datas = new HashMap<>();
|
|
|
|
|
Long groupType = param.getGroupType();
|
|
|
|
|
Set<Long> lsDelGroupId = new HashSet<>();
|
|
|
|
|
List<ExtendTitlePO> extendTitleList = getExtendTitleMapper().getTitlesByGroupID(groupType);
|
|
|
|
|
List<ExtendTitlePO> extendTitleList = getExtendTitleMapper().getTitlesByGroupID(groupType,null);
|
|
|
|
|
extendTitleList.forEach(item -> lsDelGroupId.add(item.getId()));
|
|
|
|
|
String data = param.getData();
|
|
|
|
|
JSONObject jsonObject = JSON.parseObject(data);
|
|
|
|
@ -178,7 +178,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
public Map<String, Object> saveTitle(ExtendTitleSaveParam param) {
|
|
|
|
|
Map<String, Object> datas = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
List<ExtendTitlePO> titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType());
|
|
|
|
|
List<ExtendTitlePO> titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType(),null);
|
|
|
|
|
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();
|
|
|
|
@ -201,7 +201,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
@Override
|
|
|
|
|
public void changeTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
|
|
|
|
|
if (fieldTypeTreeParam.getId() == null) {
|
|
|
|
|
List<ExtendGroupPO> extendGroupPOList = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listByType(moduleTypeEnum.getValue());
|
|
|
|
|
List<ExtendGroupPO> extendGroupPOList = MapperProxyFactory.getProxy(ExtendGroupMapper.class).listByType(moduleTypeEnum.getValue(),null);
|
|
|
|
|
ExtendGroupPO extendGroup = extendGroupPOList.stream().max(Comparator.comparing(ExtendGroupPO::getShowOrder)).get();
|
|
|
|
|
ExtendGroupPO extendGroupPO = buildExtendGroupType(moduleTypeEnum, fieldTypeTreeParam, extendGroup.getShowOrder());
|
|
|
|
|
MapperProxyFactory.getProxy(ExtendGroupMapper.class).insertIgnoreNull(extendGroupPO);
|
|
|
|
@ -217,7 +217,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
@Override
|
|
|
|
|
public int deleteTitle(ExtendTitleSaveParam param) {
|
|
|
|
|
getExtendTitleMapper().deleteExtendTitleByIds(DeleteParam.builder().ids(param.getId().toString()).build().getIds());
|
|
|
|
|
List<ExtendTitlePO> titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType());
|
|
|
|
|
List<ExtendTitlePO> titlesByGroupID = getExtendTitleMapper().getTitlesByGroupID(param.getGroupType(),null);
|
|
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(titlesByGroupID)) {
|
|
|
|
|
// 删除整个分组
|
|
|
|
@ -469,7 +469,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
|
@Override
|
|
|
|
|
public void saveTree(ModuleTypeEnum moduleTypeEnum, FieldTypeTreeParam fieldTypeTreeParam) {
|
|
|
|
|
Set<Long> collect = MapperProxyFactory.getProxy(ExtendGroupMapper.class)
|
|
|
|
|
.listGroupByPid(fieldTypeTreeParam.getParentId()).stream().map(ExtendGroupPO::getId).collect(Collectors.toSet());
|
|
|
|
|
.listGroupByPid(fieldTypeTreeParam.getParentId(),null).stream().map(ExtendGroupPO::getId).collect(Collectors.toSet());
|
|
|
|
|
Integer extendType = moduleTypeEnum.getValue();
|
|
|
|
|
List<ExtendGroupPO> extendGroupPOS = JSONArray.parseArray(fieldTypeTreeParam.getData(), ExtendGroupPO.class);
|
|
|
|
|
|
|
|
|
|