|
@ -168,6 +168,7 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
Prescription prescription = prescriptionDao.findByCode(code);
|
|
|
List<PrescriptionInfo> prescriptionInfos = prescriptionInfoDao.findByPrescriptionCode(code);
|
|
|
PrescriptionReviewed reviewed = prescriptionReviewedDao.findByPrescriptionCode(code);
|
|
|
List<PrescriptionAdjust> prescriptionAdjusts = prescriptionAdjustDao.findByPrescriptionCode(code);
|
|
|
JSONObject rs = new JSONObject();
|
|
|
if(prescription!=null&&StringUtils.isNotBlank(prescription.getPatient())){
|
|
|
Patient p = patientDao.findByCode(prescription.getPatient());
|
|
@ -178,13 +179,18 @@ public class PrescriptionInfoService extends BaseService {
|
|
|
|
|
|
if(prescription.getStatus()==10){
|
|
|
Long s = (prescription.getCreateTime().getTime()-new Date().getTime())/1000;
|
|
|
rs.put("time",s);
|
|
|
//rs.put("time",s);
|
|
|
if(s>172800){
|
|
|
prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.pay_outtime.getValue());
|
|
|
prescriptionDao.save(prescription);
|
|
|
}
|
|
|
}else{
|
|
|
rs.put("time","");
|
|
|
//rs.put("time","");
|
|
|
}
|
|
|
if(prescriptionAdjusts!=null&&prescriptionAdjusts.size()>0){
|
|
|
rs.put("isAdjust",true);
|
|
|
}else{
|
|
|
rs.put("isAdjust",false);
|
|
|
}
|
|
|
rs.put("reviewed",reviewed);
|
|
|
rs.put("prescription",prescription);
|