28169 2 gadus atpakaļ
vecāks
revīzija
e17b18770d
1 mainītis faili ar 20 papildinājumiem un 2 dzēšanām
  1. 20 2
      service/mobile_dialysis_service.go

+ 20 - 2
service/mobile_dialysis_service.go Parādīt failu

@@ -4477,6 +4477,12 @@ func GetFistMonitor(orgid int64, patient_id int64, dialysis_date int64) (models.
4477 4477
 }
4478 4478
 
4479 4479
 func MobileGetScheduleDoctorAdvicesOne(orgID int64, scheduleDate int64, adviceType int, patientType int, adminUserId int64, deliverWay string, scheduleType int64, partitonType int64, patient_id int64, execution_state int64, cost_type int64, execution_frequency string) ([]*MScheduleDoctorAdviceVM, error) {
4480
+
4481
+	fmt.Println("execution_frequency---------------------------", execution_frequency)
4482
+	fmt.Println("cost_type-----------", cost_type)
4483
+	fmt.Println("adviceType-----------", adviceType)
4484
+	fmt.Println("patientType---------", patientType)
4485
+	fmt.Println("len(deliverWay)--------", len(deliverWay))
4480 4486
 	var vms []*MScheduleDoctorAdviceVM
4481 4487
 	adviceWhere := ""
4482 4488
 	adviceCondition := []interface{}{}
@@ -5316,6 +5322,7 @@ func MobileGetScheduleDoctorAdvicesOne(orgID int64, scheduleDate int64, adviceTy
5316 5322
 		}
5317 5323
 
5318 5324
 	} else if adviceType == 2 && len(deliverWay) > 0 {
5325
+
5319 5326
 		if patientType == 0 {
5320 5327
 			if patient_id > 0 {
5321 5328
 				if execution_state > 0 {
@@ -5592,6 +5599,11 @@ func MobileGetScheduleDoctorAdvicesOne(orgID int64, scheduleDate int64, adviceTy
5592 5599
 		}
5593 5600
 
5594 5601
 	} else if adviceType == 2 && len(deliverWay) <= 0 {
5602
+		fmt.Println("寄哪里233223322323233232", patientType)
5603
+		fmt.Println("patient_id", patient_id)
5604
+		fmt.Println("execution_state000000", execution_state)
5605
+		fmt.Println("cost_type", cost_type)
5606
+		fmt.Println("len23323232", len(execution_frequency))
5595 5607
 		if patientType == 0 {
5596 5608
 			if patient_id > 0 {
5597 5609
 				if execution_state > 0 {
@@ -5668,8 +5680,14 @@ func MobileGetScheduleDoctorAdvicesOne(orgID int64, scheduleDate int64, adviceTy
5668 5680
 						}
5669 5681
 
5670 5682
 					} else {
5671
-						adviceWhere = "status = 1 AND user_org_id = ? AND advice_type = 2 AND record_date = ?"
5672
-						adviceCondition = append(adviceCondition, adviceWhere, orgID, scheduleDate)
5683
+						if len(execution_frequency) > 0 {
5684
+							adviceWhere = "status = 1 AND user_org_id = ? AND advice_type = 2 AND record_date = ? and execution_frequency = ?"
5685
+							adviceCondition = append(adviceCondition, adviceWhere, orgID, scheduleDate, execution_frequency)
5686
+						} else {
5687
+							adviceWhere = "status = 1 AND user_org_id = ? AND advice_type = 2 AND record_date = ?"
5688
+							adviceCondition = append(adviceCondition, adviceWhere, orgID, scheduleDate)
5689
+						}
5690
+
5673 5691
 					}
5674 5692
 
5675 5693
 				}