|
@@ -41,8 +41,8 @@ public class AppointmentService {
|
|
|
@Value("${hrgApiUrl}")
|
|
|
private String hrgApiUrl;
|
|
|
|
|
|
- private static final int[] ampmValue = new int[]{830, 900, 930, 1000, 1030, 1100, 1130, 1200, 1430, 1500, 1530, 1600, 1630, 1700};
|
|
|
- private static final String[] ampmLabel = new String[]{"a1","a2","a3","a4","a5","a6","a7","a8","p1","p2","p3","p4","p5","p6"};
|
|
|
+ private static final int[] ampmValue = new int[]{830, 900, 930, 1000, 1030, 1100, 1130, 1200, 1430, 1500, 1530, 1600, 1630, 1700, 1730};
|
|
|
+ private static final String[] ampmLabel = new String[]{"a1","a2","a3","a4","a5","a6","a7","a8","p1","p2","p3","p4","p5","p6","p7"};
|
|
|
|
|
|
@Autowired
|
|
|
public AppointmentService(AppointmentDao dao, RedisLikeService redis, ElectronicHealthCardService healthCardService, WxRefundService wxRefundService) {
|
|
@@ -160,16 +160,14 @@ public class AppointmentService {
|
|
|
continue;
|
|
|
}
|
|
|
for (Map<String, Object> item : hrgResponse.getData()) {
|
|
|
- if ((int) item.get("leftNum") > 0) {
|
|
|
- if (param.getNightClinic()) {
|
|
|
- if ((Boolean) item.get("isP4Request")) {
|
|
|
- sourceArray[i] = 1;
|
|
|
- break;
|
|
|
- }
|
|
|
- } else {
|
|
|
+ if (param.getNightClinic()) {
|
|
|
+ if ((Boolean) item.get("isP4Request")) {
|
|
|
sourceArray[i] = 1;
|
|
|
break;
|
|
|
}
|
|
|
+ } else {
|
|
|
+ sourceArray[i] = 1;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -187,7 +185,6 @@ public class AppointmentService {
|
|
|
if (data.getResultCode() == -1) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR, data.getResultMessage());
|
|
|
}
|
|
|
- data.getData().removeIf(map -> (int) map.get("leftNum") == 0);
|
|
|
if (data.getData().size() == 0) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR);
|
|
|
}
|
|
@@ -221,7 +218,6 @@ public class AppointmentService {
|
|
|
if (data.getResultCode() == -1) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR, data.getResultMessage());
|
|
|
}
|
|
|
- data.getData().removeIf(map -> (int) map.get("leftNum") == 0);
|
|
|
String today = DateUtil.formatDatetime(new Date(), "yyyy-MM-dd");
|
|
|
if (param.getNeedExcludePassedTime() && param.getDate().equals(today)) {
|
|
|
int currentHourMinute = DateUtil.parseHourMinuteToInteger();
|