|
@@ -166,19 +166,19 @@ public class NucleicServiceImpl implements NucleicService {
|
|
private List<NucleicItemResponseData> getScheduleListCommon(int hospitalId, String deptCode, String doctorCode,
|
|
private List<NucleicItemResponseData> getScheduleListCommon(int hospitalId, String deptCode, String doctorCode,
|
|
String serviceCode, int startOffset, int endOffset) throws AppMessageException {
|
|
String serviceCode, int startOffset, int endOffset) throws AppMessageException {
|
|
//支付宝核酸
|
|
//支付宝核酸
|
|
-// String redisKeyPattern = "ALI_HS_SCHEDULE_LIST_%s_%s_%d_%s";
|
|
|
|
-// String key = String.format(redisKeyPattern, deptCode, doctorCode, hospitalId, serviceCode);
|
|
|
|
-// if (startOffset >= 0 && endOffset >= 0) {
|
|
|
|
-// redisKeyPattern = "ALI_HS_SCHEDULE_LIST_%s_%s_%d_%s_%d_%d";
|
|
|
|
-// key = String.format(redisKeyPattern, deptCode, doctorCode, hospitalId, serviceCode, startOffset, endOffset);
|
|
|
|
-// }
|
|
|
|
-// String value = jedisCommands.get(key);
|
|
|
|
-// if (!StringHelper.isNullOrWhiteSpace(value)) {
|
|
|
|
-// List<NucleicItemResponseData> lss = JsonSerializer.from(value, List.class);
|
|
|
|
-// if (lss != null) {
|
|
|
|
-// return lss;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
|
|
+ String redisKeyPattern = "ALI_HS_SCHEDULE_LIST_%s_%s_%d_%s";
|
|
|
|
+ String key = String.format(redisKeyPattern, deptCode, doctorCode, hospitalId, serviceCode);
|
|
|
|
+ if (startOffset >= 0 && endOffset >= 0) {
|
|
|
|
+ redisKeyPattern = "ALI_HS_SCHEDULE_LIST_%s_%s_%d_%s_%d_%d";
|
|
|
|
+ key = String.format(redisKeyPattern, deptCode, doctorCode, hospitalId, serviceCode, startOffset, endOffset);
|
|
|
|
+ }
|
|
|
|
+ String value = jedisCommands.get(key);
|
|
|
|
+ if (!StringHelper.isNullOrWhiteSpace(value)) {
|
|
|
|
+ List<NucleicItemResponseData> lss = JsonSerializer.from(value, List.class);
|
|
|
|
+ if (lss != null) {
|
|
|
|
+ return lss;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
List<Dept> deptList = systemSrv.getDeptListByHospitalId(hospitalId);
|
|
List<Dept> deptList = systemSrv.getDeptListByHospitalId(hospitalId);
|
|
if (deptList == null || deptList.size() == 0) {
|
|
if (deptList == null || deptList.size() == 0) {
|
|
@@ -211,8 +211,8 @@ public class NucleicServiceImpl implements NucleicService {
|
|
}
|
|
}
|
|
List<NucleicItemResponseData> lst = getConvertedScheduleList(hospitalId, startOffset, endOffset, deptCode,
|
|
List<NucleicItemResponseData> lst = getConvertedScheduleList(hospitalId, startOffset, endOffset, deptCode,
|
|
doctorCode, serviceCode);
|
|
doctorCode, serviceCode);
|
|
-// jedisCommands.set(key, JsonSerializer.toJson(lst));
|
|
|
|
-// jedisCommands.expire(key, 3 * 60);
|
|
|
|
|
|
+ jedisCommands.set(key, JsonSerializer.toJson(lst));
|
|
|
|
+ jedisCommands.expire(key, 3 * 60);
|
|
return lst;
|
|
return lst;
|
|
}
|
|
}
|
|
|
|
|