|
@ -37,7 +37,12 @@ public class PrescriptionLogService extends BaseService {
|
|
|
* @param userType 1 患者 2医生
|
|
|
*/
|
|
|
public void addLog(Prescription prescription,Integer type,Integer flag,Integer userType){
|
|
|
PrescriptionLog log = new PrescriptionLog();
|
|
|
PrescriptionLog log = null;
|
|
|
List<PrescriptionLog> prescriptionLogs = prescriptionLogDao.findByPrescriptionCodeAndStutas(prescription.getCode(),prescription.getStatus());
|
|
|
if (prescriptionLogs == null || prescriptionLogs.size() ==0){
|
|
|
log = new PrescriptionLog();
|
|
|
}
|
|
|
log = prescriptionLogDao.findOne(prescriptionLogs.get(0).getId());
|
|
|
log.setStatus(prescription.getStatus());
|
|
|
log.setType(type);
|
|
|
log.setCode(getCode());
|