From a19eb9f3c3d07363830a274fc0493d311b1a85f8 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 27 Nov 2021 18:01:12 +0800
Subject: [PATCH] 公司单位人数统计修改
---
src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java b/src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java
index f431ef3..83de7b1 100644
--- a/src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java
+++ b/src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java
@@ -74,17 +74,17 @@
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());
- }
+ 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());
}
}
}
--
Gitblit v1.9.3