瀏覽代碼

提交代码

陈少旭 3 週之前
父節點
當前提交
2ee1831b27

+ 16 - 0
controllers/pharmacy_controller.go 查看文件

@@ -47,6 +47,9 @@ func PharmacyApiRegistRouters() {
47 47
 	beego.Router("/api/pharmacy/updatedruginventorywarehouseinfo", &PharmacyController{}, "Get:UpdateDrugInventoryWarehouseInfo")
48 48
 
49 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,3 +1426,16 @@ func (this *PharmacyController) ChangeDrugCode() {
1423 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 查看文件

@@ -239,6 +239,8 @@ func (this *RoleAPIController) EditPurviewInitData() {
239 239
 	_, _, GongjuPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/hisTool")
240 240
 	_, _, ShoufeiPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/hospitalCharges")
241 241
 
242
+	_, _, FapiaoPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/eleFaPiao")
243
+
242 244
 	_, _, outpatientRegistrationPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientRegistration/index")
243 245
 
244 246
 	_, _, outpatientRegistrationPurviewTwo := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientDoctorStation")
@@ -283,6 +285,7 @@ func (this *RoleAPIController) EditPurviewInitData() {
283 285
 	subPurviewTreeViewModelFive := []*service.PurviewTreeViewModel{}
284 286
 	subGongJuPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
285 287
 	subShouFeiPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
288
+	subFaPiaoPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
286 289
 
287 290
 	for _, item := range YajinPurview {
288 291
 		temp := &service.PurviewTreeViewModel{
@@ -324,6 +327,16 @@ func (this *RoleAPIController) EditPurviewInitData() {
324 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 340
 	for _, item := range ShoufeiPurview {
328 341
 		temp := &service.PurviewTreeViewModel{
329 342
 			ID:     item.Id,
@@ -439,6 +452,11 @@ func (this *RoleAPIController) EditPurviewInitData() {
439 452
 
440 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 查看文件

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

+ 1 - 0
models/his_models.go 查看文件

@@ -277,6 +277,7 @@ type HisDoctorAdviceInfo struct {
277 277
 	DrugCode              string                 `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
278 278
 	IsUpload              int64                  `gorm:"column:is_upload" json:"is_upload" form:"is_upload"`
279 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 283
 func (HisDoctorAdviceInfo) TableName() string {

+ 2 - 0
models/pharmacy_models.go 查看文件

@@ -62,6 +62,7 @@ type PharmacyContent struct {
62 62
 	ExecutionState int64
63 63
 	Price          float64
64 64
 	DrugCode       string
65
+	ZeroFlag       string
65 66
 }
66 67
 
67 68
 // 发药明细列表
@@ -209,6 +210,7 @@ type HisDoctorAdviceInfoL struct {
209 210
 	People                int64   `gorm:"column:people" json:"people" form:"people"`
210 211
 	DispensingTime        int64   `gorm:"column:dispensing_time" json:"dispensing_time" form:"dispensing_time"`
211 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 216
 func (HisDoctorAdviceInfoL) TableName() string {

+ 8 - 0
service/pharmacy_service.go 查看文件

@@ -321,6 +321,7 @@ func GetPatientMedication(orgid, patient_id, stime, etime, is_medicine int64) (p
321 321
 				DrugId:       v.DrugId,
322 322
 				Price:        v.Price,
323 323
 				DrugCode:     v.DrugCode,
324
+				ZeroFlag:     config.ToString(v.ZeroFlag),
324 325
 			})
325 326
 		}
326 327
 
@@ -391,6 +392,7 @@ func GetPatientMedication(orgid, patient_id, stime, etime, is_medicine int64) (p
391 392
 				ExecutionTime:  v.ExecutionTime,
392 393
 				Price:          v.Price,
393 394
 				DrugCode:       v.DrugCode,
395
+				ZeroFlag:       config.ToString(v.ZeroFlag),
394 396
 			})
395 397
 		}
396 398
 
@@ -2466,6 +2468,12 @@ func ChangeAdivceDrugCode(id int64, drug_code string, user_org_id int64) (models
2466 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 2477
 func DispensingMedicineTwo(orgid, patient_id, advice_date, drug_id, creater int64) (err error) {
2470 2478
 
2471 2479
 	//开事务