ソースを参照

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

28169 9 ヶ月 前
コミット
724fae8d1e
共有1 個のファイルを変更した40 個の追加6 個の削除を含む
  1. 40 6
      controllers/his_api_controller.go

+ 40 - 6
controllers/his_api_controller.go ファイルの表示

72
 	beego.Router("/api/incomestatistics/get", &HisApiController{}, "get:GetIncomeStatisticsData")
72
 	beego.Router("/api/incomestatistics/get", &HisApiController{}, "get:GetIncomeStatisticsData")
73
 
73
 
74
 	beego.Router("/api/postprojectinformation", &HisApiController{}, "post:PostProjectInformation")
74
 	beego.Router("/api/postprojectinformation", &HisApiController{}, "post:PostProjectInformation")
75
-	//beego.Router("/api/editprojectinformation", &HisApiController{}, "post:EditProjectInformation")
76
 	beego.Router("/api/hisprescriptiontemplate/create", &HisApiController{}, "post:CreateHisPrescriptionTemplate")
75
 	beego.Router("/api/hisprescriptiontemplate/create", &HisApiController{}, "post:CreateHisPrescriptionTemplate")
77
 	beego.Router("/api/privateexpenses/get", &HisApiController{}, "get:GetPrivateExpensesInfo")
76
 	beego.Router("/api/privateexpenses/get", &HisApiController{}, "get:GetPrivateExpensesInfo")
78
 	beego.Router("/api/changemedtype/post", &HisApiController{}, "post:ChangeMedType")
77
 	beego.Router("/api/changemedtype/post", &HisApiController{}, "post:ChangeMedType")
101
 	beego.Router("/api/batch/settleaccount", &HisApiController{}, "get:GetBatchSettleAccounts")
100
 	beego.Router("/api/batch/settleaccount", &HisApiController{}, "get:GetBatchSettleAccounts")
102
 
101
 
103
 	beego.Router("/api/monthhispatient", &HisApiController{}, "get:GetMonthHisPatient")
102
 	beego.Router("/api/monthhispatient", &HisApiController{}, "get:GetMonthHisPatient")
104
-
105
 	beego.Router("/api/changeorderdesc", &HisApiController{}, "get:ChangeOrderDesc")
103
 	beego.Router("/api/changeorderdesc", &HisApiController{}, "get:ChangeOrderDesc")
106
-
107
 	beego.Router("/api/getfapiaonumber", &HisApiController{}, "get:GetFaPiaoNumber")
104
 	beego.Router("/api/getfapiaonumber", &HisApiController{}, "get:GetFaPiaoNumber")
108
-
109
 	beego.Router("/api/associationprescription", &HisApiController{}, "get:AssociationHisPrescription")
105
 	beego.Router("/api/associationprescription", &HisApiController{}, "get:AssociationHisPrescription")
110
 	beego.Router("/api/checkhispatient", &HisApiController{}, "get:CheckHisPatient")
106
 	beego.Router("/api/checkhispatient", &HisApiController{}, "get:CheckHisPatient")
111
-
112
 	beego.Router("/api/hisorder/listtwo", &HisApiController{}, "get:GetHisOrderListTwo")
107
 	beego.Router("/api/hisorder/listtwo", &HisApiController{}, "get:GetHisOrderListTwo")
113
 
108
 
114
 }
109
 }
10284
 	record_time := theAdviceRecordTime.Unix()
10279
 	record_time := theAdviceRecordTime.Unix()
10285
 	adminUserInfo := this.GetAdminUserInfo()
10280
 	adminUserInfo := this.GetAdminUserInfo()
10286
 	prescriptions, err := service.GetHisPrescriptionByType(change_type, record_time, adminUserInfo.CurrentOrgId, patient_id, p_type)
10281
 	prescriptions, err := service.GetHisPrescriptionByType(change_type, record_time, adminUserInfo.CurrentOrgId, patient_id, p_type)
10282
+
10283
+	if adminUserInfo.CurrentOrgId == 10265 {
10284
+		_, config := service.FindHisStockPriceRecordByOrgId(adminUserInfo.CurrentOrgId)
10285
+		if config.ID > 0 && config.IsOpen == 1 {
10286
+			for _, subitems := range prescriptions {
10287
+				for _, item := range subitems.VMHisPrescription {
10288
+					for _, subItem := range item.HisDoctorAdviceInfo {
10289
+						drug, _ := service.GetDrugByGoodId(subItem.DrugId)
10290
+						info, _ := service.GetWarehoseInfoByDrugId(subItem.DrugId, adminUserInfo.CurrentOrgId)
10291
+						if info.RetailPrice > 0 {
10292
+							if subItem.PrescribingNumberUnit == drug.MaxUnit && drug.MaxUnit != drug.MinUnit {
10293
+								subItem.Drug.RetailPrice = drug.RetailPrice
10294
+							}
10295
+							if subItem.PrescribingNumberUnit == drug.MinUnit {
10296
+								subItem.Drug.MinPrice = info.RetailPrice
10297
+								subItem.Drug.RetailPrice = info.RetailPrice
10298
+							}
10299
+
10300
+						}
10301
+					}
10302
+				}
10303
+			}
10304
+		}
10305
+
10306
+		if config.ID > 0 && config.IsOpen == 1 {
10307
+			for _, subitems := range prescriptions {
10308
+				for _, item := range subitems.VMHisPrescription {
10309
+					for _, subItem := range item.HisPrescriptionProject {
10310
+						if subItem.Type == 3 {
10311
+							info, _ := service.GetGoodWarehoseInfoByGoodId(subItem.ProjectId, adminUserInfo.CurrentOrgId)
10312
+							if info.Price > 0 {
10313
+								subItem.GoodInfo.PackingPrice = info.Price
10314
+							}
10315
+						}
10316
+					}
10317
+				}
10318
+			}
10319
+		}
10320
+	}
10321
+
10287
 	if err == nil {
10322
 	if err == nil {
10288
 		if len(prescriptions) == 0 {
10323
 		if len(prescriptions) == 0 {
10289
 			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDoctorAdviceEmpty)
10324
 			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDoctorAdviceEmpty)
10340
 				}
10375
 				}
10341
 			}
10376
 			}
10342
 		}
10377
 		}
10343
-
10344
 		if config.ID > 0 && config.IsOpen == 1 {
10378
 		if config.ID > 0 && config.IsOpen == 1 {
10345
 			for _, subitems := range prescriptions {
10379
 			for _, subitems := range prescriptions {
10346
 				for _, item := range subitems.VMHisPrescription {
10380
 				for _, item := range subitems.VMHisPrescription {