suntianwu 3 роки тому
батько
коміт
e0514b8564

+ 25 - 0
src/main/java/com/care/client/service/PinanbaoDeviceService.java

@@ -16,6 +16,7 @@ import com.care.common.service.*;
 import com.care.common.vo.device.StationVO;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.compress.utils.Lists;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -112,6 +113,30 @@ public class PinanbaoDeviceService {
         vo.setChambName(chamb.getName());
         vo.setChambPhone(chamb.getPhone());
         vo.setStationName(this.careStationService.getById(vo.getStationId()).getShortName());
+        if(StringUtils.isNotEmpty(vo.getDevScene())){
+            vo.setIsHasScene(true);
+        } else {
+            vo.setIsHasScene(false);
+        }
+
+        if((vo.getFallingbedResponseTime() != null && vo.getFallingbedResponseTime() > 0)
+               || (vo.getFallResponseTime() != null && vo.getFallResponseTime() > 0)
+                || (vo.getLonglagResponseTime() != null && vo.getLonglagResponseTime() > 0)){
+            vo.setIsHasResponseTime(true);
+        } else {
+            vo.setIsHasResponseTime(false);
+        }
+        if(CollUtil.isNotEmpty(queryMyOlderListByDeviceId(id))){
+            vo.setIsHasOlder(true);
+        } else {
+            vo.setIsHasOlder(false);
+        }
+        if(CollUtil.isNotEmpty(queryMyContactListByDeviceId(id))){
+            vo.setIsHasConnector(true);
+        } else {
+            vo.setIsHasConnector(false);
+        }
+
         return vo;
     }
     /**

+ 10 - 0
src/main/java/com/care/client/vo/DeviceVO.java

@@ -102,5 +102,15 @@ public class DeviceVO {
     @ApiModelProperty("关联用户号码")
     private String memberPhone;
 
+    @ApiModelProperty("标签是否设置")
+    private Boolean isHasScene;
 
+    @ApiModelProperty("被监护人是否设置")
+    private Boolean isHasOlder;
+
+    @ApiModelProperty("紧急联系人是否设置")
+    private Boolean isHasConnector;
+
+    @ApiModelProperty("响应时间是否设置")
+    private Boolean isHasResponseTime;
 }