智慧保安后台管理项目备份
Administrator
2021-12-06 e62fac2c0b345eb40097cf55188f57a17f65af89
src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java
@@ -42,7 +42,29 @@
   @Override
   public IPage<InformationVO> selectInformationPage(IPage<InformationVO> page, InformationVO information) {
      return page.setRecords(baseMapper.selectInformationPage(page, information));
      List<InformationVO> informationVOS = baseMapper.selectInformationPage(page, information);
      //遍历
      if (informationVOS.size()>0){
         //判断有无子级
         for (InformationVO informationVO : informationVOS) {
            List<Dept> deptList = baseMapper.getDeptHashChildren(informationVO);
            //有子级
            if (deptList.size()>0){
               Dept dept = new Dept();
               dept.setId(Long.parseLong(informationVO.getDepartmentid()));
               //查询当前子单位的人数
               Integer z = baseMapper.selectInformationUserNumCount(dept) + Integer.parseInt(informationVO.getZnum());
               informationVO.setZnum(z.toString());
               //已派遣人数
               Integer p = baseMapper.selectInformationDispatcherNumCount(dept) + Integer.parseInt(informationVO.getPnum());
               informationVO.setPnum(p.toString());
               //持证人数
               Integer c = baseMapper.selectInformationHoldNumCount(dept) + Integer.parseInt(informationVO.getCnum());
               informationVO.setCnum(c.toString());
            }
         }
      }
      return page.setRecords(informationVOS);
   }
   @Override
@@ -230,7 +252,7 @@
      if (list.size()>0) {
         //遍历
         for (InformationStatisticsVO informationStatisticsVO : list) {
            List<Dept> deptList = baseMapper.getDeptHashChildren(informationStatisticsVO);
            List<Dept> deptList = baseMapper.getDeptHashChildrens(informationStatisticsVO);
            //有子级
            if (deptList.size()>0){
               Dept dept = new Dept();