Explorar o código

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

guarantee-lsq hai 1 ano
pai
achega
e67cb9e62f

+ 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"));