部门统计bug修复

This commit is contained in:
wanghao
2026-01-09 16:06:36 +08:00
parent 410bd6efa6
commit 58acc58338
7 changed files with 50 additions and 4 deletions
@@ -640,9 +640,9 @@ public class DeptStatisticDataServiceImpl extends ServiceImpl<DeptStatisticDataM
private DeptStatData transferData(SysDepart depart, DepartStatTransfer transfer) {
DeptStatData deptStatData = new DeptStatData();
String orgCode = depart.getOrgCode();
String orgCode = null != depart ? depart.getOrgCode() : null;
boolean allSecond = StrUtil.isEmpty(transfer.filter().getOrgCode());
boolean isSecond = orgCode.length() == 6;
boolean isSecond = StrUtil.isNotEmpty(orgCode) && orgCode.length() == 6;
if (isSecond) {
deptStatData.setOrgCode(orgCode);
deptStatData.setOrgCodeLeaf(orgCode);
@@ -657,7 +657,7 @@ public class DeptStatisticDataServiceImpl extends ServiceImpl<DeptStatisticDataM
deptStatData.setOrgCode(Optional.ofNullable(transfer.secondDepart()).map(SysDepart::getOrgCode).orElse(""));
deptStatData.setOrgCodeLeaf(orgCode);
deptStatData.setOrgCodeName(Optional.ofNullable(transfer.secondDepart()).map(SysDepart::getDepartName).orElse(""));
deptStatData.setOrgCodeLeafName(depart.getDepartName());
deptStatData.setOrgCodeLeafName(null!=depart ? depart.getDepartName() : "");
}
fillWatchNums(
deptStatData,
@@ -802,7 +802,7 @@ public class DeptStatisticDataServiceImpl extends ServiceImpl<DeptStatisticDataM
} else {
return departDeviceNumMap.keySet()
.stream()
.map(sysCache::getDepartByOrgCode)
.map(sysBaseAPI::getDepartIdsByOrgCodeNew)
.sorted(this::departComparator)
.collect(Collectors.toList());
}