csx преди 2 години
родител
ревизия
a903e79a4d
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      service/ystx_service.go

+ 3 - 3
service/ystx_service.go Целия файл

@@ -1623,7 +1623,7 @@ func Synctfyz() (err error) {
1623 1623
 	for _, idStr := range idArray {
1624 1624
 		//temp_id := strings.Split(idStr, "-")
1625 1625
 		id := idStr
1626
-		printInfo, _ := GetPatientsInfoByIDCardNo(id, 10330)
1626
+		printInfo, _ := GetPatientsInfoByIDCardNo(id, org_id)
1627 1627
 		timeNow := time.Unix(sync_time, 0) //2017-08-30 16:19:19 +0800 CST
1628 1628
 
1629 1629
 		timeString := timeNow.Format("2006-01-02 15:04:05") //2015-06-15 08:52:32
@@ -1673,7 +1673,7 @@ func Synctfyz() (err error) {
1673 1673
 				SingleDose := yz.DanLiang
1674 1674
 				PrescribingNumber := yz.Shuliang
1675 1675
 				advice := models.XtDoctorAdvice{
1676
-					UserOrgId:  3877,
1676
+					UserOrgId:  org_id,
1677 1677
 					PatientId:  temp_patient_id,
1678 1678
 					AdviceType: 2,
1679 1679
 					AdviceDate: schedulesTime,
@@ -1696,7 +1696,7 @@ func Synctfyz() (err error) {
1696 1696
 				}
1697 1697
 				utils.InfoLog("advice:%v", advice)
1698 1698
 				// 根据同步来的 advice_id 来查询库里是否已经存在
1699
-				advice_info, _ := GetAdviceBySyncAdviceIdTwo(3877, yz.AdviceId)
1699
+				advice_info, _ := GetAdviceBySyncAdviceIdTwo(org_id, yz.AdviceId)
1700 1700
 				utils.InfoLog("advice_info:%v", advice_info)
1701 1701
 				if advice_info.ID > 0 {
1702 1702
 					key := strconv.FormatInt(org_id, 10) + ":" + strconv.FormatInt(temp_patient_id, 10) + ":" + strconv.FormatInt(schedulesTime, 10) + ":doctor_advices"