智慧保安后台管理-外网
Administrator
2021-11-23 d4ad4cd6c127aa5944685c4aa098e0015139e1a4
src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java
@@ -66,7 +66,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){
               for (Dept dept : deptList) {
                  //查询当前子单位的人数
                  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