|
@ -91,6 +91,45 @@ public class DataGeneratorService extends BaseJpaService<InternetUpErrorLogDO, I
|
|
|
return "success";
|
|
|
}
|
|
|
|
|
|
public String delData(String doctor,String date){
|
|
|
//居民门诊记录数据源
|
|
|
Iterable<PatientMappingDO> patientMappingDOs = patientMappingDao.findAll();
|
|
|
Iterator it = patientMappingDOs.iterator();
|
|
|
|
|
|
//遍历居民删除预约记录
|
|
|
while (it.hasNext()) {
|
|
|
PatientMappingDO patientMappingDO = (PatientMappingDO) it.next();
|
|
|
List<WlyyPatientRegisterDO> registerDOs = patientRegisterDao.findByPatientAndCreateTime(patientMappingDO.getPatient(),DateUtil.strToDate(date+" 08:00:00"));
|
|
|
if(registerDOs!=null&®isterDOs.size()>0){
|
|
|
patientRegisterDao.delete(registerDOs);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//删除复诊
|
|
|
List<WlyyOutpatientDO> outpatientDOs = outpatientDao.findByDoctorAndCreateTimeAndPatientCancelRemark(doctor,DateUtil.strToDate(date+" 09:30:00"),"test_info");
|
|
|
if(outpatientDOs!=null&&outpatientDOs.size()>0){
|
|
|
outpatientDao.delete(outpatientDOs);
|
|
|
}
|
|
|
|
|
|
//删除复诊
|
|
|
List<WlyyPrescriptionDO> prescriptionDOs = prescriptionDao.findByDoctorAndCreateTimeAndRemark(doctor,DateUtil.strToDate(date+" 10:00:00"),"test_info");
|
|
|
if(prescriptionDOs!=null&&prescriptionDOs.size()>0){
|
|
|
for(WlyyPrescriptionDO prescriptionDO :prescriptionDOs){
|
|
|
List<WlyyPrescriptionInfoDO> infoDOs = prescriptionInfoDao.findByPrescriptionId(prescriptionDO.getId());
|
|
|
if(infoDOs!=null&&infoDOs.size()>0){
|
|
|
prescriptionInfoDao.delete(infoDOs);
|
|
|
}
|
|
|
List<WlyyInspectionDO> inspectionDOs = wlyyInspectionDao.findByPrescriptionId(prescriptionDO.getId());
|
|
|
if(inspectionDOs!=null&&inspectionDOs.size()>0){
|
|
|
wlyyInspectionDao.delete(inspectionDOs);
|
|
|
}
|
|
|
}
|
|
|
prescriptionDao.delete(prescriptionDOs);
|
|
|
}
|
|
|
|
|
|
return "success";
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 生成门诊记录
|
|
|
* @param date
|
|
@ -133,6 +172,7 @@ public class DataGeneratorService extends BaseJpaService<InternetUpErrorLogDO, I
|
|
|
outpatientDO.setRegisterNo(getCode());
|
|
|
outpatientDO.setConNo(getCode());
|
|
|
|
|
|
outpatientDO.setPatientCancelRemark("test_info");
|
|
|
return outpatientDao.save(outpatientDO);
|
|
|
}
|
|
|
|
|
@ -158,6 +198,8 @@ public class DataGeneratorService extends BaseJpaService<InternetUpErrorLogDO, I
|
|
|
prescriptionDO.setType(1);
|
|
|
prescriptionDO.setCreateTime(DateUtil.strToDate(date+" 10:00:00"));
|
|
|
|
|
|
prescriptionDO.setRemark("test_info");
|
|
|
|
|
|
return prescriptionDao.save(prescriptionDO);
|
|
|
}
|
|
|
|