Browse Source

耗材参数

XMLWAN 4 years ago
parent
commit
32529985c3

+ 1 - 1
controllers/new_mobile_api_controllers/new_dialysis_api_controller.go View File

@@ -627,7 +627,7 @@ func (this *NewDialysisApiController) GetDoctorAdvices() {
627 627
 	fmt.Println("病人ID", newPatientInfo.BloodId)
628 628
 	advice, _, err := service.GetNewDoctorAdvice(newPatientInfo.BloodId, doctor_type, startime, endtime, limit, page, orgid)
629 629
 	one, total, err := service.GetNewDoctorAdviceOne(newPatientInfo.BloodId, doctor_type, startime, endtime, limit, page, orgid)
630
-	fmt.Println("err------------------------", err)
630
+	fmt.Println("err", err)
631 631
 	if err != nil {
632 632
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
633 633
 		return

+ 2 - 0
controllers/stock_in_api_controller.go View File

@@ -1851,11 +1851,13 @@ func (this *StockManagerApiController) GetAllSalesReturnConfig() {
1851 1851
 }
1852 1852
 
1853 1853
 func (this *StockManagerApiController) GetDetailInfo() {
1854
+
1854 1855
 	page, _ := this.GetInt64("page", 0)
1855 1856
 	limit, _ := this.GetInt64("limit", 0)
1856 1857
 	start_time := this.GetString("start_time")
1857 1858
 	end_time := this.GetString("end_time")
1858 1859
 	types, _ := this.GetInt64("type", 0)
1860
+
1859 1861
 	keywords := this.GetString("keywords")
1860 1862
 	manufacturer, _ := this.GetInt64("manufacturer", 0)
1861 1863
 	order_type, _ := this.GetInt64("order_type", 0)

+ 51 - 46
models/dialysis.go View File

@@ -304,52 +304,57 @@ func (PredialysisEvaluationList) TableName() string {
304 304
 
305 305
 //更改的地方
306 306
 type DoctorAdvices struct {
307
-	ID                    int64           `gorm:"column:id" json:"id" form:"id"`
308
-	GroupNo               int64           `gorm:"column:groupno" json:"groupno" form:"groupno"`
309
-	UserOrgId             int64           `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
310
-	PatientId             int64           `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
311
-	AdviceType            int64           `gorm:"column:advice_type" json:"advice_type" form:"advice_type"`
312
-	AdviceDate            int64           `gorm:"column:advice_date" json:"advice_date" form:"advice_date"`
313
-	StartTime             int64           `gorm:"column:start_time" json:"start_time" form:"start_time"`
314
-	AdviceName            string          `gorm:"column:advice_name" json:"advice_name" form:"advice_name"`
315
-	AdviceDesc            string          `gorm:"column:advice_desc" json:"advice_desc" form:"advice_desc"`
316
-	ReminderDate          int64           `gorm:"column:reminder_date" json:"reminder_date" form:"reminder_date"`
317
-	SingleDose            float64         `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
318
-	SingleDoseUnit        string          `gorm:"column:single_dose_unit" json:"single_dose_unit" form:"single_dose_unit"`
319
-	DrugSpec              float64         `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
320
-	DrugSpecUnit          string          `gorm:"column:drug_spec_unit" json:"drug_spec_unit" form:"drug_spec_unit"`
321
-	PrescribingNumber     float64         `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
322
-	PrescribingNumberUnit string          `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
323
-	DeliveryWay           string          `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
324
-	ExecutionFrequency    string          `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
325
-	AdviceDoctor          int64           `gorm:"column:advice_doctor" json:"advice_doctor" form:"advice_doctor"`
326
-	Status                int64           `gorm:"column:status" json:"status" form:"status"`
327
-	CreatedTime           int64           `gorm:"column:created_time" json:"created_time" form:"created_time"`
328
-	UpdatedTime           int64           `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
329
-	AdviceAffirm          string          `gorm:"column:advice_affirm" json:"advice_affirm" form:"advice_affirm"`
330
-	Remark                string          `gorm:"column:remark" json:"remark" form:"remark"`
331
-	StopTime              int64           `gorm:"column:stop_time" json:"stop_time" form:"stop_time"`
332
-	StopReason            string          `gorm:"column:stop_reason" json:"stop_reason" form:"stop_reason"`
333
-	StopDoctor            int64           `gorm:"column:stop_doctor" json:"stop_doctor" form:"stop_doctor"`
334
-	StopState             int64           `gorm:"column:stop_state" json:"stop_state" form:"stop_state"`
335
-	ParentId              int64           `gorm:"column:parent_id" json:"parent_id" form:"parent_id"`
336
-	ExecutionTime         int64           `gorm:"column:execution_time" json:"execution_time" form:"execution_time"`
337
-	ExecutionStaff        int64           `gorm:"column:execution_staff" json:"execution_staff" form:"execution_staff"`
338
-	ExecutionState        int64           `gorm:"column:execution_state" json:"execution_state" form:"execution_state"`
339
-	Checker               int64           `gorm:"column:checker" json:"checker" form:"checker"`
340
-	RecordDate            int64           `gorm:"column:record_date" json:"record_date"`
341
-	DialysisOrderId       int64           `gorm:"column:dialysis_order_id" json:"dialysis_order_id"`
342
-	CheckTime             int64           `gorm:"column:check_time" json:"check_time" form:"check_time"`
343
-	CheckState            int64           `gorm:"column:check_state" json:"check_state" form:"check_state"`
344
-	AdviceId              int64           `gorm:"-"`
345
-	RemindType            int64           `gorm:"column:remind_type" json:"remind_type"`
346
-	FrequencyType         int64           `gorm:"column:frequency_type" json:"frequency_type"`
347
-	DayCount              int64           `gorm:"column:day_count" json:"day_count"`
348
-	WeekDay               string          `gorm:"column:week_day" json:"week_day"`
349
-	ChildDoctorAdvice     []*DoctorAdvice `gorm:"ForeignKey:ParentId;AssociationForeignKey:ID" json:"child"`
350
-	TemplateId            string          `gorm:"column:template_id" json:"template_id"`
351
-	UserName              string          `gorm:"column:user_name" json:"user_name" form:"user_name"`
352
-	Name                  string          `gorm:"column:name" json:"name" form:"name"`
307
+	ID                         int64           `gorm:"column:id" json:"id" form:"id"`
308
+	GroupNo                    int64           `gorm:"column:groupno" json:"groupno" form:"groupno"`
309
+	UserOrgId                  int64           `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
310
+	PatientId                  int64           `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
311
+	AdviceType                 int64           `gorm:"column:advice_type" json:"advice_type" form:"advice_type"`
312
+	AdviceDate                 int64           `gorm:"column:advice_date" json:"advice_date" form:"advice_date"`
313
+	StartTime                  int64           `gorm:"column:start_time" json:"start_time" form:"start_time"`
314
+	AdviceName                 string          `gorm:"column:advice_name" json:"advice_name" form:"advice_name"`
315
+	AdviceDesc                 string          `gorm:"column:advice_desc" json:"advice_desc" form:"advice_desc"`
316
+	ReminderDate               int64           `gorm:"column:reminder_date" json:"reminder_date" form:"reminder_date"`
317
+	SingleDose                 float64         `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
318
+	SingleDoseUnit             string          `gorm:"column:single_dose_unit" json:"single_dose_unit" form:"single_dose_unit"`
319
+	DrugSpec                   float64         `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
320
+	DrugSpecUnit               string          `gorm:"column:drug_spec_unit" json:"drug_spec_unit" form:"drug_spec_unit"`
321
+	PrescribingNumber          float64         `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
322
+	PrescribingNumberUnit      string          `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
323
+	DeliveryWay                string          `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
324
+	ExecutionFrequency         string          `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
325
+	AdviceDoctor               int64           `gorm:"column:advice_doctor" json:"advice_doctor" form:"advice_doctor"`
326
+	Status                     int64           `gorm:"column:status" json:"status" form:"status"`
327
+	CreatedTime                int64           `gorm:"column:created_time" json:"created_time" form:"created_time"`
328
+	UpdatedTime                int64           `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
329
+	AdviceAffirm               string          `gorm:"column:advice_affirm" json:"advice_affirm" form:"advice_affirm"`
330
+	Remark                     string          `gorm:"column:remark" json:"remark" form:"remark"`
331
+	StopTime                   int64           `gorm:"column:stop_time" json:"stop_time" form:"stop_time"`
332
+	StopReason                 string          `gorm:"column:stop_reason" json:"stop_reason" form:"stop_reason"`
333
+	StopDoctor                 int64           `gorm:"column:stop_doctor" json:"stop_doctor" form:"stop_doctor"`
334
+	StopState                  int64           `gorm:"column:stop_state" json:"stop_state" form:"stop_state"`
335
+	ParentId                   int64           `gorm:"column:parent_id" json:"parent_id" form:"parent_id"`
336
+	ExecutionTime              int64           `gorm:"column:execution_time" json:"execution_time" form:"execution_time"`
337
+	ExecutionStaff             int64           `gorm:"column:execution_staff" json:"execution_staff" form:"execution_staff"`
338
+	ExecutionState             int64           `gorm:"column:execution_state" json:"execution_state" form:"execution_state"`
339
+	Checker                    int64           `gorm:"column:checker" json:"checker" form:"checker"`
340
+	RecordDate                 int64           `gorm:"column:record_date" json:"record_date"`
341
+	DialysisOrderId            int64           `gorm:"column:dialysis_order_id" json:"dialysis_order_id"`
342
+	CheckTime                  int64           `gorm:"column:check_time" json:"check_time" form:"check_time"`
343
+	CheckState                 int64           `gorm:"column:check_state" json:"check_state" form:"check_state"`
344
+	AdviceId                   int64           `gorm:"-"`
345
+	RemindType                 int64           `gorm:"column:remind_type" json:"remind_type"`
346
+	FrequencyType              int64           `gorm:"column:frequency_type" json:"frequency_type"`
347
+	DayCount                   int64           `gorm:"column:day_count" json:"day_count"`
348
+	WeekDay                    string          `gorm:"column:week_day" json:"week_day"`
349
+	ChildDoctorAdvice          []*DoctorAdvice `gorm:"ForeignKey:ParentId;AssociationForeignKey:ID" json:"child"`
350
+	TemplateId                 string          `gorm:"column:template_id" json:"template_id"`
351
+	UserName                   string          `gorm:"column:user_name" json:"user_name" form:"user_name"`
352
+	Name                       string          `gorm:"column:name" json:"name" form:"name"`
353
+	DialyzerPerfusionApparatus string          `gorm:"column:dialyzer_perfusion_apparatus" json:"dialyzer_perfusion_apparatus" form:"dialyzer_perfusion_apparatus"`
354
+	Anticoagulant              int64           `gorm:"column:anticoagulant" json:"anticoagulant" form:"anticoagulant"`
355
+	AnticoagulantShouji        float64         `gorm:"column:anticoagulant_shouji" json:"anticoagulant_shouji" form:"anticoagulant_shouji"`
356
+	AnticoagulantWeichi        float64         `gorm:"column:anticoagulant_weichi" json:"anticoagulant_weichi" form:"anticoagulant_weichi"`
357
+	AnticoagulantZongliang     float64         `gorm:"column:anticoagulant_zongliang" json:"anticoagulant_zongliang" form:"anticoagulant_zongliang"`
353 358
 }
354 359
 
355 360
 type DoctorAdvice struct {

+ 2 - 0
models/stock_models.go View File

@@ -193,6 +193,7 @@ type SalesReturnInfo struct {
193 193
 	SalesReturn   SalesReturn `ForeignKey:SalesReturnId json:"SalesReturn"`
194 194
 	Dealer        int64       `gorm:"column:dealer" json:"dealer"`
195 195
 	Manufacturer  int64       `gorm:"column:manufacturer" json:"manufacturer"`
196
+	GoodInfo      GoodInfo    `gorm:"ForeignKey:ID;AssociationForeignKey:GoodId" `
196 197
 }
197 198
 
198 199
 func (SalesReturnInfo) TableName() string {
@@ -218,6 +219,7 @@ type CancelStockInfo struct {
218 219
 	CancelStock   CancelStock `ForeignKey:CancelStockId json:"CancelStock"`
219 220
 	Dealer        int64       `gorm:"column:dealer" json:"dealer"`
220 221
 	Manufacturer  int64       `gorm:"column:manufacturer" json:"manufacturer"`
222
+	GoodInfo      GoodInfo    `gorm:"ForeignKey:ID;AssociationForeignKey:GoodId" `
221 223
 }
222 224
 
223 225
 func (CancelStockInfo) TableName() string {

+ 8 - 2
service/patient_service.go View File

@@ -775,6 +775,9 @@ func GetDoctorAdviceListOne(orgID, patientID, advice_type, stop, start, end int6
775 775
 	if advice_type == 3 && advice_type > 0 {
776 776
 		db = db.Where("x.advice_type = 2 or x.advice_type = 3")
777 777
 	}
778
+	if advice_type == 4 && advice_type > 0 {
779
+		db = db.Where("x.advice_type = 4")
780
+	}
778 781
 	if stop == 1 {
779 782
 		db = db.Where("(x.stop_state=? or x.execution_state=?)", stop, stop)
780 783
 	} else if stop == 2 {
@@ -811,8 +814,11 @@ func GetDoctorAdviceListTwo(orgID int64, patientID int64, advice_type int64, sto
811 814
 	if advice_type == 1 {
812 815
 		db = db.Where("x.advice_type = ?", advice_type)
813 816
 	}
814
-	if advice_type == 3 {
815
-		db = db.Where("x.advice_type <> 1")
817
+	if advice_type == 3 && advice_type > 0 {
818
+		db = db.Where("x.advice_type = 2 or x.advice_type = 3")
819
+	}
820
+	if advice_type == 4 && advice_type > 0 {
821
+		db = db.Where("x.advice_type = 4")
816 822
 	}
817 823
 
818 824
 	if stop == 1 {

+ 14 - 5
service/patientmanage_service.go View File

@@ -503,7 +503,8 @@ func GetLastNewSlowPatient(phone string, orgid int64) (*models.XtPatientsNew, er
503 503
 func GetNewDoctorAdvice(patientID int64, advice_type int64, start int64, end int64, limit int64, page int64, orgID int64) (doctoradvice []*models.DoctorAdvices, total int64, err error) {
504 504
 	db := readDb.Table("xt_doctor_advice as x").Where("x.status = 1")
505 505
 	table := UserReadDB().Table("sgj_user_admin_role as r")
506
-	fmt.Print("table", table)
506
+	tabletwo := readDb.Table("xt_dialysis_prescription as s").Where("s.status = 1")
507
+	fmt.Print("table", table, tabletwo)
507 508
 	if orgID > 0 {
508 509
 		db = db.Where("x.user_org_id=?", orgID)
509 510
 	}
@@ -514,7 +515,10 @@ func GetNewDoctorAdvice(patientID int64, advice_type int64, start int64, end int
514 515
 		db = db.Where("x.advice_type = ?", advice_type)
515 516
 	}
516 517
 	if advice_type == 3 {
517
-		db = db.Where("x.advice_type <> 1")
518
+		db = db.Where("x.advice_type = 2 or x.advice_type = 3")
519
+	}
520
+	if advice_type == 4 {
521
+		db = db.Where("x.advice_type = ?", advice_type)
518 522
 	}
519 523
 	if start > 0 {
520 524
 		db = db.Where("x.start_time>=?", start)
@@ -523,7 +527,7 @@ func GetNewDoctorAdvice(patientID int64, advice_type int64, start int64, end int
523 527
 		db = db.Where("x.start_time<=?", end)
524 528
 	}
525 529
 	//offset := (page - 1) * limit
526
-	err = db.Group("x.id").Count(&total).Select("x.id, x.user_org_id, x.patient_id, x.advice_type, x.advice_date, x.record_date, x.start_time, x.advice_name,x.advice_desc, x.reminder_date, x.drug_spec, x.drug_spec_unit, x.single_dose, x.single_dose_unit, x.prescribing_number, x.prescribing_number_unit, x.delivery_way, x.execution_frequency, x.advice_doctor, x.status, x.created_time,x.updated_time, x.advice_affirm, x.remark, x.stop_time, x.stop_reason, x.stop_doctor, x.stop_state, x.parent_id, x.execution_time, x.execution_staff, x.execution_state, x.checker, x.check_state, x.check_time, x.groupno,x.remind_type,x.frequency_type,x.day_count,x.week_day,x.parent_id,r.user_name, IF(x.parent_id > 0, x.parent_id, x.id) as advice_order").Joins("Left join sgj_users.sgj_user_admin_role as r on r.admin_user_id = x.advice_doctor").Order("start_time desc, groupno desc, advice_order desc, id asc").Scan(&doctoradvice).Error
530
+	err = db.Group("x.id").Count(&total).Select("x.id, x.user_org_id, x.patient_id, x.advice_type, x.advice_date, x.record_date, x.start_time, x.advice_name,x.advice_desc, x.reminder_date, x.drug_spec, x.drug_spec_unit, x.single_dose, x.single_dose_unit, x.prescribing_number, x.prescribing_number_unit, x.delivery_way, x.execution_frequency, x.advice_doctor, x.status, x.created_time,x.updated_time, x.advice_affirm, x.remark, x.stop_time, x.stop_reason, x.stop_doctor, x.stop_state, x.parent_id, x.execution_time, x.execution_staff, x.execution_state, x.checker, x.check_state, x.check_time, x.groupno,x.remind_type,x.frequency_type,x.day_count,x.week_day,x.parent_id,r.user_name,s.dialyzer_perfusion_apparatus,s.anticoagulant,s.anticoagulant_shouji,s.anticoagulant_weichi,s.anticoagulant_zongliang, IF(x.parent_id > 0, x.parent_id, x.id) as advice_order").Joins("Left join sgj_users.sgj_user_admin_role as r on r.admin_user_id = x.advice_doctor").Joins("left join xt_dialysis_prescription as s on s.patient_id = x.patient_id and s.record_date = x.advice_date and s.user_org_id = ?", orgID).Order("start_time desc, groupno desc, advice_order desc, id asc").Scan(&doctoradvice).Error
527 531
 	fmt.Print("err", err)
528 532
 	return
529 533
 
@@ -533,6 +537,8 @@ func GetNewDoctorAdviceOne(patientID int64, advice_type int64, start int64, end
533 537
 	db := readDb.Table("xt_doctor_advice as x").Where("x.status = 1")
534 538
 	table := UserReadDB().Table("sgj_user_admin_role as r")
535 539
 	fmt.Println("table", table)
540
+	tabletwo := readDb.Table("xt_dialysis_prescription as s").Where("s.status = 1")
541
+	fmt.Print("table", table, tabletwo)
536 542
 	if orgID > 0 {
537 543
 		db = db.Where("x.user_org_id=?", orgID)
538 544
 	}
@@ -543,7 +549,10 @@ func GetNewDoctorAdviceOne(patientID int64, advice_type int64, start int64, end
543 549
 		db = db.Where("x.advice_type = ?", advice_type)
544 550
 	}
545 551
 	if advice_type == 3 {
546
-		db = db.Where("x.advice_type <> 1")
552
+		db = db.Where("x.advice_type = 2 or x.advice_type = 3")
553
+	}
554
+	if advice_type == 4 {
555
+		db = db.Where("x.advice_type = ?", advice_type)
547 556
 	}
548 557
 
549 558
 	if start > 0 {
@@ -553,7 +562,7 @@ func GetNewDoctorAdviceOne(patientID int64, advice_type int64, start int64, end
553 562
 		db = db.Where("x.start_time<=?", end)
554 563
 	}
555 564
 	offset := (page - 1) * limit
556
-	err = db.Order("x.start_time desc").Group("x.start_time").Count(&total).Offset(offset).Limit(limit).Select("x.id, x.user_org_id, x.patient_id, x.advice_type, x.advice_date, x.record_date, x.start_time, x.advice_name,x.advice_desc, x.reminder_date, x.drug_spec, x.drug_spec_unit, x.single_dose, x.single_dose_unit, x.prescribing_number, x.prescribing_number_unit, x.delivery_way, x.execution_frequency, x.advice_doctor, x.status, x.created_time,x.updated_time, x.advice_affirm, x.remark, x.stop_time, x.stop_reason, x.stop_doctor, x.stop_state, x.parent_id, x.execution_time, x.execution_staff, x.execution_state, x.checker, x.check_state, x.check_time, x.groupno,x.remind_type,x.frequency_type,x.day_count,x.week_day,x.parent_id,r.user_name, IF(x.parent_id > 0, x.parent_id, x.id) as advice_order").Joins("Left join sgj_users.sgj_user_admin_role as r on r.admin_user_id = x.advice_doctor").Scan(&doctoradvice).Error
565
+	err = db.Order("x.start_time desc").Group("x.start_time").Count(&total).Offset(offset).Limit(limit).Select("x.id, x.user_org_id, x.patient_id, x.advice_type, x.advice_date, x.record_date, x.start_time, x.advice_name,x.advice_desc, x.reminder_date, x.drug_spec, x.drug_spec_unit, x.single_dose, x.single_dose_unit, x.prescribing_number, x.prescribing_number_unit, x.delivery_way, x.execution_frequency, x.advice_doctor, x.status, x.created_time,x.updated_time, x.advice_affirm, x.remark, x.stop_time, x.stop_reason, x.stop_doctor, x.stop_state, x.parent_id, x.execution_time, x.execution_staff, x.execution_state, x.checker, x.check_state, x.check_time, x.groupno,x.remind_type,x.frequency_type,x.day_count,x.week_day,x.parent_id,r.user_name,s.dialyzer_perfusion_apparatus,s.anticoagulant,s.anticoagulant_shouji,s.anticoagulant_weichi,s.anticoagulant_zongliang, IF(x.parent_id > 0, x.parent_id, x.id) as advice_order").Joins("Left join sgj_users.sgj_user_admin_role as r on r.admin_user_id = x.advice_doctor").Joins("left join xt_dialysis_prescription as s on s.patient_id = x.patient_id and s.record_date = x.advice_date and s.user_org_id = ?", orgID).Scan(&doctoradvice).Error
557 566
 	fmt.Print("错误是什么", err)
558 567
 	return
559 568
 }

+ 5 - 0
service/stock_service.go View File

@@ -1719,6 +1719,7 @@ type StockDetailModel struct {
1719 1719
 }
1720 1720
 
1721 1721
 func FindStockInDetailList(orgId int64, page int64, limit int64, startTime int64, endTime int64, keywords string, manufacturer int64, order_type int64, dealer int64) (list []*models.WarehousingInfo, total int64, err error) {
1722
+
1722 1723
 	db := readDb.Model(&models.WarehousingInfo{})
1723 1724
 	db = db.Where("xt_warehouse_info.org_id = ? AND xt_warehouse_info.status = 1", orgId)
1724 1725
 	if len(keywords) > 0 {
@@ -1744,6 +1745,7 @@ func FindStockInDetailList(orgId int64, page int64, limit int64, startTime int64
1744 1745
 	}
1745 1746
 
1746 1747
 	db = db.Preload("Warehousing", "status = 1 AND org_id = ?", orgId)
1748
+	db = db.Preload("GoodInfo", "status = 1 AND org_id = ?", orgId)
1747 1749
 	db = db.Count(&total)
1748 1750
 	offset := (page - 1) * limit
1749 1751
 	err = db.Offset(offset).Limit(limit).Order("xt_warehouse_info.ctime desc").Find(&list).Error
@@ -1812,6 +1814,7 @@ func FindStockOutDetailList(orgId int64, page int64, limit int64, startTime int6
1812 1814
 	}
1813 1815
 
1814 1816
 	db = db.Preload("WarehouseOut", "status = 1 AND org_id = ?", orgId)
1817
+	db = db.Preload("GoodInfo", "status = 1 AND org_id = ?", orgId)
1815 1818
 	db = db.Count(&total)
1816 1819
 	offset := (page - 1) * limit
1817 1820
 	err = db.Offset(offset).Limit(limit).Order("xt_warehouse_out_info.ctime desc").Find(&list).Error
@@ -1878,6 +1881,7 @@ func FindSalesReturnDetailList(orgId int64, page int64, limit int64, startTime i
1878 1881
 	}
1879 1882
 
1880 1883
 	db = db.Preload("SalesReturn", "status = 1 AND org_id = ?", orgId)
1884
+	db = db.Preload("GoodInfo", "status = 1 AND org_id = ?", orgId)
1881 1885
 	offset := (page - 1) * limit
1882 1886
 	db = db.Count(&total)
1883 1887
 
@@ -1909,6 +1913,7 @@ func FindCancelDetailList(orgId int64, page int64, limit int64, startTime int64,
1909 1913
 	}
1910 1914
 
1911 1915
 	db = db.Preload("CancelStock", "status = 1 AND org_id = ?", orgId)
1916
+	db = db.Preload("GoodInfo", "status = 1 AND org_id = ?", orgId)
1912 1917
 	db = db.Count(&total)
1913 1918
 	offset := (page - 1) * limit
1914 1919
 	err = db.Offset(offset).Limit(limit).Order("xt_cancel_stock_info.ctime desc").Find(&list).Error