Browse Source

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

28169 2 weeks ago
parent
commit
02750ff745

+ 14 - 10
controllers/his_api_controller.go View File

11452
 
11452
 
11453
 	admin := c.GetAdminUserInfo()
11453
 	admin := c.GetAdminUserInfo()
11454
 	his_patient_info, _ := service.GetNewHisPatientInfo(his_patient_id)
11454
 	his_patient_info, _ := service.GetNewHisPatientInfo(his_patient_id)
11455
+
11456
+	last_his_patient_info, _ := service.GetLastNewHisPatientInfo(patient_id, recordDateTime)
11457
+
11455
 	xt_patient_info, _ := service.GetXTPatientInfo(admin.CurrentOrgId, patient_id)
11458
 	xt_patient_info, _ := service.GetXTPatientInfo(admin.CurrentOrgId, patient_id)
11456
 
11459
 
11457
 	var prescriptions []*models.HisPrescription
11460
 	var prescriptions []*models.HisPrescription
11478
 	sch, _ := service.GetScheduleByDate(c.GetAdminUserInfo().CurrentOrgId, recordDateTime, patient_id)
11481
 	sch, _ := service.GetScheduleByDate(c.GetAdminUserInfo().CurrentOrgId, recordDateTime, patient_id)
11479
 
11482
 
11480
 	c.ServeSuccessJSON(map[string]interface{}{
11483
 	c.ServeSuccessJSON(map[string]interface{}{
11481
-		"his_info":     his_patient_info,
11482
-		"xt_info":      xt_patient_info,
11483
-		"prescription": prescriptions,
11484
-		"case_history": case_history,
11485
-		"info":         patientPrescriptionInfo,
11486
-		"last_info":    lastPatientPrescriptionInfo,
11487
-		"order":        order,
11488
-		"doctors":      doctors,
11489
-		"department":   department,
11490
-		"sch":          sch,
11484
+		"his_info":              his_patient_info,
11485
+		"last_his_patient_info": last_his_patient_info,
11486
+		"xt_info":               xt_patient_info,
11487
+		"prescription":          prescriptions,
11488
+		"case_history":          case_history,
11489
+		"info":                  patientPrescriptionInfo,
11490
+		"last_info":             lastPatientPrescriptionInfo,
11491
+		"order":                 order,
11492
+		"doctors":               doctors,
11493
+		"department":            department,
11494
+		"sch":                   sch,
11491
 	})
11495
 	})
11492
 	return
11496
 	return
11493
 }
11497
 }

+ 12 - 0
controllers/manager_center_api_controller.go View File

165
 	is_show, _ := c.GetInt64("is_show")
165
 	is_show, _ := c.GetInt64("is_show")
166
 	adminInfo := c.GetAdminUserInfo()
166
 	adminInfo := c.GetAdminUserInfo()
167
 	is_self_drug, _ := c.GetInt64("is_self_drug")
167
 	is_self_drug, _ := c.GetInt64("is_self_drug")
168
+	is_zero_flag, _ := c.GetInt64("is_zero_flag")
169
+
168
 	specification_name := c.GetString("specification_name")
170
 	specification_name := c.GetString("specification_name")
169
 	hans := drug_name // 要转换的汉字字符串
171
 	hans := drug_name // 要转换的汉字字符串
170
 
172
 
257
 		IsShow:                      is_show,
259
 		IsShow:                      is_show,
258
 		IsSelfDrug:                  is_self_drug,
260
 		IsSelfDrug:                  is_self_drug,
259
 		SpecificationName:           specification_name,
261
 		SpecificationName:           specification_name,
262
+		IsZeroFlag:                  is_zero_flag,
260
 	}
263
 	}
261
 	drugLib.FirstLetter = firstLetter
264
 	drugLib.FirstLetter = firstLetter
262
 	drugLib.Pinyin = firstLetter
265
 	drugLib.Pinyin = firstLetter
381
 	is_show, _ := c.GetInt64("is_show")
384
 	is_show, _ := c.GetInt64("is_show")
382
 	is_self_drug, _ := c.GetInt64("is_self_drug")
385
 	is_self_drug, _ := c.GetInt64("is_self_drug")
383
 	specification_name := c.GetString("specification_name")
386
 	specification_name := c.GetString("specification_name")
387
+	is_zero_flag, _ := c.GetInt64("is_zero_flag")
388
+
384
 	adminInfo := c.GetAdminUserInfo()
389
 	adminInfo := c.GetAdminUserInfo()
385
 	drug, _ := service.FindBaseDrugLibRecord(adminInfo.CurrentOrgId, id)
390
 	drug, _ := service.FindBaseDrugLibRecord(adminInfo.CurrentOrgId, id)
386
 
391
 
478
 		IsShow:                      is_show,
483
 		IsShow:                      is_show,
479
 		IsSelfDrug:                  is_self_drug,
484
 		IsSelfDrug:                  is_self_drug,
480
 		SpecificationName:           specification_name,
485
 		SpecificationName:           specification_name,
486
+		IsZeroFlag:                  is_zero_flag,
481
 	}
487
 	}
482
 	if adminInfo.CurrentOrgId == 10206 || adminInfo.CurrentOrgId == 10344 {
488
 	if adminInfo.CurrentOrgId == 10206 || adminInfo.CurrentOrgId == 10344 {
483
 
489
 
1643
 	bbx01 := c.GetString("bbx01")
1649
 	bbx01 := c.GetString("bbx01")
1644
 	bby01 := c.GetString("bby01")
1650
 	bby01 := c.GetString("bby01")
1645
 	is_show, _ := c.GetInt64("is_show")
1651
 	is_show, _ := c.GetInt64("is_show")
1652
+	is_zero_flag, _ := c.GetInt64("is_zero_flag")
1653
+
1646
 	adminUserInfo := c.GetAdminUserInfo()
1654
 	adminUserInfo := c.GetAdminUserInfo()
1647
 
1655
 
1648
 	totals := service.FindGoodInfoByNameTwo(specification_name, adminUserInfo.CurrentOrgId, good_id, good_name)
1656
 	totals := service.FindGoodInfoByNameTwo(specification_name, adminUserInfo.CurrentOrgId, good_id, good_name)
1726
 		ZuobiaoId:                   bbx01,
1734
 		ZuobiaoId:                   bbx01,
1727
 		Bck01b:                      "55",
1735
 		Bck01b:                      "55",
1728
 		IsShow:                      is_show,
1736
 		IsShow:                      is_show,
1737
+		IsZeroFlag:                  is_zero_flag,
1729
 	}
1738
 	}
1730
 	err, goodInfos := service.AddSigleGoodInfo(&goodInfo)
1739
 	err, goodInfos := service.AddSigleGoodInfo(&goodInfo)
1731
 	if err == nil {
1740
 	if err == nil {
1796
 	bbx01 := c.GetString("bbx01")
1805
 	bbx01 := c.GetString("bbx01")
1797
 	bby01 := c.GetString("bby01")
1806
 	bby01 := c.GetString("bby01")
1798
 	is_show, _ := c.GetInt64("is_show")
1807
 	is_show, _ := c.GetInt64("is_show")
1808
+	is_zero_flag, _ := c.GetInt64("is_zero_flag")
1809
+
1799
 	// 创建一个拼音转换器
1810
 	// 创建一个拼音转换器
1800
 	p := pinyin.NewArgs()
1811
 	p := pinyin.NewArgs()
1801
 
1812
 
1871
 		ZuobiaoId:                   bbx01,
1882
 		ZuobiaoId:                   bbx01,
1872
 		Bck01b:                      "55",
1883
 		Bck01b:                      "55",
1873
 		IsShow:                      is_show,
1884
 		IsShow:                      is_show,
1885
+		IsZeroFlag:                  is_zero_flag,
1874
 	}
1886
 	}
1875
 
1887
 
1876
 	totals := service.FindGoodInfoByNameOne(specification_name, adminUserInfo.CurrentOrgId, good_id, id, good_name)
1888
 	totals := service.FindGoodInfoByNameOne(specification_name, adminUserInfo.CurrentOrgId, good_id, id, good_name)

+ 8 - 0
models/drug.go View File

91
 	IsShow             int64  `gorm:"column:is_show" json:"is_show" form:"is_show"`
91
 	IsShow             int64  `gorm:"column:is_show" json:"is_show" form:"is_show"`
92
 	IsSelfDrug         int64  `gorm:"column:is_self_drug" json:"is_self_drug" form:"is_self_drug"`
92
 	IsSelfDrug         int64  `gorm:"column:is_self_drug" json:"is_self_drug" form:"is_self_drug"`
93
 	SpecificationName  string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
93
 	SpecificationName  string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
94
+	IsZeroFlag         int64  `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
94
 }
95
 }
95
 
96
 
96
 func (BaseDrugLib) TableName() string {
97
 func (BaseDrugLib) TableName() string {
112
 	IsSelfDrug int64  `gorm:"column:is_self_drug" json:"is_self_drug" form:"is_self_drug"`
113
 	IsSelfDrug int64  `gorm:"column:is_self_drug" json:"is_self_drug" form:"is_self_drug"`
113
 	Dose       string `gorm:"column:dose" json:"dose" form:"dose"`
114
 	Dose       string `gorm:"column:dose" json:"dose" form:"dose"`
114
 	DoseUnit   string `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
115
 	DoseUnit   string `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
116
+	IsZeroFlag int64  `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
115
 }
117
 }
116
 
118
 
117
 func (BaseDrugLibSeven) TableName() string {
119
 func (BaseDrugLibSeven) TableName() string {
135
 	DoseUnit     string  `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
137
 	DoseUnit     string  `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
136
 	DrugDay      string  `gorm:"column:drug_day" json:"drug_day" form:"drug_day"`
138
 	DrugDay      string  `gorm:"column:drug_day" json:"drug_day" form:"drug_day"`
137
 	MinPrice     float64 `gorm:"column:min_price" json:"min_price" form:"min_price"`
139
 	MinPrice     float64 `gorm:"column:min_price" json:"min_price" form:"min_price"`
140
+	IsZeroFlag   int64   `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
138
 }
141
 }
139
 
142
 
140
 func (BaseDrugLibTwentyOne) TableName() string {
143
 func (BaseDrugLibTwentyOne) TableName() string {
151
 	MinUnit          string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
154
 	MinUnit          string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
152
 	Dose             string `gorm:"column:dose" json:"dose" form:"dose"`
155
 	Dose             string `gorm:"column:dose" json:"dose" form:"dose"`
153
 	DoseUnit         string `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
156
 	DoseUnit         string `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
157
+	IsZeroFlag       int64  `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
154
 }
158
 }
155
 
159
 
156
 func (BaseDrugLibEleven) TableName() string {
160
 func (BaseDrugLibEleven) TableName() string {
163
 	TotalCount          int64 `gorm:"column:total_count" json:"total_count" form:"total_count"`
167
 	TotalCount          int64 `gorm:"column:total_count" json:"total_count" form:"total_count"`
164
 	DrugStockLimitCount int64 `gorm:"column:drug_stock_limit_count" json:"drug_stock_limit_count" form:"drug_stock_limit_count"`
168
 	DrugStockLimitCount int64 `gorm:"column:drug_stock_limit_count" json:"drug_stock_limit_count" form:"drug_stock_limit_count"`
165
 	Status              int64 `gorm:"column:status" json:"status" form:"status"`
169
 	Status              int64 `gorm:"column:status" json:"status" form:"status"`
170
+	IsZeroFlag          int64 `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
166
 }
171
 }
167
 
172
 
168
 func (BaseDrugLibTen) TableName() string {
173
 func (BaseDrugLibTen) TableName() string {
280
 	SumCount                    int64                   `gorm:"column:sum_count" json:"sum_count" form:"sum_count"`
285
 	SumCount                    int64                   `gorm:"column:sum_count" json:"sum_count" form:"sum_count"`
281
 	SumInCount                  int64                   `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
286
 	SumInCount                  int64                   `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
282
 	IsPharmacy                  int64                   `gorm:"column:is_pharmacy" json:"is_pharmacy" form:"is_pharmacy"`
287
 	IsPharmacy                  int64                   `gorm:"column:is_pharmacy" json:"is_pharmacy" form:"is_pharmacy"`
288
+	IsZeroFlag                  int64                   `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
283
 }
289
 }
284
 
290
 
285
 func (BaseDrugLibNight) TableName() string {
291
 func (BaseDrugLibNight) TableName() string {
299
 	DrugStatus     string `gorm:"column:drug_status" json:"drug_status" form:"drug_status"`
305
 	DrugStatus     string `gorm:"column:drug_status" json:"drug_status" form:"drug_status"`
300
 	DrugStockLimit string `gorm:"column:drug_stock_limit" json:"drug_stock_limit_count" form:"drug_stock_limit"`
306
 	DrugStockLimit string `gorm:"column:drug_stock_limit" json:"drug_stock_limit_count" form:"drug_stock_limit"`
301
 	Manufacturer   int64  `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
307
 	Manufacturer   int64  `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
308
+	IsZeroFlag     int64  `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
302
 }
309
 }
303
 
310
 
304
 func (BaseDrugLibTwenty) TableName() string {
311
 func (BaseDrugLibTwenty) TableName() string {
322
 	DrugType              int64                      `gorm:"column:drug_type" json:"drug_type" form:"drug_type"`
329
 	DrugType              int64                      `gorm:"column:drug_type" json:"drug_type" form:"drug_type"`
323
 	LastDrugWarehouseInfo XtSelfDrugWarehouseInfo    `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"first_drug_warehouse_info"`
330
 	LastDrugWarehouseInfo XtSelfDrugWarehouseInfo    `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"first_drug_warehouse_info"`
324
 	DrugWarehouseInfo     []*XtSelfDrugWarehouseInfo `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"drug_warehouse_info"`
331
 	DrugWarehouseInfo     []*XtSelfDrugWarehouseInfo `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"drug_warehouse_info"`
332
+	IsZeroFlag            int64                      `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
325
 }
333
 }
326
 
334
 
327
 func (BaseDrugLibThrity) TableName() string {
335
 func (BaseDrugLibThrity) TableName() string {

+ 1 - 0
models/drug_pharmacy_management_models.go View File

74
 	SumInCount                  int64                  `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
74
 	SumInCount                  int64                  `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
75
 	IsPharmacy                  int64                  `gorm:"column:is_pharmacy" json:"is_pharmacy" form:"is_pharmacy"`
75
 	IsPharmacy                  int64                  `gorm:"column:is_pharmacy" json:"is_pharmacy" form:"is_pharmacy"`
76
 	DrugWarehouseInfo           []*XtDrugWarehouseInfo `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"drug_warehouse_info"`
76
 	DrugWarehouseInfo           []*XtDrugWarehouseInfo `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"drug_warehouse_info"`
77
+	IsZeroFlag                  int64                  `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
77
 }
78
 }
78
 
79
 
79
 func (PharmacyBaseDrug) TableName() string {
80
 func (PharmacyBaseDrug) TableName() string {

+ 1 - 0
models/good_models.go View File

105
 	Bbx01                       string               `gorm:"column:bbx01" json:"bbx01" form:"bbx01"`
105
 	Bbx01                       string               `gorm:"column:bbx01" json:"bbx01" form:"bbx01"`
106
 	Bby01                       string               `gorm:"column:bby01" json:"bby01" form:"bby01"`
106
 	Bby01                       string               `gorm:"column:bby01" json:"bby01" form:"bby01"`
107
 	Bck01b                      string               `gorm:"column:bck01b" json:"bck01b" form:"bck01b"`
107
 	Bck01b                      string               `gorm:"column:bck01b" json:"bck01b" form:"bck01b"`
108
+	IsZeroFlag                  int64                `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
108
 
109
 
109
 	ZuobiaoId string `gorm:"column:zuobiao_id" json:"zuobiao_id" form:"zuobiao_id"`
110
 	ZuobiaoId string `gorm:"column:zuobiao_id" json:"zuobiao_id" form:"zuobiao_id"`
110
 
111
 

+ 1 - 0
models/his_charge_models.go View File

461
 	RetailPrice  float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
461
 	RetailPrice  float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
462
 	DrugDose     float64 `gorm:"column:drug_dose" json:"drug_dose" form:"drug_dose"`
462
 	DrugDose     float64 `gorm:"column:drug_dose" json:"drug_dose" form:"drug_dose"`
463
 	DrugDoseUnit int64   `gorm:"column:drug_dose_unit" json:"drug_dose_unit" form:"drug_dose_unit"`
463
 	DrugDoseUnit int64   `gorm:"column:drug_dose_unit" json:"drug_dose_unit" form:"drug_dose_unit"`
464
+	IsZeroFlag   int64   `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
464
 }
465
 }
465
 
466
 
466
 func (NewDrug) TableName() string {
467
 func (NewDrug) TableName() string {

+ 2 - 0
models/his_models.go View File

360
 	Bck01b                      string  `gorm:"column:bck01b" json:"bck01b" form:"bck01b"`
360
 	Bck01b                      string  `gorm:"column:bck01b" json:"bck01b" form:"bck01b"`
361
 	Bby01                       string  `gorm:"column:bby01" json:"bby01" form:"bby01"`
361
 	Bby01                       string  `gorm:"column:bby01" json:"bby01" form:"bby01"`
362
 	Bbx01                       string  `gorm:"column:bbx01" json:"bbx01" form:"bbx01"`
362
 	Bbx01                       string  `gorm:"column:bbx01" json:"bbx01" form:"bbx01"`
363
+	IsZeroFlag                  int64   `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
363
 }
364
 }
364
 
365
 
365
 func (Drug) TableName() string {
366
 func (Drug) TableName() string {
768
 	DrugDay                     string  `gorm:"column:drug_day" json:"drug_day" form:"drug_day"`
769
 	DrugDay                     string  `gorm:"column:drug_day" json:"drug_day" form:"drug_day"`
769
 	Total                       float64 `gorm:"column:total" json:"total" form:"total"`
770
 	Total                       float64 `gorm:"column:total" json:"total" form:"total"`
770
 	PrescribingNumberUnit       string  `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
771
 	PrescribingNumberUnit       string  `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
772
+	IsZeroFlag                  int64   `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
771
 }
773
 }
772
 
774
 
773
 func (VMDrug) TableName() string {
775
 func (VMDrug) TableName() string {

+ 3 - 0
models/new_stock_models.go View File

138
 	SumCount                    int64                  `gorm:"column:sum_count" json:"sum_count" form:"sum_count"`
138
 	SumCount                    int64                  `gorm:"column:sum_count" json:"sum_count" form:"sum_count"`
139
 	SumInCount                  int64                  `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
139
 	SumInCount                  int64                  `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
140
 	IsPharmacy                  int64                  `gorm:"column:is_pharmacy" json:"is_pharmacy" form:"is_pharmacy"`
140
 	IsPharmacy                  int64                  `gorm:"column:is_pharmacy" json:"is_pharmacy" form:"is_pharmacy"`
141
+	IsZeroFlag                  int64                  `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
141
 }
142
 }
142
 
143
 
143
 func (NewBaseDrug) TableName() string {
144
 func (NewBaseDrug) TableName() string {
175
 	DrugType               int64                  `gorm:"column:drug_type" json:"drug_type" form:"drug_type"`
176
 	DrugType               int64                  `gorm:"column:drug_type" json:"drug_type" form:"drug_type"`
176
 	MedicalInsuranceLevel  int64                  `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
177
 	MedicalInsuranceLevel  int64                  `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
177
 	IsSelfDrug             int64                  `gorm:"column:is_self_drug" json:"is_self_drug" form:"is_self_drug"`
178
 	IsSelfDrug             int64                  `gorm:"column:is_self_drug" json:"is_self_drug" form:"is_self_drug"`
179
+	IsZeroFlag             int64                  `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
178
 }
180
 }
179
 
181
 
180
 func (NewBaseDrugOne) TableName() string {
182
 func (NewBaseDrugOne) TableName() string {
454
 	NewDrugFlowPofitWarehouseInfo    []*DrugFlowTwenty `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"new_drug_profit_flow_info"`
456
 	NewDrugFlowPofitWarehouseInfo    []*DrugFlowTwenty `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"new_drug_profit_flow_info"`
455
 	NewDrugFlowNoPofitWarehouseInfo  []*DrugFlowTwenty `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"new_drug_no_profit_flow_info"`
457
 	NewDrugFlowNoPofitWarehouseInfo  []*DrugFlowTwenty `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"new_drug_no_profit_flow_info"`
456
 	NewDrugFlowNoCancelWarehouseInfo []*DrugFlowTwenty `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"new_drug_cancel_flow_info"`
458
 	NewDrugFlowNoCancelWarehouseInfo []*DrugFlowTwenty `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"new_drug_cancel_flow_info"`
459
+	IsZeroFlag                       int64             `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
457
 }
460
 }
458
 
461
 
459
 func (VmBaseDrugTwenty) TableName() string {
462
 func (VmBaseDrugTwenty) TableName() string {

+ 1 - 0
models/pharmacy_models.go View File

506
 	IsPharmacy            int64                  `gorm:"column:is_pharmacy" json:"is_pharmacy" form:"is_pharmacy"`
506
 	IsPharmacy            int64                  `gorm:"column:is_pharmacy" json:"is_pharmacy" form:"is_pharmacy"`
507
 	List1                 interface{}            `json:"list_1"`
507
 	List1                 interface{}            `json:"list_1"`
508
 	List2                 interface{}            `json:"list_2"`
508
 	List2                 interface{}            `json:"list_2"`
509
+	IsZeroFlag            int64                  `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
509
 }
510
 }
510
 
511
 
511
 func (BaseDrugLibL) TableName() string {
512
 func (BaseDrugLibL) TableName() string {

+ 1 - 0
models/self_drug_models.go View File

83
 	IsSelfDrug             int64   `gorm:"column:is_self_drug" json:"is_self_drug" form:"is_self_drug"`
83
 	IsSelfDrug             int64   `gorm:"column:is_self_drug" json:"is_self_drug" form:"is_self_drug"`
84
 	SumCount               int64   `gorm:"column:sum_count" json:"sum_count" form:"sum_count"`
84
 	SumCount               int64   `gorm:"column:sum_count" json:"sum_count" form:"sum_count"`
85
 	SpecificationName      string  `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
85
 	SpecificationName      string  `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
86
+	IsZeroFlag             int64   `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
86
 }
87
 }
87
 
88
 
88
 func (XtBaseDrug) TableName() string {
89
 func (XtBaseDrug) TableName() string {

+ 1 - 1
models/stock_models.go View File

853
 	WareStartStockCancelInfo         []*DrugFlow               //期初结余退库
853
 	WareStartStockCancelInfo         []*DrugFlow               //期初结余退库
854
 	WareEndStockCancelInfo           []*DrugFlow               //期末结余退库
854
 	WareEndStockCancelInfo           []*DrugFlow               //期末结余退库
855
 	WareStartEndStockCancelInfo      []*DrugFlow               //期中减少退库
855
 	WareStartEndStockCancelInfo      []*DrugFlow               //期中减少退库
856
-
856
+	IsZeroFlag                       int64                     `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
857
 }
857
 }
858
 
858
 
859
 func (VmBaseDrug) TableName() string {
859
 func (VmBaseDrug) TableName() string {

+ 1 - 0
models/supply.models.go View File

39
 	DrugStatus             string                 `gorm:"column:drug_status" json:"drug_status" form:"drug_status"`
39
 	DrugStatus             string                 `gorm:"column:drug_status" json:"drug_status" form:"drug_status"`
40
 	MinPrice               float64                `gorm:"column:min_price" json:"min_price" form:"min_price"`
40
 	MinPrice               float64                `gorm:"column:min_price" json:"min_price" form:"min_price"`
41
 	MedicalInsuranceNumber string                 `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
41
 	MedicalInsuranceNumber string                 `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
42
+	IsZeroFlag             int64                  `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
42
 }
43
 }
43
 
44
 
44
 func (SpBaseDrug) TableName() string {
45
 func (SpBaseDrug) TableName() string {

+ 5 - 0
service/his_service.go View File

2266
 	err = readDb.Model(&models.HisPatient{}).Where("id = ? AND status = 1 ", his_patient_id).First(&info).Error
2266
 	err = readDb.Model(&models.HisPatient{}).Where("id = ? AND status = 1 ", his_patient_id).First(&info).Error
2267
 	return
2267
 	return
2268
 }
2268
 }
2269
+func GetLastNewHisPatientInfo(patient_id int64, recordDateTime int64) (info models.HisPatient, err error) {
2270
+	err = readDb.Model(&models.HisPatient{}).Where("patient_id = ? AND status = 1  and record_date < ?", patient_id, recordDateTime).First(&info).Error
2271
+	return
2272
+
2273
+}
2269
 
2274
 
2270
 func GetNewHisOrder(user_org_id int64, mdtrt_id string, patient_id int64) (order models.HisOrder, err error) {
2275
 func GetNewHisOrder(user_org_id int64, mdtrt_id string, patient_id int64) (order models.HisOrder, err error) {
2271
 	err = readDb.Model(&models.HisOrder{}).Where("status = 1 AND user_org_id = ? AND patient_id = ? AND mdtrt_id=? ", user_org_id, patient_id, mdtrt_id).
2276
 	err = readDb.Model(&models.HisOrder{}).Where("status = 1 AND user_org_id = ? AND patient_id = ? AND mdtrt_id=? ", user_org_id, patient_id, mdtrt_id).

+ 2 - 0
service/stock_service.go View File

279
 		"zuobiao_id":                     goodInfo.Bbx01,
279
 		"zuobiao_id":                     goodInfo.Bbx01,
280
 		"first_letter":                   goodInfo.FirstLetter,
280
 		"first_letter":                   goodInfo.FirstLetter,
281
 		"is_show":                        goodInfo.IsShow,
281
 		"is_show":                        goodInfo.IsShow,
282
+		"is_zero_flag":                   goodInfo.IsZeroFlag,
282
 	}).Error
283
 	}).Error
283
 
284
 
284
 	writeDb.Model(&models.WarehousingInfo{}).Where("good_id = ? AND org_id = ?", goodInfo.ID, goodInfo.OrgId).Updates(map[string]interface{}{"good_type_id": goodInfo.GoodTypeId})
285
 	writeDb.Model(&models.WarehousingInfo{}).Where("good_id = ? AND org_id = ?", goodInfo.ID, goodInfo.OrgId).Updates(map[string]interface{}{"good_type_id": goodInfo.GoodTypeId})
1180
 	DoseUnit                    string  `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
1181
 	DoseUnit                    string  `gorm:"column:dose_unit" json:"dose_unit" form:"dose_unit"`
1181
 	DrugDay                     string  `gorm:"column:drug_day" json:"drug_day" form:"drug_day"`
1182
 	DrugDay                     string  `gorm:"column:drug_day" json:"drug_day" form:"drug_day"`
1182
 	MinPrice                    float64 `gorm:"column:min_price" json:"min_price" form:"min_price"`
1183
 	MinPrice                    float64 `gorm:"column:min_price" json:"min_price" form:"min_price"`
1184
+	IsZeroFlag                  int64   `gorm:"column:is_zero_flag" json:"is_zero_flag" form:"is_zero_flag"`
1183
 }
1185
 }
1184
 
1186
 
1185
 func (Drug) TableName() string {
1187
 func (Drug) TableName() string {