|
|
@ -3,6 +3,7 @@ package com.engine.organization.service.impl;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
import com.engine.organization.entity.DeleteParam;
|
|
|
|
import com.engine.organization.entity.DeleteParam;
|
|
|
|
import com.engine.organization.entity.SelectOptionParam;
|
|
|
|
import com.engine.organization.entity.SelectOptionParam;
|
|
|
@ -17,11 +18,13 @@ import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
|
|
|
import com.engine.organization.entity.extend.po.ExtendTitlePO;
|
|
|
|
import com.engine.organization.entity.extend.po.ExtendTitlePO;
|
|
|
|
import com.engine.organization.entity.fieldset.param.FieldTypeTreeParam;
|
|
|
|
import com.engine.organization.entity.fieldset.param.FieldTypeTreeParam;
|
|
|
|
import com.engine.organization.entity.fieldset.vo.TypeTreeVO;
|
|
|
|
import com.engine.organization.entity.fieldset.vo.TypeTreeVO;
|
|
|
|
|
|
|
|
import com.engine.organization.entity.personnelcard.po.CardAccessPO;
|
|
|
|
import com.engine.organization.enums.DeleteTypeEnum;
|
|
|
|
import com.engine.organization.enums.DeleteTypeEnum;
|
|
|
|
import com.engine.organization.enums.ModuleTypeEnum;
|
|
|
|
import com.engine.organization.enums.ModuleTypeEnum;
|
|
|
|
import com.engine.organization.mapper.extend.ExtendGroupMapper;
|
|
|
|
import com.engine.organization.mapper.extend.ExtendGroupMapper;
|
|
|
|
import com.engine.organization.mapper.extend.ExtendInfoMapper;
|
|
|
|
import com.engine.organization.mapper.extend.ExtendInfoMapper;
|
|
|
|
import com.engine.organization.mapper.extend.ExtendTitleMapper;
|
|
|
|
import com.engine.organization.mapper.extend.ExtendTitleMapper;
|
|
|
|
|
|
|
|
import com.engine.organization.service.CardAccessService;
|
|
|
|
import com.engine.organization.service.FieldDefinedService;
|
|
|
|
import com.engine.organization.service.FieldDefinedService;
|
|
|
|
import com.engine.organization.util.HasRightUtil;
|
|
|
|
import com.engine.organization.util.HasRightUtil;
|
|
|
|
import com.engine.organization.util.OrganizationAssert;
|
|
|
|
import com.engine.organization.util.OrganizationAssert;
|
|
|
@ -29,6 +32,7 @@ import com.engine.organization.util.db.MapperProxyFactory;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import weaver.general.Util;
|
|
|
|
import weaver.general.Util;
|
|
|
|
|
|
|
|
import weaver.hrm.User;
|
|
|
|
import weaver.systeminfo.SystemEnv;
|
|
|
|
import weaver.systeminfo.SystemEnv;
|
|
|
|
import weaver.workflow.field.BrowserComInfo;
|
|
|
|
import weaver.workflow.field.BrowserComInfo;
|
|
|
|
|
|
|
|
|
|
|
@ -56,6 +60,11 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
return MapperProxyFactory.getProxy(ExtendInfoMapper.class);
|
|
|
|
return MapperProxyFactory.getProxy(ExtendInfoMapper.class);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private CardAccessService getCardAccessService(User user) {
|
|
|
|
|
|
|
|
return ServiceUtil.getService(CardAccessServiceImpl.class,user);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<TypeTreeVO> getTree(ModuleTypeEnum moduleTypeEnum) {
|
|
|
|
public List<TypeTreeVO> getTree(ModuleTypeEnum moduleTypeEnum) {
|
|
|
|
Integer extendType = moduleTypeEnum.getValue();
|
|
|
|
Integer extendType = moduleTypeEnum.getValue();
|
|
|
@ -208,8 +217,22 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
//默认新增title
|
|
|
|
//默认新增title
|
|
|
|
ExtendTitlePO extendTitlePO = buildExtendTitleType(extendGroupPO, 1);
|
|
|
|
ExtendTitlePO extendTitlePO = buildExtendTitleType(extendGroupPO, 1);
|
|
|
|
MapperProxyFactory.getProxy(ExtendTitleMapper.class).insertIgnoreNull(extendTitlePO);
|
|
|
|
MapperProxyFactory.getProxy(ExtendTitleMapper.class).insertIgnoreNull(extendTitlePO);
|
|
|
|
|
|
|
|
CardAccessPO cardAccessPO = CardAccessPO.builder()
|
|
|
|
|
|
|
|
.typeId(extendGroupPO.getId().intValue())
|
|
|
|
|
|
|
|
.typeName(fieldTypeTreeParam.getName())
|
|
|
|
|
|
|
|
.status(1)
|
|
|
|
|
|
|
|
.allPeople(0)
|
|
|
|
|
|
|
|
.superior(0)
|
|
|
|
|
|
|
|
.allSuperior(0)
|
|
|
|
|
|
|
|
.creator((long)user.getUID())
|
|
|
|
|
|
|
|
.deleteType(0)
|
|
|
|
|
|
|
|
.createTime(new Date())
|
|
|
|
|
|
|
|
.updateTime(new Date())
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
getCardAccessService(user).addData(cardAccessPO);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
MapperProxyFactory.getProxy(ExtendGroupMapper.class).update(fieldTypeTreeParam.getId(), fieldTypeTreeParam.getName());
|
|
|
|
MapperProxyFactory.getProxy(ExtendGroupMapper.class).update(fieldTypeTreeParam.getId(), fieldTypeTreeParam.getName());
|
|
|
|
|
|
|
|
getCardAccessService(user).updateTabName(fieldTypeTreeParam.getName(),fieldTypeTreeParam.getId().intValue());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -222,6 +245,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
|
|
|
|
if (CollectionUtils.isEmpty(titlesByGroupID)) {
|
|
|
|
if (CollectionUtils.isEmpty(titlesByGroupID)) {
|
|
|
|
// 删除整个分组
|
|
|
|
// 删除整个分组
|
|
|
|
getExtendGroupMapper().delete(param.getGroupType());
|
|
|
|
getExtendGroupMapper().delete(param.getGroupType());
|
|
|
|
|
|
|
|
getCardAccessService(user).deleteByIds(DeleteParam.builder().ids(param.getGroupType().toString()).build().getIds());
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|