jihs 3 gadi atpakaļ
vecāks
revīzija
e23c5011d0

+ 1 - 1
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/mapper/ActNodeMapper.java

@@ -29,6 +29,6 @@ public interface ActNodeMapper extends BaseMapper<ActNode> {
     List<LoginUser> queryAllUser();
     @Select("select * from sys_user where id in (select user_id from sys_user_role where role_id = #{id})")
     List<LoginUser> findUserByRoleId(@Param("id") String id);
-    @Select("select * from sys_user where id in (select user_id from sys_user_depart where dep_id = #{id})")
+    @Select("select * from sys_user where id in (select user_id from sys_user_depart where dep_id = #{id}) and identity = 2")
     List<LoginUser> findUserDepartmentId(@Param("id") String id);
 }

+ 7 - 0
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/service/Impl/ActNodeServiceImpl.java

@@ -50,6 +50,13 @@ public class ActNodeServiceImpl extends ServiceImpl<ActNodeMapper, ActNode> impl
         }
         return false;
     }
+    public Boolean hasChooseDepHeader2(String nodeId) {
+        List<ActNode> listNode = findByNodeIdAndType(nodeId, 5);
+        if(listNode!=null&&listNode.size()>0){
+            return true;
+        }
+        return false;
+    }
     public Boolean hasChooseSponsor(String nodeId) {
         List<ActNode> listNode = findByNodeIdAndType(nodeId, 3);
         if(listNode!=null&&listNode.size()>0){

+ 1 - 1
jeecg-boot/jeecg-boot-module-activiti/src/main/java/org/jeecg/modules/activiti/web/ActivitiProcessController.java

@@ -360,7 +360,7 @@ public class ActivitiProcessController {
     @RequestMapping(value = "/getNextNode", method = RequestMethod.GET)
     @ApiOperation(value = "通过当前节点定义id获取下一个节点")
     public Result getNextNode(@ApiParam("当前节点定义id")  String procDefId,
-                                             @ApiParam("当前节点定义id")  String currActId){
+                             @ApiParam("当前节点定义id")  String currActId){
         ProcessNodeVo node = actZprocessService.getNextNode(procDefId, currActId);
         return Result.ok(node);
     }

+ 3 - 1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDictController.java

@@ -549,7 +549,9 @@ public class SysDictController {
 			for(String id : ids){
 				List<SysDictItem> sysDictItems = sysDictItemService.list(new LambdaQueryWrapper<SysDictItem>().eq(SysDictItem::getDictId, id));
 				List<DictModel> dictModels = new ArrayList<DictModel>();
-//				sysDictItem.parallelStream().reduce((a, b) -> new DictModel(a.getItemValue(), a.getItemText())).ifPresent(dictModels::add);
+//				 sysDictItems.stream().forEach(t -> {
+//				 	Optional.ofNullable(new DictModel(t.getItemValue(), t.getItemText())).ifPresent(dictModels::add);
+//				 });
 				for(SysDictItem sysDictItem : sysDictItems){
 					dictModels.add(new DictModel(sysDictItem.getItemValue(), sysDictItem.getItemText()));
 				}

+ 28 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java

@@ -93,6 +93,7 @@ public class SysUserController {
 		Result<IPage<SysUser>> result = new Result<IPage<SysUser>>();
 		QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap());
 		Page<SysUser> page = new Page<SysUser>(pageNo, pageSize);
+        queryWrapper.orderByAsc("create_time");
 		IPage<SysUser> pageList = sysUserService.page(page, queryWrapper);
 
 		//批量查询用户的所属部门
@@ -1064,4 +1065,31 @@ public class SysUserController {
         return Result.ok("删除成功");
     }
 
+
+    @RequestMapping(value = "/list2", method = RequestMethod.GET)
+    public Result<IPage<SysUser>> queryPageList2(SysUser user,@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                                @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,HttpServletRequest req) {
+        Result<IPage<SysUser>> result = new Result<IPage<SysUser>>();
+        QueryWrapper<SysUser> queryWrapper = QueryGenerator.initQueryWrapper(user, req.getParameterMap());
+        Page<SysUser> page = new Page<SysUser>(pageNo, pageSize);
+        queryWrapper.orderByAsc("convert(realname using gbk)");
+        IPage<SysUser> pageList = sysUserService.page(page, queryWrapper);
+
+        //批量查询用户的所属部门
+        //step.1 先拿到全部的 useids
+        //step.2 通过 useids,一次性查询用户的所属部门名字
+        List<String> userIds = pageList.getRecords().stream().map(SysUser::getId).collect(Collectors.toList());
+        if(userIds!=null && userIds.size()>0){
+            Map<String,String>  useDepNames = sysUserService.getDepNamesByUserIds(userIds);
+            pageList.getRecords().forEach(item->{
+                //TODO 临时借用这个字段用于页面展示
+                item.setOrgCode(useDepNames.get(item.getId()));
+            });
+        }
+        result.setSuccess(true);
+        result.setResult(pageList);
+        log.info(pageList.toString());
+        return result;
+    }
+
 }