Browse Source

医保对接

csx 3 years ago
parent
commit
36256c73c2

+ 0 - 1
controllers/manager_center_api_controller.go View File

@@ -141,7 +141,6 @@ func (c *ManagerCenterApiController) CreateBaseDrugLib() {
141 141
 	packing_unit := c.GetString("packing_unit")
142 142
 	packing_price, _ := c.GetFloat("packing_price")
143 143
 	drug_day := c.GetString("drug_day")
144
-	//hosp_appr_flag
145 144
 	hosp_appr_flag, _ := c.GetInt64("hosp_appr_flag")
146 145
 	lmt_used_flag, _ := c.GetInt64("lmt_used_flag")
147 146
 	adminInfo := c.GetAdminUserInfo()

+ 1 - 1
models/drug.go View File

@@ -75,7 +75,7 @@ type BaseDrugLib struct {
75 75
 }
76 76
 
77 77
 func (BaseDrugLib) TableName() string {
78
-	return ""
78
+	return "xt_base_drug"
79 79
 }
80 80
 
81 81
 type DrugUnitSafeguard struct {

+ 10 - 14
service/stock_service.go View File

@@ -468,7 +468,8 @@ func FindLastDrugWarehousingInfoByID(drug_id int64) (info models.XtDrugWarehouse
468 468
 	return info, err
469 469
 }
470 470
 
471
-// 出库时先进先出,找出最先入库的批次
471
+//
472
+//// 出库时先进先出,找出最先入库的批次
472 473
 //func  (drug_id int64) (info models.WarehousingInfo, err error) {
473 474
 //	err = readDb.Model(&models.WarehousingInfo{}).Where("drup_id = ? AND status = 1 AND (stock_max_number > 0 or stock_min_number > 0) ", drug_id).Order("ctime").First(&info).Error
474 475
 //	return info, err
@@ -578,9 +579,6 @@ type Drug struct {
578 579
 	MaxUnit         string  `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
579 580
 	MinUnit         string  `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
580 581
 	LastPrice       float64 `gorm:"column:last_price" json:"last_price" form:"last_price"`
581
-	HospApprFlag    int64   `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
582
-	LmtUsedFlag     int64   `gorm:"column:lmt_used_flag" json:"lmt_used_flag" form:"lmt_used_flag"`
583
-	Total           float64 `gorm:"column:total" json:"total" form:"total"`
584 582
 }
585 583
 
586 584
 func (Drug) TableName() string {
@@ -2186,13 +2184,10 @@ func (VMWarehousingInfo) TableName() string {
2186 2184
 }
2187 2185
 
2188 2186
 type GoodInfo struct {
2189
-	ID                int64   `gorm:"column:id" json:"id"`
2190
-	SpecificationName string  `gorm:"column:specification_name" json:"specification_name"`
2191
-	Status            int64   `gorm:"column:status" json:"status"`
2192
-	OrgId             int64   `gorm:"column:org_id" json:"org_id"`
2193
-	GoodName          string  `gorm:"column:good_name" json:"good_name" form:"good_name"`
2194
-	GoodUnit          int64   `gorm:"column:good_unit" json:"good_unit" form:"good_unit"`
2195
-	RetailPrice       float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
2187
+	ID                int64  `gorm:"column:id" json:"id"`
2188
+	SpecificationName string `gorm:"column:specification_name" json:"specification_name"`
2189
+	Status            int64  `gorm:"column:status" json:"status"`
2190
+	OrgId             int64  `gorm:"column:org_id" json:"org_id"`
2196 2191
 }
2197 2192
 
2198 2193
 func (GoodInfo) TableName() string {
@@ -2333,13 +2328,14 @@ func GetCoutWareseOutInfo(startime int64, endtime int64, orgid int64) (houseOutI
2333 2328
 }
2334 2329
 
2335 2330
 func GetGoodInfomationList(orgid int64, keyword string) (goodInfo []*models.GoodInfo, err error) {
2331
+	key := "%" + keyword + "%"
2336 2332
 	if len(keyword) == 0 {
2337 2333
 		err = XTReadDB().Where("org_id = ? and status = 1", orgid).Find(&goodInfo).Error
2334
+
2338 2335
 	} else {
2339
-		key := "%" + keyword + "%"
2340
-		err = XTReadDB().Where("org_id = ? and status = 1 and good_name Like ?", orgid, key).Find(&goodInfo).Error
2341
-	}
2336
+		err = XTReadDB().Where("org_id = ? and status = 1 AND good_name like ?", orgid, key).Find(&goodInfo).Error
2342 2337
 
2338
+	}
2343 2339
 	return goodInfo, err
2344 2340
 }
2345 2341
 

+ 2 - 2
service/warhouse_service.go View File

@@ -419,7 +419,7 @@ package service
419 419
 //			Dealer:                  0,
420 420
 //			IsSys:                   1,
421 421
 //			SysRecordTime:           record_time,
422
-//			GoodTypeId:              goods.GoodTypeId,
422
+//			GoodTypeId:              goods..GoodTypeId,
423 423
 //			GoodId:                  goods.GoodId,
424 424
 //			PatientId:				 patient_id,
425 425
 //		}
@@ -494,7 +494,7 @@ package service
494 494
 //			Dealer:                  0,
495 495
 //			IsSys:                   2,
496 496
 //			SysRecordTime:           record_time,
497
-//			GoodTypeId:              goods.GoodTypeId,
497
+//			GoodTypeId:              goods..GoodTypeId,
498 498
 //			GoodId:                  goods.GoodId,
499 499
 //			PatientId:				 patient_id,
500 500
 //		}