diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java index 4c1fd73..1f65a94 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java @@ -187,7 +187,7 @@ public class PatientController { Date instDate = new Date(); //需要添加医院购买卡记录 - for (int i = 0; i < patient.getCcnt(); i++) { + for (int i = 0; i < patient.getCcnt() && Objects.nonNull(patient.getCcnt()); i++) { LymsTcard tcard = new LymsTcard(); tcard.setCnt(1); tcard.setPcid(pcase.getPcid());