Преглед на файлове

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

liuwenbin преди 7 години
родител
ревизия
b5e9c1493d

+ 2 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java

@ -1495,7 +1495,8 @@ public class DoctorInfoService extends BaseService {
                    return jsonObject;
                }
            }else{
                throw new Exception(responseObject.getString("msg"));
                String error = msg.split("\\|\\|")[0].split(":")[2];
                throw new Exception(error);
            }
        }else{
            throw new Exception("null response.");

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

@ -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

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionCodeController.java

@ -124,7 +124,7 @@ public class PrescriptionCodeController extends BaseController{
            @ApiParam(required = true, name = "prescriptionCode", value = "处方code") @RequestParam(value = "prescriptionCode", required = true) String prescriptionCode) {
        try{
            Map<String, Object> map = prescriptionDispensaryCodeService.getQrcode(prescriptionCode,getUID(),2);
            Map<String, Object> map = prescriptionDispensaryCodeService.getQrcode(prescriptionCode,getUID(),2);//xh1D2017031503333
//            map.put("code", Base64.encode(map.get("code").toString().getBytes()));
            return write(200, "获取配送员取药码成功!", "data", map);
        } catch (Exception e) {