|
|
@@ -6,7 +6,6 @@ import com.coffee.bus.registry.constant.PatientKeyConstant;
|
|
|
import com.coffee.bus.registry.patient.bean.DeviceTimeSmallInfo;
|
|
|
import com.coffee.bus.registry.patient.bean.PatientCacheInfo;
|
|
|
import com.coffee.common.cache.ConfigStorage;
|
|
|
-import com.coffee.common.cache.value.Value;
|
|
|
import com.coffee.common.enums.SexEnum;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
|
|
@@ -30,45 +29,45 @@ public class ClusterPatientOperator implements PatientOperator<PatientCacheInfo>
|
|
|
|
|
|
@Override
|
|
|
public PatientCacheInfo get() {
|
|
|
- Map<String, Value> result = configStorage.getKeys(getAllKeys());
|
|
|
- PatientCacheInfo cacheInfo = PatientCacheInfo.builder().build();
|
|
|
- Value code =parseValue(result.get("code")) ;
|
|
|
- if(code!=null&&code.get()!=null){
|
|
|
- cacheInfo.setCode(code.asString());
|
|
|
- }
|
|
|
- Value gender =parseValue(result.get("gender"));
|
|
|
- if(gender!=null&&gender.get()!=null){
|
|
|
- cacheInfo.setGender(gender.as(SexEnum.class));
|
|
|
- }
|
|
|
- Value name =parseValue( result.get("name"));
|
|
|
- if(name!=null&&name.get()!=null){
|
|
|
- cacheInfo.setName(name.asString());
|
|
|
- }
|
|
|
- Value tenantId =parseValue(result.get("tenantId")) ;
|
|
|
- if(tenantId!=null&&tenantId.get()!=null){
|
|
|
- cacheInfo.setTenantId(tenantId.asString());
|
|
|
- }
|
|
|
- Value clinicId =parseValue(result.get("clinicId")) ;
|
|
|
- if(clinicId!=null&&clinicId.get()!=null){
|
|
|
- cacheInfo.setClinicId(clinicId.asString());
|
|
|
- }
|
|
|
- Value startTime = parseValue(result.get("startTime"));
|
|
|
- if(startTime!=null&&startTime.get()!=null){
|
|
|
- cacheInfo.setStartTime(startTime.asDate());
|
|
|
- }
|
|
|
- Value finished = parseValue(result.get("finished"));
|
|
|
- if(finished!=null&&finished.get()!=null){
|
|
|
- cacheInfo.setIsFinished(finished.asBoolean());
|
|
|
- }
|
|
|
- Value bindDeviceId =parseValue( result.get("bindDeviceId"));
|
|
|
- if(bindDeviceId!=null&&bindDeviceId.get()!=null){
|
|
|
- cacheInfo.setBindDeviceId(bindDeviceId.asString());
|
|
|
- }
|
|
|
- Value devices = parseValue(result.get("devices"));
|
|
|
- if(devices!=null&&devices.get()!=null){
|
|
|
- cacheInfo.setDevices(code.as(HashSet.class));
|
|
|
- }
|
|
|
- return cacheInfo;
|
|
|
+// Map<String, Value> result = configStorage.getKeys(getAllKeys());
|
|
|
+// PatientCacheInfo cacheInfo = PatientCacheInfo.builder().build();
|
|
|
+// Value code =parseValue(result.get("code")) ;
|
|
|
+// if(code!=null&&code.get()!=null){
|
|
|
+// cacheInfo.setCode(code.asString());
|
|
|
+// }
|
|
|
+// Value gender =parseValue(result.get("gender"));
|
|
|
+// if(gender!=null&&gender.get()!=null){
|
|
|
+// cacheInfo.setGender(gender.as(SexEnum.class));
|
|
|
+// }
|
|
|
+// Value name =parseValue( result.get("name"));
|
|
|
+// if(name!=null&&name.get()!=null){
|
|
|
+// cacheInfo.setName(name.asString());
|
|
|
+// }
|
|
|
+// Value tenantId =parseValue(result.get("tenantId")) ;
|
|
|
+// if(tenantId!=null&&tenantId.get()!=null){
|
|
|
+// cacheInfo.setTenantId(tenantId.asString());
|
|
|
+// }
|
|
|
+// Value clinicId =parseValue(result.get("clinicId")) ;
|
|
|
+// if(clinicId!=null&&clinicId.get()!=null){
|
|
|
+// cacheInfo.setClinicId(clinicId.asString());
|
|
|
+// }
|
|
|
+// Value startTime = parseValue(result.get("startTime"));
|
|
|
+// if(startTime!=null&&startTime.get()!=null){
|
|
|
+// cacheInfo.setStartTime(startTime.asDate());
|
|
|
+// }
|
|
|
+// Value finished = parseValue(result.get("finished"));
|
|
|
+// if(finished!=null&&finished.get()!=null){
|
|
|
+// cacheInfo.setIsFinished(finished.asBoolean());
|
|
|
+// }
|
|
|
+// Value bindDeviceId =parseValue( result.get("bindDeviceId"));
|
|
|
+// if(bindDeviceId!=null&&bindDeviceId.get()!=null){
|
|
|
+// cacheInfo.setBindDeviceId(bindDeviceId.asString());
|
|
|
+// }
|
|
|
+// Value devices = parseValue(result.get("devices"));
|
|
|
+// if(devices!=null&&devices.get()!=null){
|
|
|
+// cacheInfo.setDevices(code.as(HashSet.class));
|
|
|
+// }
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
@Override
|