hfxc226 3 年之前
父节点
当前提交
2c46c4e0c3

+ 7 - 1
platform-service/src/main/java/com/platform/service/fill/impl/FillExecuteServiceImpl.java

@@ -98,8 +98,14 @@ public class FillExecuteServiceImpl extends BaseServiceImpl<FillExecuteMapper, F
             }
         }
         SbInfo sbInfo = sbInfoMapper.selectByPrimaryKey(sbId);
+
         SbModel sbModel = sbModelMapper.selectByPrimaryKey(sbInfo.getModelId());
-        Integer sbUseType = sbModel.getUseType();
+        Integer sbUseType = 0;
+        if(sbModel == null){
+             sbUseType = sbInfo.getUseType();
+        }else{
+            sbUseType = sbModel.getUseType();
+        }
         List<FillExecuteVO> fillInfos = fillGatherMapper.selectFillInfoByCodeIdUseType(new FillGatherDTO().setCodeId(sbUseType).setUseType(useType));
         if (CollectionUtil.isEmpty(fillInfos)) {
             throw new BusinessException("该设备没有配置填报项,请核对填报配置与设备类型");