Commit ce4b83419c187565abb71fd3e5b676b25ee992e4

Authored by 陈强
1 parent bf74ff94

Bug修改

... ... @@ -156,8 +156,10 @@ public class SafetyObservationService extends BaseServiceImpl<SafetyObservation>
156 156 }
157 157 // 走访工位数:当日明细记录条数
158 158 int gws = dayList.size();
159   - // 问题数:直接取异常数字段汇总
160   - Double wts = dayList.stream().mapToDouble(item -> item.getExceptionNum()).sum();
  159 + // 问题数:直接取异常数字段汇总(exceptionNum 可能为 null,null 视为 0 避免拆箱空指针)
  160 + Double wts = dayList.stream()
  161 + .mapToDouble(item -> item.getExceptionNum() == null ? 0.0d : item.getExceptionNum())
  162 + .sum();
161 163
162 164 result.add(new SafetyObservationDailySummaryDTO(dateKey, gws, wts));
163 165 }
... ...
... ... @@ -23,7 +23,7 @@ spring:
23 23 # filters: stat,wall,log4j
24 24 # useGlobalDataSourceStat: true
25 25 datasource:
26   - url: jdbc:kingbase8://10.109.0.110:54321/kingbase?currentSchema=qixiao-apaas
  26 + url: jdbc:kingbase8://10.9.0.110:54321/kingbase?currentSchema=qixiao-apaas
27 27 username: root
28 28 password: Kingbase@2026.com
29 29 type: com.alibaba.druid.pool.DruidDataSource
... ...