张保健 пре 5 месеци
родитељ
комит
48bff22e5c

+ 1 - 1
conf/app.conf Прегледај датотеку

@@ -96,7 +96,7 @@ backupname = sgj_xt
96 96
 redishost = kuyicloud.redis.rds.aliyuncs.com
97 97
 redisport = 6379
98 98
 redispasswrod = 1Q2W3e4r!@#$
99
-redisdb = 1
99
+redisdb = 13
100 100
 
101 101
 
102 102
 

+ 4 - 2
main.go Прегледај датотеку

@@ -18,10 +18,12 @@ func main() {
18 18
 	service.BeginAutoSyncLis()
19 19
 	//service.SyncStsyLis() //  汕头三优  打开程序马上运行LIS同步
20 20
 	//service.SyncLisSgyhs() //  韶关源和盛  打开程序马上运行LIS同步
21
-	//service.SyncCsnyLis() //  揭阳景熹透析中心  打开程序马上运行LIS同步
21
+	//service.SyncLisPljx(10597) //  揭阳景熹透析中心  打开程序马上运行LIS同步
22 22
 	//service.SyncTszhraLis() // 遵化仁爱医院  打开程序马上运行LIS同步
23 23
 	//service.SyncLisYstxChyd() // 从化意达透析中心  打开程序马上运行LIS同步
24 24
 	//service.SyncJhhjyyLis() // 湖南郴州嘉禾恒佳医院  打开程序马上运行LIS同步
25
-	//service.SyncSYData2() // 石狮盛誉血液透析中心  打开程序马上运行LIS同步
25
+	//service.SyncSclsyyyyyz() // 石狮盛誉血液透析中心  打开程序马上运行LIS同步
26
+	//service.SyncSccdkfyyLis() // 成都城东康复医院  打开程序马上运行LIS同步
27
+	//service.SyncSclsyyyyyz(orgDb) // 深圳五洲医院  打开程序马上运行LIS同步
26 28
 	beego.Run()
27 29
 }

+ 36 - 3
service/cron.go Прегледај датотеку

@@ -5,8 +5,10 @@ import (
5 5
 	"IC/utils"
6 6
 	"encoding/json"
7 7
 	_ "fmt"
8
+	oracle "github.com/dzwvip/gorm-oracle"
8 9
 	_ "github.com/jinzhu/gorm"
9 10
 	"github.com/robfig/cron/v3"
11
+	"gorm.io/gorm"
10 12
 	_ "strings"
11 13
 	"time"
12 14
 )
@@ -29,6 +31,12 @@ func BeginAutoSyncLis() {
29 31
 	utils.InfoLog("开启自动检验检查同步定时任务")
30 32
 	createLisSyncCronJob := newWithSeconds()
31 33
 
34
+	orgDb, err := gorm.Open(oracle.Open("oracle://zjybase:zjybase@10.0.0.248:1521/orcl"), &gorm.Config{})
35
+
36
+	if err != nil {
37
+		utils.InfoLog("创建数据库连接失败:%v", err)
38
+	}
39
+
32 40
 	//specys := "0 0 */1 * * ?" // 每天凌晨3点同步 唐山朝阳医院
33 41
 	//createLisSyncCronJob.AddFunc(specys, func() {
34 42
 	//	SyncTscyLis()
@@ -59,7 +67,7 @@ func BeginAutoSyncLis() {
59 67
 	//	SyncSYData2()
60 68
 	//})
61 69
 	//
62
-	//spec5 := "0 20 4 * * ?" // 每天凌晨同步 石狮盛誉血液透析中心
70
+	//spec5 := "0 20 4 * * ?" // 每天凌晨同步 唐山朝阳医院VIP血液透析中心
63 71
 	//createLisSyncCronJob.AddFunc(spec5, func() {
64 72
 	//	SyncTscyVipLis()
65 73
 	//})
@@ -74,7 +82,7 @@ func BeginAutoSyncLis() {
74 82
 	//	SyncLisSzwz()
75 83
 	//})
76 84
 
77
-	//spec8 := "0 20 */2 * * ?" // 每个小时同步一次 汕头三优透析中心LIS对接,本地部署的
85
+	//spec8 := "0 25 */2 * * ?" // 每个小时同步一次 汕头三优透析中心LIS对接,本地部署的
78 86
 	//createLisSyncCronJob.AddFunc(spec8, func() {
79 87
 	//	SyncStsyLis()
80 88
 	//})
@@ -93,7 +101,7 @@ func BeginAutoSyncLis() {
93 101
 	//createLisSyncCronJob.AddFunc(spec11, func() {
94 102
 	//	SyncLisPljx(10597)
95 103
 	//})
96
-	//
104
+
97 105
 	//spec12 := "0 40 */2 * * ?" // 每个小时同步一次 普宁景熹LIS对接,本地部署的
98 106
 	//createLisSyncCronJob.AddFunc(spec12, func() {
99 107
 	//	SyncLisPljx(10599)
@@ -109,6 +117,31 @@ func BeginAutoSyncLis() {
109 117
 	//	SyncLisChyd(0)
110 118
 	//})
111 119
 
120
+	//spec15 := "0 20 */2 * * ?" // 每个小时同步一次 成都城东康复医院,本地部署的
121
+	//createLisSyncCronJob.AddFunc(spec15, func() {
122
+	//	SyncSccdkfyyLis()
123
+	//})
124
+
125
+	//spec16 := "0 20 */2 * * ?" // 每个小时同步一次 深圳五洲医院,本地部署的
126
+	//createLisSyncCronJob.AddFunc(spec16, func() {
127
+	//	SyncLisSzwz()
128
+	//})
129
+
130
+	//spec17 := "0 20 */2 * * ?" // 每个小时同步一次 湖南嘉禾恒佳医院,本地部署的
131
+	//createLisSyncCronJob.AddFunc(spec17, func() {
132
+	//	SyncJhhjyyLis()
133
+	//})
134
+
135
+	spec18 := "1 * * * * ?" // 每个30秒同步一次 四川乐山友谊医院医嘱对接,本地部署的
136
+	createLisSyncCronJob.AddFunc(spec18, func() {
137
+		SyncSclsyyyyyz(orgDb)
138
+	})
139
+
140
+	spec19 := "* 35 */4 * * ?" // 每个2个小时同步一次 四川乐山友谊医院LIS对接,本地部署的
141
+	createLisSyncCronJob.AddFunc(spec19, func() {
142
+		SyncScyyyyLis()
143
+	})
144
+
112 145
 	createLisSyncCronJob.Start()
113 146
 }
114 147
 

+ 3 - 3
service/csny_service.go Прегледај датотеку

@@ -406,7 +406,7 @@ func CsnyGetLab(id_card_no string, synctime string) (string, string) {
406 406
 		return err.Error(), ""
407 407
 	}
408 408
 	reader := bytes.NewReader(bytesData)
409
-	url := "http://218.104.146.179:9091/esb/listener/getLab1"
409
+	url := "http://58.20.58.241:9092/esb/listener/getLab1"
410 410
 
411 411
 	request, err := http.NewRequest("POST", url, reader)
412 412
 	if err != nil {
@@ -447,7 +447,7 @@ func CsnyGetLabTj(patient_name string, synctime string) (string, string) {
447 447
 		return err.Error(), ""
448 448
 	}
449 449
 	reader := bytes.NewReader(bytesData)
450
-	url := "http://218.104.146.179:9091/esb/listener/getLab1"
450
+	url := "http://58.20.58.241:9092/esb/listener/getLab1"
451 451
 
452 452
 	request, err := http.NewRequest("POST", url, reader)
453 453
 	if err != nil {
@@ -505,7 +505,7 @@ func CsnyGetLac(lab01 int64) (string, string) {
505 505
 		return err.Error(), ""
506 506
 	}
507 507
 	reader := bytes.NewReader(bytesData)
508
-	url := "http://218.104.146.179:9091/esb/listener/getLac1"
508
+	url := "http://58.20.58.241:9092/esb/listener/getLac1"
509 509
 
510 510
 	request, err := http.NewRequest("POST", url, reader)
511 511
 	if err != nil {

+ 384 - 392
service/sssy_service.go Прегледај датотеку

@@ -350,71 +350,363 @@ func UploadSYData(org_id int64) {
350 350
 }
351 351
 
352 352
 // 同步逻辑
353
-func SyncSYData(org_id int64) {
353
+//func SyncSYData(org_id int64) {
354
+//	record, _ := GetLastSyncResultRecord(org_id)
355
+//	if record.ID == 0 {
356
+//		//通过接口从高品那里获取检验数据
357
+//		start_time := "2023-06-01"
358
+//		end_time := "2023-06-30"
359
+//		result := GetGPReportListData(start_time, end_time, key)
360
+//		list := GetGPResultDataTwo(result, key)
361
+//		jsonData, err := json.Marshal(result)
362
+//		if err != nil {
363
+//			fmt.Println("转换为JSON时发生错误:", err)
364
+//			return
365
+//		}
366
+//		jsonStr := string(jsonData)
367
+//		jsonData1, err1 := json.Marshal(list)
368
+//		if err1 != nil {
369
+//			fmt.Println("转换为JSON时发生错误:", err1)
370
+//			return
371
+//		}
372
+//		jsonStr1 := string(jsonData1)
373
+//		saveLog1(jsonStr, "", "列表数据", "列表数据")
374
+//		saveLog1(jsonStr1, "", "结果数据", "结果数据")
375
+//
376
+//		if err == nil {
377
+//			fmt.Println(list)
378
+//			//插入到系统检验检查数据
379
+//			if len(list) > 0 {
380
+//				for _, item := range list {
381
+//					project_id := int64(0)
382
+//					//xt_project_id := int64(0)
383
+//					if len(item.ListResult.Barcode) > 0 {
384
+//						project_id, _, _ = GetSyjhProjectID(org_id, item.ChargeItemName)
385
+//					} else {
386
+//						continue
387
+//					}
388
+//					//var patient models.Patients
389
+//					printInfo, _ := GetHisLabelPrintStatusInfoById(item.ListResult.CustomerBarcode)
390
+//					if printInfo.ID == 0 {
391
+//						patient, _ := GetPatientID(org_id, item.ListResult.PatientName)
392
+//						printInfo.PatientId = patient.ID
393
+//
394
+//					}
395
+//					if printInfo.PatientId == 0 {
396
+//						continue
397
+//					}
398
+//					item_id, _ := GetSyItemID(org_id, item.ChargeItemName, item.InspectionName, project_id)
399
+//					tx := writeMiddleDb.Begin()
400
+//					var inspection models.MiddleInspection
401
+//					var inspection_reference models.MiddleInspectionReference
402
+//
403
+//					recordDateStr := ""
404
+//					inspect_date := ""
405
+//					if len(item.ListResult.InspectDate) > 0 {
406
+//
407
+//						inspect_date = item.ListResult.InspectDate
408
+//
409
+//					} else {
410
+//						inspect_date = strings.Split(item.ListResult.ReceiveDateTime, " ")[0]
411
+//
412
+//					}
413
+//
414
+//					recordDateStr = inspect_date
415
+//
416
+//					date, _ := utils.ParseTimeStringToTime("2006-01-02", recordDateStr)
417
+//					record_date := date
418
+//					var total int
419
+//					var RangeOptions string
420
+//					var RangeMin string
421
+//					var RangeMax string
422
+//					// 判断检查类型
423
+//					var ItemType int
424
+//					if strings.Contains(item.Reference, "--") {
425
+//						ItemType = 1
426
+//					} else {
427
+//						ItemType = 2
428
+//
429
+//					}
430
+//
431
+//					if ItemType == 1 {
432
+//						Range := strings.Split(item.Reference, "--")
433
+//						RangeMin = Range[0]
434
+//						RangeMax = Range[1]
435
+//					} else {
436
+//						RangeOptions = item.Reference
437
+//					}
438
+//					err = readMiddleDb.Model(&models.MiddleInspectionReference{}).Where("org_id = ?  and item_id = ? and status = 1", org_id, project_id, item_id).Find(&inspection_reference).Count(&total).Error
439
+//					if inspection_reference.ID > 0 {
440
+//						ItemType = inspection_reference.RangeType
441
+//					}
442
+//					if total <= 0 {
443
+//						inspection_reference.OrgId = org_id
444
+//						inspection_reference.ProjectName = item.ChargeItemName
445
+//						inspection_reference.Project = item.ChargeItemName
446
+//						inspection_reference.ProjectId = project_id
447
+//						inspection_reference.ItemName = item.InspectionName
448
+//						inspection_reference.ItemNameAddition = item.Barcode
449
+//						inspection_reference.ItemId = item_id
450
+//						inspection_reference.RangeType = ItemType
451
+//						inspection_reference.RangeMin = RangeMin
452
+//						inspection_reference.RangeMax = RangeMax
453
+//						inspection_reference.RangeOptions = RangeOptions
454
+//						inspection_reference.Unit = item.Unit
455
+//						inspection_reference.Status = 1
456
+//						inspection_reference.CreatedTime = time.Now().Unix()
457
+//						inspection_reference.UpdatedTime = time.Now().Unix()
458
+//						inspection_reference.InspectDate = inspect_date
459
+//						inspection_reference.UTime = inspect_date
460
+//						err = tx.Model(&models.MiddleInspectionReference{}).Create(&inspection_reference).Error
461
+//						if err != nil {
462
+//							tx.Rollback()
463
+//						}
464
+//					}
465
+//					var itotal int
466
+//					err = readMiddleDb.Model(&models.MiddleInspection{}).Where("org_id = ? and project_id = ? and item_id = ? and record_date = ? and patient_id = ?  and status = 1", org_id, project_id, item_id, record_date.Unix(), printInfo.PatientId).Find(&inspection).Count(&itotal).Error
467
+//					if itotal <= 0 {
468
+//						//item.Result = strings.Replace(item.Result, "&gt;", ">", -1)
469
+//						//item.Result = strings.Replace(item.Result, "&lt;", "<", -1)
470
+//						inspection.PatientId = printInfo.PatientId
471
+//						inspection.OrgId = org_id
472
+//						inspection.ProjectId = project_id
473
+//						inspection.ItemName = inspection_reference.ItemName
474
+//						inspection.ProjectName = inspection_reference.ProjectName
475
+//						inspection.InspectType = ItemType
476
+//						inspection.ItemId = item_id
477
+//
478
+//						inspection.InspectValue = item.Result
479
+//						inspection.InspectDate = inspect_date
480
+//						inspection.RecordDate = record_date.Unix()
481
+//						inspection.Status = 1
482
+//						inspection.CreatedTime = time.Now().Unix()
483
+//						inspection.UpdatedTime = time.Now().Unix()
484
+//						inspection.UTime = inspect_date
485
+//						inspection.HisUserId = strconv.FormatInt(printInfo.PatientId, 10)
486
+//						err = tx.Model(&models.MiddleInspection{}).Create(&inspection).Error
487
+//						if err != nil {
488
+//							tx.Rollback()
489
+//						}
490
+//					}
491
+//					tx.Commit()
492
+//
493
+//				}
494
+//				//插入一条查询检验检查结果记录状态数据
495
+//				var info LisSyncResultStatusInfo
496
+//				info.Ctime = time.Now().Unix()
497
+//				info.Status = 1
498
+//				info.Mtime = time.Now().Unix()
499
+//				info.OrgId = org_id
500
+//				info.IsResult = 1
501
+//				code, _ := strconv.ParseInt(list[0].Barcode, 10, 64)
502
+//				info.LastId = code
503
+//				info.ResultDate = time.Now().Unix()
504
+//				info.GpSyncEndDate = end_time
505
+//				writeMiddleDb.Save(&info)
506
+//			}
507
+//		}
508
+//
509
+//	} else {
510
+//		//start_time := record.GpSyncEndDate
511
+//		//end_time := time.Now().Format("2006-01-02")
512
+//		//
513
+//		//result := GetGPReportListData(start_time, end_time, key)
514
+//		//list := GetGPResultDataTwo(result, key)
515
+//		//
516
+//		////插入一条插入中间库记录数据
517
+//		//if err == nil {
518
+//		//	if len(list) > 0 {
519
+//		//		//插入到系统检验检查数据
520
+//		//		for _, item := range list {
521
+//		//			project_id := int64(0)
522
+//		//			if len(item.ListResult.CustomerBarcode) > 0 {
523
+//		//				project_id, _, _ = GetSyjhProjectID(org_id, item.ChargeItemName)
524
+//		//			} else {
525
+//		//				continue
526
+//		//			}
527
+//		//			var patient models.Patients
528
+//		//			printInfo, _ := GetHisLabelPrintStatusInfoById(item.ListResult.CustomerBarcode)
529
+//		//			if printInfo.ID == 0 {
530
+//		//				patient, _ = GetPatientID(org_id, item.ListResult.PatientName)
531
+//		//			}
532
+//		//			if patient.ID > 0 {
533
+//		//				printInfo.PatientId = patient.ID
534
+//		//			}
535
+//		//			if printInfo.PatientId == 0 {
536
+//		//				continue
537
+//		//			}
538
+//		//
539
+//		//			item_id, _ := GetSyItemID(org_id, item.ChargeItemName, item.InspectionName, project_id)
540
+//		//			tx := writeMiddleDb.Begin()
541
+//		//			var inspection models.MiddleInspection
542
+//		//			var inspection_reference models.MiddleInspectionReference
543
+//		//
544
+//		//			recordDateStr := ""
545
+//		//			inspect_date := ""
546
+//		//			if len(item.ListResult.InspectDate) > 0 {
547
+//		//
548
+//		//				inspect_date = item.ListResult.InspectDate
549
+//		//			} else {
550
+//		//				inspect_date = strings.Split(item.ListResult.ReceiveDateTime, " ")[0]
551
+//		//
552
+//		//			}
553
+//		//			recordDateStr = inspect_date
554
+//		//
555
+//		//			date, _ := utils.ParseTimeStringToTime("2006-01-02", recordDateStr)
556
+//		//			record_date, _ := utils.ParseTimeStringToTime("2006-01-02", date.Format("2006-01-02"))
557
+//		//			var total int
558
+//		//			var RangeOptions string
559
+//		//			var RangeMin string
560
+//		//			var RangeMax string
561
+//		//			// 判断检查类型
562
+//		//			var ItemType int
563
+//		//			if strings.Contains(item.Reference, "--") {
564
+//		//				ItemType = 1
565
+//		//			} else {
566
+//		//				ItemType = 2
567
+//		//
568
+//		//			}
569
+//		//
570
+//		//			if ItemType == 1 {
571
+//		//				Range := strings.Split(item.Reference, "--")
572
+//		//				RangeMin = Range[0]
573
+//		//				RangeMax = Range[1]
574
+//		//			} else {
575
+//		//				RangeOptions = item.Reference
576
+//		//			}
577
+//		//
578
+//		//			err = readMiddleDb.Model(&models.MiddleInspectionReference{}).Where("org_id = ? and project_id = ? and item_id = ? and status = 1", org_id, project_id, item_id).Find(&inspection_reference).Count(&total).Error
579
+//		//			if inspection_reference.ID > 0 {
580
+//		//				ItemType = inspection_reference.RangeType
581
+//		//			}
582
+//		//			if total <= 0 {
583
+//		//				inspection_reference.OrgId = org_id
584
+//		//				inspection_reference.ProjectName = item.ChargeItemName
585
+//		//				inspection_reference.Project = item.ChargeItemName
586
+//		//				inspection_reference.ProjectId = project_id
587
+//		//				inspection_reference.ItemName = item.InspectionName
588
+//		//				inspection_reference.ItemNameAddition = item.Barcode
589
+//		//				inspection_reference.ItemId = item_id
590
+//		//				inspection_reference.RangeType = ItemType
591
+//		//				inspection_reference.RangeMin = RangeMin
592
+//		//				inspection_reference.RangeMax = RangeMax
593
+//		//				inspection_reference.RangeOptions = RangeOptions
594
+//		//				inspection_reference.Unit = item.Unit
595
+//		//				inspection_reference.Status = 1
596
+//		//				inspection_reference.CreatedTime = time.Now().Unix()
597
+//		//				inspection_reference.UpdatedTime = time.Now().Unix()
598
+//		//				inspection_reference.InspectDate = inspect_date
599
+//		//				inspection_reference.UTime = inspect_date
600
+//		//				err = tx.Model(&models.MiddleInspectionReference{}).Create(&inspection_reference).Error
601
+//		//				if err != nil {
602
+//		//					tx.Rollback()
603
+//		//				}
604
+//		//			}
605
+//		//
606
+//		//			var itotal int
607
+//		//			err = readMiddleDb.Model(&models.MiddleInspection{}).Where("org_id = ? and project_id = ? and item_id = ? and record_date = ? and patient_id = ?  and status = 1", org_id, project_id, item_id, record_date.Unix(), printInfo.PatientId).Find(&inspection).Count(&itotal).Error
608
+//		//			if itotal <= 0 {
609
+//		//				//item.Result = strings.Replace(item.Result, "&gt;", ">", -1)
610
+//		//				//item.Result = strings.Replace(item.Result, "&lt;", "<", -1)
611
+//		//				inspection.PatientId = printInfo.PatientId
612
+//		//				inspection.OrgId = org_id
613
+//		//				inspection.ProjectId = project_id
614
+//		//				inspection.ItemName = inspection_reference.ItemName
615
+//		//				inspection.ProjectName = inspection_reference.ProjectName
616
+//		//				inspection.InspectType = ItemType
617
+//		//				inspection.ItemId = item_id
618
+//		//
619
+//		//				inspection.InspectValue = item.Result
620
+//		//				inspection.InspectDate = inspect_date
621
+//		//				inspection.RecordDate = record_date.Unix()
622
+//		//				inspection.Status = 1
623
+//		//				inspection.CreatedTime = time.Now().Unix()
624
+//		//				inspection.UpdatedTime = time.Now().Unix()
625
+//		//				inspection.UTime = inspect_date
626
+//		//				inspection.HisUserId = strconv.FormatInt(printInfo.PatientId, 10)
627
+//		//				err = tx.Model(&models.MiddleInspection{}).Create(&inspection).Error
628
+//		//				if err != nil {
629
+//		//					tx.Rollback()
630
+//		//				}
631
+//		//			}
632
+//		//
633
+//		//			tx.Commit()
634
+//		//
635
+//		//		}
636
+//		//		//插入一条查询检验检查结果记录状态数据
637
+//		//		var info LisSyncResultStatusInfo
638
+//		//		info.Ctime = time.Now().Unix()
639
+//		//		info.Status = 1
640
+//		//		info.Mtime = time.Now().Unix()
641
+//		//		info.OrgId = org_id
642
+//		//		info.IsResult = 1
643
+//		//		info.ResultDate = time.Now().Unix()
644
+//		//		info.GpSyncEndDate = end_time
645
+//		//		writeMiddleDb.Save(&info)
646
+//		//	}
647
+//		//}
648
+//	}
649
+//	//// 第一步:跟进org_id 去中间库查出需要同步的数据
650
+//
651
+//	//inspection_references, _ := GetSyncInspectionReferenceByOrgId(org_id)
652
+//	//inspections, _ := GetSyncInspectionByOrgId(org_id)
653
+//	//// 第二步:将数据同步到业务库
654
+//	//if len(inspection_references) > 0 {
655
+//	//	for _, inspection_reference := range inspection_references {
656
+//	//		SyncInspectionReference(&inspection_reference)
657
+//	//	}
658
+//	//}
659
+//	//if len(inspections) > 0 {
660
+//	//	for _, inspection := range inspections {
661
+//	//		SyncInspection(&inspection)
662
+//	//	}
663
+//	//}
664
+//	//return
665
+//}
666
+
667
+func SyncSYData2() {
668
+	org_id := int64(10191)
669
+	start_time := "2024-04-20"
670
+	end_time := "2024-04-26"
354 671
 	record, _ := GetLastSyncResultRecord(org_id)
355
-	if record.ID == 0 {
356
-		//通过接口从高品那里获取检验数据
357
-		start_time := "2023-06-01"
358
-		end_time := "2023-06-30"
359
-		result := GetGPReportListData(start_time, end_time, key)
360
-		list := GetGPResultDataTwo(result, key)
361
-		jsonData, err := json.Marshal(result)
362
-		if err != nil {
363
-			fmt.Println("转换为JSON时发生错误:", err)
364
-			return
365
-		}
366
-		jsonStr := string(jsonData)
367
-		jsonData1, err1 := json.Marshal(list)
368
-		if err1 != nil {
369
-			fmt.Println("转换为JSON时发生错误:", err1)
370
-			return
371
-		}
372
-		jsonStr1 := string(jsonData1)
373
-		saveLog1(jsonStr, "", "列表数据", "列表数据")
374
-		saveLog1(jsonStr1, "", "结果数据", "结果数据")
672
+	if record.ID > 0 {
673
+		start_time = record.GpSyncEndDate
674
+		end_time = time.Now().Format("2006-01-02")
675
+	}
676
+	loc, _ := time.LoadLocation("Local")
677
+	theTime, _ := time.ParseInLocation("2006-01-02", start_time, loc)
678
+	newtheTime := theTime.Unix() - 60*60*24*3
679
+
680
+	SyncTime := time.Unix(newtheTime, 0)
681
+	syncTimeStr := SyncTime.Format("2006-01-02")
682
+
683
+	result := GetGPReportListData(syncTimeStr, end_time, key)
684
+	if len(result) > 0 {
685
+		for _, item := range result {
686
+			list := GetGPResultDataTwo(item, key)
375 687
 
376
-		if err == nil {
377
-			fmt.Println(list)
378 688
 			//插入到系统检验检查数据
379 689
 			if len(list) > 0 {
380 690
 				for _, item := range list {
381 691
 					project_id := int64(0)
382
-					//xt_project_id := int64(0)
383
-					if len(item.ListResult.Barcode) > 0 {
384
-						project_id, _, _ = GetSyjhProjectID(org_id, item.ChargeItemName)
385
-					} else {
386
-						continue
387
-					}
388
-					//var patient models.Patients
389
-					printInfo, _ := GetHisLabelPrintStatusInfoById(item.ListResult.CustomerBarcode)
390
-					if printInfo.ID == 0 {
391
-						patient, _ := GetPatientID(org_id, item.ListResult.PatientName)
392
-						printInfo.PatientId = patient.ID
692
+					patient, _ := GetPatientID(org_id, item.ListResult.PatientName)
393 693
 
394
-					}
395
-					if printInfo.PatientId == 0 {
694
+					if patient.ID == 0 {
396 695
 						continue
397 696
 					}
398
-					item_id, _ := GetSyItemID(org_id, item.ChargeItemName, item.InspectionName, project_id)
399 697
 					tx := writeMiddleDb.Begin()
400 698
 					var inspection models.MiddleInspection
401 699
 					var inspection_reference models.MiddleInspectionReference
402 700
 
403
-					recordDateStr := ""
404
-					inspect_date := ""
405
-					if len(item.ListResult.InspectDate) > 0 {
406
-
407
-						inspect_date = item.ListResult.InspectDate
408
-
409
-					} else {
410
-						inspect_date = strings.Split(item.ListResult.ReceiveDateTime, " ")[0]
411
-
412
-					}
701
+					recordDateStr := item.ListResult.ReceiveDateTime
702
+					recordDate, _ := utils.ParseTimeStringToTime("2006-01-02 15:04:05", recordDateStr)
703
+					inspect_date := recordDate.Format("2006-01-02 15:04")
413 704
 
414
-					recordDateStr = inspect_date
705
+					date, _ := time.Parse("2006-01-02 15:04:05", recordDateStr)
706
+					utils.InfoLog("date2: %v", date.Unix())
707
+					record_date_time, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", inspect_date)
708
+					record_date := record_date_time.Unix()
415 709
 
416
-					date, _ := utils.ParseTimeStringToTime("2006-01-02", recordDateStr)
417
-					record_date := date
418 710
 					var total int
419 711
 					var RangeOptions string
420 712
 					var RangeMin string
@@ -425,7 +717,6 @@ func SyncSYData(org_id int64) {
425 717
 						ItemType = 1
426 718
 					} else {
427 719
 						ItemType = 2
428
-
429 720
 					}
430 721
 
431 722
 					if ItemType == 1 {
@@ -435,11 +726,35 @@ func SyncSYData(org_id int64) {
435 726
 					} else {
436 727
 						RangeOptions = item.Reference
437 728
 					}
438
-					err = readMiddleDb.Model(&models.MiddleInspectionReference{}).Where("org_id = ?  and item_id = ? and status = 1", org_id, project_id, item_id).Find(&inspection_reference).Count(&total).Error
729
+					err = readMiddleDb.Model(&models.MiddleInspectionReference{}).Where("org_id = ? and project = ?  and item_name = ? and status = 1", org_id, item.ChargeItemName, item.InspectionName).Find(&inspection_reference).Count(&total).Error
439 730
 					if inspection_reference.ID > 0 {
440 731
 						ItemType = inspection_reference.RangeType
732
+						project_id = inspection_reference.ProjectId
441 733
 					}
442 734
 					if total <= 0 {
735
+						var inspection_referenceTwo models.MiddleInspectionReference
736
+						err = readMiddleDb.Model(&models.MiddleInspectionReference{}).Where("org_id = ? and status = 1 and project_name = ?", org_id, item.ChargeItemName).First(&inspection_referenceTwo).Error
737
+						if inspection_referenceTwo.ID > 0 {
738
+							project_id = inspection_referenceTwo.ProjectId
739
+						} else {
740
+							err = readMiddleDb.Table("xt_middle_inspection_reference").Where("org_id=? ", org_id).Select("max(project_id) as project_id").Scan(&inspection_referenceTwo).Error
741
+							if inspection_referenceTwo.ProjectId > 0 {
742
+								project_id = inspection_referenceTwo.ProjectId + 1
743
+							} else {
744
+								project_id = 1019101
745
+							}
746
+						}
747
+
748
+						var item_id int64
749
+						var inspection_referenceThree models.MiddleInspectionReference
750
+						readMiddleDb.Table("xt_middle_inspection_reference").Where("org_id = ? and project_id = ?", org_id, project_id).Select("max(item_id) as item_id").First(&inspection_referenceThree)
751
+						utils.InfoLog("inspection_reference: %v", inspection_reference)
752
+						if inspection_referenceThree.ItemId > 0 {
753
+							item_id = inspection_referenceThree.ItemId + 1
754
+						} else {
755
+							item_id = project_id*100 + 1
756
+						}
757
+
443 758
 						inspection_reference.OrgId = org_id
444 759
 						inspection_reference.ProjectName = item.ChargeItemName
445 760
 						inspection_reference.Project = item.ChargeItemName
@@ -463,371 +778,48 @@ func SyncSYData(org_id int64) {
463 778
 						}
464 779
 					}
465 780
 					var itotal int
466
-					err = readMiddleDb.Model(&models.MiddleInspection{}).Where("org_id = ? and project_id = ? and item_id = ? and record_date = ? and patient_id = ?  and status = 1", org_id, project_id, item_id, record_date.Unix(), printInfo.PatientId).Find(&inspection).Count(&itotal).Error
781
+					err = readMiddleDb.Model(&models.MiddleInspection{}).Where("org_id = ? and project_id = ? and item_id = ? and record_date = ? and patient_id = ?  and status = 1", org_id, project_id, inspection_reference.ItemId, record_date, patient.ID).Find(&inspection).Count(&itotal).Error
467 782
 					if itotal <= 0 {
468 783
 						//item.Result = strings.Replace(item.Result, "&gt;", ">", -1)
469 784
 						//item.Result = strings.Replace(item.Result, "&lt;", "<", -1)
470
-						inspection.PatientId = printInfo.PatientId
785
+						inspection.PatientId = patient.ID
471 786
 						inspection.OrgId = org_id
472 787
 						inspection.ProjectId = project_id
473 788
 						inspection.ItemName = inspection_reference.ItemName
474 789
 						inspection.ProjectName = inspection_reference.ProjectName
475 790
 						inspection.InspectType = ItemType
476
-						inspection.ItemId = item_id
477
-
791
+						inspection.ItemId = inspection_reference.ItemId
478 792
 						inspection.InspectValue = item.Result
479 793
 						inspection.InspectDate = inspect_date
480
-						inspection.RecordDate = record_date.Unix()
794
+						inspection.RecordDate = record_date
481 795
 						inspection.Status = 1
482 796
 						inspection.CreatedTime = time.Now().Unix()
483 797
 						inspection.UpdatedTime = time.Now().Unix()
484 798
 						inspection.UTime = inspect_date
485
-						inspection.HisUserId = strconv.FormatInt(printInfo.PatientId, 10)
799
+						inspection.HisUserId = strconv.FormatInt(patient.ID, 10)
800
+						inspection.SysProjectId = inspection_reference.XtProjectId
801
+						inspection.SysItemId = inspection_reference.XtItemId
486 802
 						err = tx.Model(&models.MiddleInspection{}).Create(&inspection).Error
487 803
 						if err != nil {
488 804
 							tx.Rollback()
489 805
 						}
490 806
 					}
491 807
 					tx.Commit()
492
-
493 808
 				}
494
-				//插入一条查询检验检查结果记录状态数据
495
-				var info LisSyncResultStatusInfo
496
-				info.Ctime = time.Now().Unix()
497
-				info.Status = 1
498
-				info.Mtime = time.Now().Unix()
499
-				info.OrgId = org_id
500
-				info.IsResult = 1
501
-				code, _ := strconv.ParseInt(list[0].Barcode, 10, 64)
502
-				info.LastId = code
503
-				info.ResultDate = time.Now().Unix()
504
-				info.GpSyncEndDate = end_time
505
-				writeMiddleDb.Save(&info)
506 809
 			}
507 810
 		}
508
-
509
-	} else {
510
-		//start_time := record.GpSyncEndDate
511
-		//end_time := time.Now().Format("2006-01-02")
512
-		//
513
-		//result := GetGPReportListData(start_time, end_time, key)
514
-		//list := GetGPResultDataTwo(result, key)
515
-		//
516
-		////插入一条插入中间库记录数据
517
-		//if err == nil {
518
-		//	if len(list) > 0 {
519
-		//		//插入到系统检验检查数据
520
-		//		for _, item := range list {
521
-		//			project_id := int64(0)
522
-		//			if len(item.ListResult.CustomerBarcode) > 0 {
523
-		//				project_id, _, _ = GetSyjhProjectID(org_id, item.ChargeItemName)
524
-		//			} else {
525
-		//				continue
526
-		//			}
527
-		//			var patient models.Patients
528
-		//			printInfo, _ := GetHisLabelPrintStatusInfoById(item.ListResult.CustomerBarcode)
529
-		//			if printInfo.ID == 0 {
530
-		//				patient, _ = GetPatientID(org_id, item.ListResult.PatientName)
531
-		//			}
532
-		//			if patient.ID > 0 {
533
-		//				printInfo.PatientId = patient.ID
534
-		//			}
535
-		//			if printInfo.PatientId == 0 {
536
-		//				continue
537
-		//			}
538
-		//
539
-		//			item_id, _ := GetSyItemID(org_id, item.ChargeItemName, item.InspectionName, project_id)
540
-		//			tx := writeMiddleDb.Begin()
541
-		//			var inspection models.MiddleInspection
542
-		//			var inspection_reference models.MiddleInspectionReference
543
-		//
544
-		//			recordDateStr := ""
545
-		//			inspect_date := ""
546
-		//			if len(item.ListResult.InspectDate) > 0 {
547
-		//
548
-		//				inspect_date = item.ListResult.InspectDate
549
-		//			} else {
550
-		//				inspect_date = strings.Split(item.ListResult.ReceiveDateTime, " ")[0]
551
-		//
552
-		//			}
553
-		//			recordDateStr = inspect_date
554
-		//
555
-		//			date, _ := utils.ParseTimeStringToTime("2006-01-02", recordDateStr)
556
-		//			record_date, _ := utils.ParseTimeStringToTime("2006-01-02", date.Format("2006-01-02"))
557
-		//			var total int
558
-		//			var RangeOptions string
559
-		//			var RangeMin string
560
-		//			var RangeMax string
561
-		//			// 判断检查类型
562
-		//			var ItemType int
563
-		//			if strings.Contains(item.Reference, "--") {
564
-		//				ItemType = 1
565
-		//			} else {
566
-		//				ItemType = 2
567
-		//
568
-		//			}
569
-		//
570
-		//			if ItemType == 1 {
571
-		//				Range := strings.Split(item.Reference, "--")
572
-		//				RangeMin = Range[0]
573
-		//				RangeMax = Range[1]
574
-		//			} else {
575
-		//				RangeOptions = item.Reference
576
-		//			}
577
-		//
578
-		//			err = readMiddleDb.Model(&models.MiddleInspectionReference{}).Where("org_id = ? and project_id = ? and item_id = ? and status = 1", org_id, project_id, item_id).Find(&inspection_reference).Count(&total).Error
579
-		//			if inspection_reference.ID > 0 {
580
-		//				ItemType = inspection_reference.RangeType
581
-		//			}
582
-		//			if total <= 0 {
583
-		//				inspection_reference.OrgId = org_id
584
-		//				inspection_reference.ProjectName = item.ChargeItemName
585
-		//				inspection_reference.Project = item.ChargeItemName
586
-		//				inspection_reference.ProjectId = project_id
587
-		//				inspection_reference.ItemName = item.InspectionName
588
-		//				inspection_reference.ItemNameAddition = item.Barcode
589
-		//				inspection_reference.ItemId = item_id
590
-		//				inspection_reference.RangeType = ItemType
591
-		//				inspection_reference.RangeMin = RangeMin
592
-		//				inspection_reference.RangeMax = RangeMax
593
-		//				inspection_reference.RangeOptions = RangeOptions
594
-		//				inspection_reference.Unit = item.Unit
595
-		//				inspection_reference.Status = 1
596
-		//				inspection_reference.CreatedTime = time.Now().Unix()
597
-		//				inspection_reference.UpdatedTime = time.Now().Unix()
598
-		//				inspection_reference.InspectDate = inspect_date
599
-		//				inspection_reference.UTime = inspect_date
600
-		//				err = tx.Model(&models.MiddleInspectionReference{}).Create(&inspection_reference).Error
601
-		//				if err != nil {
602
-		//					tx.Rollback()
603
-		//				}
604
-		//			}
605
-		//
606
-		//			var itotal int
607
-		//			err = readMiddleDb.Model(&models.MiddleInspection{}).Where("org_id = ? and project_id = ? and item_id = ? and record_date = ? and patient_id = ?  and status = 1", org_id, project_id, item_id, record_date.Unix(), printInfo.PatientId).Find(&inspection).Count(&itotal).Error
608
-		//			if itotal <= 0 {
609
-		//				//item.Result = strings.Replace(item.Result, "&gt;", ">", -1)
610
-		//				//item.Result = strings.Replace(item.Result, "&lt;", "<", -1)
611
-		//				inspection.PatientId = printInfo.PatientId
612
-		//				inspection.OrgId = org_id
613
-		//				inspection.ProjectId = project_id
614
-		//				inspection.ItemName = inspection_reference.ItemName
615
-		//				inspection.ProjectName = inspection_reference.ProjectName
616
-		//				inspection.InspectType = ItemType
617
-		//				inspection.ItemId = item_id
618
-		//
619
-		//				inspection.InspectValue = item.Result
620
-		//				inspection.InspectDate = inspect_date
621
-		//				inspection.RecordDate = record_date.Unix()
622
-		//				inspection.Status = 1
623
-		//				inspection.CreatedTime = time.Now().Unix()
624
-		//				inspection.UpdatedTime = time.Now().Unix()
625
-		//				inspection.UTime = inspect_date
626
-		//				inspection.HisUserId = strconv.FormatInt(printInfo.PatientId, 10)
627
-		//				err = tx.Model(&models.MiddleInspection{}).Create(&inspection).Error
628
-		//				if err != nil {
629
-		//					tx.Rollback()
630
-		//				}
631
-		//			}
632
-		//
633
-		//			tx.Commit()
634
-		//
635
-		//		}
636
-		//		//插入一条查询检验检查结果记录状态数据
637
-		//		var info LisSyncResultStatusInfo
638
-		//		info.Ctime = time.Now().Unix()
639
-		//		info.Status = 1
640
-		//		info.Mtime = time.Now().Unix()
641
-		//		info.OrgId = org_id
642
-		//		info.IsResult = 1
643
-		//		info.ResultDate = time.Now().Unix()
644
-		//		info.GpSyncEndDate = end_time
645
-		//		writeMiddleDb.Save(&info)
646
-		//	}
647
-		//}
648
-	}
649
-	//// 第一步:跟进org_id 去中间库查出需要同步的数据
650
-
651
-	//inspection_references, _ := GetSyncInspectionReferenceByOrgId(org_id)
652
-	//inspections, _ := GetSyncInspectionByOrgId(org_id)
653
-	//// 第二步:将数据同步到业务库
654
-	//if len(inspection_references) > 0 {
655
-	//	for _, inspection_reference := range inspection_references {
656
-	//		SyncInspectionReference(&inspection_reference)
657
-	//	}
658
-	//}
659
-	//if len(inspections) > 0 {
660
-	//	for _, inspection := range inspections {
661
-	//		SyncInspection(&inspection)
662
-	//	}
663
-	//}
664
-	//return
665
-}
666
-
667
-func SyncSYData2() {
668
-	org_id := int64(10191)
669
-	start_time := "2024-01-01"
670
-	end_time := "2024-04-15"
671
-	record, _ := GetLastSyncResultRecord(org_id)
672
-	if record.ID > 0 {
673
-		start_time = record.GpSyncEndDate
674
-		end_time = time.Now().Format("2006-01-02")
675
-	}
676
-	result := GetGPReportListData(start_time, end_time, key)
677
-	list := GetGPResultDataTwo(result, key)
678
-	jsonData, err := json.Marshal(result)
679
-	if err != nil {
680
-		fmt.Println("转换为JSON时发生错误:", err)
681
-		return
682
-	}
683
-	jsonStr := string(jsonData)
684
-	jsonData1, err1 := json.Marshal(list)
685
-	if err1 != nil {
686
-		fmt.Println("转换为JSON时发生错误:", err1)
687
-		return
811
+		//插入一条查询检验检查结果记录状态数据
812
+		var info LisSyncResultStatusInfo
813
+		info.Ctime = time.Now().Unix()
814
+		info.Status = 1
815
+		info.Mtime = time.Now().Unix()
816
+		info.OrgId = org_id
817
+		info.IsResult = 1
818
+		info.ResultDate = time.Now().Unix()
819
+		info.GpSyncEndDate = end_time
820
+		writeMiddleDb.Save(&info)
688 821
 	}
689
-	jsonStr1 := string(jsonData1)
690
-	saveLog1(jsonStr, "", "列表数据", "列表数据")
691
-	saveLog1(jsonStr1, "", "结果数据", "结果数据")
692
-
693
-	if err == nil {
694
-		fmt.Println(list)
695
-		//插入到系统检验检查数据
696
-		if len(list) > 0 {
697
-			tx := writeMiddleDb.Begin()
698
-			for _, item := range list {
699
-				project_id := int64(0)
700
-				patient, _ := GetPatientID(org_id, item.ListResult.PatientName)
701
-
702
-				if patient.ID == 0 {
703
-					continue
704
-				}
705
-				var inspection models.MiddleInspection
706
-				var inspection_reference models.MiddleInspectionReference
707
-
708
-				recordDateStr := item.ListResult.ReceiveDateTime
709
-				recordDate, _ := utils.ParseTimeStringToTime("2006-01-02 15:04:05", recordDateStr)
710
-				inspect_date := recordDate.Format("2006-01-02 15:04")
711
-
712
-				date, _ := time.Parse("2006-01-02 15:04:05", recordDateStr)
713
-				utils.InfoLog("date2: %v", date.Unix())
714
-				record_date_time, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", inspect_date)
715
-				record_date := record_date_time.Unix()
716
-
717
-				var total int
718
-				var RangeOptions string
719
-				var RangeMin string
720
-				var RangeMax string
721
-				// 判断检查类型
722
-				var ItemType int
723
-				if strings.Contains(item.Reference, "--") {
724
-					ItemType = 1
725
-				} else {
726
-					ItemType = 2
727
-				}
728 822
 
729
-				if ItemType == 1 {
730
-					Range := strings.Split(item.Reference, "--")
731
-					RangeMin = Range[0]
732
-					RangeMax = Range[1]
733
-				} else {
734
-					RangeOptions = item.Reference
735
-				}
736
-				err = readMiddleDb.Model(&models.MiddleInspectionReference{}).Where("org_id = ?  and item_name = ? and status = 1", org_id, item.InspectionName).Find(&inspection_reference).Count(&total).Error
737
-				if inspection_reference.ID > 0 {
738
-					ItemType = inspection_reference.RangeType
739
-					project_id = inspection_reference.ProjectId
740
-				}
741
-				if total <= 0 {
742
-					var inspection_referenceTwo models.MiddleInspectionReference
743
-					err = readMiddleDb.Model(&models.MiddleInspectionReference{}).Where("org_id = ? and status = 1 and project_name = ?", org_id, item.ChargeItemName).First(&inspection_referenceTwo).Error
744
-					if inspection_referenceTwo.ID > 0 {
745
-						project_id = inspection_referenceTwo.ProjectId
746
-					} else {
747
-						err = readMiddleDb.Table("xt_middle_inspection_reference").Where("org_id=? ", org_id).Select("max(project_id) as project_id").Scan(&inspection_referenceTwo).Error
748
-						if inspection_referenceTwo.ProjectId > 0 {
749
-							project_id = inspection_referenceTwo.ProjectId + 1
750
-						} else {
751
-							project_id = 1019101
752
-						}
753
-					}
754
-
755
-					var item_id int64
756
-					var inspection_referenceThree models.MiddleInspectionReference
757
-					readMiddleDb.Table("xt_middle_inspection_reference").Where("org_id = ? and project_id = ?", org_id, project_id).Select("max(item_id) as item_id").First(&inspection_referenceThree)
758
-					utils.InfoLog("inspection_reference: %v", inspection_reference)
759
-					if inspection_referenceThree.ItemId > 0 {
760
-						item_id = inspection_referenceThree.ItemId + 1
761
-					} else {
762
-						item_id = project_id*100 + 1
763
-					}
764
-
765
-					inspection_reference.OrgId = org_id
766
-					inspection_reference.ProjectName = item.ChargeItemName
767
-					inspection_reference.Project = item.ChargeItemName
768
-					inspection_reference.ProjectId = project_id
769
-					inspection_reference.ItemName = item.InspectionName
770
-					inspection_reference.ItemNameAddition = item.Barcode
771
-					inspection_reference.ItemId = item_id
772
-					inspection_reference.RangeType = ItemType
773
-					inspection_reference.RangeMin = RangeMin
774
-					inspection_reference.RangeMax = RangeMax
775
-					inspection_reference.RangeOptions = RangeOptions
776
-					inspection_reference.Unit = item.Unit
777
-					inspection_reference.Status = 1
778
-					inspection_reference.CreatedTime = time.Now().Unix()
779
-					inspection_reference.UpdatedTime = time.Now().Unix()
780
-					inspection_reference.InspectDate = inspect_date
781
-					inspection_reference.UTime = inspect_date
782
-					err = tx.Model(&models.MiddleInspectionReference{}).Create(&inspection_reference).Error
783
-					if err != nil {
784
-						tx.Rollback()
785
-					}
786
-				}
787
-				var itotal int
788
-				err = readMiddleDb.Model(&models.MiddleInspection{}).Where("org_id = ? and project_id = ? and item_id = ? and record_date = ? and patient_id = ?  and status = 1", org_id, project_id, inspection_reference.ItemId, record_date, patient.ID).Find(&inspection).Count(&itotal).Error
789
-				if itotal <= 0 {
790
-					//item.Result = strings.Replace(item.Result, "&gt;", ">", -1)
791
-					//item.Result = strings.Replace(item.Result, "&lt;", "<", -1)
792
-					inspection.PatientId = patient.ID
793
-					inspection.OrgId = org_id
794
-					inspection.ProjectId = project_id
795
-					inspection.ItemName = inspection_reference.ItemName
796
-					inspection.ProjectName = inspection_reference.ProjectName
797
-					inspection.InspectType = ItemType
798
-					inspection.ItemId = inspection_reference.ItemId
799
-					inspection.InspectValue = item.Result
800
-					inspection.InspectDate = inspect_date
801
-					inspection.RecordDate = record_date
802
-					inspection.Status = 1
803
-					inspection.CreatedTime = time.Now().Unix()
804
-					inspection.UpdatedTime = time.Now().Unix()
805
-					inspection.UTime = inspect_date
806
-					inspection.HisUserId = strconv.FormatInt(patient.ID, 10)
807
-					inspection.SysProjectId = inspection_reference.XtProjectId
808
-					inspection.SysItemId = inspection_reference.XtItemId
809
-					err = tx.Model(&models.MiddleInspection{}).Create(&inspection).Error
810
-					if err != nil {
811
-						tx.Rollback()
812
-					}
813
-				}
814
-			}
815
-			//插入一条查询检验检查结果记录状态数据
816
-			var info LisSyncResultStatusInfo
817
-			info.Ctime = time.Now().Unix()
818
-			info.Status = 1
819
-			info.Mtime = time.Now().Unix()
820
-			info.OrgId = org_id
821
-			info.IsResult = 1
822
-			code, _ := strconv.ParseInt(list[0].Barcode, 10, 64)
823
-			info.LastId = code
824
-			info.ResultDate = time.Now().Unix()
825
-			info.GpSyncEndDate = end_time
826
-			writeMiddleDb.Save(&info)
827
-
828
-			tx.Commit()
829
-		}
830
-	}
831 823
 	SyncToSssytx()
832 824
 	UpdateJg()
833 825
 }

+ 4 - 2
service/sy_service.go Прегледај датотеку

@@ -44,7 +44,7 @@ func (stsylis) TableName() string {
44 44
 }
45 45
 
46 46
 func GetStsyLis(rdb *gorm.DB, synctime time.Time) (record []*stsylis, err error) {
47
-	err = rdb.Model(&stsylis{}).Where("resulttime >= ? ", synctime).Find(&record).Error
47
+	err = rdb.Model(&stsylis{}).Where("lastmodify >= ? ", synctime).Find(&record).Error
48 48
 	return
49 49
 }
50 50
 
@@ -127,6 +127,8 @@ func SyncStsyLis() (err error) {
127 127
 	stsyLis, _ := GetStsyLis(orgDb, SyncTime)
128 128
 
129 129
 	if len(stsyLis) > 0 {
130
+		var syncTimeEnd int64
131
+		syncTimeEnd = time.Now().Unix()
130 132
 		for _, LisInfo := range stsyLis {
131 133
 			brxm := LisInfo.Brxm
132 134
 			// 根据姓名获取患者ID
@@ -223,7 +225,7 @@ func SyncStsyLis() (err error) {
223 225
 
224 226
 		var syncInfo models.MiddleSyncInfo
225 227
 		syncInfo.OrgId = org_id
226
-		syncInfo.SyncTime = time.Now().Unix()
228
+		syncInfo.SyncTime = syncTimeEnd
227 229
 		syncInfo.SyncResultType = 1
228 230
 		syncInfo.SyncRsultRemark = "同步成功"
229 231
 		syncInfo.SyncTotalNum = 0

+ 103 - 104
service/xml_service.go Прегледај датотеку

@@ -2,6 +2,7 @@ package service
2 2
 
3 3
 import (
4 4
 	"IC/models"
5
+	"IC/utils"
5 6
 	"bytes"
6 7
 	"encoding/json"
7 8
 	"encoding/xml"
@@ -24,7 +25,7 @@ func GetGPReportListData(start_date string, end_date string, key string) (result
24 25
 				BeginDateTime: start_date,
25 26
 				EndDateTime:   end_date,
26 27
 				DateType:      1,
27
-				PrintState:    0,
28
+				PrintState:    2,
28 29
 			},
29 30
 		},
30 31
 	}
@@ -76,6 +77,7 @@ func GetGPReportListData(start_date string, end_date string, key string) (result
76 77
 
77 78
 	// 获取GetReportListResult的JSON字符串
78 79
 	jsonStr := envelope_two.Body.GetAllSampleListResponse.GetAllSampleListResult
80
+	utils.InfoLog("jsonStr:%v", jsonStr)
79 81
 	//fmt.Println(jsonStr)
80 82
 	// 解析JSON字符串到结构体
81 83
 	var reportData models.ReportData
@@ -165,20 +167,100 @@ func GetGPReportListData(start_date string, end_date string, key string) (result
165 167
 //}
166 168
 
167 169
 // 根据高品条码获取标本检测结果或诊断结果,遍历结果
168
-func GetGPResultDataTwo(result []models.GPReportListResultData, key string) (results []models.InspectResultFive) {
169
-	for _, item := range result {
170
-		if len(item.CustomerBarcode) > 0 {
171
-			fmt.Println("~~~~~~-------")
170
+func GetGPResultDataTwo(item models.GPReportListResultData, key string) (results []models.InspectResultFive) {
171
+	if len(item.CustomerBarcode) > 0 {
172
+		fmt.Println("~~~~~~-------")
173
+		// 构建SOAP请求数据
174
+		requestData := &models.ReportResultEnvelope{
175
+			Soap: "http://schemas.xmlsoap.org/soap/envelope/",
176
+			Xsi:  "http://www.w3.org/2001/XMLSchema-instance",
177
+			Xsd:  "http://www.w3.org/2001/XMLSchema",
178
+			Body: models.ReportResultBody{
179
+				GetReportResultReq: models.GetReportResultReq{
180
+					XMLName:         xml.Name{Local: "GetJSONReportItemListByCustomerBarocde", Space: "http://tempuri.org/"},
181
+					Key:             key,
182
+					CustomerBarCode: item.CustomerBarcode,
183
+				},
184
+			},
185
+		}
186
+
187
+		// 将SOAP请求数据转换为XML格式
188
+		requestBody, err := xml.Marshal(requestData)
189
+		if err != nil {
190
+			fmt.Println("XML Marshal error:", err)
191
+
192
+		}
193
+
194
+		// 创建POST请求
195
+		url := "http://gpis.cnhiqc.com:9799/InstituteLISService.asmx"
196
+		req, err := http.NewRequest("POST", url, bytes.NewBuffer(requestBody))
197
+		if err != nil {
198
+			fmt.Println("Request creation error:", err)
199
+		}
200
+		// 设置请求头
201
+		req.Header.Set("Content-Type", "text/xml; charset=utf-8")
202
+		req.Header.Set("Content-Length", "length")
203
+		req.Header.Set("SOAPAction", "http://tempuri.org/GetJSONReportItemListByCustomerBarocde")
204
+		// 发送请求
205
+		client := &http.Client{}
206
+		resp, err := client.Do(req)
207
+		if err != nil {
208
+			fmt.Println("Request error:", err)
209
+
210
+		}
211
+		defer resp.Body.Close()
212
+		// 读取响应数据
213
+		responseBody, err := ioutil.ReadAll(resp.Body)
214
+		if err != nil {
215
+			fmt.Println("Response read error:", err)
216
+		}
217
+
218
+		// 解析XML数据
219
+		var envelope_three models.EnvelopeThree
220
+		err2 := xml.Unmarshal(responseBody, &envelope_three)
221
+		if err2 != nil {
222
+			fmt.Println("XML Unmarshal error:", err2)
223
+		}
224
+		// 获取GetReportListResult的JSON字符串
225
+		jsonStr := envelope_three.Body.GetJSONReportItemListByCustomerBarocdeResponse.GetJSONReportItemListByCustomerBarocdeResult
226
+		// 解析JSON字符串到结构体
227
+		//fmt.Println(jsonStr)
228
+		var reportData models.ReportResultData
229
+		err = json.Unmarshal([]byte(jsonStr), &reportData)
230
+		if err != nil {
231
+			fmt.Println("JSON Unmarshal error:", err)
232
+		}
233
+		if reportData.Res == 0 {
234
+			//reportData.ListResult = item
235
+			for _, subItem := range reportData.InspectResult {
236
+				subItem.ListResult = item
237
+				var resultTwo models.InspectResultFive
238
+				resultTwo.ListResult = subItem.ListResult
239
+				resultTwo.Result = subItem.Result
240
+				resultTwo.Barcode = subItem.Barcode
241
+				resultTwo.Flag = subItem.Flag
242
+				resultTwo.Unit = subItem.Unit
243
+				resultTwo.ChargeItemName = subItem.ChargeItemName
244
+				resultTwo.InspectionName = subItem.InspectionName
245
+				resultTwo.InspectionCode = subItem.InspectionCode
246
+				resultTwo.Reference = subItem.Reference
247
+				results = append(results, resultTwo)
248
+			}
249
+		}
250
+	} else {
251
+		if len(item.Barcode) > 0 {
252
+
253
+			//fmt.Println("11122222")
172 254
 			// 构建SOAP请求数据
173
-			requestData := &models.ReportResultEnvelope{
255
+			requestData := &models.GPReportResultEnvelope{
174 256
 				Soap: "http://schemas.xmlsoap.org/soap/envelope/",
175 257
 				Xsi:  "http://www.w3.org/2001/XMLSchema-instance",
176 258
 				Xsd:  "http://www.w3.org/2001/XMLSchema",
177
-				Body: models.ReportResultBody{
178
-					GetReportResultReq: models.GetReportResultReq{
179
-						XMLName:         xml.Name{Local: "GetJSONReportItemListByCustomerBarocde", Space: "http://tempuri.org/"},
180
-						Key:             key,
181
-						CustomerBarCode: item.CustomerBarcode,
259
+				Body: models.GPReportResultBody{
260
+					GetReportResultReq: models.GetGPReportResultReq{
261
+						XMLName:   xml.Name{Local: "GetJSONReportItemListByGPBarocde", Space: "http://tempuri.org/"},
262
+						Key:       key,
263
+						GPBarCode: item.Barcode,
182 264
 					},
183 265
 				},
184 266
 			}
@@ -199,7 +281,7 @@ func GetGPResultDataTwo(result []models.GPReportListResultData, key string) (res
199 281
 			// 设置请求头
200 282
 			req.Header.Set("Content-Type", "text/xml; charset=utf-8")
201 283
 			req.Header.Set("Content-Length", "length")
202
-			req.Header.Set("SOAPAction", "http://tempuri.org/GetJSONReportItemListByCustomerBarocde")
284
+			req.Header.Set("SOAPAction", "http://tempuri.org/GetJSONReportItemListByGPBarocde")
203 285
 			// 发送请求
204 286
 			client := &http.Client{}
205 287
 			resp, err := client.Do(req)
@@ -215,115 +297,32 @@ func GetGPResultDataTwo(result []models.GPReportListResultData, key string) (res
215 297
 			}
216 298
 
217 299
 			// 解析XML数据
218
-			var envelope_three models.EnvelopeThree
219
-			err2 := xml.Unmarshal(responseBody, &envelope_three)
300
+			var envelope_five models.EnvelopeFive
301
+			err2 := xml.Unmarshal(responseBody, &envelope_five)
220 302
 			if err2 != nil {
221 303
 				fmt.Println("XML Unmarshal error:", err2)
222 304
 			}
305
+
223 306
 			// 获取GetReportListResult的JSON字符串
224
-			jsonStr := envelope_three.Body.GetJSONReportItemListByCustomerBarocdeResponse.GetJSONReportItemListByCustomerBarocdeResult
307
+			jsonStr := envelope_five.Body.GetJSONReportItemListByGPBarocdeResponse.GetJSONReportItemListByGPBarocdeResult
308
+			utils.InfoLog("jsonStr:%v", jsonStr)
225 309
 			// 解析JSON字符串到结构体
226
-			//fmt.Println(jsonStr)
227
-			var reportData models.ReportResultData
310
+			var reportData models.ReportResultDataFive
228 311
 			err = json.Unmarshal([]byte(jsonStr), &reportData)
229 312
 			if err != nil {
230 313
 				fmt.Println("JSON Unmarshal error:", err)
231 314
 			}
315
+			//fmt.Println(reportData)
316
+
232 317
 			if reportData.Res == 0 {
233 318
 				//reportData.ListResult = item
234 319
 				for _, subItem := range reportData.InspectResult {
235 320
 					subItem.ListResult = item
236
-					var resultTwo models.InspectResultFive
237
-					resultTwo.ListResult = subItem.ListResult
238
-					resultTwo.Result = subItem.Result
239
-					resultTwo.Barcode = subItem.Barcode
240
-					resultTwo.Flag = subItem.Flag
241
-					resultTwo.Unit = subItem.Unit
242
-					resultTwo.ChargeItemName = subItem.ChargeItemName
243
-					resultTwo.InspectionName = subItem.InspectionName
244
-					resultTwo.InspectionCode = subItem.InspectionCode
245
-					resultTwo.Reference = subItem.Reference
246
-					results = append(results, resultTwo)
321
+					results = append(results, subItem)
247 322
 				}
248 323
 			}
249
-		} else {
250
-
251
-			if len(item.Barcode) > 0 {
252
-				//fmt.Println("11122222")
253
-				// 构建SOAP请求数据
254
-				requestData := &models.GPReportResultEnvelope{
255
-					Soap: "http://schemas.xmlsoap.org/soap/envelope/",
256
-					Xsi:  "http://www.w3.org/2001/XMLSchema-instance",
257
-					Xsd:  "http://www.w3.org/2001/XMLSchema",
258
-					Body: models.GPReportResultBody{
259
-						GetReportResultReq: models.GetGPReportResultReq{
260
-							XMLName:   xml.Name{Local: "GetJSONReportItemListByGPBarocde", Space: "http://tempuri.org/"},
261
-							Key:       key,
262
-							GPBarCode: item.Barcode,
263
-						},
264
-					},
265
-				}
266
-
267
-				// 将SOAP请求数据转换为XML格式
268
-				requestBody, err := xml.Marshal(requestData)
269
-				if err != nil {
270
-					fmt.Println("XML Marshal error:", err)
271
-
272
-				}
273
-
274
-				// 创建POST请求
275
-				url := "http://gpis.cnhiqc.com:9799/InstituteLISService.asmx"
276
-				req, err := http.NewRequest("POST", url, bytes.NewBuffer(requestBody))
277
-				if err != nil {
278
-					fmt.Println("Request creation error:", err)
279
-				}
280
-				// 设置请求头
281
-				req.Header.Set("Content-Type", "text/xml; charset=utf-8")
282
-				req.Header.Set("Content-Length", "length")
283
-				req.Header.Set("SOAPAction", "http://tempuri.org/GetJSONReportItemListByGPBarocde")
284
-				// 发送请求
285
-				client := &http.Client{}
286
-				resp, err := client.Do(req)
287
-				if err != nil {
288
-					fmt.Println("Request error:", err)
289
-
290
-				}
291
-				defer resp.Body.Close()
292
-				// 读取响应数据
293
-				responseBody, err := ioutil.ReadAll(resp.Body)
294
-				if err != nil {
295
-					fmt.Println("Response read error:", err)
296
-				}
297 324
 
298
-				// 解析XML数据
299
-				var envelope_five models.EnvelopeFive
300
-				err2 := xml.Unmarshal(responseBody, &envelope_five)
301
-				if err2 != nil {
302
-					fmt.Println("XML Unmarshal error:", err2)
303
-				}
304
-
305
-				// 获取GetReportListResult的JSON字符串
306
-				jsonStr := envelope_five.Body.GetJSONReportItemListByGPBarocdeResponse.GetJSONReportItemListByGPBarocdeResult
307
-				// 解析JSON字符串到结构体
308
-				var reportData models.ReportResultDataFive
309
-				err = json.Unmarshal([]byte(jsonStr), &reportData)
310
-				if err != nil {
311
-					fmt.Println("JSON Unmarshal error:", err)
312
-				}
313
-				//fmt.Println(reportData)
314
-
315
-				if reportData.Res == 0 {
316
-					//reportData.ListResult = item
317
-					for _, subItem := range reportData.InspectResult {
318
-						subItem.ListResult = item
319
-						results = append(results, subItem)
320
-
321
-					}
322
-				}
323
-
324
-			}
325 325
 		}
326
-
327 326
 	}
328 327
 	return results
329 328
 

+ 6 - 1
service/ystx_service.go Прегледај датотеку

@@ -288,7 +288,7 @@ func SyncLisYstx() (err error) {
288 288
 
289 289
 // 根据姓名获取patient_id
290 290
 func GetPatientID(org_id int64, patient_name string) (patient models.Patients, err error) {
291
-	err = readDb.Model(&models.Patients{}).Where("user_org_id = ? and status = 1 and name = ? and lapseto = 1 ", org_id, patient_name).First(&patient).Error
291
+	err = readDb.Model(&models.Patients{}).Where("user_org_id = ?  and name = ?  ", org_id, patient_name).First(&patient).Error
292 292
 	return
293 293
 }
294 294
 
@@ -566,6 +566,11 @@ func CreateDoctorAdviceHandle(advice *models.XtDoctorAdvice) error {
566 566
 	return err
567 567
 }
568 568
 
569
+func SaveDoctorAdviceHandle(advice *models.XtDoctorAdvice) error {
570
+	err := writeDb.Save(&advice).Error
571
+	return err
572
+}
573
+
569 574
 func GetAdviceBySyncAdviceId(orgId int64, sync_advice_id int64) (advice models.XtDoctorAdvice, err error) {
570 575
 	err = readDb.Model(&models.XtDoctorAdvice{}).Where("status = 1 AND user_org_id = ? AND sync_advice_id = ?", orgId, sync_advice_id).First(&advice).Error
571 576
 	return

+ 0 - 37
tf日志/tf_20220808_log.txt Прегледај датотеку

@@ -1,37 +0,0 @@
1
-记录日志
2
-
3
-
4
-2022-08-08 09:50:00 【 tftf入参 】:
5
-{"开嘱时间":"2022-08-08 09:49:00","病人来源":"1","身份证号":""}
6
-2022-08-08 09:50:00 【 tftf出参 】:
7
-{"msg":"成功","result":[],"code":"10000"}
8
-
9
-
10
-2022-08-08 09:51:00 【 tftf入参 】:
11
-{"开嘱时间":"2022-08-08 09:50:00","病人来源":"1","身份证号":""}
12
-2022-08-08 09:51:00 【 tftf出参 】:
13
-{"msg":"成功","result":[],"code":"10000"}
14
-
15
-
16
-2022-08-08 09:52:00 【 tftf入参 】:
17
-{"开嘱时间":"2022-08-08 09:51:00","病人来源":"1","身份证号":""}
18
-2022-08-08 09:52:00 【 tftf出参 】:
19
-{"msg":"成功","result":[],"code":"10000"}
20
-
21
-
22
-2022-08-08 09:53:00 【 tftf入参 】:
23
-{"开嘱时间":"2022-08-08 09:52:00","病人来源":"1","身份证号":""}
24
-2022-08-08 09:53:00 【 tftf出参 】:
25
-{"msg":"成功","result":[],"code":"10000"}
26
-
27
-
28
-2022-08-08 09:54:00 【 tftf入参 】:
29
-{"开嘱时间":"2022-08-08 09:53:00","病人来源":"1","身份证号":""}
30
-2022-08-08 09:54:00 【 tftf出参 】:
31
-{"msg":"成功","result":[],"code":"10000"}
32
-
33
-
34
-2022-08-08 09:55:00 【 tftf入参 】:
35
-{"开嘱时间":"2022-08-08 09:54:00","病人来源":"1","身份证号":""}
36
-2022-08-08 09:55:00 【 tftf出参 】:
37
-{"msg":"成功","result":[],"code":"10000"}

+ 0 - 43
tf日志/tf_20220809_log.txt Прегледај датотеку

@@ -1,43 +0,0 @@
1
-记录日志
2
-
3
-
4
-2022-08-09 15:09:00 【 tftf入参 】:
5
-{"开嘱时间":"2022-08-09 15:09:00","病人来源":"1","身份证号":"999999190001018888"}
6
-2022-08-09 15:09:00 【 tftf出参 】:
7
-{"msg":"成功","result":[],"code":"10000"}
8
-
9
-
10
-2022-08-09 15:09:00 【 tftf入参 】:
11
-{"开嘱时间":"2022-08-09 15:09:00","病人来源":"1","身份证号":"430581200205182779"}
12
-2022-08-09 15:09:00 【 tftf出参 】:
13
-{"msg":"成功","result":[],"code":"10000"}
14
-
15
-
16
-2022-08-09 15:09:00 【 tftf入参 】:
17
-{"开嘱时间":"2022-08-09 15:09:00","病人来源":"1","身份证号":"350425200411242430"}
18
-2022-08-09 15:09:00 【 tftf出参 】:
19
-{"msg":"成功","result":[],"code":"10000"}
20
-
21
-
22
-2022-08-09 15:10:00 【 tftf入参 】:
23
-{"开嘱时间":"2022-08-09 15:10:00","病人来源":"1","身份证号":"999999190001019999"}
24
-2022-08-09 15:10:00 【 tftf出参 】:
25
-{"msg":"成功","result":[],"code":"10000"}
26
-
27
-
28
-2022-08-09 15:10:00 【 tftf入参 】:
29
-{"开嘱时间":"2022-08-09 15:10:00","病人来源":"1","身份证号":"999999190001018888"}
30
-2022-08-09 15:10:00 【 tftf出参 】:
31
-{"msg":"成功","result":[],"code":"10000"}
32
-
33
-
34
-2022-08-09 15:10:00 【 tftf入参 】:
35
-{"开嘱时间":"2022-08-09 15:10:00","病人来源":"1","身份证号":"430581200205182779"}
36
-2022-08-09 15:10:00 【 tftf出参 】:
37
-{"msg":"成功","result":[],"code":"10000"}
38
-
39
-
40
-2022-08-09 15:10:00 【 tftf入参 】:
41
-{"开嘱时间":"2022-08-09 15:10:00","病人来源":"1","身份证号":"350425200411242430"}
42
-2022-08-09 15:10:00 【 tftf出参 】:
43
-{"msg":"成功","result":[],"code":"10000"}

+ 0 - 85
tf日志/tf_20220810_log.txt Прегледај датотеку

@@ -1,85 +0,0 @@
1
-记录日志
2
-
3
-
4
-2022-08-10 20:31:00 【 tftf入参 】:
5
-{"开嘱时间":"2022-08-10 20:31:00","病人来源":"1","身份证号":"350425200411242430"}
6
-2022-08-10 20:31:00 【 tftf出参 】:
7
-{"msg":"成功","result":[],"code":"10000"}
8
-
9
-
10
-2022-08-10 20:31:00 【 tftf入参 】:
11
-{"开嘱时间":"2022-08-10 20:31:00","病人来源":"1","身份证号":"35062319500804667X"}
12
-2022-08-10 20:31:00 【 tftf出参 】:
13
-{"msg":"成功","result":[],"code":"10000"}
14
-
15
-
16
-2022-08-10 20:32:00 【 tftf入参 】:
17
-{"开嘱时间":"2022-08-10 20:32:00","病人来源":"1","身份证号":"350623198802116616"}
18
-2022-08-10 20:32:00 【 tftf出参 】:
19
-{"msg":"成功","result":[],"code":"10000"}
20
-
21
-
22
-2022-08-10 20:32:00 【 tftf入参 】:
23
-{"开嘱时间":"2022-08-10 20:32:00","病人来源":"1","身份证号":"350425200411242430"}
24
-2022-08-10 20:32:00 【 tftf出参 】:
25
-{"msg":"成功","result":[],"code":"10000"}
26
-
27
-
28
-2022-08-10 20:32:00 【 tftf入参 】:
29
-{"开嘱时间":"2022-08-10 20:32:00","病人来源":"1","身份证号":"35062319500804667X"}
30
-2022-08-10 20:32:00 【 tftf出参 】:
31
-{"msg":"成功","result":[],"code":"10000"}
32
-
33
-
34
-2022-08-10 20:33:00 【 tftf入参 】:
35
-{"开嘱时间":"2022-08-10 20:33:00","病人来源":"1","身份证号":"350623198802116616"}
36
-2022-08-10 20:33:00 【 tftf出参 】:
37
-{"msg":"成功","result":[],"code":"10000"}
38
-
39
-
40
-2022-08-10 20:33:00 【 tftf入参 】:
41
-{"开嘱时间":"2022-08-10 20:33:00","病人来源":"1","身份证号":"350425200411242430"}
42
-2022-08-10 20:33:00 【 tftf出参 】:
43
-{"msg":"成功","result":[],"code":"10000"}
44
-
45
-
46
-2022-08-10 20:33:01 【 tftf入参 】:
47
-{"开嘱时间":"2022-08-10 20:33:00","病人来源":"1","身份证号":"35062319500804667X"}
48
-2022-08-10 20:33:01 【 tftf出参 】:
49
-{"msg":"成功","result":[],"code":"10000"}
50
-
51
-
52
-2022-08-10 20:37:00 【 tftf入参 】:
53
-{"开嘱时间":"2022-08-10 20:37:00","病人来源":"1","身份证号":"350623198802116616"}
54
-2022-08-10 20:37:00 【 tftf出参 】:
55
-{"msg":"成功","result":[],"code":"10000"}
56
-
57
-
58
-2022-08-10 20:37:00 【 tftf入参 】:
59
-{"开嘱时间":"2022-08-10 20:37:00","病人来源":"1","身份证号":"350425200411242430"}
60
-2022-08-10 20:37:00 【 tftf出参 】:
61
-{"msg":"成功","result":[],"code":"10000"}
62
-
63
-
64
-2022-08-10 20:37:00 【 tftf入参 】:
65
-{"开嘱时间":"2022-08-10 20:37:00","病人来源":"1","身份证号":"35062319500804667X"}
66
-2022-08-10 20:37:00 【 tftf出参 】:
67
-{"msg":"成功","result":[],"code":"10000"}
68
-
69
-
70
-2022-08-10 20:39:00 【 tftf入参 】:
71
-{"开嘱时间":"2022-08-10 20:39:00","病人来源":"1","身份证号":"350623198802116616"}
72
-2022-08-10 20:39:00 【 tftf出参 】:
73
-{"msg":"成功","result":[],"code":"10000"}
74
-
75
-
76
-2022-08-10 20:39:00 【 tftf入参 】:
77
-{"开嘱时间":"2022-08-10 20:39:00","病人来源":"1","身份证号":"350425200411242430"}
78
-2022-08-10 20:39:00 【 tftf出参 】:
79
-{"msg":"成功","result":[],"code":"10000"}
80
-
81
-
82
-2022-08-10 20:39:00 【 tftf入参 】:
83
-{"开嘱时间":"2022-08-10 20:39:00","病人来源":"1","身份证号":"35062319500804667X"}
84
-2022-08-10 20:39:00 【 tftf出参 】:
85
-{"msg":"成功","result":[],"code":"10000"}