fengjin
2022-11-17 76883184a1be9f941a809468ae1592d268478648
flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java
@@ -78,15 +78,25 @@
                                          @RequestParam(value = "pageSize",required = false) Integer pageSize,
                                          @RequestParam(value = "keyword",required = false) String keyword,
                                          @RequestParam(value = "classifyGrade",required = false) String classifyGrade,
                                          @RequestParam(value = "departmentId",required = false) String departmentId,
                                          @CurrentUser SysUser sysUser)
    {
        Assert.notNull(pageNum, "pageNum 不能为空");
        Assert.notNull(pageSize, "pageSize 不能为空");
        Page<TransactionEvent> pageParam = new Page<>(pageNum,pageSize);
//        List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId());
        List<TransactionEvent> list = iTransactionEventService.selectConfigList(pageParam,pageSize,keyword,
        List<TransactionEvent> list;
        int num;
        if (departmentId!=null&&departmentId.length()>0){
            List<String> ids=iOrganizationChartService.getDepartmentId(departmentId);
            list = iTransactionEventService.selectConfigList(pageParam,pageSize,keyword,
                    classifyGrade,ids);
              num=iTransactionEventService.countNum(keyword,classifyGrade,ids);
        }else {
               list = iTransactionEventService.selectConfigList(pageParam,pageSize,keyword,
                classifyGrade,null);
        int num=iTransactionEventService.countNum(keyword,classifyGrade,null);
              num=iTransactionEventService.countNum(keyword,classifyGrade,null);
        }
        return getDataTable(list,num);
    }