|
@ -171,20 +171,20 @@ public class PrescriptionExpressageService {
|
|
|
|
|
|
//修改处方状态为完成
|
|
|
Prescription prescription = prescriptionDao.findByCode(prescriptionDispensaryCode.getPrescriptionCode());
|
|
|
if(prescription.getStatus()<=65){
|
|
|
PrescriptionLog prescriptionLog = new PrescriptionLog();
|
|
|
prescriptionLog.setCode(UUID.randomUUID().toString());
|
|
|
prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
|
|
|
prescriptionLog.setCreateTime(new Date());
|
|
|
prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.expressage.getValue());
|
|
|
prescriptionLog.setFlag(1);
|
|
|
prescriptionLog.setUserCode(userCode);
|
|
|
prescriptionLog.setUserType(2);
|
|
|
prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing_error.getValue());
|
|
|
prescriptionLog.setRemark("该状态不可取药");
|
|
|
prescriptionLogDao.save(prescriptionLog);
|
|
|
return -4;
|
|
|
}
|
|
|
// if(prescription.getStatus()<=65){
|
|
|
// PrescriptionLog prescriptionLog = new PrescriptionLog();
|
|
|
// prescriptionLog.setCode(UUID.randomUUID().toString());
|
|
|
// prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
|
|
|
// prescriptionLog.setCreateTime(new Date());
|
|
|
// prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.expressage.getValue());
|
|
|
// prescriptionLog.setFlag(1);
|
|
|
// prescriptionLog.setUserCode(userCode);
|
|
|
// prescriptionLog.setUserType(2);
|
|
|
// prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing_error.getValue());
|
|
|
// prescriptionLog.setRemark("该状态不可取药");
|
|
|
// prescriptionLogDao.save(prescriptionLog);
|
|
|
// return -4;
|
|
|
// }
|
|
|
Date finshTime = new Date();
|
|
|
prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.finish.getValue());
|
|
|
prescription.setFinishTime(finshTime);
|
|
@ -226,20 +226,20 @@ public class PrescriptionExpressageService {
|
|
|
|
|
|
|
|
|
Prescription prescription = prescriptionDao.findByCode(prescriptionDispensaryCode.getPrescriptionCode());
|
|
|
if(prescription.getStatus()<=50){
|
|
|
PrescriptionLog prescriptionLog = new PrescriptionLog();
|
|
|
prescriptionLog.setCode(UUID.randomUUID().toString());
|
|
|
prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
|
|
|
prescriptionLog.setCreateTime(new Date());
|
|
|
prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.expressage.getValue());
|
|
|
prescriptionLog.setFlag(1);
|
|
|
prescriptionLog.setUserCode(userCode);
|
|
|
prescriptionLog.setUserType(2);
|
|
|
prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing_error.getValue());
|
|
|
prescriptionLog.setRemark("该状态不可配送");
|
|
|
prescriptionLogDao.save(prescriptionLog);
|
|
|
return -5;
|
|
|
}
|
|
|
// if(prescription.getStatus()<=50){
|
|
|
// PrescriptionLog prescriptionLog = new PrescriptionLog();
|
|
|
// prescriptionLog.setCode(UUID.randomUUID().toString());
|
|
|
// prescriptionLog.setPrescriptionCode(prescriptionDispensaryCode.getPrescriptionCode());
|
|
|
// prescriptionLog.setCreateTime(new Date());
|
|
|
// prescriptionLog.setType(PrescriptionLog.PrescriptionLogType.expressage.getValue());
|
|
|
// prescriptionLog.setFlag(1);
|
|
|
// prescriptionLog.setUserCode(userCode);
|
|
|
// prescriptionLog.setUserType(2);
|
|
|
// prescriptionLog.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing_error.getValue());
|
|
|
// prescriptionLog.setRemark("该状态不可配送");
|
|
|
// prescriptionLogDao.save(prescriptionLog);
|
|
|
// return -5;
|
|
|
// }
|
|
|
//修改处方状态为配送中
|
|
|
Date expressageing = new Date();
|
|
|
prescription.setExpressageTime(expressageing);
|
|
@ -273,7 +273,7 @@ public class PrescriptionExpressageService {
|
|
|
"&code=" + prescriptionDispensaryCode.getPrescriptionCode() + "&toUser=" + patient.getCode() + "&toName=" + patient.getName();
|
|
|
|
|
|
|
|
|
prescriptionNoticesService.sendMessages(userCode, doctor.getName(), DateUtil.dateToStrLong(expressageing), 3, 0, url);
|
|
|
prescriptionNoticesService.sendMessages(patient.getCode(), doctor.getName(), DateUtil.dateToStrLong(expressageing), 3, 0, url);
|
|
|
|
|
|
return prescriptionDispensaryCode.getType();
|
|
|
}
|