|
@@ -1337,6 +1337,13 @@ public class CzrkServiceImpl implements ICzrkService {
|
|
|
// 镇领导,只能查看本镇下人员
|
|
|
//获取本镇下所有乡村
|
|
|
List<SysDept> allDepts = remoteDeptService.listChildrenDepts(dept.getId());
|
|
|
+ List<SysDept> cunDepts = new ArrayList<>(16);
|
|
|
+ for (SysDept dep : allDepts) {
|
|
|
+ if (isEmpty(dep.getParentId())) continue;
|
|
|
+ if (dept.getId().equals(dep.getParentId())) {
|
|
|
+ cunDepts.add(dep);
|
|
|
+ }
|
|
|
+ }
|
|
|
//获取本镇所有人员
|
|
|
List<Czrk> czrkList = czrkMapper.getAllCzrkVillageTownsId(dept.getAreaId());
|
|
|
|
|
@@ -1365,7 +1372,7 @@ public class CzrkServiceImpl implements ICzrkService {
|
|
|
|
|
|
// 以各个镇为单位单独处理 townsDepts
|
|
|
ArrayList<JSONObject> towsDataList = new ArrayList<>(20);
|
|
|
- for (SysDept townsDept : allDepts) {
|
|
|
+ for (SysDept townsDept : cunDepts) {
|
|
|
JSONObject townsResult = new JSONObject(16);
|
|
|
townStsvaccineCun(townsResult, townsDept, czrkList);
|
|
|
towsDataList.add(townsResult);
|
|
@@ -1425,7 +1432,17 @@ public class CzrkServiceImpl implements ICzrkService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- List<SysDept> allDepts = remoteDeptService.listChildrenDepts(deptId);
|
|
|
+ List<SysDept> depts = remoteDeptService.listChildrenDepts(deptId);
|
|
|
+
|
|
|
+ List<SysDept> cunDepts = new ArrayList<>(16);
|
|
|
+ for (SysDept dep : depts) {
|
|
|
+ if (isEmpty(dep.getParentId())) continue;
|
|
|
+ if (deptId.equals(dep.getParentId())) {
|
|
|
+ cunDepts.add(dep);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//获取本镇所有人员
|
|
|
List<Czrk> czrkList = czrkMapper.getAllCzrkVillageTownsId(code);
|
|
|
|
|
@@ -1454,7 +1471,7 @@ public class CzrkServiceImpl implements ICzrkService {
|
|
|
|
|
|
// 以各个镇为单位单独处理 townsDepts
|
|
|
ArrayList<JSONObject> towsDataList = new ArrayList<>(20);
|
|
|
- for (SysDept townsDept : allDepts) {
|
|
|
+ for (SysDept townsDept : cunDepts) {
|
|
|
JSONObject townsResult = new JSONObject(16);
|
|
|
townStsvaccineCun(townsResult, townsDept, czrkList);
|
|
|
towsDataList.add(townsResult);
|
|
@@ -1567,7 +1584,7 @@ public class CzrkServiceImpl implements ICzrkService {
|
|
|
|
|
|
//循环所有人判断当前总人数,该镇 户籍人口今日新增,该镇 户籍人口今日减少
|
|
|
for (Czrk czrk : czrkList) {
|
|
|
- if (StringUtils.isNotEmpty(czrk.getVillageTownsId()) && String.valueOf(czrk.getVillageTownsId()).equals(areaId)) {
|
|
|
+ if (StringUtils.isNotEmpty(czrk.getVillageId()) && String.valueOf(czrk.getVillageId()).equals(areaId)) {
|
|
|
if ("1".equals(czrk.getStatus())) {
|
|
|
hjzrs++;
|
|
|
}
|