XMLWAN hace 2 años
padre
commit
53f87f901d
Se han modificado 1 ficheros con 12 adiciones y 0 borrados
  1. 12 0
      service/dialysis_service.go

+ 12 - 0
service/dialysis_service.go Ver fichero

@@ -1786,3 +1786,15 @@ func GetOrgFollowIsExist(orgid int64) (*models.SgjOrgFollowOne, error) {
1786 1786
 	}
1787 1787
 	return &follow, nil
1788 1788
 }
1789
+
1790
+func UpdatePatientSign(patient_id int64, dialysis_date int64, order models.DialysisOrder, orgid int64) error {
1791
+
1792
+	err := XTWriteDB().Model(&order).Where("patient_id = ? and dialysis_date= ? and status = 1 and user_org_id = ?", patient_id, dialysis_date, orgid).Update(map[string]interface{}{"url": order.Url, "hash": order.Hash}).Error
1793
+	return err
1794
+}
1795
+
1796
+func GetPatientSign(patient_id int64, dialysis_date int64, orgid int64) (models.DialysisOrder, error) {
1797
+	order := models.DialysisOrder{}
1798
+	err := XTReadDB().Where("patient_id=? and dialysis_date = ? and user_org_id = ? and status = 1", patient_id, dialysis_date, orgid).Find(&order).Error
1799
+	return order, err
1800
+}