Merge branch 'develop' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into master-jdk21
commit
ba3fe15ec5
@ -1,15 +0,0 @@
|
||||
-- `ruoyi-vue-pro`.crm_contact_business_link definition
|
||||
|
||||
CREATE TABLE `crm_contact_business_link` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`contact_id` int(11) DEFAULT NULL COMMENT '联系人id',
|
||||
`business_id` int(11) DEFAULT NULL COMMENT '商机id',
|
||||
`creator` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '创建者',
|
||||
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`updater` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '更新者',
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
`tenant_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '租户编号',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `crm_contact_business_link_un` (`contact_id`,`business_id`,`deleted`,`tenant_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='联系人商机关联表';
|
||||
@ -0,0 +1,19 @@
|
||||
package cn.iocoder.yudao.framework.common.pojo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "可排序的分页参数")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class SortablePageParam extends PageParam {
|
||||
|
||||
@Schema(description = "排序字段")
|
||||
private List<SortingField> sortingFields;
|
||||
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.framework.operatelog.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.service.LogRecordServiceImpl;
|
||||
import com.mzt.logapi.service.ILogRecordService;
|
||||
import com.mzt.logapi.starter.annotation.EnableLogRecord;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
|
||||
/**
|
||||
* 操作日志配置类
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
@EnableLogRecord(tenant = "") // 貌似用不上 tenant 这玩意给个空好啦
|
||||
@AutoConfiguration
|
||||
@Slf4j
|
||||
public class YudaoOperateLogV2Configuration {
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
public ILogRecordService iLogRecordServiceImpl() {
|
||||
return new LogRecordServiceImpl();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* 基于 mzt-log 框架
|
||||
* 实现操作日志功能
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
package cn.iocoder.yudao.framework.operatelog;
|
||||
@ -1,2 +1,3 @@
|
||||
cn.iocoder.yudao.framework.security.config.YudaoSecurityAutoConfiguration
|
||||
cn.iocoder.yudao.framework.security.config.YudaoWebSecurityConfigurerAdapter
|
||||
cn.iocoder.yudao.framework.security.config.YudaoWebSecurityConfigurerAdapter
|
||||
cn.iocoder.yudao.framework.operatelog.config.YudaoOperateLogV2Configuration
|
||||
@ -0,0 +1,107 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.candidate;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import org.flowable.engine.delegate.DelegateExecution;
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
public class BpmCandidateSourceInfoProcessorChain {
|
||||
|
||||
// 保存处理节点
|
||||
|
||||
private List<BpmCandidateSourceInfoProcessor> processorList;
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
/**
|
||||
* 可添加其他处理器
|
||||
*
|
||||
* @param processorOp
|
||||
* @return
|
||||
*/
|
||||
@Resource
|
||||
// 动态扩展处理节点
|
||||
public BpmCandidateSourceInfoProcessorChain addProcessor(ObjectProvider<BpmCandidateSourceInfoProcessor> processorOp) {
|
||||
List<BpmCandidateSourceInfoProcessor> processor = ListUtil.toList(processorOp.iterator());
|
||||
if (null == processorList) {
|
||||
processorList = new ArrayList<>(processor.size());
|
||||
}
|
||||
processorList.addAll(processor);
|
||||
return this;
|
||||
}
|
||||
|
||||
// 获取处理器处理
|
||||
public Set<Long> process(BpmCandidateSourceInfo sourceInfo, DelegateExecution execution) throws Exception {
|
||||
// Verify our parameters
|
||||
if (sourceInfo == null) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
for (BpmCandidateSourceInfoProcessor processor : processorList) {
|
||||
try {
|
||||
for (BpmTaskCandidateRuleVO vo : sourceInfo.getRules()) {
|
||||
if (CollUtil.contains(processor.getSupportedTypes(), vo.getType())) {
|
||||
processor.validRuleOptions(vo.getType(), vo.getOptions());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
Set<Long> saveResult = Collections.emptySet();
|
||||
Exception saveException = null;
|
||||
for (BpmCandidateSourceInfoProcessor processor : processorList) {
|
||||
try {
|
||||
saveResult = processor.process(sourceInfo, execution);
|
||||
if (CollUtil.isNotEmpty(saveResult)) {
|
||||
removeDisableUsers(saveResult);
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
saveException = e;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Return the exception or result state from the last execute()
|
||||
if ((saveException != null)) {
|
||||
throw saveException;
|
||||
} else {
|
||||
return (saveResult);
|
||||
}
|
||||
}
|
||||
|
||||
public Set<Long> calculateTaskCandidateUsers(DelegateExecution execution, BpmCandidateSourceInfo sourceInfo) {
|
||||
Set<Long> results = Collections.emptySet();
|
||||
try {
|
||||
results = process(sourceInfo, execution);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除禁用用户
|
||||
*
|
||||
* @param assigneeUserIds
|
||||
*/
|
||||
public void removeDisableUsers(Set<Long> assigneeUserIds) {
|
||||
if (CollUtil.isEmpty(assigneeUserIds)) {
|
||||
return;
|
||||
}
|
||||
Map<Long, AdminUserRespDTO> userMap = adminUserApi.getUserMap(assigneeUserIds);
|
||||
assigneeUserIds.removeIf(id -> {
|
||||
AdminUserRespDTO user = userMap.get(id);
|
||||
return user == null || !CommonStatusEnum.ENABLE.getStatus().equals(user.getStatus());
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.collection.SetUtils;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum;
|
||||
import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo;
|
||||
import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessor;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import org.flowable.engine.delegate.DelegateExecution;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.Set;
|
||||
|
||||
public class BpmCandidateAdminUserApiSourceInfoProcessor implements BpmCandidateSourceInfoProcessor {
|
||||
@Resource
|
||||
private AdminUserApi api;
|
||||
|
||||
@Override
|
||||
public Set<Integer> getSupportedTypes() {
|
||||
return SetUtils.asSet(BpmTaskAssignRuleTypeEnum.USER.getType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validRuleOptions(Integer type, Set<Long> options) {
|
||||
api.validateUserList(options);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Long> doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) {
|
||||
return rule.getOptions();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.collection.SetUtils;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum;
|
||||
import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo;
|
||||
import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessor;
|
||||
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import org.flowable.engine.delegate.DelegateExecution;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
|
||||
|
||||
public class BpmCandidateDeptApiSourceInfoProcessor implements BpmCandidateSourceInfoProcessor {
|
||||
@Resource
|
||||
private DeptApi api;
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
@Override
|
||||
public Set<Integer> getSupportedTypes() {
|
||||
return SetUtils.asSet(BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(),
|
||||
BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validRuleOptions(Integer type, Set<Long> options) {
|
||||
api.validateDeptList(options);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Long> doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) {
|
||||
if (Objects.equals(BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(), rule.getType())) {
|
||||
List<AdminUserRespDTO> users = adminUserApi.getUserListByDeptIds(rule.getOptions());
|
||||
return convertSet(users, AdminUserRespDTO::getId);
|
||||
} else if (Objects.equals(BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType(), rule.getType())) {
|
||||
List<DeptRespDTO> depts = api.getDeptList(rule.getOptions());
|
||||
return convertSet(depts, DeptRespDTO::getLeaderUserId);
|
||||
}
|
||||
return Collections.emptySet();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.collection.SetUtils;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum;
|
||||
import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo;
|
||||
import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessor;
|
||||
import cn.iocoder.yudao.module.system.api.dept.PostApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import org.flowable.engine.delegate.DelegateExecution;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
|
||||
|
||||
public class BpmCandidatePostApiSourceInfoProcessor implements BpmCandidateSourceInfoProcessor {
|
||||
@Resource
|
||||
private PostApi api;
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
@Override
|
||||
public Set<Integer> getSupportedTypes() {
|
||||
return SetUtils.asSet(BpmTaskAssignRuleTypeEnum.POST.getType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validRuleOptions(Integer type, Set<Long> options) {
|
||||
api.validPostList(options);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Long> doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) {
|
||||
List<AdminUserRespDTO> users = adminUserApi.getUserListByPostIds(rule.getOptions());
|
||||
return convertSet(users, AdminUserRespDTO::getId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.collection.SetUtils;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum;
|
||||
import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo;
|
||||
import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessor;
|
||||
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
||||
import cn.iocoder.yudao.module.system.api.permission.RoleApi;
|
||||
import org.flowable.engine.delegate.DelegateExecution;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.Set;
|
||||
|
||||
public class BpmCandidateRoleApiSourceInfoProcessor implements BpmCandidateSourceInfoProcessor {
|
||||
@Resource
|
||||
private RoleApi api;
|
||||
|
||||
@Resource
|
||||
private PermissionApi permissionApi;
|
||||
|
||||
@Override
|
||||
public Set<Integer> getSupportedTypes() {
|
||||
return SetUtils.asSet(BpmTaskAssignRuleTypeEnum.ROLE.getType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validRuleOptions(Integer type, Set<Long> options) {
|
||||
api.validRoleList(options);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Long> doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) {
|
||||
return permissionApi.getUserRoleIdListByRoleIds(rule.getOptions());
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
||||
import cn.iocoder.yudao.framework.common.util.collection.SetUtils;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.DictTypeConstants;
|
||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum;
|
||||
import cn.iocoder.yudao.module.bpm.framework.flowable.core.behavior.script.BpmTaskAssignScript;
|
||||
import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo;
|
||||
import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessor;
|
||||
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
||||
import org.flowable.engine.delegate.DelegateExecution;
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
|
||||
import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.TASK_ASSIGN_SCRIPT_NOT_EXISTS;
|
||||
|
||||
public class BpmCandidateScriptApiSourceInfoProcessor implements BpmCandidateSourceInfoProcessor {
|
||||
@Resource
|
||||
private DictDataApi dictDataApi;
|
||||
|
||||
/**
|
||||
* 任务分配脚本
|
||||
*/
|
||||
private Map<Long, BpmTaskAssignScript> scriptMap = Collections.emptyMap();
|
||||
|
||||
public void setScripts(ObjectProvider<BpmTaskAssignScript> scriptsOp) {
|
||||
List<BpmTaskAssignScript> scripts = scriptsOp.orderedStream().collect(Collectors.toList());
|
||||
setScripts(scripts);
|
||||
}
|
||||
|
||||
public void setScripts(List<BpmTaskAssignScript> scripts) {
|
||||
this.scriptMap = convertMap(scripts, script -> script.getEnum().getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Integer> getSupportedTypes() {
|
||||
return SetUtils.asSet(BpmTaskAssignRuleTypeEnum.SCRIPT.getType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validRuleOptions(Integer type, Set<Long> options) {
|
||||
dictDataApi.validateDictDataList(DictTypeConstants.TASK_ASSIGN_SCRIPT,
|
||||
CollectionUtils.convertSet(options, String::valueOf));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Long> doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) {
|
||||
return calculateTaskCandidateUsersByScript(delegateExecution, rule.getOptions());
|
||||
}
|
||||
|
||||
private Set<Long> calculateTaskCandidateUsersByScript(DelegateExecution execution, Set<Long> options) {
|
||||
// 获得对应的脚本
|
||||
List<BpmTaskAssignScript> scripts = new ArrayList<>(options.size());
|
||||
options.forEach(id -> {
|
||||
BpmTaskAssignScript script = scriptMap.get(id);
|
||||
if (script == null) {
|
||||
throw exception(TASK_ASSIGN_SCRIPT_NOT_EXISTS, id);
|
||||
}
|
||||
scripts.add(script);
|
||||
});
|
||||
// 逐个计算任务
|
||||
Set<Long> userIds = new HashSet<>();
|
||||
scripts.forEach(script -> CollUtil.addAll(userIds, script.calculateTaskCandidateUsers(execution)));
|
||||
return userIds;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.candidate.sourceInfoProcessor;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.collection.SetUtils;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.candidate.vo.BpmTaskCandidateRuleVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum;
|
||||
import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfo;
|
||||
import cn.iocoder.yudao.module.bpm.service.candidate.BpmCandidateSourceInfoProcessor;
|
||||
import cn.iocoder.yudao.module.bpm.service.definition.BpmUserGroupService;
|
||||
import org.flowable.engine.delegate.DelegateExecution;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class BpmCandidateUserGroupApiSourceInfoProcessor implements BpmCandidateSourceInfoProcessor {
|
||||
@Resource
|
||||
private BpmUserGroupService api;
|
||||
@Resource
|
||||
private BpmUserGroupService userGroupService;
|
||||
|
||||
@Override
|
||||
public Set<Integer> getSupportedTypes() {
|
||||
return SetUtils.asSet(BpmTaskAssignRuleTypeEnum.USER_GROUP.getType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validRuleOptions(Integer type, Set<Long> options) {
|
||||
api.validUserGroups(options);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Long> doProcess(BpmCandidateSourceInfo request, BpmTaskCandidateRuleVO rule, DelegateExecution delegateExecution) {
|
||||
List<BpmUserGroupDO> userGroups = userGroupService.getUserGroupList(rule.getOptions());
|
||||
Set<Long> userIds = new HashSet<>();
|
||||
userGroups.forEach(group -> userIds.addAll(group.getMemberUserIds()));
|
||||
return userIds;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,439 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.cc.dto;
|
||||
|
||||
import org.flowable.bpmn.model.FlowElement;
|
||||
import org.flowable.bpmn.model.FlowableListener;
|
||||
import org.flowable.engine.delegate.DelegateExecution;
|
||||
import org.flowable.engine.delegate.ReadOnlyDelegateExecution;
|
||||
import org.flowable.variable.api.persistence.entity.VariableInstance;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 仅为了传输processInstanceId
|
||||
*/
|
||||
public class BpmDelegateExecutionDTO implements DelegateExecution {
|
||||
|
||||
public BpmDelegateExecutionDTO(String getProcessInstanceId) {
|
||||
this.getProcessInstanceId = getProcessInstanceId;
|
||||
}
|
||||
|
||||
private final String getProcessInstanceId;
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProcessInstanceId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRootProcessInstanceId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEventName(String eventName) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProcessInstanceBusinessKey() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProcessInstanceBusinessStatus() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProcessDefinitionId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPropagatedStageInstanceId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParentId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSuperExecutionId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCurrentActivityId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTenantId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlowElement getCurrentFlowElement() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCurrentFlowElement(FlowElement flowElement) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public FlowableListener getCurrentFlowableListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCurrentFlowableListener(FlowableListener currentListener) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReadOnlyDelegateExecution snapshotReadOnly() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DelegateExecution getParent() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends DelegateExecution> getExecutions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActive(boolean isActive) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActive() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnded() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setConcurrent(boolean isConcurrent) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConcurrent() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isProcessInstanceType() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inactivate() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isScope() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setScope(boolean isScope) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMultiInstanceRoot() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMultiInstanceRoot(boolean isMultiInstanceRoot) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getVariables() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, VariableInstance> getVariableInstances() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getVariables(Collection<String> collection) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, VariableInstance> getVariableInstances(Collection<String> collection) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getVariables(Collection<String> collection, boolean b) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, VariableInstance> getVariableInstances(Collection<String> collection, boolean b) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getVariablesLocal() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, VariableInstance> getVariableInstancesLocal() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getVariablesLocal(Collection<String> collection) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, VariableInstance> getVariableInstancesLocal(Collection<String> collection) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getVariablesLocal(Collection<String> collection, boolean b) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, VariableInstance> getVariableInstancesLocal(Collection<String> collection, boolean b) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getVariable(String s) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VariableInstance getVariableInstance(String s) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getVariable(String s, boolean b) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VariableInstance getVariableInstance(String s, boolean b) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getVariableLocal(String s) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VariableInstance getVariableInstanceLocal(String s) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getVariableLocal(String s, boolean b) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VariableInstance getVariableInstanceLocal(String s, boolean b) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getVariable(String s, Class<T> aClass) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getVariableLocal(String s, Class<T> aClass) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getVariableNames() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getVariableNamesLocal() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVariable(String s, Object o) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVariable(String s, Object o, boolean b) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object setVariableLocal(String s, Object o) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object setVariableLocal(String s, Object o, boolean b) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVariables(Map<String, ?> map) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVariablesLocal(Map<String, ?> map) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasVariables() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasVariablesLocal() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasVariable(String s) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasVariableLocal(String s) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeVariable(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeVariableLocal(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeVariables(Collection<String> collection) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeVariablesLocal(Collection<String> collection) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeVariables() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeVariablesLocal() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTransientVariable(String s, Object o) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTransientVariableLocal(String s, Object o) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTransientVariables(Map<String, Object> map) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getTransientVariable(String s) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getTransientVariables() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTransientVariablesLocal(Map<String, Object> map) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getTransientVariableLocal(String s) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getTransientVariablesLocal() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTransientVariableLocal(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTransientVariable(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTransientVariables() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTransientVariablesLocal() {
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.cc;
|
||||
|
||||
import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
@Import({BpmProcessInstanceCopyServiceImpl.class})
|
||||
class BpmProcessInstanceCopyServiceTest extends BaseDbUnitTest {
|
||||
@Resource
|
||||
private BpmProcessInstanceCopyServiceImpl service;
|
||||
|
||||
@Test
|
||||
void queryById() {
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.crm.enums.message;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* CRM 联系状态
|
||||
*
|
||||
* @author dhb52
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum CrmContactStatusEnum implements IntArrayValuable {
|
||||
|
||||
NEEDED_TODAY(1, "今日需联系"),
|
||||
EXPIRED(2, "已逾期"),
|
||||
ALREADY_CONTACT(3, "已联系"),
|
||||
;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(CrmContactStatusEnum::getType).toArray();
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private final Integer type;
|
||||
/**
|
||||
* 状态名
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.crm.enums.permission;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Crm 数据权限角色枚举
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum CrmPermissionRoleCodeEnum {
|
||||
|
||||
CRM_ADMIN("crm_admin", "CRM 管理员");
|
||||
|
||||
/**
|
||||
* 角色标识
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.business.vo.product;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 商机产品关联 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CrmBusinessProductRespVO {
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.clue.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 线索创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CrmClueCreateReqVO extends CrmClueBaseVO {
|
||||
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.clue.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.infra.enums.DictTypeConstants;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
|
||||
/**
|
||||
* 线索 Excel VO
|
||||
*
|
||||
* @author Wanwan
|
||||
*/
|
||||
@Data
|
||||
public class CrmClueExcelVO {
|
||||
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty(value = "转化状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.BOOLEAN_STRING)
|
||||
private Boolean transformStatus;
|
||||
|
||||
@ExcelProperty(value = "跟进状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.BOOLEAN_STRING)
|
||||
private Boolean followUpStatus;
|
||||
|
||||
@ExcelProperty("线索名称")
|
||||
private String name;
|
||||
|
||||
// TODO 这里需要导出成客户名称
|
||||
@ExcelProperty("客户id")
|
||||
private Long customerId;
|
||||
|
||||
@ExcelProperty("下次联系时间")
|
||||
private LocalDateTime contactNextTime;
|
||||
|
||||
@ExcelProperty("电话")
|
||||
private String telephone;
|
||||
|
||||
@ExcelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
@ExcelProperty("地址")
|
||||
private String address;
|
||||
|
||||
@ExcelProperty("负责人的用户编号")
|
||||
private Long ownerUserId;
|
||||
|
||||
@ExcelProperty("最后跟进时间")
|
||||
private LocalDateTime contactLastTime;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -1,27 +1,80 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.clue.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.module.infra.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 线索 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CrmClueRespVO extends CrmClueBaseVO {
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CrmClueRespVO {
|
||||
|
||||
@Schema(description = "编号,主键自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "10969")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "转化状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
|
||||
@ExcelProperty(value = "转化状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.BOOLEAN_STRING)
|
||||
private Boolean transformStatus;
|
||||
|
||||
@Schema(description = "跟进状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
|
||||
@ExcelProperty(value = "跟进状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.BOOLEAN_STRING)
|
||||
private Boolean followUpStatus;
|
||||
|
||||
@Schema(description = "线索名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "线索xxx")
|
||||
@ExcelProperty("线索名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "客户 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "520")
|
||||
// TODO 这里需要导出成客户名称
|
||||
@ExcelProperty("客户id")
|
||||
private Long customerId;
|
||||
|
||||
@Schema(description = "下次联系时间", example = "2023-10-18 01:00:00")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ExcelProperty("下次联系时间")
|
||||
private LocalDateTime contactNextTime;
|
||||
|
||||
@Schema(description = "电话", example = "18000000000")
|
||||
@ExcelProperty("电话")
|
||||
private String telephone;
|
||||
|
||||
@Schema(description = "手机号", example = "18000000000")
|
||||
@ExcelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "地址", example = "北京市海淀区")
|
||||
@ExcelProperty("地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "负责人编号")
|
||||
@ExcelProperty("负责人的用户编号")
|
||||
private Long ownerUserId;
|
||||
|
||||
@Schema(description = "最后跟进时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ExcelProperty("最后跟进时间")
|
||||
private LocalDateTime contactLastTime;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.clue.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||
import cn.iocoder.yudao.module.crm.enums.permission.CrmPermissionLevelEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 线索转移 Request VO")
|
||||
@Data
|
||||
public class CrmClueTransferReqVO {
|
||||
|
||||
@Schema(description = "线索编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430")
|
||||
@NotNull(message = "线索编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "新负责人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10430")
|
||||
@NotNull(message = "新负责人的用户编号不能为空")
|
||||
private Long newOwnerUserId;
|
||||
|
||||
@Schema(description = "老负责人加入团队后的权限级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@InEnum(value = CrmPermissionLevelEnum.class)
|
||||
private Integer oldOwnerPermissionLevel; // 老负责人加入团队后的权限级别。如果 null 说明移除
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.clue.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Schema(description = "管理后台 - 线索转化为客户 Request VO")
|
||||
@Data
|
||||
public class CrmClueTransformReqVO {
|
||||
|
||||
@Schema(description = "线索编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1024, 1025]")
|
||||
@NotEmpty(message = "线索编号不能为空")
|
||||
private Set<Long> ids;
|
||||
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.clue.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 线索更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CrmClueUpdateReqVO extends CrmClueBaseVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10969")
|
||||
@NotNull(message = "编号不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.contact.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - CRM 联系人商机 Request VO") // 用于关联,取消关联的操作
|
||||
@Data
|
||||
public class CrmContactBusinessReqVO {
|
||||
|
||||
@Schema(description = "联系人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20878")
|
||||
@NotNull(message="联系人不能为空")
|
||||
private Long contactId;
|
||||
|
||||
@Schema(description = "商机编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "7638")
|
||||
@NotEmpty(message="商机不能为空")
|
||||
private List<Long> businessIds;
|
||||
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.contact.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - CRM 联系人创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CrmContactCreateReqVO extends CrmContactBaseVO {
|
||||
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.contact.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - CRM 联系人的精简 Response VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class CrmContactSimpleRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "3167")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "姓名", example = "芋艿")
|
||||
private String name;
|
||||
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.contact.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - CRM 联系人更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CrmContactUpdateReqVO extends CrmContactBaseVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "3167")
|
||||
@NotNull(message = "主键不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.contactbusinesslink.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - CRM 联系人商机关联 Response VO")
|
||||
@Data
|
||||
public class CrmContactBusinessLinkRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17220")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "联系人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20878")
|
||||
private Long contactId;
|
||||
|
||||
@Schema(description = "商机编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7638")
|
||||
private Long businessId;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.contactbusinesslink.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - CRM 联系人商机关联新增/修改 Request VO")
|
||||
@Data
|
||||
public class CrmContactBusinessLinkSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17220")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "联系人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "20878")
|
||||
@NotNull(message="联系人不能为空")
|
||||
private Long contactId;
|
||||
|
||||
@Schema(description = "商机编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7638")
|
||||
@NotNull(message="商机不能为空")
|
||||
private Long businessId;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue