|
@ -601,14 +601,23 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
sql = "UPDATE base.wlyy_prescription p SET p.`status`='13' WHERE p.adm_no='" + admNo + "' AND p.real_order='" + realOrder + "' ";
|
|
|
} else if ("2".equals(status)) {
|
|
|
//开方成功时候,先用处方号获取本地处方状态是否为开方失败,如果是则需要更新本地的处方
|
|
|
|
|
|
sql = "UPDATE base.wlyy_prescription p SET p.`status`='20' WHERE p.adm_no='" + admNo + "' AND p.real_order='" + realOrder + "' ";
|
|
|
//变更门诊状态
|
|
|
outPatientSql="UPDATE base.wlyy_outpatient p SET p.`status`='2' WHERE p.adm_no='" + admNo + "'";
|
|
|
jdbcTemplate.execute(outPatientSql);
|
|
|
} else if ("3".equals(status)) {
|
|
|
//自取处方结束
|
|
|
sql = "UPDATE base.wlyy_prescription p SET p.`status`='100',p.pay_status='1' WHERE p.adm_no='" + admNo + "' AND p.real_order='" + realOrder + "' ";
|
|
|
WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findByRealOrder(realOrder);
|
|
|
if (null != wlyyPrescriptionDO && 1 == wlyyPrescriptionDO.getDispensaryType()) {
|
|
|
//取药类型:1 自取 2快递配送
|
|
|
sql = "UPDATE base.wlyy_prescription p SET p.`status`='100',p.pay_status='1' WHERE p.adm_no='" + admNo + "' AND p.real_order='" + realOrder + "' ";
|
|
|
//变更门诊状态
|
|
|
outPatientSql = "UPDATE base.wlyy_outpatient p SET p.`status`='2' WHERE p.adm_no='" + admNo + "'";
|
|
|
jdbcTemplate.execute(outPatientSql);
|
|
|
} else {
|
|
|
//取药类型:1 自取 2快递配送
|
|
|
sql = "UPDATE base.wlyy_prescription p SET p.`status`='32',p.pay_status='1' WHERE p.adm_no='" + admNo + "' AND p.real_order='" + realOrder + "' ";
|
|
|
}
|
|
|
}
|
|
|
jdbcTemplate.execute(sql);
|
|
|
return true;
|