Browse Source

Merge branch '20230223_xt_api_new_branch' of http://git.shengws.com/csx/XT_New into 20230223_xt_api_new_branch

28169 1 week ago
parent
commit
4b565c2998

+ 6 - 8
controllers/his_charge_api_controller.go View File

@@ -20,19 +20,13 @@ type HisChargeApiController struct {
20 20
 func HisChargeApiRegistRouters() {
21 21
 	beego.Router("/api/his/chargestatistics/detail", &HisChargeApiController{}, "get:GetChargeStatisticsDetail")
22 22
 	beego.Router("/api/his/chargestatistics/settle", &HisChargeApiController{}, "get:GetChargeStatisticsSettle")
23
-
24 23
 	beego.Router("/api/his/prescription/detail", &HisChargeApiController{}, "get:GetPrescriptionStatisticsDetail")
25 24
 	beego.Router("/api/his/prescription/initdata", &HisChargeApiController{}, "get:GetPrescriptionInitData")
26
-
27 25
 	//beego.InsertFilter("/api/his/chargestatistics/detail", beego.BeforeRouter, GzipFilter)
28
-
29 26
 	beego.Router("/api/his/patient", &HisChargeApiController{}, "get:GetAllPatient")
30 27
 	//beego.Router("/api/his/chargestatistics/settle", &HisChargeApiController{}, "get:GetChargeStatisticsSettle")
31
-
32 28
 	beego.Router("/api/his/inspectionlist/get", &HisChargeApiController{}, "get:GetHisInspectionList")
33
-
34 29
 	beego.Router("/api/his/inspectionlisttwo/get", &HisChargeApiController{}, "get:GetHisInspectionListTwo")
35
-
36 30
 	beego.Router("/api/his/inspectioninfo/get", &HisChargeApiController{}, "get:GetHisInspectionInfo")
37 31
 
38 32
 	//发票
@@ -42,9 +36,7 @@ func HisChargeApiRegistRouters() {
42 36
 	beego.Router("/api/fapiao/delete", &HisChargeApiController{}, "post:DeleteFaPiaoRecord")
43 37
 	beego.Router("/api/fapiao", &HisChargeApiController{}, "get:GetFaPiaoRecord")
44 38
 	beego.Router("/api/fapiao/is_use", &HisChargeApiController{}, "post:UpdateFaPiaoRecordIsUse")
45
-
46 39
 	beego.Router("/api/his/getyidiclear", &HisChargeApiController{}, "get:GetHisYidiClearRecord")
47
-
48 40
 	beego.Router("/api/his/getexportdata", &HisChargeApiController{}, "get:GetExportData")
49 41
 
50 42
 }
@@ -566,10 +558,16 @@ func (c *HisChargeApiController) GetChargeStatisticsSettle() {
566 558
 
567 559
 	}
568 560
 	endRecordDateTime := endTime.Unix()
561
+
569 562
 	chargePatient, err := service.GetAllPatientChargeSettle(adminUser.CurrentOrgId, startRecordDateTime, endRecordDateTime, keyword, item_type)
563
+	sick, _, _ := service.FindAllMZSickList(adminUser.CurrentOrgId, 1, 10000)
564
+	config, _ := service.FindMedicalInsuranceInfo(c.GetAdminUserInfo().CurrentOrgId)
565
+
570 566
 	if err == nil {
571 567
 		c.ServeSuccessJSON(map[string]interface{}{
572 568
 			"patients": chargePatient,
569
+			"config":   config,
570
+			"sick":     sick,
573 571
 		})
574 572
 		return
575 573
 	} else {

+ 8 - 6
models/his_charge_models.go View File

@@ -95,10 +95,11 @@ func (SettlePatient) TableName() string {
95 95
 }
96 96
 
97 97
 type OrderHisPatient struct {
98
-	ID        int64  `gorm:"column:id" json:"id" form:"id"`
99
-	PatientId int64  `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
100
-	Number    string `gorm:"column:number" json:"number" form:"number"`
101
-	SickType  int64  `gorm:"column:sick_type" json:"sick_type" form:"sick_type"`
98
+	ID            int64  `gorm:"column:id" json:"id" form:"id"`
99
+	PatientId     int64  `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
100
+	Number        string `gorm:"column:number" json:"number" form:"number"`
101
+	SickType      int64  `gorm:"column:sick_type" json:"sick_type" form:"sick_type"`
102
+	InsuplcAdmdvs string `gorm:"column:insuplc_admdvs" json:"insuplc_admdvs" form:"insuplc_admdvs"`
102 103
 }
103 104
 
104 105
 func (OrderHisPatient) TableName() string {
@@ -212,7 +213,7 @@ type HisChargeSettleOrder struct {
212 213
 	SickName string `gorm:"sick_name" json:"sick_name" form:"sick_name"`
213 214
 	CardDesc string `gorm:"card_desc" json:"card_desc" form:"card_desc"`
214 215
 
215
-	//OrderHisPatient OrderHisPatient `gorm:"ForeignKey:Number;AssociationForeignKey:MdtrtId" json:"his"`
216
+	OrderHisPatient OrderHisPatient `gorm:"ForeignKey:Number;AssociationForeignKey:MdtrtId" json:"his"`
216 217
 }
217 218
 
218 219
 func (HisChargeSettleOrder) TableName() string {
@@ -505,5 +506,6 @@ type NewPDetail struct {
505 506
 	AdviceId     string  `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
506 507
 	ProjectId    string  `gorm:"column:project_id" json:"project_id" form:"project_id"`
507 508
 	ItemId       string  `gorm:"column:item_id" json:"item_id" form:"item_id"`
508
-	//SetlTime     string  `gorm:"column:setl_time" json:"setl_time" form:"setl_time"`
509
+	MdtrtId      string  `gorm:"column:mdtrt_id" json:"mdtrt_id" form:"mdtrt_id"`
510
+	AdviceDoctor int64   `gorm:"column:advice_doctor" json:"advice_doctor" form:"advice_doctor"`
509 511
 }

+ 14 - 14
service/his_charge_service.go View File

@@ -594,43 +594,43 @@ func GetAllPatientChargeSettle(org_id int64, start_time int64, end_time int64, k
594 594
 		switch item_type {
595 595
 		case 0:
596 596
 			err = readDb2.Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status,p.id_card_no").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1  AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2", start_time, end_time, org_id).Preload("HisChargeSettleOrder", func(db *gorm.DB) *gorm.DB {
597
-				return db.Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2", start_time, end_time, org_id).Order("ctime")
597
+				return db.Preload("OrderHisPatient", "status = 1").Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2", start_time, end_time, org_id).Order("ctime")
598 598
 			}).Where("p.status = 1  AND p.user_org_id = ?", org_id).Group("id").Find(&patients).Error
599 599
 
600 600
 			break
601 601
 		case 1:
602 602
 			err = readDb2.Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status,p.id_card_no").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1  AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2", start_time, end_time, org_id).Preload("HisChargeSettleOrder", func(db *gorm.DB) *gorm.DB {
603
-				return db.Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND is_medicine_insurance = 1 ", start_time, end_time, org_id).Order("ctime")
603
+				return db.Preload("OrderHisPatient", "status = 1").Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND is_medicine_insurance = 1 ", start_time, end_time, org_id).Order("ctime")
604 604
 			}).Where("p.status = 1  AND p.user_org_id = ?", org_id).Group("id").Find(&patients).Error
605 605
 
606 606
 			break
607 607
 		case 2:
608 608
 			err = readDb2.Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status,p.id_card_no").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1  AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2", start_time, end_time, org_id).Preload("HisChargeSettleOrder", func(db *gorm.DB) *gorm.DB {
609
-				return db.Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND is_medicine_insurance = 0", start_time, end_time, org_id).Order("ctime")
609
+				return db.Preload("OrderHisPatient", "status = 1").Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND is_medicine_insurance = 0", start_time, end_time, org_id).Order("ctime")
610 610
 			}).Where("p.status = 1  AND p.user_org_id = ?", org_id).Group("id").Find(&patients).Error
611 611
 
612 612
 			break
613 613
 		case 3:
614 614
 			err = readDb2.Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status,p.id_card_no").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1  AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2", start_time, end_time, org_id).Preload("HisChargeSettleOrder", func(db *gorm.DB) *gorm.DB {
615
-				return db.Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND med_type = 14", start_time, end_time, org_id).Order("ctime")
615
+				return db.Preload("OrderHisPatient", "status = 1").Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND med_type = 14", start_time, end_time, org_id).Order("ctime")
616 616
 			}).Where("p.status = 1  AND p.user_org_id = ?", org_id).Group("id").Find(&patients).Error
617 617
 
618 618
 			break
619 619
 		case 4:
620 620
 			err = readDb2.Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status,p.id_card_no").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1  AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2", start_time, end_time, org_id).Preload("HisChargeSettleOrder", func(db *gorm.DB) *gorm.DB {
621
-				return db.Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND med_type = 11", start_time, end_time, org_id).Order("ctime")
621
+				return db.Preload("OrderHisPatient", "status = 1").Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND med_type = 11", start_time, end_time, org_id).Order("ctime")
622 622
 			}).Where("p.status = 1  AND p.user_org_id = ?", org_id).Group("id").Find(&patients).Error
623 623
 
624 624
 			break
625 625
 		case 5:
626 626
 			err = readDb2.Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status,p.id_card_no").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1  AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2 AND orders.insutype = 390", start_time, end_time, org_id).Preload("HisChargeSettleOrder", func(db *gorm.DB) *gorm.DB {
627
-				return db.Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 ", start_time, end_time, org_id).Order("ctime")
627
+				return db.Preload("OrderHisPatient", "status = 1").Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 ", start_time, end_time, org_id).Order("ctime")
628 628
 			}).Where("p.status = 1  AND p.user_org_id = ?", org_id).Group("id").Find(&patients).Error
629 629
 
630 630
 			break
631 631
 		case 6:
632 632
 			err = readDb2.Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status,p.id_card_no").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1  AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2 AND orders.insutype = 310 ", start_time, end_time, org_id).Preload("HisChargeSettleOrder", func(db *gorm.DB) *gorm.DB {
633
-				return db.Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2", start_time, end_time, org_id).Order("ctime")
633
+				return db.Preload("OrderHisPatient", "status = 1").Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2", start_time, end_time, org_id).Order("ctime")
634 634
 			}).Where("p.status = 1  AND p.user_org_id = ?", org_id).Group("id").Find(&patients).Error
635 635
 
636 636
 			break
@@ -642,31 +642,31 @@ func GetAllPatientChargeSettle(org_id int64, start_time int64, end_time int64, k
642 642
 		switch item_type {
643 643
 		case 0:
644 644
 			err = readDb2.Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status,p.id_card_no").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1  AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2", start_time, end_time, org_id).Preload("HisChargeSettleOrder", func(db *gorm.DB) *gorm.DB {
645
-				return db.Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2", start_time, end_time, org_id).Order("ctime")
645
+				return db.Preload("OrderHisPatient", "status = 1").Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2", start_time, end_time, org_id).Order("ctime")
646 646
 			}).Where("p.status = 1  AND p.user_org_id = ? AND p.name LIKE ?", org_id, keyword).Group("id").Find(&patients).Error
647 647
 
648 648
 			break
649 649
 		case 1:
650 650
 			err = readDb2.Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status,p.id_card_no").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1  AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2", start_time, end_time, org_id).Preload("HisChargeSettleOrder", func(db *gorm.DB) *gorm.DB {
651
-				return db.Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND is_medicine_insurance = 1 ", start_time, end_time, org_id).Order("ctime")
651
+				return db.Preload("OrderHisPatient", "status = 1").Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND is_medicine_insurance = 1 ", start_time, end_time, org_id).Order("ctime")
652 652
 			}).Where("p.status = 1  AND p.user_org_id = ? AND p.name LIKE ?", org_id, keyword).Group("id").Find(&patients).Error
653 653
 
654 654
 			break
655 655
 		case 2:
656 656
 			err = readDb2.Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status,p.id_card_no").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1  AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2", start_time, end_time, org_id).Preload("HisChargeSettleOrder", func(db *gorm.DB) *gorm.DB {
657
-				return db.Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND is_medicine_insurance = 0", start_time, end_time, org_id).Order("ctime")
657
+				return db.Preload("OrderHisPatient", "status = 1").Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND is_medicine_insurance = 0", start_time, end_time, org_id).Order("ctime")
658 658
 			}).Where("p.status = 1  AND p.user_org_id = ? AND p.name LIKE ?", org_id, keyword).Group("id").Find(&patients).Error
659 659
 
660 660
 			break
661 661
 		case 3:
662 662
 			err = readDb2.Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status,p.id_card_no").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1  AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2", start_time, end_time, org_id).Preload("HisChargeSettleOrder", func(db *gorm.DB) *gorm.DB {
663
-				return db.Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND med_type = 14", start_time, end_time, org_id).Order("ctime")
663
+				return db.Preload("OrderHisPatient", "status = 1").Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND med_type = 14", start_time, end_time, org_id).Order("ctime")
664 664
 			}).Where("p.status = 1  AND p.user_org_id = ? AND p.name LIKE ?", org_id, keyword).Group("id").Find(&patients).Error
665 665
 
666 666
 			break
667 667
 		case 4:
668 668
 			err = readDb2.Table("xt_patients as p").Select("p.id,p.user_org_id,p.name,p.lapseto,p.status,p.id_card_no").Joins("JOIN his_order AS orders ON orders.patient_id = p.id AND orders.status = 1  AND orders.ctime >= ? AND orders.ctime <= ? AND orders.user_org_id = ? AND orders.order_status = 2", start_time, end_time, org_id).Preload("HisChargeSettleOrder", func(db *gorm.DB) *gorm.DB {
669
-				return db.Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND med_type = 11", start_time, end_time, org_id).Order("ctime")
669
+				return db.Preload("OrderHisPatient", "status = 1").Where("status = 1  AND ctime >= ? AND ctime <= ? AND user_org_id = ? AND order_status = 2 AND med_type = 11", start_time, end_time, org_id).Order("ctime")
670 670
 			}).Where("p.status = 1  AND p.user_org_id = ? AND p.name LIKE ?", org_id, keyword).Group("id").Find(&patients).Error
671 671
 
672 672
 			break
@@ -1068,7 +1068,7 @@ func GetAllLisDataFor10191(org_id int64) (list []models.HisLabelPrintStatusInfo,
1068 1068
 }
1069 1069
 
1070 1070
 func GetHisPrescriptionDrugDetails(org_id int64, start_time_str string, end_time_str string, start_time int64, end_time int64, patient_id int64, item_type int64) (patients []*models.NewPDetail, err error) {
1071
-	db := readDb.Table("his_doctor_advice_info as oi").Select("oo.setl_time as setl_time, drug.id as item_id,1 as p_type,oi.id as advice_id,0 as project_id,pp.id as p_id,pp.name as p_name,FROM_UNIXTIME(o.`record_date`, '%Y-%m-%d') as record_date, drug.drug_type as item_cost_type,o.med_type as med_type,oi.`prescribing_number` as cnt,oi.`price` as pric,drug.drug_name as item_name,CONCAT(drug.dose, \"\", drug.dose_unit, \"*\", drug.min_number, \"\", drug.min_unit, \"/\", drug.max_unit) as spec,o.order_status as order_status,oi.`prescribing_number_unit` as unit").
1071
+	db := readDb.Table("his_doctor_advice_info as oi").Select("oo.mdtrt_id as mdtrt_id,oi.advice_doctor as advice_doctor,oo.setl_time as setl_time, drug.id as item_id,1 as p_type,oi.id as advice_id,0 as project_id,pp.id as p_id,pp.name as p_name,FROM_UNIXTIME(o.`record_date`, '%Y-%m-%d') as record_date, drug.drug_type as item_cost_type,o.med_type as med_type,oi.`prescribing_number` as cnt,oi.`price` as pric,drug.drug_name as item_name,CONCAT(drug.dose, \"\", drug.dose_unit, \"*\", drug.min_number, \"\", drug.min_unit, \"/\", drug.max_unit) as spec,o.order_status as order_status,oi.`prescribing_number_unit` as unit").
1072 1072
 		Joins("JOIN xt_base_drug drug ON oi.drug_id = drug.id ")
1073 1073
 	if patient_id == 0 {
1074 1074
 		db = db.Joins("JOIN xt_patients pp on oi.patient_id = pp.id")
@@ -1094,7 +1094,7 @@ func GetHisPrescriptionDrugDetails(org_id int64, start_time_str string, end_time
1094 1094
 }
1095 1095
 
1096 1096
 func GetHisPrescriptionProjectDetails(org_id int64, start_time_str string, end_time_str string, start_time int64, end_time int64, patient_id int64, item_type int64) (patients []*models.NewPDetail, err error) {
1097
-	db := readDb.Table("`his_prescription_project` AS oi").Select("oo.setl_time as setl_time,(case oi.type\n\t\t\tWHEN 2 THEN\n\t\t\tproject.id\n\t\t\tWHEN 3 THEN\n\t\t\tgood.id END) AS item_id,oi.type as p_type,oi.id as project_id,0 as advice_id,pp.id as p_id,(case oi.type\n\t\t\tWHEN 2 THEN\n\t\t\tproject.`cost_classify`\n\t\t\tWHEN 3 THEN\n\t\t\t-100 END) AS item_cost_type,\n\t o.med_type as med_type,\n\t oi.count AS cnt,\n \t oi.price AS pric,\n \t pp.name AS p_name, \n \tFROM_UNIXTIME(o.`record_date`,'%Y-%m-%d') as record_date,\n\t\t (case oi.type\n\tWHEN 2 THEN\n\tproject.project_name\n\tWHEN 3 THEN\n\tgood.good_name END) AS item_name,\n\t\t (case oi.type\n\tWHEN 2 THEN\n\t\"\"\n\tWHEN 3 THEN\n\tgood.`specification_name` END) AS spec,\n\toi.`unit`  as unit,o.order_status as order_status")
1097
+	db := readDb.Table("`his_prescription_project` AS oi").Select("oo.mdtrt_id as mdtrt_id,oi.doctor as advice_doctor,oo.setl_time as setl_time,(case oi.type\n\t\t\tWHEN 2 THEN\n\t\t\tproject.id\n\t\t\tWHEN 3 THEN\n\t\t\tgood.id END) AS item_id,oi.type as p_type,oi.id as project_id,0 as advice_id,pp.id as p_id,(case oi.type\n\t\t\tWHEN 2 THEN\n\t\t\tproject.`cost_classify`\n\t\t\tWHEN 3 THEN\n\t\t\t-100 END) AS item_cost_type,\n\t o.med_type as med_type,\n\t oi.count AS cnt,\n \t oi.price AS pric,\n \t pp.name AS p_name, \n \tFROM_UNIXTIME(o.`record_date`,'%Y-%m-%d') as record_date,\n\t\t (case oi.type\n\tWHEN 2 THEN\n\tproject.project_name\n\tWHEN 3 THEN\n\tgood.good_name END) AS item_name,\n\t\t (case oi.type\n\tWHEN 2 THEN\n\t\"\"\n\tWHEN 3 THEN\n\tgood.`specification_name` END) AS spec,\n\toi.`unit`  as unit,o.order_status as order_status")
1098 1098
 	db = db.Joins("LEFT JOIN xt_his_project project\n\tON oi.project_id = project.id").
1099 1099
 		Joins("LEFT JOIN xt_good_information good\n\tON oi.project_id = good.id\n")
1100 1100
 	//Joins("JOIN his_order ord ON o.batch_number = ord.number ")

+ 1 - 1
service/user_service.go View File

@@ -143,7 +143,7 @@ func GetDryWeightByPatientId(patientid int64, orgid int64) (pre []*models.SgjPat
143 143
 
144 144
 func GetAllDoctor(orgid int64, appid int64) (appRole []*models.App_Role, err error) {
145 145
 
146
-	err = UserReadDB().Where("org_id = ? AND app_id = ? AND status = ? AND  (user_type = ? OR user_type = ?) ", orgid, appid, 1, 2, 1).Find(&appRole).Error
146
+	err = UserReadDB().Where("org_id = ? AND status = ? AND  (user_type = ? OR user_type = ?) ", orgid, 1, 2, 1).Find(&appRole).Error
147 147
 	return appRole, err
148 148
 }
149 149