feat: (REQ-3057) 方法入参个数/管理员岗位nacos优化
This commit is contained in:
parent
131987aeb9
commit
e970fd92e2
@ -68,6 +68,9 @@ public class ChatGroupCreateReq implements Serializable {
|
||||
|
||||
private Long ouId;
|
||||
|
||||
/**
|
||||
* 人群类型
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public enum CrowTypeEnum {
|
||||
|
||||
@ -11,12 +11,23 @@ import lombok.NoArgsConstructor;
|
||||
@NoArgsConstructor
|
||||
public class ChatGroupGenericSearchReq {
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
private Long workspaceId;
|
||||
|
||||
/**
|
||||
* 单位Id
|
||||
*/
|
||||
private Long ouId;
|
||||
|
||||
/**
|
||||
* 班组Id
|
||||
*/
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* {@link cn.axzo.im.center.api.vo.req.chatgroup.ChatGroupCreateReq.CrowTypeEnum} 人群类型
|
||||
*/
|
||||
private ChatGroupCreateReq.CrowTypeEnum crowType;
|
||||
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 群聊创建请求
|
||||
* 群聊查询请求
|
||||
* @author xudawei
|
||||
* @date 2024/11/04
|
||||
*/
|
||||
|
||||
@ -0,0 +1,78 @@
|
||||
package cn.axzo.im.channel.netease.dto;
|
||||
|
||||
import cn.axzo.im.center.api.vo.req.chatgroup.ChatGroupCreateReq;
|
||||
import cn.axzo.im.center.common.enums.ChatGroupStatusEnum;
|
||||
import cn.axzo.im.center.common.enums.ChatGroupUserTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 获取群聊
|
||||
* @author xudawei@axzo.cn
|
||||
* @date 2024/11/25
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ChatGroupUserCreateDto {
|
||||
|
||||
/**
|
||||
* 群聊Id
|
||||
*/
|
||||
private Long chatGroupId;
|
||||
/**
|
||||
* 网易云信服务器产生,群唯一标识
|
||||
*/
|
||||
private String tid;
|
||||
/**
|
||||
* IM账号
|
||||
*/
|
||||
private String accId;
|
||||
/**
|
||||
* {@link cn.axzo.im.center.common.enums.ChatGroupStatusEnum} 群聊状态
|
||||
*/
|
||||
private ChatGroupStatusEnum status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* {@link cn.axzo.im.center.api.vo.req.chatgroup.ChatGroupCreateReq.CrowTypeEnum} 人群类型
|
||||
*/
|
||||
private ChatGroupCreateReq.CrowTypeEnum crowType;
|
||||
/**
|
||||
* {@link cn.axzo.im.center.common.enums.ChatGroupUserTypeEnum} 群聊用户类型
|
||||
*/
|
||||
private ChatGroupUserTypeEnum type;
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
private Long workspaceId;
|
||||
/**
|
||||
* 单位Id
|
||||
*/
|
||||
private Long ouId;
|
||||
/**
|
||||
* 数据来源
|
||||
*/
|
||||
private String dataSource;
|
||||
|
||||
public static ChatGroupUserCreateDto buildDto(Long chatGroupId, String tid, String accId, ChatGroupStatusEnum status, String remark
|
||||
, ChatGroupCreateReq.CrowTypeEnum crowType, ChatGroupUserTypeEnum type, Long workspaceId,Long ouId, String dataSource) {
|
||||
return ChatGroupUserCreateDto.builder()
|
||||
.chatGroupId(chatGroupId)
|
||||
.tid(tid)
|
||||
.accId(accId)
|
||||
.workspaceId(workspaceId)
|
||||
.ouId(ouId)
|
||||
.status(status)
|
||||
.crowType(crowType)
|
||||
.dataSource(dataSource)
|
||||
.type(type)
|
||||
.remark(remark).build();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package cn.axzo.im.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 岗位code
|
||||
* @author xudawei@axzo.cn
|
||||
* @since 2024-11-25
|
||||
*/
|
||||
@Data
|
||||
@RefreshScope
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "chatgroup")
|
||||
public class JobCodeProperties {
|
||||
|
||||
@Value("${admin-job-codes:HumanResources,YoElse,YoUserexperiencedesi,YoProdcutmanager,YoHardwareengineer,YoTestengineer,YoOperationmanager,YoOperationandmainte,YoProjectimplementer,YoIndustryresearcher,YoDeveloper,YoTheprojectmanager" +
|
||||
",YoChieftechnologyoff,YoChieffinancialoffi,YoChiefoperatingoffi,YoChiefexecutiveoffi,cms:ou_staff,cms:ou_archivist,cms:ou_seal_administrator,cms:ou_office_staff,cms:ou_office_chief,cms:ou_legal_staff,EwLegaldepartmentman,cms:ou_hr_staff,EwHumanresourcesmana,cms:ou_accountant_staff" +
|
||||
",cms:ou_cashier_staff,EwFinancialcontrolle,cms:ou_contract_staff,EwContractdepartment,cms:ou_budget_staff,cms:ou_calculate_engnieer,cms:ou_cost_engnieer,cms:ou_business_manager,cms:ou_buyer,cms:ou_operation_staff,EwBusinessdepartment,cms:ou_business_vice_officer,cms:ou_chief_economic_manager" +
|
||||
",cms:ou_technology_staff,EwTechnicaldepartmen,EwChiefengineer,cms:ou_machine_staff,cms:ou_securityt_staff,EwSecuritydepartment,cms:ou_quantity_staff,EwQualitydepartmentm,cms:ou_material_staff,cms:ou_professional_engineer,cms:ou_engineering_manager,EwProductiongeneralm,EwThesecretary,EwThegeneralmanager" +
|
||||
",cms:ou_executive_director,cms:ou_chairman,other,OtProjectManager,scother,scresposible,scinspector,scSafetydesignedprison,cms:jl_project_professional_supervision_engineer,scCostofthedesignedprison,scTherepresentative,scProjectmanager,cuother,cms:js_project_security_chief,cuTheprojectintheindustry,curesposible" +
|
||||
",cuThecostengineer,cuProfessionalengineers,cuProjectmanager,lsother,istreasurer1,isTreasurer,lsTestsamplingmember,lsQualitativecheckmember,lsThequalitysupervis,cms:lafb_project_machine_staff,lssafe,lsSecuritychief,lsMaterialkeeper,lsGoodsreceiving,lsSuppliestobuyer,lsCompetentmaterials,cms:lafb_project_contract_staff" +
|
||||
",lsBudgetmember,lsLabormember,cms:lafb_project_business_vice_officer,lssurveyor,ziliaoyuan,lsThetechnician,lsTechnicalmanager,cms:lafb_project_trainee_construction_staff,lsThebuilder,isEngineeringmanager,lsProductionvicemanager,lsTheprojectmanager,psother,pstreasurer1,cms:mafb_project_accountant_staff,PSTreasurer" +
|
||||
",psresposible,psTestsamplingmember,psQualitativecheckmember,psThequalitysupervisor,pssafe,psSecuritychief,cms:mafb_project_machine_staff,psMaterialwarehousekeeper,psGoodsreceiving,psSuppliestobuyer,psCompetentmaterials,psLabormember,psThecontractadministrator,psBudgetmember,cms:mafb_project_business_vice_officer" +
|
||||
",cms:mafb_project_standard_staff,pssurveyor,psThetechnician,psTechnicalmanage,cms:mafb_project_technology_president,cms:mafb_project_electricity_manager,cms:mafb_project_trainee_construction_staff,psThebuilder,cms:mafb_project_schedule_manager,psEngineeringmanager,psProductionvicemanager,cms:mafb_project_secretary" +
|
||||
",cms:mafb_project_manger,psTheprojectmanager,coother,coLogisticsAdministr,coOfficeclerk,cms:zb_project_comperhensive_chief,cotreasurer,coaccounting,cms:zb_project_financial_chief,coresposible,cms:zb_project_referenc_chief,coTheoperator,coQualitativecheckmember,cms:zb_project_quantity_chief,cosafe,cms:zb_project_security_chief" +
|
||||
",coMechanicaladministrator,coMaterialwarehousekeeper,coGoodsreceiving,coSuppliestobuyer,cms:zb_project_material_chief,coLabormember,cms:zb_project_contract_manager,coBudgetmember,coTheprojectbusinessassistantmanager,coStandardOfficer,cosurveyor,coMeasuringhead,coThetechnician,cms:zb_project_technology_commissioner,coTechnicalprojectgeneral" +
|
||||
",coNearwatertheelectricityintheadministrator,coTraineebuilder,coThebuilder,coPlanadministrator,comechanicalandelectricalmanager,cms:zb_project_engineering_commissioner,coProductionvicemanageroftheproject,coSecretaryoftheproject,coProjectimplementationmanager,coTheprojectmanager}")
|
||||
private Set<String> chatGroupAdminJobCodes;
|
||||
|
||||
/**
|
||||
* 是否管理岗位
|
||||
*/
|
||||
public boolean isAdmin(String jobCode) {
|
||||
return this.getChatGroupAdminJobCodes().contains(jobCode);
|
||||
}
|
||||
|
||||
}
|
||||
@ -11,6 +11,7 @@ import cn.axzo.im.center.common.enums.AppTypeEnum;
|
||||
import cn.axzo.im.center.common.enums.ChatGroupUserDataSourceEnum;
|
||||
import cn.axzo.im.channel.netease.NimChannelService;
|
||||
import cn.axzo.im.channel.netease.dto.ChatGroupQueryResponse;
|
||||
import cn.axzo.im.config.JobCodeProperties;
|
||||
import cn.axzo.im.entity.ChatGroup;
|
||||
import cn.axzo.im.event.inner.EventTypeEnum;
|
||||
import cn.axzo.im.event.payload.OrganizationalNodeUserPayload;
|
||||
@ -59,6 +60,9 @@ public class OrganizationalNodeUserChangeEventHandler implements EventHandler, I
|
||||
@Autowired
|
||||
private ProfilesApiGateway profilesApiGateway;
|
||||
|
||||
@Autowired
|
||||
private JobCodeProperties jobCodeProperties;
|
||||
|
||||
@Override
|
||||
public void onEvent(Event event, EventConsumer.Context context) {
|
||||
if (!EventTypeEnum.NODE_USER_CREATE.getName().equalsIgnoreCase(event.getEventCode().getName())
|
||||
@ -164,7 +168,7 @@ public class OrganizationalNodeUserChangeEventHandler implements EventHandler, I
|
||||
case WORKSPACE:
|
||||
case OU:
|
||||
//加入群聊或者退出群聊-执行动作
|
||||
this.doEnterOrExitChatGroup(tag, chatGroup, currentImAccount, members, tInfo.getOwner(), JobCodeUtils.isAdmin(currentJobCode));
|
||||
this.doEnterOrExitChatGroup(tag, chatGroup, currentImAccount, members, tInfo.getOwner(), jobCodeProperties.isAdmin(currentJobCode));
|
||||
break;
|
||||
case TEAM:
|
||||
//加入群聊或者退出群聊-执行动作
|
||||
|
||||
@ -4,6 +4,7 @@ import cn.axzo.im.center.api.vo.req.chatgroup.ChatGroupCreateReq;
|
||||
import cn.axzo.im.center.api.vo.req.chatgroup.ChatGroupUserGenericSearchReq;
|
||||
import cn.axzo.im.center.common.enums.ChatGroupStatusEnum;
|
||||
import cn.axzo.im.center.common.enums.ChatGroupUserTypeEnum;
|
||||
import cn.axzo.im.channel.netease.dto.ChatGroupUserCreateDto;
|
||||
import cn.axzo.im.entity.ChatGroupUser;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
@ -20,8 +21,7 @@ public interface ChatGroupUserService extends IService<ChatGroupUser> {
|
||||
/**
|
||||
* 创建群聊成员
|
||||
*/
|
||||
Boolean chatGroupUserCreate(Long chatGroupId, String tid,String accId, ChatGroupStatusEnum status, String remark
|
||||
, ChatGroupCreateReq.CrowTypeEnum crowType, ChatGroupUserTypeEnum type, Long workspaceId, Long ouId, String dataSource);
|
||||
Boolean chatGroupUserCreate(ChatGroupUserCreateDto dto);
|
||||
|
||||
/**
|
||||
* 批量创建群聊成员
|
||||
|
||||
@ -28,7 +28,6 @@ import cn.axzo.im.center.common.enums.ChatGroupUserDataSourceEnum;
|
||||
import cn.axzo.im.center.common.enums.ChatGroupUserTypeEnum;
|
||||
import cn.axzo.im.center.common.enums.OperateLogTypeEnum;
|
||||
import cn.axzo.im.channel.IMChannelProvider;
|
||||
import cn.axzo.im.channel.netease.INotifyService;
|
||||
import cn.axzo.im.channel.netease.NimChannelService;
|
||||
import cn.axzo.im.channel.netease.dto.ChangeOwnerRequest;
|
||||
import cn.axzo.im.channel.netease.dto.ChatGroupCreateRequest;
|
||||
@ -36,17 +35,17 @@ import cn.axzo.im.channel.netease.dto.ChatGroupCreateResponse;
|
||||
import cn.axzo.im.channel.netease.dto.ChatGroupGetUinfosResponse;
|
||||
import cn.axzo.im.channel.netease.dto.ChatGroupJoinTeamsResponse;
|
||||
import cn.axzo.im.channel.netease.dto.ChatGroupQueryResponse;
|
||||
import cn.axzo.im.channel.netease.dto.ChatGroupUserCreateDto;
|
||||
import cn.axzo.im.channel.netease.dto.HistoryMsgQueryResponse;
|
||||
import cn.axzo.im.channel.netease.dto.KickChatGroupRequest;
|
||||
import cn.axzo.im.channel.netease.dto.UserAddChatGroupRequest;
|
||||
import cn.axzo.im.config.BizResultCode;
|
||||
import cn.axzo.im.config.ChatGroupConfig;
|
||||
import cn.axzo.im.config.JobCodeProperties;
|
||||
import cn.axzo.im.config.MqProducer;
|
||||
import cn.axzo.im.dao.mapper.ChatGroupMapper;
|
||||
import cn.axzo.im.entity.ChatGroup;
|
||||
import cn.axzo.im.event.payload.ChatGroupCreatePayload;
|
||||
import cn.axzo.im.gateway.OrgJobApiGateway;
|
||||
import cn.axzo.im.gateway.OrganizationalNodeApiGateway;
|
||||
import cn.axzo.im.gateway.OrganizationalNodeUserApiGateway;
|
||||
import cn.axzo.im.gateway.ProfilesApiGateway;
|
||||
import cn.axzo.im.gateway.TyrApiGateway;
|
||||
@ -57,7 +56,6 @@ import cn.axzo.im.service.ChatGroupUserService;
|
||||
import cn.axzo.im.service.DingDingRobotService;
|
||||
import cn.axzo.im.service.OperateLogService;
|
||||
import cn.axzo.im.utils.BizAssertions;
|
||||
import cn.axzo.im.utils.DingTalkUtil;
|
||||
import cn.axzo.im.utils.JobCodeUtils;
|
||||
import cn.axzo.maokai.api.vo.response.OrganizationalNodeUserVO;
|
||||
import cn.axzo.tyr.client.common.enums.RoleTypeEnum;
|
||||
@ -143,6 +141,9 @@ public class ChatGroupServiceImpl extends ServiceImpl<ChatGroupMapper, ChatGrou
|
||||
@Value("${chatgroup.maxmember.count:199}")
|
||||
private Integer chatGroupMaxMemberCount;
|
||||
|
||||
@Resource
|
||||
private JobCodeProperties jobCodeProperties;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Throwable.class)
|
||||
@ -161,7 +162,10 @@ public class ChatGroupServiceImpl extends ServiceImpl<ChatGroupMapper, ChatGrou
|
||||
ChatGroup chatGroup = this.buildChatGroupCreate(req, response, resp.getOwnerImAccount(), req.getOuId(), resp.getTeamNodeId());
|
||||
// 保存db
|
||||
this.saveOrUpdate(chatGroup);
|
||||
this.chatGroupUserService.chatGroupUserCreate(chatGroup.getId(), response.getTid(), resp.getOwnerImAccount(), ChatGroupStatusEnum.SUCCESS, null, req.getCrowType(), ChatGroupUserTypeEnum.OWNER, req.getWorkspaceId(), req.getOuId(), ChatGroupUserDataSourceEnum.CREATE_GROUP.getCode());
|
||||
|
||||
ChatGroupUserCreateDto chatGroupUserCreateDto = ChatGroupUserCreateDto.buildDto(chatGroup.getId(), response.getTid(), resp.getOwnerImAccount(), ChatGroupStatusEnum.SUCCESS, null, req.getCrowType(), ChatGroupUserTypeEnum.OWNER, req.getWorkspaceId(), req.getOuId(), ChatGroupUserDataSourceEnum.CREATE_GROUP.getCode());
|
||||
|
||||
this.chatGroupUserService.chatGroupUserCreate(chatGroupUserCreateDto);
|
||||
// 群聊创建成功发送MQ
|
||||
this.chatGroupCreateSendMQ(req, response, resp.getOwnerId().toString(), resp.getOwnerImAccount(), chatGroup.getId());
|
||||
// 返回
|
||||
@ -407,9 +411,9 @@ public class ChatGroupServiceImpl extends ServiceImpl<ChatGroupMapper, ChatGrou
|
||||
public Set<String> buildJobCodesByCrowType(ChatGroupCreateReq.CrowTypeEnum crowType) {
|
||||
switch (crowType) {
|
||||
case WORKSPACE:
|
||||
return Sets.newHashSet(JobCodeUtils.CHAT_GROUP_ADMIN_JOB_CODES);
|
||||
return Sets.newHashSet(jobCodeProperties.getChatGroupAdminJobCodes());
|
||||
case OU:
|
||||
return Sets.newHashSet(JobCodeUtils.CHAT_GROUP_ADMIN_JOB_CODES);
|
||||
return Sets.newHashSet(jobCodeProperties.getChatGroupAdminJobCodes());
|
||||
case TEAM:
|
||||
return Sets.newHashSet(JobCodeUtils.CHAT_GROUP_TEAM_MEMBER_JOB_CODES);// TODO
|
||||
default:
|
||||
@ -447,7 +451,8 @@ public class ChatGroupServiceImpl extends ServiceImpl<ChatGroupMapper, ChatGrou
|
||||
if (JobCodeUtils.isProjectManaGpWorkerLeader(nodeUserVO.getOrganizationalJobCode())) {
|
||||
continue;
|
||||
}
|
||||
jobResult = JobCodeUtils.isAdmin(nodeUserVO.getOrganizationalJobCode()) ? ChatGroupCreateReq.CrowTypeEnum.workspaceOu() : JobCodeUtils.isProjectTeamLeader(nodeUserVO.getOrganizationalJobCode()) ? ChatGroupCreateReq.CrowTypeEnum.team() : Sets.newHashSet();
|
||||
jobResult = jobCodeProperties.isAdmin(nodeUserVO.getOrganizationalJobCode()) ? ChatGroupCreateReq.CrowTypeEnum.workspaceOu() : JobCodeUtils.isProjectTeamLeader(nodeUserVO.getOrganizationalJobCode()) ? ChatGroupCreateReq.CrowTypeEnum.team() : Sets.newHashSet();
|
||||
// jobResult = JobCodeUtils.isAdmin(nodeUserVO.getOrganizationalJobCode()) ? ChatGroupCreateReq.CrowTypeEnum.workspaceOu() : JobCodeUtils.isProjectTeamLeader(nodeUserVO.getOrganizationalJobCode()) ? ChatGroupCreateReq.CrowTypeEnum.team() : Sets.newHashSet();
|
||||
}
|
||||
}
|
||||
return ChatGroupCreateReq.CrowTypeEnum.mergeCrowType(roleResult, jobResult);
|
||||
|
||||
@ -3,8 +3,8 @@ package cn.axzo.im.service.impl;
|
||||
import cn.axzo.im.center.api.vo.req.chatgroup.ChatGroupCreateReq;
|
||||
import cn.axzo.im.center.api.vo.req.chatgroup.ChatGroupUserGenericSearchReq;
|
||||
import cn.axzo.im.center.common.enums.ChatGroupStatusEnum;
|
||||
import cn.axzo.im.center.common.enums.ChatGroupUserDataSourceEnum;
|
||||
import cn.axzo.im.center.common.enums.ChatGroupUserTypeEnum;
|
||||
import cn.axzo.im.channel.netease.dto.ChatGroupUserCreateDto;
|
||||
import cn.axzo.im.dao.mapper.ChatGroupUserMapper;
|
||||
import cn.axzo.im.entity.ChatGroup;
|
||||
import cn.axzo.im.entity.ChatGroupUser;
|
||||
@ -39,19 +39,18 @@ public class ChatGroupUserServiceImpl extends ServiceImpl<ChatGroupUserMapper,
|
||||
private ChatGroupService chatGroupService;
|
||||
|
||||
@Override
|
||||
public Boolean chatGroupUserCreate(Long chatGroupId, String tid, String accId, ChatGroupStatusEnum status, String remark
|
||||
, ChatGroupCreateReq.CrowTypeEnum crowType, ChatGroupUserTypeEnum type, Long workspaceId,Long ouId, String dataSource) {
|
||||
public Boolean chatGroupUserCreate(ChatGroupUserCreateDto dto) {
|
||||
return this.saveOrUpdate(ChatGroupUser.builder()
|
||||
.chatGroupId(chatGroupId)
|
||||
.tid(tid)
|
||||
.accId(accId)
|
||||
.workspaceId(workspaceId)
|
||||
.ouId(ouId)
|
||||
.status(status)
|
||||
.crowType(crowType)
|
||||
.dataSource(dataSource)
|
||||
.type(type)
|
||||
.remark(remark).build());
|
||||
.chatGroupId(dto.getChatGroupId())
|
||||
.tid(dto.getTid())
|
||||
.accId(dto.getAccId())
|
||||
.workspaceId(dto.getWorkspaceId())
|
||||
.ouId(dto.getOuId())
|
||||
.status(dto.getStatus())
|
||||
.crowType(dto.getCrowType())
|
||||
.dataSource(dto.getDataSource())
|
||||
.type(dto.getType())
|
||||
.remark(dto.getRemark()).build());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -78,7 +77,8 @@ public class ChatGroupUserServiceImpl extends ServiceImpl<ChatGroupUserMapper,
|
||||
return;
|
||||
}
|
||||
|
||||
this.chatGroupUserCreate(chatGroupId, chatGroup.getTid(), newAccId, ChatGroupStatusEnum.SUCCESS, null, chatGroup.getCrowType(), ChatGroupUserTypeEnum.OWNER, chatGroup.getWorkspaceId(), chatGroup.getOuId(), dataSource);
|
||||
ChatGroupUserCreateDto dto = ChatGroupUserCreateDto.buildDto(chatGroupId, chatGroup.getTid(), newAccId, ChatGroupStatusEnum.SUCCESS, null, chatGroup.getCrowType(), ChatGroupUserTypeEnum.OWNER, chatGroup.getWorkspaceId(), chatGroup.getOuId(), dataSource);
|
||||
this.chatGroupUserCreate(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -10,20 +10,6 @@ import java.util.Set;
|
||||
*/
|
||||
public class JobCodeUtils {
|
||||
|
||||
public static Set<String> CHAT_GROUP_ADMIN_JOB_CODES = Sets.newHashSet("HumanResources","YoElse","YoUserexperiencedesi","YoProdcutmanager","YoHardwareengineer","YoTestengineer","YoOperationmanager","YoOperationandmainte","YoProjectimplementer","YoIndustryresearcher","YoDeveloper","YoTheprojectmanager"
|
||||
,"YoChieftechnologyoff","YoChieffinancialoffi","YoChiefoperatingoffi","YoChiefexecutiveoffi","cms:ou_staff","cms:ou_archivist","cms:ou_seal_administrator","cms:ou_office_staff","cms:ou_office_chief","cms:ou_legal_staff","EwLegaldepartmentman","cms:ou_hr_staff","EwHumanresourcesmana","cms:ou_accountant_staff"
|
||||
,"cms:ou_cashier_staff","EwFinancialcontrolle","cms:ou_contract_staff","EwContractdepartment","cms:ou_budget_staff","cms:ou_calculate_engnieer","cms:ou_cost_engnieer","cms:ou_business_manager","cms:ou_buyer","cms:ou_operation_staff","EwBusinessdepartment","cms:ou_business_vice_officer","cms:ou_chief_economic_manager"
|
||||
,"cms:ou_technology_staff","EwTechnicaldepartmen","EwChiefengineer","cms:ou_machine_staff","cms:ou_securityt_staff","EwSecuritydepartment","cms:ou_quantity_staff","EwQualitydepartmentm","cms:ou_material_staff","cms:ou_professional_engineer","cms:ou_engineering_manager","EwProductiongeneralm","EwThesecretary","EwThegeneralmanager"
|
||||
,"cms:ou_executive_director","cms:ou_chairman","other","OtProjectManager","scother","scresposible","scinspector","scSafetydesignedprison","cms:jl_project_professional_supervision_engineer","scCostofthedesignedprison","scTherepresentative","scProjectmanager","cuother","cms:js_project_security_chief","cuTheprojectintheindustry","curesposible"
|
||||
,"cuThecostengineer","cuProfessionalengineers","cuProjectmanager","lsother","istreasurer1","isTreasurer","lsTestsamplingmember","lsQualitativecheckmember","lsThequalitysupervis","cms:lafb_project_machine_staff","lssafe","lsSecuritychief","lsMaterialkeeper","lsGoodsreceiving","lsSuppliestobuyer","lsCompetentmaterials","cms:lafb_project_contract_staff"
|
||||
,"lsBudgetmember","lsLabormember","cms:lafb_project_business_vice_officer","lssurveyor","ziliaoyuan","lsThetechnician","lsTechnicalmanager","cms:lafb_project_trainee_construction_staff","lsThebuilder","isEngineeringmanager","lsProductionvicemanager","lsTheprojectmanager","psother","pstreasurer1","cms:mafb_project_accountant_staff","PSTreasurer"
|
||||
,"psresposible","psTestsamplingmember","psQualitativecheckmember","psThequalitysupervisor","pssafe","psSecuritychief","cms:mafb_project_machine_staff","psMaterialwarehousekeeper","psGoodsreceiving","psSuppliestobuyer","psCompetentmaterials","psLabormember","psThecontractadministrator","psBudgetmember","cms:mafb_project_business_vice_officer"
|
||||
,"cms:mafb_project_standard_staff","pssurveyor","psThetechnician","psTechnicalmanage","cms:mafb_project_technology_president","cms:mafb_project_electricity_manager","cms:mafb_project_trainee_construction_staff","psThebuilder","cms:mafb_project_schedule_manager","psEngineeringmanager","psProductionvicemanager","cms:mafb_project_secretary"
|
||||
,"cms:mafb_project_manger","psTheprojectmanager","coother","coLogisticsAdministr","coOfficeclerk","cms:zb_project_comperhensive_chief","cotreasurer","coaccounting","cms:zb_project_financial_chief","coresposible","cms:zb_project_referenc_chief","coTheoperator","coQualitativecheckmember","cms:zb_project_quantity_chief","cosafe","cms:zb_project_security_chief"
|
||||
,"coMechanicaladministrator","coMaterialwarehousekeeper","coGoodsreceiving","coSuppliestobuyer","cms:zb_project_material_chief","coLabormember","cms:zb_project_contract_manager","coBudgetmember","coTheprojectbusinessassistantmanager","coStandardOfficer","cosurveyor","coMeasuringhead","coThetechnician","cms:zb_project_technology_commissioner","coTechnicalprojectgeneral"
|
||||
,"coNearwatertheelectricityintheadministrator","coTraineebuilder","coThebuilder","coPlanadministrator","comechanicalandelectricalmanager","cms:zb_project_engineering_commissioner","coProductionvicemanageroftheproject","coSecretaryoftheproject","coProjectimplementationmanager","coTheprojectmanager");
|
||||
|
||||
|
||||
/**
|
||||
* 班组长/带班长/小组长/工人
|
||||
*/
|
||||
@ -34,24 +20,11 @@ public class JobCodeUtils {
|
||||
*/
|
||||
public static String PROJECT_TEAM_LEADER_JOB_CODE = "projTeamLeader";
|
||||
|
||||
/**
|
||||
* 工人岗位code
|
||||
*/
|
||||
public static String PROJECT_WORKER_JOB_CODE = "projWorker";
|
||||
|
||||
|
||||
/**
|
||||
* 带班长/小组长/工人
|
||||
*/
|
||||
public static Set<String> PROJECT_MANA_GP_WROKER_JOB_CODES = Sets.newHashSet("projectTeamManager","projectTeamGPLeader","projWorker");
|
||||
|
||||
/**
|
||||
* 是否管理岗位
|
||||
*/
|
||||
public static boolean isAdmin(String jobCode) {
|
||||
return CHAT_GROUP_ADMIN_JOB_CODES.contains(jobCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否项目班组内的岗位(班组长/带班长/小组长工人)
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user