|
|
|
@ -67,6 +67,7 @@ public class MpController extends BaseController {
|
|
|
|
|
recordHistoryService.saveHistory(recordId);
|
|
|
|
|
|
|
|
|
|
tRecord.setId(recordId);
|
|
|
|
|
tRecord.setStatus("0");
|
|
|
|
|
tRecord.setUpdateResult("");
|
|
|
|
|
tRecord.setUpdateResult2("");
|
|
|
|
|
tRecordService.updateTRecord(tRecord);
|
|
|
|
@ -90,11 +91,9 @@ public class MpController extends BaseController {
|
|
|
|
|
TRecord tRecord = new TRecord();
|
|
|
|
|
tRecord.setPatientId(appPatientHospitalDoctor.getPatientId());
|
|
|
|
|
tRecord.setHospitalId(appPatientHospitalDoctor.getHospitalId());
|
|
|
|
|
tRecord.setStatus("0");
|
|
|
|
|
tRecord.setDoctorId(appPatientHospitalDoctor.getDoctorId());
|
|
|
|
|
tRecord.setAppointmentTime(DateUtils.dateTime(new Date()));
|
|
|
|
|
List<TRecord> tRecords = tRecordService.selectTRecordList(tRecord);
|
|
|
|
|
if (!CollectionUtils.isEmpty(tRecords)) {
|
|
|
|
|
if (whetherRegistration(tRecord, "0") || whetherRegistration(tRecord, "2") || whetherRegistration(tRecord, "3")) {
|
|
|
|
|
AjaxResult ajaxResult = AjaxResult.error();
|
|
|
|
|
ajaxResult.put("msg", "当前患者已登记过信息!");
|
|
|
|
|
return ajaxResult;
|
|
|
|
@ -104,6 +103,7 @@ public class MpController extends BaseController {
|
|
|
|
|
TPatientHospitalDoctor tPatientHospitalDoctor = new TPatientHospitalDoctor();
|
|
|
|
|
BeanUtils.copyProperties(appPatientHospitalDoctor, tPatientHospitalDoctor);
|
|
|
|
|
tRecord.setCreateBy(getUsername());
|
|
|
|
|
tRecord.setStatus("0");
|
|
|
|
|
tRecordService.insertTRecord(tRecord);
|
|
|
|
|
List<TPatientHospitalDoctor> tPHDs = itPatientHospitalDoctorService.selectTPatientHospitalDoctorList(tPatientHospitalDoctor);
|
|
|
|
|
if (tPHDs.isEmpty())
|
|
|
|
@ -118,4 +118,10 @@ public class MpController extends BaseController {
|
|
|
|
|
ajaxResult.put("msg", "登记成功");
|
|
|
|
|
return ajaxResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Boolean whetherRegistration(TRecord tRecord, String status) {
|
|
|
|
|
tRecord.setStatus(status);
|
|
|
|
|
List<TRecord> tRecords = tRecordService.selectTRecordList(tRecord);
|
|
|
|
|
return !CollectionUtils.isEmpty(tRecords);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|