trick9191 7 gadi atpakaļ
vecāks
revīzija
e1ff7a9c57

+ 14 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -805,6 +805,20 @@ public class PrescriptionInfoService extends BaseService {
            PrescriptionReviewed reviewed = prescriptionReviewedDao.findByPrescriptionCode(code);
            if ("1".equals(state)) {
                if(StringUtils.isNotBlank(dept)){
                    String sql = "SELECT t.dept_name AS deptName FROM zy_iv_dept_dict t WHERE t.dept_code = '"+dept+"'" ;
                    List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
                    if(list!=null&&list.size()>0){
                        String name = (String)list.get(0).get("deptName");
                        p.setDeptName(name);
                        p.setDept(dept);
                    }else{
                        throw new RuntimeException("科室不能为空");
                    }
                }else{
                    throw new RuntimeException("科室不能为空");
                }
                //审核通过,前往智业开方
                p.setStatus(PrescriptionLog.PrescriptionLogStatus.adding.getValue());
                p.setReviewedTime(new Date());