瀏覽代碼

提交代码

陈少旭 9 月之前
父節點
當前提交
844d0dbbe2
共有 1 個文件被更改,包括 40 次插入6 次删除
  1. 40 6
      controllers/his_api_controller.go

+ 40 - 6
controllers/his_api_controller.go 查看文件

@@ -72,7 +72,6 @@ func HisManagerApiRegistRouters() {
72 72
 	beego.Router("/api/incomestatistics/get", &HisApiController{}, "get:GetIncomeStatisticsData")
73 73
 
74 74
 	beego.Router("/api/postprojectinformation", &HisApiController{}, "post:PostProjectInformation")
75
-	//beego.Router("/api/editprojectinformation", &HisApiController{}, "post:EditProjectInformation")
76 75
 	beego.Router("/api/hisprescriptiontemplate/create", &HisApiController{}, "post:CreateHisPrescriptionTemplate")
77 76
 	beego.Router("/api/privateexpenses/get", &HisApiController{}, "get:GetPrivateExpensesInfo")
78 77
 	beego.Router("/api/changemedtype/post", &HisApiController{}, "post:ChangeMedType")
@@ -101,14 +100,10 @@ func HisManagerApiRegistRouters() {
101 100
 	beego.Router("/api/batch/settleaccount", &HisApiController{}, "get:GetBatchSettleAccounts")
102 101
 
103 102
 	beego.Router("/api/monthhispatient", &HisApiController{}, "get:GetMonthHisPatient")
104
-
105 103
 	beego.Router("/api/changeorderdesc", &HisApiController{}, "get:ChangeOrderDesc")
106
-
107 104
 	beego.Router("/api/getfapiaonumber", &HisApiController{}, "get:GetFaPiaoNumber")
108
-
109 105
 	beego.Router("/api/associationprescription", &HisApiController{}, "get:AssociationHisPrescription")
110 106
 	beego.Router("/api/checkhispatient", &HisApiController{}, "get:CheckHisPatient")
111
-
112 107
 	beego.Router("/api/hisorder/listtwo", &HisApiController{}, "get:GetHisOrderListTwo")
113 108
 
114 109
 }
@@ -10251,6 +10246,46 @@ func (this *HisApiController) GetLastOrNextHisPrescription() {
10251 10246
 	record_time := theAdviceRecordTime.Unix()
10252 10247
 	adminUserInfo := this.GetAdminUserInfo()
10253 10248
 	prescriptions, err := service.GetHisPrescriptionByType(change_type, record_time, adminUserInfo.CurrentOrgId, patient_id, p_type)
10249
+
10250
+	if adminUserInfo.CurrentOrgId == 10265 {
10251
+		_, config := service.FindHisStockPriceRecordByOrgId(adminUserInfo.CurrentOrgId)
10252
+		if config.ID > 0 && config.IsOpen == 1 {
10253
+			for _, subitems := range prescriptions {
10254
+				for _, item := range subitems.VMHisPrescription {
10255
+					for _, subItem := range item.HisDoctorAdviceInfo {
10256
+						drug, _ := service.GetDrugByGoodId(subItem.DrugId)
10257
+						info, _ := service.GetWarehoseInfoByDrugId(subItem.DrugId, adminUserInfo.CurrentOrgId)
10258
+						if info.RetailPrice > 0 {
10259
+							if subItem.PrescribingNumberUnit == drug.MaxUnit && drug.MaxUnit != drug.MinUnit {
10260
+								subItem.Drug.RetailPrice = drug.RetailPrice
10261
+							}
10262
+							if subItem.PrescribingNumberUnit == drug.MinUnit {
10263
+								subItem.Drug.MinPrice = info.RetailPrice
10264
+								subItem.Drug.RetailPrice = info.RetailPrice
10265
+							}
10266
+
10267
+						}
10268
+					}
10269
+				}
10270
+			}
10271
+		}
10272
+
10273
+		if config.ID > 0 && config.IsOpen == 1 {
10274
+			for _, subitems := range prescriptions {
10275
+				for _, item := range subitems.VMHisPrescription {
10276
+					for _, subItem := range item.HisPrescriptionProject {
10277
+						if subItem.Type == 3 {
10278
+							info, _ := service.GetGoodWarehoseInfoByGoodId(subItem.ProjectId, adminUserInfo.CurrentOrgId)
10279
+							if info.Price > 0 {
10280
+								subItem.GoodInfo.PackingPrice = info.Price
10281
+							}
10282
+						}
10283
+					}
10284
+				}
10285
+			}
10286
+		}
10287
+	}
10288
+
10254 10289
 	if err == nil {
10255 10290
 		if len(prescriptions) == 0 {
10256 10291
 			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDoctorAdviceEmpty)
@@ -10307,7 +10342,6 @@ func (this *HisApiController) GetCallHisPrescription() {
10307 10342
 				}
10308 10343
 			}
10309 10344
 		}
10310
-
10311 10345
 		if config.ID > 0 && config.IsOpen == 1 {
10312 10346
 			for _, subitems := range prescriptions {
10313 10347
 				for _, item := range subitems.VMHisPrescription {