From 0a9b99882a75196d095bba38fd712a893bbdfddb Mon Sep 17 00:00:00 2001 From: bobol Date: Mon, 3 Jun 2024 17:43:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/dto/MultiOrgSomeReportEverydayData.java | 2 ++ .../lzbi/bi/domain/vo/SomeReportDataRankingVO.java | 13 +++++++++++++ .../java/com/lzbi/system/mapper/SysDeptMapper.java | 8 ++++++++ .../com/lzbi/system/service/ISysDeptService.java | 7 +++++++ .../system/service/impl/SysDeptServiceImpl.java | 9 +++++++++ .../main/resources/mapper/system/SysDeptMapper.xml | 5 ++++- 6 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 lzbi-module/src/main/java/com/lzbi/bi/domain/dto/MultiOrgSomeReportEverydayData.java create mode 100644 lzbi-module/src/main/java/com/lzbi/bi/domain/vo/SomeReportDataRankingVO.java diff --git a/lzbi-module/src/main/java/com/lzbi/bi/domain/dto/MultiOrgSomeReportEverydayData.java b/lzbi-module/src/main/java/com/lzbi/bi/domain/dto/MultiOrgSomeReportEverydayData.java new file mode 100644 index 0000000..aca9881 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bi/domain/dto/MultiOrgSomeReportEverydayData.java @@ -0,0 +1,2 @@ +package com.lzbi.bi.domain.dto;public class MultiOrgSomeReportEverydayData { +} diff --git a/lzbi-module/src/main/java/com/lzbi/bi/domain/vo/SomeReportDataRankingVO.java b/lzbi-module/src/main/java/com/lzbi/bi/domain/vo/SomeReportDataRankingVO.java new file mode 100644 index 0000000..d4272a2 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/bi/domain/vo/SomeReportDataRankingVO.java @@ -0,0 +1,13 @@ +package com.lzbi.bi.domain.vo; + +import lombok.Data; + +@Data +public class ChildrenOrgReportDataRankingVO { + + private String cdate; + + private String cname; + + private String cut; +} diff --git a/lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java b/lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java index 9281005..a9e3f28 100644 --- a/lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java +++ b/lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java @@ -127,4 +127,12 @@ public interface SysDeptMapper List selectDeptListByRoleIds(List ids); List selectBatchIds(@Param("ids") Collection ids); + + /** + * 查询某类型下级部门的数量 + * @param deptId + * @param orgType + * @return + */ + Integer selectSomeTypeChildrenDeptCount(@Param("deptId") Long deptId, @Param("orgType") String orgType); } diff --git a/lzbi-system/src/main/java/com/lzbi/system/service/ISysDeptService.java b/lzbi-system/src/main/java/com/lzbi/system/service/ISysDeptService.java index cbd3a32..c405159 100644 --- a/lzbi-system/src/main/java/com/lzbi/system/service/ISysDeptService.java +++ b/lzbi-system/src/main/java/com/lzbi/system/service/ISysDeptService.java @@ -143,4 +143,11 @@ public interface ISysDeptService public List selectCompany(Long parentId); public HashMap selectDeptMap(); + /** + * 查询某类型下级部门数量 + * @param deptId 部门id + * @param orgType 部门类型 + * @return 数量 + */ + int selectSomeTypeChildrenDeptCount(Long deptId, String orgType); } diff --git a/lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java b/lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java index 22358cd..e11bad3 100644 --- a/lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java +++ b/lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java @@ -448,6 +448,15 @@ public class SysDeptServiceImpl implements ISysDeptService { return deptMapper.selectDeptMap(); } + @Override + public int selectSomeTypeChildrenDeptCount(Long deptId, String orgType) { + Integer i = deptMapper.selectSomeTypeChildrenDeptCount(deptId, orgType); + if (null == i) { + i = 0; + } + return i; + } + /** * 递归列表 */ diff --git a/lzbi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/lzbi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 8988d27..5f329df 100644 --- a/lzbi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/lzbi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -149,8 +149,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{deptId} + - + insert into sys_dept( dept_id, parent_id,