|
@ -664,7 +664,9 @@ public class DoctorInfoService extends BaseService {
|
|
|
filters.put("name", new SearchFilter("name", SearchFilter.Operator.LIKE, key));
|
|
|
}
|
|
|
|
|
|
filters.put("isFamous", new SearchFilter("isFamous", SearchFilter.Operator.EQ, type));
|
|
|
if (type == 1) {
|
|
|
filters.put("isFamous", new SearchFilter("isFamous", SearchFilter.Operator.EQ, type));
|
|
|
}
|
|
|
|
|
|
if (level != null && level > 0 && level < 4) {
|
|
|
filters.put("level", new SearchFilter("level", SearchFilter.Operator.EQ, level));
|
|
@ -677,6 +679,11 @@ public class DoctorInfoService extends BaseService {
|
|
|
|
|
|
if (doctors.size() > 0) {
|
|
|
for (Doctor doc : doctors) {
|
|
|
if (type != 1) {
|
|
|
if (doc.getIsFamous() != null && doc.getIsFamous() == 1) {
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
JSONObject iswork = type == 1 ? workTimeService.isFamousDoctorWorking(doc.getCode()) : workTimeService.isDoctorWorking(doc.getCode());
|
|
|
if (iswork.getString("status").equals("1")) {
|
|
|
workingDoctor.add(doc);
|
|
@ -686,11 +693,11 @@ public class DoctorInfoService extends BaseService {
|
|
|
int start = (page - 1) * pageSize;
|
|
|
int end = start + pageSize;
|
|
|
|
|
|
if(end > workingDoctor.size()){
|
|
|
if (end > workingDoctor.size()) {
|
|
|
end = workingDoctor.size();
|
|
|
}
|
|
|
|
|
|
if(start < workingDoctor.size()) {
|
|
|
if (start < workingDoctor.size()) {
|
|
|
returnList = workingDoctor.subList(start, end);
|
|
|
}
|
|
|
}
|