Browse Source

Merge branch 'dev' of liuwenbin/patient-co-management into dev

liuwenbin 7 years ago
parent
commit
6cdc2a5113

+ 7 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionDispensaryCodeService.java

@ -230,8 +230,13 @@ public class PrescriptionDispensaryCodeService extends BaseService {
    public Map<String, Object> getQrcode(String prescriptionCode ,String patientCode ,Integer type){
        String sql = "select  p2.is_use as isUse,p2.code as dispensaryCode,p2.img_url,p3.hospital_name as hospitalName  from wlyy_prescription_dispensary_code p2 " +
                " left join  wlyy_prescription p1 on p2.prescription_code=p1.code LEFT JOIN wlyy_prescription_expressage p3 on p1.code=p3.prescription_code " +
                " where p2.prescription_code=? and p1.patient=? and p2.type=?  and p2.is_Use=0 ";
        List<Map<String, Object>> result = jdbcTemplate.queryForList(sql,prescriptionCode,patientCode,type);
                " where p2.prescription_code=?  and p2.type=?  and p2.is_Use=0 ";
        if(type==2||type==3){
            sql +=" and p3.expressage_code=? ";
        }else{
            sql +=" and p1.patient=? ";
        }
        List<Map<String, Object>> result = jdbcTemplate.queryForList(sql,prescriptionCode,type,patientCode);
        if(result.size()>0){
            return result.get(0);
        }