Browse Source

提交代码

陈少旭 3 weeks ago
parent
commit
2ee1831b27

+ 16 - 0
controllers/pharmacy_controller.go View File

47
 	beego.Router("/api/pharmacy/updatedruginventorywarehouseinfo", &PharmacyController{}, "Get:UpdateDrugInventoryWarehouseInfo")
47
 	beego.Router("/api/pharmacy/updatedruginventorywarehouseinfo", &PharmacyController{}, "Get:UpdateDrugInventoryWarehouseInfo")
48
 
48
 
49
 	beego.Router("/api/pharmacy/changedrugcode", &PharmacyController{}, "Get:ChangeDrugCode")
49
 	beego.Router("/api/pharmacy/changedrugcode", &PharmacyController{}, "Get:ChangeDrugCode")
50
+
51
+	beego.Router("/api/pharmacy/changeZeroFlag", &PharmacyController{}, "Get:ChangeZeroFlag")
52
+
50
 }
53
 }
51
 
54
 
52
 // 测试
55
 // 测试
1423
 		"msg": "msg",
1426
 		"msg": "msg",
1424
 	})
1427
 	})
1425
 }
1428
 }
1429
+
1430
+func (this *PharmacyController) ChangeZeroFlag() {
1431
+	id, _ := this.GetInt64("id")
1432
+	orgId := this.GetAdminUserInfo().CurrentOrgId
1433
+	zero_flag, _ := this.GetInt64("zero_flag")
1434
+	fmt.Println(id)
1435
+	fmt.Println(zero_flag)
1436
+	service.ChangeAdivceZeroFlag(id, zero_flag, orgId)
1437
+	this.ServeSuccessJSON(map[string]interface{}{
1438
+		"msg": "msg",
1439
+	})
1440
+
1441
+}

+ 18 - 0
controllers/role_controller.go View File

239
 	_, _, GongjuPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/hisTool")
239
 	_, _, GongjuPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/hisTool")
240
 	_, _, ShoufeiPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/hospitalCharges")
240
 	_, _, ShoufeiPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/hospitalCharges")
241
 
241
 
242
+	_, _, FapiaoPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/eleFaPiao")
243
+
242
 	_, _, outpatientRegistrationPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientRegistration/index")
244
 	_, _, outpatientRegistrationPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientRegistration/index")
243
 
245
 
244
 	_, _, outpatientRegistrationPurviewTwo := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientDoctorStation")
246
 	_, _, outpatientRegistrationPurviewTwo := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientDoctorStation")
283
 	subPurviewTreeViewModelFive := []*service.PurviewTreeViewModel{}
285
 	subPurviewTreeViewModelFive := []*service.PurviewTreeViewModel{}
284
 	subGongJuPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
286
 	subGongJuPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
285
 	subShouFeiPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
287
 	subShouFeiPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
288
+	subFaPiaoPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
286
 
289
 
287
 	for _, item := range YajinPurview {
290
 	for _, item := range YajinPurview {
288
 		temp := &service.PurviewTreeViewModel{
291
 		temp := &service.PurviewTreeViewModel{
324
 		subGongJuPurviewTreeViewModel = append(subGongJuPurviewTreeViewModel, temp)
327
 		subGongJuPurviewTreeViewModel = append(subGongJuPurviewTreeViewModel, temp)
325
 	}
328
 	}
326
 
329
 
330
+	for _, item := range FapiaoPurview {
331
+		temp := &service.PurviewTreeViewModel{
332
+			ID:     item.Id,
333
+			PID:    item.Parentid,
334
+			Name:   item.Name,
335
+			Number: 1,
336
+		}
337
+		subFaPiaoPurviewTreeViewModel = append(subFaPiaoPurviewTreeViewModel, temp)
338
+	}
339
+
327
 	for _, item := range ShoufeiPurview {
340
 	for _, item := range ShoufeiPurview {
328
 		temp := &service.PurviewTreeViewModel{
341
 		temp := &service.PurviewTreeViewModel{
329
 			ID:     item.Id,
342
 			ID:     item.Id,
439
 
452
 
440
 			item.Childs = append(item.Childs, subGongJuPurviewTreeViewModel...)
453
 			item.Childs = append(item.Childs, subGongJuPurviewTreeViewModel...)
441
 		}
454
 		}
455
+
456
+		if item.Name == "电子发票" {
457
+
458
+			item.Childs = append(item.Childs, subFaPiaoPurviewTreeViewModel...)
459
+		}
442
 	}
460
 	}
443
 
461
 
444
 	//电子病历
462
 	//电子病历

+ 2 - 0
controllers/statistics_api_controller.go View File

2167
 	}
2167
 	}
2168
 
2168
 
2169
 }
2169
 }
2170
+
2170
 func (c *StatisticsApiController) GetPersonInspectionStatistisc() {
2171
 func (c *StatisticsApiController) GetPersonInspectionStatistisc() {
2171
 	start_date := c.GetString("start_time")
2172
 	start_date := c.GetString("start_time")
2172
 	end_date := c.GetString("end_time")
2173
 	end_date := c.GetString("end_time")
2236
 	}
2237
 	}
2237
 
2238
 
2238
 }
2239
 }
2240
+
2239
 func (c *StatisticsApiController) GetStatistics() {
2241
 func (c *StatisticsApiController) GetStatistics() {
2240
 	adminUserInfo := c.GetAdminUserInfo()
2242
 	adminUserInfo := c.GetAdminUserInfo()
2241
 
2243
 

+ 1 - 0
models/his_models.go View File

277
 	DrugCode              string                 `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
277
 	DrugCode              string                 `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
278
 	IsUpload              int64                  `gorm:"column:is_upload" json:"is_upload" form:"is_upload"`
278
 	IsUpload              int64                  `gorm:"column:is_upload" json:"is_upload" form:"is_upload"`
279
 	Patient               Patients               `gorm:"ForeignKey:ID;AssociationForeignKey:PatientId" json:"patient"`
279
 	Patient               Patients               `gorm:"ForeignKey:ID;AssociationForeignKey:PatientId" json:"patient"`
280
+	ZeroFlag              int64                  `gorm:"column:zero_flag" json:"zero_flag" form:"zero_flag"`
280
 }
281
 }
281
 
282
 
282
 func (HisDoctorAdviceInfo) TableName() string {
283
 func (HisDoctorAdviceInfo) TableName() string {

+ 2 - 0
models/pharmacy_models.go View File

62
 	ExecutionState int64
62
 	ExecutionState int64
63
 	Price          float64
63
 	Price          float64
64
 	DrugCode       string
64
 	DrugCode       string
65
+	ZeroFlag       string
65
 }
66
 }
66
 
67
 
67
 // 发药明细列表
68
 // 发药明细列表
209
 	People                int64   `gorm:"column:people" json:"people" form:"people"`
210
 	People                int64   `gorm:"column:people" json:"people" form:"people"`
210
 	DispensingTime        int64   `gorm:"column:dispensing_time" json:"dispensing_time" form:"dispensing_time"`
211
 	DispensingTime        int64   `gorm:"column:dispensing_time" json:"dispensing_time" form:"dispensing_time"`
211
 	DrugCode              string  `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
212
 	DrugCode              string  `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
213
+	ZeroFlag              int64   `gorm:"column:zero_flag" json:"zero_flag" form:"zero_flag"`
212
 }
214
 }
213
 
215
 
214
 func (HisDoctorAdviceInfoL) TableName() string {
216
 func (HisDoctorAdviceInfoL) TableName() string {

+ 8 - 0
service/pharmacy_service.go View File

321
 				DrugId:       v.DrugId,
321
 				DrugId:       v.DrugId,
322
 				Price:        v.Price,
322
 				Price:        v.Price,
323
 				DrugCode:     v.DrugCode,
323
 				DrugCode:     v.DrugCode,
324
+				ZeroFlag:     config.ToString(v.ZeroFlag),
324
 			})
325
 			})
325
 		}
326
 		}
326
 
327
 
391
 				ExecutionTime:  v.ExecutionTime,
392
 				ExecutionTime:  v.ExecutionTime,
392
 				Price:          v.Price,
393
 				Price:          v.Price,
393
 				DrugCode:       v.DrugCode,
394
 				DrugCode:       v.DrugCode,
395
+				ZeroFlag:       config.ToString(v.ZeroFlag),
394
 			})
396
 			})
395
 		}
397
 		}
396
 
398
 
2466
 	return adviceInfo, err
2468
 	return adviceInfo, err
2467
 }
2469
 }
2468
 
2470
 
2471
+func ChangeAdivceZeroFlag(id int64, zero_flag int64, user_org_id int64) (models.HisDoctorAdviceInfo, error) {
2472
+	adviceInfo := models.HisDoctorAdviceInfo{}
2473
+	err := XTWriteDB().Model(&adviceInfo).Where("id = ? and user_org_id = ? and status =1", id, user_org_id).Updates(map[string]interface{}{"zero_flag": zero_flag}).Error
2474
+	return adviceInfo, err
2475
+}
2476
+
2469
 func DispensingMedicineTwo(orgid, patient_id, advice_date, drug_id, creater int64) (err error) {
2477
 func DispensingMedicineTwo(orgid, patient_id, advice_date, drug_id, creater int64) (err error) {
2470
 
2478
 
2471
 	//开事务
2479
 	//开事务