部门统计bug修复
This commit is contained in:
+4
-4
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user