Browse Source

排名

develop
bobol 6 months ago
parent
commit
0a9b99882a
  1. 2
      lzbi-module/src/main/java/com/lzbi/bi/domain/dto/MultiOrgSomeReportEverydayData.java
  2. 13
      lzbi-module/src/main/java/com/lzbi/bi/domain/vo/SomeReportDataRankingVO.java
  3. 8
      lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java
  4. 7
      lzbi-system/src/main/java/com/lzbi/system/service/ISysDeptService.java
  5. 9
      lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java
  6. 3
      lzbi-system/src/main/resources/mapper/system/SysDeptMapper.xml

2
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 {
}

13
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;
}

8
lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java

@ -127,4 +127,12 @@ public interface SysDeptMapper
List<SysDept> selectDeptListByRoleIds(List<Long> ids);
List<SysDept> selectBatchIds(@Param("ids") Collection<Long> ids);
/**
* 查询某类型下级部门的数量
* @param deptId
* @param orgType
* @return
*/
Integer selectSomeTypeChildrenDeptCount(@Param("deptId") Long deptId, @Param("orgType") String orgType);
}

7
lzbi-system/src/main/java/com/lzbi/system/service/ISysDeptService.java

@ -143,4 +143,11 @@ public interface ISysDeptService
public List<SysDept> selectCompany(Long parentId);
public HashMap<Long,String> selectDeptMap();
/**
* 查询某类型下级部门数量
* @param deptId 部门id
* @param orgType 部门类型
* @return 数量
*/
int selectSomeTypeChildrenDeptCount(Long deptId, String orgType);
}

9
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;
}
/**
* 递归列表
*/

3
lzbi-system/src/main/resources/mapper/system/SysDeptMapper.xml

@ -149,6 +149,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{deptId}
</foreach>
</select>
<select id="selectSomeTypeChildrenDeptCount" resultType="java.lang.Integer">
select count(*) from sys_dept where org_type = #{orgType} and FIND_IN_SET( #{deptId}, ancestors) and status = 0 and del_flag = '0'
</select>
<insert id="insertDept" parameterType="SysDept">
insert into sys_dept(

Loading…
Cancel
Save