瀏覽代碼

Merge branch 'demo_' of http://124.71.196.186:8888/hfxc226/hitch-manage into demo_

guarantee-lsq 1 年之前
父節點
當前提交
e67cb9e62f
共有 1 個文件被更改,包括 9 次插入4 次删除
  1. 9 4
      platform-service/src/main/java/com/platform/service/sb/impl/SbInfoServiceImpl.java

+ 9 - 4
platform-service/src/main/java/com/platform/service/sb/impl/SbInfoServiceImpl.java

@@ -1188,7 +1188,6 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
 
 
     private void setSbNum(LocalDateTime now, SbInfoWorkplaceVO vo) {
-
         List<SbInfo> sbInfoList = mapper.selectAll();
         // 设置使用中数据,维修,调拨中,报废数据
 
@@ -1203,9 +1202,15 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
                 sbInfoWorkplacePieVO.setItem((String) statusMap.get("name"));
                 int num = 0;
                 for (SbInfo sbInfo : sbInfoList) {
-                    if (sbInfo.getStatus().equals(statusMap.get("value"))) {
-                        num++;
-                    }
+//                    try {
+                        if (sbInfo.getStatus()!=null&&sbInfo.getStatus().equals(statusMap.get("value"))) {
+                            num++;
+//                        }
+//                    }catch (Exception e){
+//                        System.out.println("设备位号:"+ sbInfo.getPositionNo()+" "+"设备编号:"+ sbInfo.getPositionNo()+" "+"设备状态:"+ sbInfo.getStatus());
+//                    }
+                        }
+
                 }
                 sbInfoWorkplacePieVO.setCount(num);
                 sbInfoWorkplacePieVO.setStatus((Integer) statusMap.get("value"));