Browse Source

feature:处方外传下载,处方列表下载

wuyongyi 2 years ago
parent
commit
1f048683eb

+ 1 - 0
src/main/java/com/ywt/mg/domain/models/enums/PresPaymentChannelEnum.java

@@ -10,6 +10,7 @@ public enum PresPaymentChannelEnum {
     FREE("无须支付", 6),
     MedicalInsurance("医保", 7),
     ICBC("工行", 8),
+    PharmacyPOS("药房pos机", 9),
     UNKNOWN("", 0);
 
     private final String displayName;

+ 164 - 59
src/main/java/com/ywt/mg/domain/ywtDrugEntities/PrescriptionDrugView.java

@@ -255,12 +255,39 @@ public class PrescriptionDrugView implements Serializable {
    */
   @Column(name = "send_no")
   private String sendNo;
+  /**
+   * 处方作废状态:0-初始状态,1-作废申请中,2-已作废,3-作废失败
+   */
+  @Column(name = "cancel_status")
+  private Integer cancelStatus;
+  /**
+   * 处方作废备注
+   */
+  @Column(name = "cancel_remark")
+  private String cancelRemark;
+  /**
+   * HIS 插入医嘱返回的 orderId, 多个用英文逗号隔开
+   */
+  @Column(name = "his_oeori_order_id")
+  private String hisOeoriOrderId;
+  /**
+   * 病历 id, 医生 PC 端开方,病历和处方关联
+   */
+  @Column(name = "med_record_id")
+  private Integer medRecordId;
+  @Column(name = "order_id")
+  private Integer orderId;
 
   /**
    * 订单号
    */
   @Column(name = "order_no")
   private String orderNo;
+  /**
+   * 处方类型: 0 互联网医院, 1 处方外传
+   */
+  @Column(name = "pres_type")
+  private Integer presType;
 
   public Integer getId() {
     return id;
@@ -865,64 +892,142 @@ public class PrescriptionDrugView implements Serializable {
   }
 
   public String toString() {
-    return "PrescriptionDrugView{id=" + id + 
-      ", preBizNo=" + preBizNo + 
-      ", preId=" + preId + 
-      ", drugCode=" + drugCode + 
-      ", drugName=" + drugName + 
-      ", drugSpec=" + drugSpec + 
-      ", oneDosage=" + oneDosage + 
-      ", oneDosageUnit=" + oneDosageUnit + 
-      ", amount=" + amount + 
-      ", units=" + units + 
-      ", frequencyCode=" + frequencyCode + 
-      ", frequency=" + frequency + 
-      ", frequencyQty=" + frequencyQty + 
-      ", usageCode=" + usageCode + 
-      ", usageDetail=" + usageDetail + 
-      ", price=" + price + 
-      ", total=" + total + 
-      ", remark=" + remark + 
-      ", course=" + course + 
-      ", drugId=" + drugId + 
-      ", quantity=" + quantity + 
-      ", doctorName=" + doctorName + 
-      ", doctorCode=" + doctorCode + 
-      ", patientName=" + patientName + 
-      ", patientAge=" + patientAge + 
-      ", patientSex=" + patientSex + 
-      ", patientNo=" + patientNo + 
-      ", diagnose=" + diagnose + 
-      ", dept=" + dept + 
-      ", createOn=" + createOn + 
-      ", source=" + source + 
-      ", status=" + status + 
-      ", hospitalCode=" + hospitalCode + 
-      ", hospitalId=" + hospitalId + 
-      ", orgCode3th=" + orgCode3th + 
-      ", totalPrice=" + totalPrice + 
-      ", paymentStatus=" + paymentStatus + 
-      ", userId=" + userId + 
-      ", userType=" + userType + 
-      ", userKeyId=" + userKeyId + 
-      ", patientMobile=" + patientMobile + 
-      ", allergicHistory=" + allergicHistory + 
-      ", description=" + description + 
-      ", doctorSignId=" + doctorSignId + 
-      ", doctorId=" + doctorId + 
-      ", pharmacyId=" + pharmacyId + 
-      ", startSendTime=" + startSendTime + 
-      ", payTime=" + payTime + 
-      ", refundTime=" + refundTime + 
-      ", refundStatus=" + refundStatus + 
-      ", refundNo=" + refundNo + 
-      ", deliveryMethod=" + deliveryMethod + 
-      ", idCardNo=" + idCardNo + 
-      ", senderNickname=" + senderNickname + 
-      ", checkInTime=" + checkInTime + 
-      ", extStatus=" + extStatus + 
-      ", sendNo=" + sendNo + 
-      ", orderNo=" + orderNo +
-      "}";
+    return "PrescriptionDrugView{id=" + id +
+            ", preBizNo=" + preBizNo +
+            ", preId=" + preId +
+            ", drugCode=" + drugCode +
+            ", drugName=" + drugName +
+            ", drugSpec=" + drugSpec +
+            ", oneDosage=" + oneDosage +
+            ", oneDosageUnit=" + oneDosageUnit +
+            ", amount=" + amount +
+            ", units=" + units +
+            ", frequencyCode=" + frequencyCode +
+            ", frequency=" + frequency +
+            ", frequencyQty=" + frequencyQty +
+            ", usageCode=" + usageCode +
+            ", usageDetail=" + usageDetail +
+            ", price=" + price +
+            ", total=" + total +
+            ", remark=" + remark +
+            ", course=" + course +
+            ", drugId=" + drugId +
+            ", quantity=" + quantity +
+            ", doctorName=" + doctorName +
+            ", doctorCode=" + doctorCode +
+            ", patientName=" + patientName +
+            ", patientAge=" + patientAge +
+            ", patientSex=" + patientSex +
+            ", patientNo=" + patientNo +
+            ", diagnose=" + diagnose +
+            ", dept=" + dept +
+            ", createOn=" + createOn +
+            ", source=" + source +
+            ", status=" + status +
+            ", hospitalCode=" + hospitalCode +
+            ", hospitalId=" + hospitalId +
+            ", orgCode3th=" + orgCode3th +
+            ", totalPrice=" + totalPrice +
+            ", paymentStatus=" + paymentStatus +
+            ", userId=" + userId +
+            ", userType=" + userType +
+            ", userKeyId=" + userKeyId +
+            ", patientMobile=" + patientMobile +
+            ", allergicHistory=" + allergicHistory +
+            ", description=" + description +
+            ", doctorSignId=" + doctorSignId +
+            ", doctorId=" + doctorId +
+            ", pharmacyId=" + pharmacyId +
+            ", startSendTime=" + startSendTime +
+            ", payTime=" + payTime +
+            ", refundTime=" + refundTime +
+            ", refundStatus=" + refundStatus +
+            ", refundNo=" + refundNo +
+            ", deliveryMethod=" + deliveryMethod +
+            ", idCardNo=" + idCardNo +
+            ", senderNickname=" + senderNickname +
+            ", checkInTime=" + checkInTime +
+            ", extStatus=" + extStatus +
+            ", sendNo=" + sendNo +
+            ", orderNo=" + orderNo +
+            "}";
+  }
+
+  /**
+   * 处方作废状态:0-初始状态,1-作废申请中,2-已作废,3-作废失败
+   */
+  public void setCancelStatus(Integer cancelStatus) {
+    this.cancelStatus = cancelStatus;
+  }
+
+  /**
+   * 处方作废状态:0-初始状态,1-作废申请中,2-已作废,3-作废失败
+   */
+  public Integer getCancelStatus() {
+    return cancelStatus;
+  }
+
+  /**
+   * 处方作废备注
+   */
+  public void setCancelRemark(String cancelRemark) {
+    this.cancelRemark = cancelRemark;
+  }
+
+  /**
+   * 处方作废备注
+   */
+  public String getCancelRemark() {
+    return cancelRemark;
+  }
+
+  /**
+   * HIS 插入医嘱返回的 orderId, 多个用英文逗号隔开
+   */
+  public void setHisOeoriOrderId(String hisOeoriOrderId) {
+    this.hisOeoriOrderId = hisOeoriOrderId;
+  }
+
+  /**
+   * HIS 插入医嘱返回的 orderId, 多个用英文逗号隔开
+   */
+  public String getHisOeoriOrderId() {
+    return hisOeoriOrderId;
+  }
+
+  /**
+   * 病历 id, 医生 PC 端开方,病历和处方关联
+   */
+  public void setMedRecordId(Integer medRecordId) {
+    this.medRecordId = medRecordId;
+  }
+
+  /**
+   * 病历 id, 医生 PC 端开方,病历和处方关联
+   */
+  public Integer getMedRecordId() {
+    return medRecordId;
+  }
+
+  public void setOrderId(Integer orderId) {
+    this.orderId = orderId;
+  }
+
+  public Integer getOrderId() {
+    return orderId;
+  }
+
+  /**
+   * 处方类型: 0 互联网医院, 1 处方外传
+   */
+  public void setPresType(Integer presType) {
+    this.presType = presType;
+  }
+
+  /**
+   * 处方类型: 0 互联网医院, 1 处方外传
+   */
+  public Integer getPresType() {
+    return presType;
   }
 }

+ 462 - 1
src/main/java/com/ywt/mg/domain/ywtDrugEntities/PrescriptionInfo.java

@@ -4,12 +4,15 @@ import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Table;
+import java.io.Serializable;
 import java.util.Date;
 
 @Entity
 @Table(name = "prescription_info")
-public class PrescriptionInfo {
+public class PrescriptionInfo implements Serializable {
+    private static final long serialVersionUID = 1L;
 
+    @Column(name = "id", nullable = false)
     @Id
     private int id;
 
@@ -90,6 +93,8 @@ public class PrescriptionInfo {
      */
     @Column(name = "status")
     private Integer status;
+    @Column(name = "hospital_code")
+    private String hospitalCode;
 
     /**
      * 总价格
@@ -144,6 +149,11 @@ public class PrescriptionInfo {
 
     @Column(name = "hospital_id")
     private Integer hospitalId;
+    /**
+     * 第三方公司编码
+     */
+    @Column(name = "org_code_3th")
+    private String orgCode3th;
 
     /**
      * 取药方式
@@ -156,6 +166,21 @@ public class PrescriptionInfo {
      */
     @Column(name = "address_id")
     private Integer addressId;
+    /**
+     * 微信商户Id
+     */
+    @Column(name = "wx_merchant_id")
+    private String wxMerchantId;
+    /**
+     * 内部支付实现唯一编码
+     */
+    @Column(name = "wx_internal_pay_no")
+    private String wxInternalPayNo;
+    /**
+     * 微信支付订单号
+     */
+    @Column(name = "wx_transaction_id")
+    private String wxTransactionId;
 
     /**
      * HIS单号
@@ -268,6 +293,11 @@ public class PrescriptionInfo {
      */
     @Column(name = "refund_time")
     private Date refundTime;
+    /**
+     * 处方日期(一般用于第三方来源)
+     */
+    @Column(name = "prescription_date")
+    private String prescriptionDate;
 
     /**
      * 是否已经发送微信取药消息,0-否,1-是 (1-发送"未取药"提醒,2-发送"提醒取药",位运算)
@@ -293,12 +323,22 @@ public class PrescriptionInfo {
 
     @Column(name = "remarks")
     private String remarks;
+    /**
+     * 逻辑删除标记,0 - 正常 1 - 删除
+     */
+    @Column(name = "deleted")
+    private Integer deleted;
 
     @Column(name = "sender_account")
     private String senderAccount;
 
     @Column(name = "sender_nickname")
     private String senderNickname;
+    /**
+     * 时效标准(快递的预计送达时间)
+     */
+    @Column(name = "time_standard")
+    private String timeStandard;
 
     /**
      * 退费状态
@@ -317,6 +357,11 @@ public class PrescriptionInfo {
      */
     @Column(name = "pharmacy_tree_code")
     private String pharmacyTreeCode;
+    /**
+     * 价格设置,见 pharmacy_price_setting 表
+     */
+    @Column(name = "price_setting")
+    private Integer priceSetting;
 
 
     /**
@@ -336,6 +381,46 @@ public class PrescriptionInfo {
 
     @Column(name = "his_patient_id")
     private String hisPatientId;
+    /**
+     * HIS 一键挂号流水号
+     */
+    @Column(name = "his_clinic_code")
+    private String hisClinicCode;
+    /**
+     * HIS 预结算订单号
+     */
+    @Column(name = "his_ord_num")
+    private String hisOrdNum;
+    /**
+     * HIS 预结算发票号
+     */
+    @Column(name = "his_invoice_no")
+    private String hisInvoiceNo;
+    /**
+     * HIS 预结算后的支付费用
+     */
+    @Column(name = "his_pay_amount")
+    private Integer hisPayAmount;
+    /**
+     * HIS 医生 jobNum,主要用于作废处方
+     */
+    @Column(name = "his_doctor_job_num")
+    private String hisDoctorJobNum;
+    /**
+     * 病历 id, 医生 PC 端开方,病历和处方关联
+     */
+    @Column(name = "med_record_id")
+    private Integer medRecordId;
+    /**
+     * 诊断编码, 多个用英文逗号隔开
+     */
+    @Column(name = "icd_codes")
+    private String icdCodes;
+    /**
+     * 患者地址,可修改
+     */
+    @Column(name = "patient_address")
+    private String patientAddress;
 
     /**
      * HIS 插入医嘱返回的 orderId, 多个用英文逗号隔开
@@ -349,6 +434,21 @@ public class PrescriptionInfo {
      */
     @Column(name = "cancel_reason")
     private String cancelReason;
+    /**
+     * HIS 回写处方下单失败错误信息记录
+     */
+    @Column(name = "his_err_msg")
+    private String hisErrMsg;
+    /**
+     * 是否已修改过配送地址
+     */
+    @Column(name = "address_modified")
+    private Boolean addressModified;
+    /**
+     * 处方类型: 0 互联网医院, 1 处方外传
+     */
+    @Column(name = "pres_type")
+    private Integer presType;
 
 
     public int getId() {
@@ -838,4 +938,365 @@ public class PrescriptionInfo {
     public void setCancelReason(String cancelReason) {
         this.cancelReason = cancelReason;
     }
+
+    public void setHospitalCode(String hospitalCode) {
+        this.hospitalCode = hospitalCode;
+    }
+
+    public String getHospitalCode() {
+        return hospitalCode;
+    }
+
+    /**
+     * 第三方公司编码
+     */
+    public void setOrgCode3th(String orgCode3th) {
+        this.orgCode3th = orgCode3th;
+    }
+
+    /**
+     * 第三方公司编码
+     */
+    public String getOrgCode3th() {
+        return orgCode3th;
+    }
+
+    /**
+     * 微信商户Id
+     */
+    public void setWxMerchantId(String wxMerchantId) {
+        this.wxMerchantId = wxMerchantId;
+    }
+
+    /**
+     * 微信商户Id
+     */
+    public String getWxMerchantId() {
+        return wxMerchantId;
+    }
+
+    /**
+     * 内部支付实现唯一编码
+     */
+    public void setWxInternalPayNo(String wxInternalPayNo) {
+        this.wxInternalPayNo = wxInternalPayNo;
+    }
+
+    /**
+     * 内部支付实现唯一编码
+     */
+    public String getWxInternalPayNo() {
+        return wxInternalPayNo;
+    }
+
+    /**
+     * 微信支付订单号
+     */
+    public void setWxTransactionId(String wxTransactionId) {
+        this.wxTransactionId = wxTransactionId;
+    }
+
+    /**
+     * 微信支付订单号
+     */
+    public String getWxTransactionId() {
+        return wxTransactionId;
+    }
+
+    /**
+     * 处方日期(一般用于第三方来源)
+     */
+    public void setPrescriptionDate(String prescriptionDate) {
+        this.prescriptionDate = prescriptionDate;
+    }
+
+    /**
+     * 处方日期(一般用于第三方来源)
+     */
+    public String getPrescriptionDate() {
+        return prescriptionDate;
+    }
+
+    /**
+     * 逻辑删除标记,0 - 正常 1 - 删除
+     */
+    public void setDeleted(Integer deleted) {
+        this.deleted = deleted;
+    }
+
+    /**
+     * 逻辑删除标记,0 - 正常 1 - 删除
+     */
+    public Integer getDeleted() {
+        return deleted;
+    }
+
+    /**
+     * 时效标准(快递的预计送达时间)
+     */
+    public void setTimeStandard(String timeStandard) {
+        this.timeStandard = timeStandard;
+    }
+
+    /**
+     * 时效标准(快递的预计送达时间)
+     */
+    public String getTimeStandard() {
+        return timeStandard;
+    }
+
+    /**
+     * 价格设置,见 pharmacy_price_setting 表
+     */
+    public void setPriceSetting(Integer priceSetting) {
+        this.priceSetting = priceSetting;
+    }
+
+    /**
+     * 价格设置,见 pharmacy_price_setting 表
+     */
+    public Integer getPriceSetting() {
+        return priceSetting;
+    }
+
+    /**
+     * HIS 一键挂号流水号
+     */
+    public void setHisClinicCode(String hisClinicCode) {
+        this.hisClinicCode = hisClinicCode;
+    }
+
+    /**
+     * HIS 一键挂号流水号
+     */
+    public String getHisClinicCode() {
+        return hisClinicCode;
+    }
+
+    /**
+     * HIS 预结算订单号
+     */
+    public void setHisOrdNum(String hisOrdNum) {
+        this.hisOrdNum = hisOrdNum;
+    }
+
+    /**
+     * HIS 预结算订单号
+     */
+    public String getHisOrdNum() {
+        return hisOrdNum;
+    }
+
+    /**
+     * HIS 预结算发票号
+     */
+    public void setHisInvoiceNo(String hisInvoiceNo) {
+        this.hisInvoiceNo = hisInvoiceNo;
+    }
+
+    /**
+     * HIS 预结算发票号
+     */
+    public String getHisInvoiceNo() {
+        return hisInvoiceNo;
+    }
+
+    /**
+     * HIS 预结算后的支付费用
+     */
+    public void setHisPayAmount(Integer hisPayAmount) {
+        this.hisPayAmount = hisPayAmount;
+    }
+
+    /**
+     * HIS 预结算后的支付费用
+     */
+    public Integer getHisPayAmount() {
+        return hisPayAmount;
+    }
+
+    /**
+     * HIS 医生 jobNum,主要用于作废处方
+     */
+    public void setHisDoctorJobNum(String hisDoctorJobNum) {
+        this.hisDoctorJobNum = hisDoctorJobNum;
+    }
+
+    /**
+     * HIS 医生 jobNum,主要用于作废处方
+     */
+    public String getHisDoctorJobNum() {
+        return hisDoctorJobNum;
+    }
+
+    /**
+     * 病历 id, 医生 PC 端开方,病历和处方关联
+     */
+    public void setMedRecordId(Integer medRecordId) {
+        this.medRecordId = medRecordId;
+    }
+
+    /**
+     * 病历 id, 医生 PC 端开方,病历和处方关联
+     */
+    public Integer getMedRecordId() {
+        return medRecordId;
+    }
+
+    /**
+     * 诊断编码, 多个用英文逗号隔开
+     */
+    public void setIcdCodes(String icdCodes) {
+        this.icdCodes = icdCodes;
+    }
+
+    /**
+     * 诊断编码, 多个用英文逗号隔开
+     */
+    public String getIcdCodes() {
+        return icdCodes;
+    }
+
+    /**
+     * 患者地址,可修改
+     */
+    public void setPatientAddress(String patientAddress) {
+        this.patientAddress = patientAddress;
+    }
+
+    /**
+     * 患者地址,可修改
+     */
+    public String getPatientAddress() {
+        return patientAddress;
+    }
+
+    /**
+     * HIS 回写处方下单失败错误信息记录
+     */
+    public void setHisErrMsg(String hisErrMsg) {
+        this.hisErrMsg = hisErrMsg;
+    }
+
+    /**
+     * HIS 回写处方下单失败错误信息记录
+     */
+    public String getHisErrMsg() {
+        return hisErrMsg;
+    }
+
+    /**
+     * 是否已修改过配送地址
+     */
+    public void setAddressModified(Boolean addressModified) {
+        this.addressModified = addressModified;
+    }
+
+    /**
+     * 是否已修改过配送地址
+     */
+    public Boolean isAddressModified() {
+        return addressModified;
+    }
+
+    /**
+     * 处方类型: 0 互联网医院, 1 处方外传
+     */
+    public void setPresType(Integer presType) {
+        this.presType = presType;
+    }
+
+    /**
+     * 处方类型: 0 互联网医院, 1 处方外传
+     */
+    public Integer getPresType() {
+        return presType;
+    }
+
+    @Override
+    public String toString() {
+        return "PrescriptionInfo{" +
+                "id=" + id + '\'' +
+                "preBizNo=" + preBizNo + '\'' +
+                "bizNo3th=" + bizNo3th + '\'' +
+                "doctorName=" + doctorName + '\'' +
+                "doctorCode=" + doctorCode + '\'' +
+                "patientName=" + patientName + '\'' +
+                "patientAge=" + patientAge + '\'' +
+                "patientSex=" + patientSex + '\'' +
+                "patientNo=" + patientNo + '\'' +
+                "diagnose=" + diagnose + '\'' +
+                "dept=" + dept + '\'' +
+                "createOn=" + createOn + '\'' +
+                "source=" + source + '\'' +
+                "status=" + status + '\'' +
+                "hospitalCode=" + hospitalCode + '\'' +
+                "hospitalId=" + hospitalId + '\'' +
+                "orgCode3th=" + orgCode3th + '\'' +
+                "totalPrice=" + totalPrice + '\'' +
+                "paymentStatus=" + paymentStatus + '\'' +
+                "userId=" + userId + '\'' +
+                "userType=" + userType + '\'' +
+                "userKeyId=" + userKeyId + '\'' +
+                "patientMobile=" + patientMobile + '\'' +
+                "allergicHistory=" + allergicHistory + '\'' +
+                "description=" + description + '\'' +
+                "doctorSignId=" + doctorSignId + '\'' +
+                "doctorId=" + doctorId + '\'' +
+                "deliveryMethod=" + deliveryMethod + '\'' +
+                "addressId=" + addressId + '\'' +
+                "wxMerchantId=" + wxMerchantId + '\'' +
+                "wxInternalPayNo=" + wxInternalPayNo + '\'' +
+                "wxTransactionId=" + wxTransactionId + '\'' +
+                "hisOrderNo=" + hisOrderNo + '\'' +
+                "idCardNo=" + idCardNo + '\'' +
+                "checkInTime=" + checkInTime + '\'' +
+                "needPrintStatus=" + needPrintStatus + '\'' +
+                "extStatus=" + extStatus + '\'' +
+                "startSendTime=" + startSendTime + '\'' +
+                "finishSendTime=" + finishSendTime + '\'' +
+                "sendNo=" + sendNo + '\'' +
+                "qrCodeUrl=" + qrCodeUrl + '\'' +
+                "freight=" + freight + '\'' +
+                "pharmacyId=" + pharmacyId + '\'' +
+                "individual=" + individual + '\'' +
+                "terminal=" + terminal + '\'' +
+                "sinopharm=" + sinopharm + '\'' +
+                "matchId=" + matchId + '\'' +
+                "extData=" + extData + '\'' +
+                "payTime=" + payTime + '\'' +
+                "orderNo=" + orderNo + '\'' +
+                "orderId=" + orderId + '\'' +
+                "paymentChannel=" + paymentChannel + '\'' +
+                "paymentNo=" + paymentNo + '\'' +
+                "refundTime=" + refundTime + '\'' +
+                "prescriptionDate=" + prescriptionDate + '\'' +
+                "getMedicineNotice=" + getMedicineNotice + '\'' +
+                "remarks=" + remarks + '\'' +
+                "deleted=" + deleted + '\'' +
+                "senderAccount=" + senderAccount + '\'' +
+                "senderNickname=" + senderNickname + '\'' +
+                "timeStandard=" + timeStandard + '\'' +
+                "refundStatus=" + refundStatus + '\'' +
+                "refundNo=" + refundNo + '\'' +
+                "pharmacyTreeCode=" + pharmacyTreeCode + '\'' +
+                "priceSetting=" + priceSetting + '\'' +
+                "cancelStatus=" + cancelStatus + '\'' +
+                "cancelRemark=" + cancelRemark + '\'' +
+                "hisOeoriOrderId=" + hisOeoriOrderId + '\'' +
+                "hisPatientId=" + hisPatientId + '\'' +
+                "hisClinicCode=" + hisClinicCode + '\'' +
+                "hisOrdNum=" + hisOrdNum + '\'' +
+                "hisInvoiceNo=" + hisInvoiceNo + '\'' +
+                "hisPayAmount=" + hisPayAmount + '\'' +
+                "hisDoctorJobNum=" + hisDoctorJobNum + '\'' +
+                "medRecordId=" + medRecordId + '\'' +
+                "icdCodes=" + icdCodes + '\'' +
+                "patientAddress=" + patientAddress + '\'' +
+                "cancelReason=" + cancelReason + '\'' +
+                "hisErrMsg=" + hisErrMsg + '\'' +
+                "addressModified=" + addressModified + '\'' +
+                "presType=" + presType + '\'' +
+                '}';
+    }
 }

+ 15 - 8
src/main/java/com/ywt/mg/services/PrescriptionServices.java

@@ -223,12 +223,9 @@ public class PrescriptionServices {
         String type = Checker.getStringValue(request.getType());
         if (!Checker.isNone(type)) {
             int typeInt = Integer.parseInt(type);
-            if (typeInt == 1) {
-                whereSql += " and (source != 6)";
-            }
-            if (typeInt == 2) {
-                whereSql += " and (source = 6)";
-            }
+            whereSql += " and ( pres_type = ? )";
+            paramList.add(typeInt);
+
         }
 
         String Format_Date = "yyyy-MM-dd";
@@ -404,7 +401,7 @@ public class PrescriptionServices {
                     map.getStringListSafely(col9).add(PresPaymentChannelEnum.valueOf(Checker.getIntegerValue(p.getPaymentChannel())).getDisplayName());
                     String total = FormatUtil.decimalFormat(p.getTotalPrice() / 100.0);
                     map.getStringListSafely(col10).add(total);
-                    map.getStringListSafely(col19).add(p.getSource() == 6 ? "处方外转" : "互联网医院");
+                    map.getStringListSafely(col19).add(p.getPresType() == 1 ? "处方外转" : "互联网医院");
                     map.getStringListSafely(col11).add(sdf.format(p.getCreateOn()));
                     String payTime = !Checker.isNone(p.getPayTime()) ? sdf.format(p.getPayTime()) : "";
                     map.getStringListSafely(col12).add(payTime);
@@ -755,6 +752,14 @@ public class PrescriptionServices {
             paramList.add("%" + orderNo.trim() + "%");
         }
 
+        String type = Checker.getStringValue(request.getType());
+        if (!Checker.isNone(type)) {
+            int typeInt = Integer.parseInt(type);
+            whereSql += " and ( pres_type = ? )";
+            paramList.add(typeInt);
+
+        }
+
         String Format_Date = "yyyy-MM-dd";
         SimpleDateFormat format = new SimpleDateFormat(Format_Date);
 
@@ -1138,7 +1143,7 @@ public class PrescriptionServices {
         List<Object> paramList = new ArrayList<>();
         String whereSql = " ( 1=1 )";
 
-        whereSql += " and ( source = 6)";
+        whereSql += " and (  pres_type = 1)";
 
         String doctorname = request.getDoctorname();
         if (!Checker.isNull(doctorname)) {
@@ -1473,6 +1478,8 @@ public class PrescriptionServices {
         List<Object> paramList = new ArrayList<>();
         String whereSql = " ( 1=1 )";
 
+        whereSql += " and ( pres_type = 1 )";
+
         String doctorname = request.getDoctorname();
         if (!Checker.isNull(doctorname)) {
             whereSql += " and ( doctor_name like ?)";