mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 02:08:43 +08:00 
			
		
		
		
	同步最新的表结构
This commit is contained in:
		
							
								
								
									
										3017
									
								
								sql/activiti.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3017
									
								
								sql/activiti.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -139,7 +139,7 @@ public class BpmUserTaskActivitiBehavior extends UserTaskActivityBehavior { | ||||
|     } | ||||
|  | ||||
|     private Set<Long> calculateTaskCandidateUsersByDeptMember(TaskEntity task, BpmTaskAssignRuleDO rule) { | ||||
|         List<SysUserDO> users = userService.getUsersByPostIds(rule.getOptions()); | ||||
|         List<SysUserDO> users = userService.getUsersByDeptIds(rule.getOptions()); | ||||
|         return convertSet(users, SysUserDO::getId); | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -158,7 +158,7 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService { | ||||
|     private void validTaskAssignRuleOptions(Integer type, Set<Long> options) { | ||||
|         if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.ROLE.getType())) { | ||||
|             roleService.validRoles(options); | ||||
|         } else if (ObjectUtils.equalsAny(BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(), | ||||
|         } else if (ObjectUtils.equalsAny(type, BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(), | ||||
|                 BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType())) { | ||||
|             deptService.validDepts(options); | ||||
|         } else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.POST.getType())) { | ||||
|   | ||||
| @@ -68,7 +68,7 @@ public interface SysUserMapper extends BaseMapperX<SysUserDO> { | ||||
|         return selectList("status", status); | ||||
|     } | ||||
|  | ||||
|     default List<SysUserDO> selectListByDeptIds(Collection<Integer> deptIds) { | ||||
|     default List<SysUserDO> selectListByDeptIds(Collection<Long> deptIds) { | ||||
|         return selectList("dept_id", deptIds); | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -188,7 +188,7 @@ public interface SysUserService { | ||||
|      * @param deptIds 部门数组 | ||||
|      * @return 用户数组 | ||||
|      */ | ||||
|     List<SysUserDO> getUsersByDeptIds(Collection<Integer> deptIds); | ||||
|     List<SysUserDO> getUsersByDeptIds(Collection<Long> deptIds); | ||||
|  | ||||
|     /** | ||||
|      * 校验用户们是否有效。如下情况,视为无效: | ||||
|   | ||||
| @@ -402,7 +402,7 @@ public class SysUserServiceImpl implements SysUserService { | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public List<SysUserDO> getUsersByDeptIds(Collection<Integer> deptIds) { | ||||
|     public List<SysUserDO> getUsersByDeptIds(Collection<Long> deptIds) { | ||||
|         if (CollUtil.isEmpty(deptIds)) { | ||||
|             return Collections.emptyList(); | ||||
|         } | ||||
|   | ||||
| @@ -20,6 +20,7 @@ import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||||
| import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||||
| import cn.iocoder.yudao.framework.common.util.collection.ArrayUtils; | ||||
| import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | ||||
| import cn.iocoder.yudao.framework.common.util.collection.SetUtils; | ||||
| import cn.iocoder.yudao.framework.common.util.object.ObjectUtils; | ||||
| import org.junit.jupiter.api.Test; | ||||
| import org.mockito.stubbing.Answer; | ||||
| @@ -29,17 +30,19 @@ import org.springframework.security.crypto.password.PasswordEncoder; | ||||
|  | ||||
| import javax.annotation.Resource; | ||||
| import java.io.ByteArrayInputStream; | ||||
| import java.util.List; | ||||
| import java.util.Set; | ||||
| import java.util.*; | ||||
| import java.util.function.Consumer; | ||||
|  | ||||
| import static cn.hutool.core.util.RandomUtil.randomBytes; | ||||
| import static cn.hutool.core.util.RandomUtil.randomEle; | ||||
| import static cn.iocoder.yudao.adminserver.modules.system.enums.SysErrorCodeConstants.*; | ||||
| import static cn.iocoder.yudao.framework.common.util.collection.SetUtils.asSet; | ||||
| import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; | ||||
| import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; | ||||
| import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; | ||||
| import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; | ||||
| import static java.util.Collections.singleton; | ||||
| import static java.util.Collections.singletonList; | ||||
| import static org.assertj.core.util.Lists.newArrayList; | ||||
| import static org.junit.jupiter.api.Assertions.assertEquals; | ||||
| import static org.junit.jupiter.api.Assertions.assertNull; | ||||
| @@ -577,6 +580,23 @@ public class SysUserServiceImplTest extends BaseDbUnitTest { | ||||
|         verify(passwordEncoder, times(1)).matches(eq(oldPassword), eq(user.getPassword())); | ||||
|     } | ||||
|  | ||||
|     @Test | ||||
|     public void testUsersByPostIds() { | ||||
|         // 准备参数 | ||||
|         Collection<Long> postIds = asSet(10L, 20L); | ||||
|         // mock 方法 | ||||
|         SysUserDO user1 = randomSysUserDO(o -> o.setPostIds(asSet(10L, 30L))); | ||||
|         userMapper.insert(user1); | ||||
|         SysUserDO user2 = randomSysUserDO(o -> o.setPostIds(singleton(100L))); | ||||
|         userMapper.insert(user2); | ||||
|  | ||||
|         // 调用 | ||||
|         List<SysUserDO> result = userService.getUsersByPostIds(postIds); | ||||
|         // 断言 | ||||
|         assertEquals(1, result.size()); | ||||
|         assertEquals(user1, result.get(0)); | ||||
|     } | ||||
|  | ||||
|     // ========== 随机对象 ========== | ||||
|  | ||||
|     @SafeVarargs | ||||
|   | ||||
| @@ -129,6 +129,11 @@ | ||||
|         <el-form-item label="流程名称" prop="name"> | ||||
|           <el-input v-model="form.name" placeholder="请输入流程名称" :disabled="form.id" clearable /> | ||||
|         </el-form-item> | ||||
|         <el-form-item v-if="form.id" label="流程分类" prop="category"> | ||||
|           <el-select v-model="form.category" placeholder="请选择流程分类" clearable style="width: 100%"> | ||||
|             <el-option v-for="dict in categoryDictDatas" :key="dict.value" :label="dict.label" :value="dict.value"/> | ||||
|           </el-select> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="流程描述" prop="description"> | ||||
|           <el-input type="textarea" v-model="form.description" clearable /> | ||||
|         </el-form-item> | ||||
| @@ -270,6 +275,7 @@ export default { | ||||
|         name: [{ required: true, message: "流程名称不能为空", trigger: "blur" }], | ||||
|         formType: [{ required: true, message: "流程名称不能为空", trigger: "blur" }], | ||||
|         formId: [{ required: true, message: "业务表单不能为空", trigger: "blur" }], | ||||
|         category: [{ required: true, message: "流程分类不能为空", trigger: "blur" }], | ||||
|         formCustomCreatePath: [{ required: true, message: "表单提交路由不能为空", trigger: "blur" }], | ||||
|         formCustomViewPath: [{ required: true, message: "表单查看路由不能为空", trigger: "blur" }], | ||||
|       }, | ||||
| @@ -331,6 +337,7 @@ export default { | ||||
|         key: undefined, | ||||
|         name: undefined, | ||||
|         description: undefined, | ||||
|         category: undefined, | ||||
|         formType: undefined, | ||||
|         formId: undefined, | ||||
|         formCustomCreatePath: undefined, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV