|
@ -217,10 +217,10 @@ public class PrescriptionDispensaryCodeService extends BaseService {
|
|
|
return sb.toString();
|
|
|
}
|
|
|
|
|
|
public Map<String, Object> getQrcode(String prescriptionCode ,String patientCode ,Integer type){
|
|
|
public Map<String, Object> getQrcode(String prescriptionCode ,String patientCode ,Integer type) throws Exception {
|
|
|
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 p2.type=? and p2.is_Use=0 ";
|
|
|
" where p2.prescription_code=? and p2.type=? ";
|
|
|
if(type==2||type==3){
|
|
|
sql +=" and p3.expressage_code=? ";
|
|
|
}else{
|
|
@ -230,7 +230,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
|
|
|
if(result.size()>0){
|
|
|
return result.get(0);
|
|
|
}
|
|
|
return null;
|
|
|
throw new Exception("二维码错误或者已过期!");
|
|
|
}
|
|
|
|
|
|
@Transactional
|