瀏覽代碼

库存调拨修改

28169 2 年之前
父節點
當前提交
76111fdbdc

+ 20 - 7
controllers/dialysis_api_controller.go 查看文件

331
 	prescription_sodium := c.GetString("prescription_sodium")
331
 	prescription_sodium := c.GetString("prescription_sodium")
332
 	start_sodium := c.GetString("start_sodium")
332
 	start_sodium := c.GetString("start_sodium")
333
 	sodium_curve := c.GetString("sodium_curve")
333
 	sodium_curve := c.GetString("sodium_curve")
334
+	dialysis_fluid_flow := c.GetString("dialysis_fluid_flow")
335
+	sodium_bicarbonate_flow := c.GetString("sodium_bicarbonate_flow")
334
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentOrgId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
336
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentOrgId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
335
 	//template, _ := service.GetOrgInfoTemplate(adminUserInfo.CurrentOrgId)
337
 	//template, _ := service.GetOrgInfoTemplate(adminUserInfo.CurrentOrgId)
336
 
338
 
444
 		PrescriptionSodium:         prescription_sodium,
446
 		PrescriptionSodium:         prescription_sodium,
445
 		StartSodium:                start_sodium,
447
 		StartSodium:                start_sodium,
446
 		SodiumCurve:                sodium_curve,
448
 		SodiumCurve:                sodium_curve,
449
+		DialysisFluidFlow:          dialysis_fluid_flow,
450
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
447
 	}
451
 	}
448
 
452
 
449
 	//长沙南雅医院,自动生成抗凝剂的临时处方
453
 	//长沙南雅医院,自动生成抗凝剂的临时处方
669
 			advicePrescription, _ := service.GetAdvicesByPrescription(adminUserInfo.CurrentOrgId, patient, recordDate.Unix())
673
 			advicePrescription, _ := service.GetAdvicesByPrescription(adminUserInfo.CurrentOrgId, patient, recordDate.Unix())
670
 			if advicePrescription.ID > 0 {
674
 			if advicePrescription.ID > 0 {
671
 
675
 
672
-				service.UpdateDoctorAdvieById(advicePrescription.ID, prescribing_number)
676
+				service.UpdateDoctorAdvieByIdOne(advicePrescription.ID, prescribing_number, anticoagulant_zongliang)
673
 
677
 
674
 				key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patient, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":doctor_advices"
678
 				key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patient, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":doctor_advices"
675
 				redis := service.RedisClient()
679
 				redis := service.RedisClient()
829
 	prescription_sodium := c.GetString("prescription_sodium")
833
 	prescription_sodium := c.GetString("prescription_sodium")
830
 	start_sodium := c.GetString("start_sodium")
834
 	start_sodium := c.GetString("start_sodium")
831
 	sodium_curve := c.GetString("sodium_curve")
835
 	sodium_curve := c.GetString("sodium_curve")
836
+	dialysis_fluid_flow := c.GetString("dialysis_fluid_flow")
837
+	sodium_bicarbonate_flow := c.GetString("sodium_bicarbonate_flow")
832
 	var prescription_doctor int64
838
 	var prescription_doctor int64
833
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentAppId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
839
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentAppId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
834
 
840
 
962
 		PrescriptionSodium:         prescription_sodium,
968
 		PrescriptionSodium:         prescription_sodium,
963
 		SodiumCurve:                sodium_curve,
969
 		SodiumCurve:                sodium_curve,
964
 		TreatmentRemark:            treatment_remark,
970
 		TreatmentRemark:            treatment_remark,
971
+		DialysisFluidFlow:          dialysis_fluid_flow,
972
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
965
 	}
973
 	}
966
 
974
 
967
 	//查询最近透析准备表里是否存在 透析器 灌流器
975
 	//查询最近透析准备表里是否存在 透析器 灌流器
1138
 		PrescriptionSodium:         prescription_sodium,
1146
 		PrescriptionSodium:         prescription_sodium,
1139
 		SodiumCurve:                sodium_curve,
1147
 		SodiumCurve:                sodium_curve,
1140
 		TreatmentRemark:            treatment_remark,
1148
 		TreatmentRemark:            treatment_remark,
1149
+		DialysisFluidFlow:          dialysis_fluid_flow,
1150
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
1141
 	}
1151
 	}
1142
 
1152
 
1143
 	//针对河间咸得
1153
 	//针对河间咸得
5801
 
5811
 
5802
 	if len(schedule) > 0 {
5812
 	if len(schedule) > 0 {
5803
 		for _, its := range schedule {
5813
 		for _, its := range schedule {
5804
-			prescription, _ := service.GetPrescriptionList(its.PatientId, its.ScheduleDate, its.UserOrgId)
5805
-			its.DialysisPrescription = prescription
5806
-			monitor, _ := service.GetLastMonitorRecordList(its.PatientId, its.ScheduleDate, its.UserOrgId)
5807
-			its.MonitoringRecord = monitor
5808
-			after, _ := service.GetLastAfter(its.PatientId, its.ScheduleDate, its.UserOrgId)
5809
-			its.XtAssessmentAfterDislysis = after
5814
+			//prescription, _ := service.GetPrescriptionList(its.PatientId, its.ScheduleDate, its.UserOrgId)
5815
+			//its.DialysisPrescription = prescription
5816
+			//monitor, _ := service.GetLastMonitorRecordList(its.PatientId, its.ScheduleDate, its.UserOrgId)
5817
+			//its.MonitoringRecord = monitor
5818
+			//after, _ := service.GetLastAfter(its.PatientId, its.ScheduleDate, its.UserOrgId)
5819
+			//its.XtAssessmentAfterDislysis = after
5820
+
5821
+			order, _ := service.GetLastOrder(its.UserOrgId, its.PatientId, its.ScheduleDate)
5822
+			service.UpdateDoctorSix(order.StartTime, order.PatientId, order.DialysisDate, order.UserOrgId)
5810
 		}
5823
 		}
5811
 	}
5824
 	}
5812
 
5825
 

+ 3 - 0
controllers/dialysis_record_api_controller.go 查看文件

554
 	BloodMonitor                float64 `gorm:"column:blood_monitor" json:"blood_monitor" form:"blood_monitor"`
554
 	BloodMonitor                float64 `gorm:"column:blood_monitor" json:"blood_monitor" form:"blood_monitor"`
555
 	HeparinAmount               float64 `gorm:"column:heparin_amount" json:"heparin_amount" form:"heparin_amount"`
555
 	HeparinAmount               float64 `gorm:"column:heparin_amount" json:"heparin_amount" form:"heparin_amount"`
556
 	Dehydration                 float64 `gorm:"column:dehydration" json:"dehydration" form:"dehydration"`
556
 	Dehydration                 float64 `gorm:"column:dehydration" json:"dehydration" form:"dehydration"`
557
+	FilterPressure              string  `gorm:"column:filter_pressure" json:"filter_pressure" form:"filter_pressure"`
557
 }
558
 }
558
 
559
 
559
 // /api/dislysis/monitor/edit [post]
560
 // /api/dislysis/monitor/edit [post]
675
 			BloodMonitor:                monitorParam.BloodMonitor,
676
 			BloodMonitor:                monitorParam.BloodMonitor,
676
 			HeparinAmount:               monitorParam.HeparinAmount,
677
 			HeparinAmount:               monitorParam.HeparinAmount,
677
 			Dehydration:                 monitorParam.Dehydration,
678
 			Dehydration:                 monitorParam.Dehydration,
679
+			FilterPressure:              monitorParam.FilterPressure,
678
 		}
680
 		}
679
 		createErr := service.CreateMonitor(&monitor)
681
 		createErr := service.CreateMonitor(&monitor)
680
 		key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(scheduleDate, 10) + ":monitor_records"
682
 		key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(scheduleDate, 10) + ":monitor_records"
759
 		monitor.BloodMonitor = monitorParam.BloodMonitor
761
 		monitor.BloodMonitor = monitorParam.BloodMonitor
760
 		monitor.HeparinAmount = monitorParam.HeparinAmount
762
 		monitor.HeparinAmount = monitorParam.HeparinAmount
761
 		monitor.Dehydration = monitorParam.Dehydration
763
 		monitor.Dehydration = monitorParam.Dehydration
764
+		monitor.FilterPressure = monitorParam.FilterPressure
762
 		updateErr := service.UpdateMonitor(monitor)
765
 		updateErr := service.UpdateMonitor(monitor)
763
 		key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(scheduleDate, 10) + ":monitor_records"
766
 		key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(scheduleDate, 10) + ":monitor_records"
764
 		redis := service.RedisClient()
767
 		redis := service.RedisClient()

+ 35 - 28
controllers/mobile_api_controllers/dialysis_api_controller.go 查看文件

786
 		firstCheckDate = firstCheckDateUnix.Unix()
786
 		firstCheckDate = firstCheckDateUnix.Unix()
787
 	}
787
 	}
788
 
788
 
789
-	if adminUserInfo.Org.Id == 10340 {
790
-
791
-		list, _ := service.GetRoleList(adminUserInfo.Org.Id, modifier)
792
-		_, check := service.FindDoubleCheckByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
793
-		if check.ID == 0 {
794
-			if employee_number != list.JobNumber {
795
-				c.ServeSuccessJSON(map[string]interface{}{
796
-					"doubleCheck": check,
797
-					"msg":         "2",
798
-				})
799
-				return
800
-			}
801
-		}
802
-		if check.ID > 0 {
803
-			if employee_number != list.JobNumber {
804
-				c.ServeSuccessJSON(map[string]interface{}{
805
-					"doubleCheck": check,
806
-					"msg":         "2",
807
-				})
808
-				return
809
-			}
810
-		}
811
-
812
-	}
789
+	//if adminUserInfo.Org.Id == 10340 {
790
+	//
791
+	//	list, _ := service.GetRoleList(adminUserInfo.Org.Id, modifier)
792
+	//	_, check := service.FindDoubleCheckByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
793
+	//	if check.ID == 0 {
794
+	//		if employee_number != list.JobNumber {
795
+	//			c.ServeSuccessJSON(map[string]interface{}{
796
+	//				"doubleCheck": check,
797
+	//				"msg":         "2",
798
+	//			})
799
+	//			return
800
+	//		}
801
+	//	}
802
+	//	if check.ID > 0 {
803
+	//		if employee_number != list.JobNumber {
804
+	//			c.ServeSuccessJSON(map[string]interface{}{
805
+	//				"doubleCheck": check,
806
+	//				"msg":         "2",
807
+	//			})
808
+	//			return
809
+	//		}
810
+	//	}
811
+	//
812
+	//}
813
 
813
 
814
 	doubleCheck := models.DoubleCheck{
814
 	doubleCheck := models.DoubleCheck{
815
 		UserOrgId:                  adminUserInfo.Org.Id,
815
 		UserOrgId:                  adminUserInfo.Org.Id,
1462
 	start_sodium := c.GetString("start_sodium")
1462
 	start_sodium := c.GetString("start_sodium")
1463
 	sodium_curve := c.GetString("sodium_curve")
1463
 	sodium_curve := c.GetString("sodium_curve")
1464
 	treatment_remark := c.GetString("treatment_remark")
1464
 	treatment_remark := c.GetString("treatment_remark")
1465
-
1465
+	dialysis_fluid_flow := c.GetString("dialysis_fluid_flow")
1466
+	sodium_bicarbonate_flow := c.GetString("sodium_bicarbonate_flow")
1466
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
1467
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
1467
 
1468
 
1468
 	//template, _ := service.GetOrgInfoTemplate(adminUserInfo.Org.Id)
1469
 	//template, _ := service.GetOrgInfoTemplate(adminUserInfo.Org.Id)
1593
 		SodiumCurve:                sodium_curve,
1594
 		SodiumCurve:                sodium_curve,
1594
 		TreatmentRemark:            treatment_remark,
1595
 		TreatmentRemark:            treatment_remark,
1595
 		PrescriptionSodium:         prescription_sodium,
1596
 		PrescriptionSodium:         prescription_sodium,
1597
+		DialysisFluidFlow:          dialysis_fluid_flow,
1598
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
1596
 	}
1599
 	}
1597
 
1600
 
1598
 	//查询最近透析准备表里是否存在 透析器 灌流器
1601
 	//查询最近透析准备表里是否存在 透析器 灌流器
1894
 			advicePrescription, _ := service.GetAdvicesByPrescription(adminUserInfo.Org.Id, id, recordDate.Unix())
1897
 			advicePrescription, _ := service.GetAdvicesByPrescription(adminUserInfo.Org.Id, id, recordDate.Unix())
1895
 			if advicePrescription.ID > 0 {
1898
 			if advicePrescription.ID > 0 {
1896
 
1899
 
1897
-				service.UpdateDoctorAdvieById(advicePrescription.ID, prescribing_number)
1900
+				service.UpdateDoctorAdvieByIdOne(advicePrescription.ID, prescribing_number, anticoagulant_zongliang)
1898
 
1901
 
1899
 				key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":doctor_advices"
1902
 				key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":doctor_advices"
1900
 				redis := service.RedisClient()
1903
 				redis := service.RedisClient()
3009
 	dry_water_hour := c.GetString("dry_water_hour")
3012
 	dry_water_hour := c.GetString("dry_water_hour")
3010
 	water_machine := c.GetString("water_machine")
3013
 	water_machine := c.GetString("water_machine")
3011
 	dialysis_remark := c.GetString("dialysis_remark")
3014
 	dialysis_remark := c.GetString("dialysis_remark")
3015
+	dialysis_fluid_flow := c.GetString("dialysis_fluid_flow")
3016
+	sodium_bicarbonate_flow := c.GetString("sodium_bicarbonate_flow")
3012
 	if mode_id > 0 {
3017
 	if mode_id > 0 {
3013
 
3018
 
3014
 		var str string
3019
 		var str string
3137
 		StartSodium:                start_sodium,
3142
 		StartSodium:                start_sodium,
3138
 		SodiumCurve:                sodium_curve,
3143
 		SodiumCurve:                sodium_curve,
3139
 		TreatmentRemark:            treatment_remark,
3144
 		TreatmentRemark:            treatment_remark,
3145
+		DialysisFluidFlow:          dialysis_fluid_flow,
3146
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
3140
 	}
3147
 	}
3141
 
3148
 
3142
 	_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
3149
 	_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
3241
 		StartSodium:                start_sodium,
3248
 		StartSodium:                start_sodium,
3242
 		SodiumCurve:                sodium_curve,
3249
 		SodiumCurve:                sodium_curve,
3243
 		TreatmentRemark:            treatment_remark,
3250
 		TreatmentRemark:            treatment_remark,
3251
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
3252
+		DialysisFluidFlow:          dialysis_fluid_flow,
3244
 	}
3253
 	}
3245
 
3254
 
3246
 	//针对河间咸的
3255
 	//针对河间咸的
6350
 	for _, item := range beforePrepares {
6359
 	for _, item := range beforePrepares {
6351
 		storeConfig, _ := service.GetAllStoreHouseConfig(adminInfo.Org.Id)
6360
 		storeConfig, _ := service.GetAllStoreHouseConfig(adminInfo.Org.Id)
6352
 		warehouse, _ := service.FindFirstWarehousingInfoByStockTwo(item.GoodId, item.GoodTypeId, storeConfig.StorehouseOutInfo)
6361
 		warehouse, _ := service.FindFirstWarehousingInfoByStockTwo(item.GoodId, item.GoodTypeId, storeConfig.StorehouseOutInfo)
6353
-
6354
 		if item.Count > warehouse.Count {
6362
 		if item.Count > warehouse.Count {
6355
 			goodObj, _ := service.GetGoodInformationByGoodId(item.GoodId)
6363
 			goodObj, _ := service.GetGoodInformationByGoodId(item.GoodId)
6356
 			c.ServeSuccessJSON(map[string]interface{}{
6364
 			c.ServeSuccessJSON(map[string]interface{}{
6360
 			})
6368
 			})
6361
 			return
6369
 			return
6362
 		}
6370
 		}
6363
-
6364
 	}
6371
 	}
6365
 
6372
 
6366
 	//出库逻辑
6373
 	//出库逻辑

+ 4 - 1
controllers/mobile_api_controllers/dialysis_api_controller_extend.go 查看文件

105
 	blood_thickness, _ := this.GetFloat("blood_thickness")
105
 	blood_thickness, _ := this.GetFloat("blood_thickness")
106
 	blood_monitor, _ := this.GetFloat("blood_monitor")
106
 	blood_monitor, _ := this.GetFloat("blood_monitor")
107
 	dehydration, _ := this.GetFloat("dehydration")
107
 	dehydration, _ := this.GetFloat("dehydration")
108
+	filter_pressure := this.GetString("filter_pressure")
108
 	adminInfo := this.GetMobileAdminUserInfo()
109
 	adminInfo := this.GetMobileAdminUserInfo()
109
 	patient, getPatientErr := service.MobileGetPatientById(adminInfo.Org.Id, patientID)
110
 	patient, getPatientErr := service.MobileGetPatientById(adminInfo.Org.Id, patientID)
110
 	if getPatientErr != nil {
111
 	if getPatientErr != nil {
170
 		BloodMonitor:                blood_monitor,
171
 		BloodMonitor:                blood_monitor,
171
 		HeparinAmount:               heparin_amount,
172
 		HeparinAmount:               heparin_amount,
172
 		Dehydration:                 dehydration,
173
 		Dehydration:                 dehydration,
174
+		FilterPressure:              filter_pressure,
173
 	}
175
 	}
174
 
176
 
175
 	err := service.CreateMonitor(&record)
177
 	err := service.CreateMonitor(&record)
283
 	blood_monitor, _ := this.GetFloat("blood_monitor")
285
 	blood_monitor, _ := this.GetFloat("blood_monitor")
284
 	heparin_amount, _ := this.GetFloat("heparin_amount")
286
 	heparin_amount, _ := this.GetFloat("heparin_amount")
285
 	dehydration, _ := this.GetFloat("dehydration")
287
 	dehydration, _ := this.GetFloat("dehydration")
286
-	fmt.Println("id232323233232233223232332233223", id)
288
+	filter_pressure := this.GetString("filter_pressure")
287
 	monitor, err := service.GetMonitor(adminInfo.Org.Id, patientID, id)
289
 	monitor, err := service.GetMonitor(adminInfo.Org.Id, patientID, id)
288
 	if err != nil {
290
 	if err != nil {
289
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
291
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
342
 	monitor.BloodTemperature = blood_temperature
344
 	monitor.BloodTemperature = blood_temperature
343
 	monitor.HeparinAmount = heparin_amount
345
 	monitor.HeparinAmount = heparin_amount
344
 	monitor.Dehydration = dehydration
346
 	monitor.Dehydration = dehydration
347
+	monitor.FilterPressure = filter_pressure
345
 	err = service.UpdateMonitor(monitor)
348
 	err = service.UpdateMonitor(monitor)
346
 	key := strconv.FormatInt(adminInfo.Org.Id, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(date, 10) + ":monitor_records"
349
 	key := strconv.FormatInt(adminInfo.Org.Id, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(date, 10) + ":monitor_records"
347
 	redis := service.RedisClient()
350
 	redis := service.RedisClient()

+ 7 - 6
controllers/mobile_api_controllers/patient_api_controller.go 查看文件

1265
 	execution_time := c.GetString("execution_time")
1265
 	execution_time := c.GetString("execution_time")
1266
 	fmt.Println("execution_time", execution_time)
1266
 	fmt.Println("execution_time", execution_time)
1267
 	groupno, _ := c.GetInt64("groupno", -1)
1267
 	groupno, _ := c.GetInt64("groupno", -1)
1268
-
1268
+	//patient_id, _ := c.GetInt64("patient_id")
1269
+	advice_date, _ := c.GetInt64("advice_date")
1269
 	var ids []string
1270
 	var ids []string
1270
 	if groupno == 0 {
1271
 	if groupno == 0 {
1271
 		advice_ids := c.GetString("advice_id")
1272
 		advice_ids := c.GetString("advice_id")
1339
 		err = service.ModifyExceDoctorAdviceByGroupNo(&advices, groupno, adminUserInfo.Org.Id)
1340
 		err = service.ModifyExceDoctorAdviceByGroupNo(&advices, groupno, adminUserInfo.Org.Id)
1340
 		redis := service.RedisClient()
1341
 		redis := service.RedisClient()
1341
 		key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.PatientId, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":doctor_advices"
1342
 		key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.PatientId, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":doctor_advices"
1342
-		fmt.Println("keyThh322323232323232323223", key)
1343
+
1343
 		redis.Set(key, "", time.Second)
1344
 		redis.Set(key, "", time.Second)
1344
 		keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":advice_list_all"
1345
 		keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":advice_list_all"
1345
 		redis.Set(keyOne, "", time.Second)
1346
 		redis.Set(keyOne, "", time.Second)
1348
 
1349
 
1349
 	} else {
1350
 	} else {
1350
 		err = service.BatchModifyExceOldDoctorAdvice(&advices, ids)
1351
 		err = service.BatchModifyExceOldDoctorAdvice(&advices, ids)
1351
-		err = service.ModifyExceDoctorAdviceByGroupNo(&advices, groupno, adminUserInfo.Org.Id)
1352
+
1353
+		err = service.ModifyExceDoctorAdviceByGroupNoOne(&advices, ids)
1352
 		redis := service.RedisClient()
1354
 		redis := service.RedisClient()
1353
 		key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.PatientId, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":doctor_advices"
1355
 		key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.PatientId, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":doctor_advices"
1354
-		fmt.Println("keyTwohh322323232323232323223", key)
1356
+
1355
 		redis.Set(key, "", time.Second)
1357
 		redis.Set(key, "", time.Second)
1356
-		keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice.AdviceDate, 10) + ":advice_list_all"
1358
+		keyOne := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(advice_date, 10) + ":advice_list_all"
1357
 		redis.Set(keyOne, "", time.Second)
1359
 		redis.Set(keyOne, "", time.Second)
1358
 
1360
 
1359
 		defer redis.Close()
1361
 		defer redis.Close()
1367
 			ExecutionTime: theTime.Unix(),
1369
 			ExecutionTime: theTime.Unix(),
1368
 			UpdatedTime:   time.Now().Unix(),
1370
 			UpdatedTime:   time.Now().Unix(),
1369
 		}
1371
 		}
1370
-		fmt.Println("ids2323232232323", ids)
1371
 		var advicehis models.HisDoctorAdviceInfo
1372
 		var advicehis models.HisDoctorAdviceInfo
1372
 		service.ModifyExceDoctorAdviceById(&advicesinfo, ids)
1373
 		service.ModifyExceDoctorAdviceById(&advicesinfo, ids)
1373
 		his_advices, _ := service.FindHisDoctorAdviceByIdOne(adminUserInfo.Org.Id, ids)
1374
 		his_advices, _ := service.FindHisDoctorAdviceByIdOne(adminUserInfo.Org.Id, ids)

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

759
 	BloodMonitor                float64 `gorm:"column:blood_monitor" json:"blood_monitor" form:"blood_monitor"`
759
 	BloodMonitor                float64 `gorm:"column:blood_monitor" json:"blood_monitor" form:"blood_monitor"`
760
 	HeparinAmount               float64 `gorm:"column:heparin_amount" json:"heparin_amount" form:"heparin_amount"`
760
 	HeparinAmount               float64 `gorm:"column:heparin_amount" json:"heparin_amount" form:"heparin_amount"`
761
 	Dehydration                 float64 `gorm:"column:dehydration" json:"dehydration" form:"dehydration"`
761
 	Dehydration                 float64 `gorm:"column:dehydration" json:"dehydration" form:"dehydration"`
762
+	FilterPressure              string  `gorm:"column:filter_pressure" json:"filter_pressure" form:"filter_pressure"`
762
 }
763
 }
763
 
764
 
764
 func (MonitoringRecord) TableName() string {
765
 func (MonitoringRecord) TableName() string {
1101
 	StorehouseId      int64  `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
1102
 	StorehouseId      int64  `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
1102
 	PatientId         int64  `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
1103
 	PatientId         int64  `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
1103
 	OrderId           int64  `gorm:"column:order_id" json:"order_id" form:"order_id"`
1104
 	OrderId           int64  `gorm:"column:order_id" json:"order_id" form:"order_id"`
1105
+	NewCount          int64  `gorm:"column:new_count" json:"new_count" form:"new_count"`
1104
 }
1106
 }
1105
 
1107
 
1106
 type NewDialysisBeforePrepareGoods struct {
1108
 type NewDialysisBeforePrepareGoods struct {

+ 4 - 0
models/patient_models.go 查看文件

362
 	PrescriptionSodium         string        `gorm:"column:prescription_sodium" json:"prescription_sodium" form:"prescription_sodium"`
362
 	PrescriptionSodium         string        `gorm:"column:prescription_sodium" json:"prescription_sodium" form:"prescription_sodium"`
363
 	StartSodium                string        `gorm:"column:start_sodium" json:"start_sodium" form:"start_sodium"`
363
 	StartSodium                string        `gorm:"column:start_sodium" json:"start_sodium" form:"start_sodium"`
364
 	SodiumCurve                string        `gorm:"column:sodium_curve" json:"sodium_curve" form:"sodium_curve"`
364
 	SodiumCurve                string        `gorm:"column:sodium_curve" json:"sodium_curve" form:"sodium_curve"`
365
+	DialysisFluidFlow          string        `gorm:"column:dialysis_fluid_flow" json:"dialysis_fluid_flow" form:"dialysis_fluid_flow"`
366
+	SodiumBicarbonateFlow      string        `gorm:"column:sodium_bicarbonate_flow" json:"sodium_bicarbonate_flow" form:"sodium_bicarbonate_flow"`
365
 }
367
 }
366
 
368
 
367
 func (DialysisPrescription) TableName() string {
369
 func (DialysisPrescription) TableName() string {
574
 	PrescriptionSodium         string  `gorm:"column:prescription_sodium" json:"prescription_sodium" form:"prescription_sodium"`
576
 	PrescriptionSodium         string  `gorm:"column:prescription_sodium" json:"prescription_sodium" form:"prescription_sodium"`
575
 	StartSodium                string  `gorm:"column:start_sodium" json:"start_sodium" form:"start_sodium"`
577
 	StartSodium                string  `gorm:"column:start_sodium" json:"start_sodium" form:"start_sodium"`
576
 	SodiumCurve                string  `gorm:"column:sodium_curve" json:"sodium_curve" form:"sodium_curve"`
578
 	SodiumCurve                string  `gorm:"column:sodium_curve" json:"sodium_curve" form:"sodium_curve"`
579
+	DialysisFluidFlow          string  `gorm:"column:dialysis_fluid_flow" json:"dialysis_fluid_flow" form:"dialysis_fluid_flow"`
580
+	SodiumBicarbonateFlow      string  `gorm:"column:sodium_bicarbonate_flow" json:"sodium_bicarbonate_flow" form:"sodium_bicarbonate_flow"`
577
 }
581
 }
578
 
582
 
579
 func (DialysisSolution) TableName() string {
583
 func (DialysisSolution) TableName() string {

+ 21 - 1
service/dialysis_service.go 查看文件

1137
 	return err
1137
 	return err
1138
 }
1138
 }
1139
 
1139
 
1140
+func ModifyExceDoctorAdviceByGroupNoOne(m *models.DoctorAdvice, ids []string) (err error) {
1141
+	ut := writeDb.Begin()
1142
+	err = ut.Model(&models.DoctorAdvice{}).Where("id in(?) and status =1", ids).Updates(map[string]interface{}{"execution_time": m.ExecutionTime}).Error
1143
+	if err != nil {
1144
+		ut.Rollback()
1145
+		return
1146
+	}
1147
+	ut.Commit()
1148
+
1149
+	return err
1150
+
1151
+}
1152
+
1140
 func BatchModifyExceOldDoctorAdvice(m *models.DoctorAdvice, ids []string) (err error) {
1153
 func BatchModifyExceOldDoctorAdvice(m *models.DoctorAdvice, ids []string) (err error) {
1141
 
1154
 
1142
 	ut := writeDb.Begin()
1155
 	ut := writeDb.Begin()
2039
 	return twenty, err
2052
 	return twenty, err
2040
 }
2053
 }
2041
 
2054
 
2055
+func UpdateDoctorSix(start_time int64, patient_id int64, dialysis_date int64, user_org_id int64) (models.DoctorAdvice, error) {
2056
+
2057
+	advice := models.DoctorAdvice{}
2058
+	err := XTWriteDB().Model(&advice).Where("patient_id = ? and advice_date=? and user_org_id =? and status=1 and advice_name ='低分子肝素钠注射液'", patient_id, dialysis_date, user_org_id).Updates(map[string]interface{}{"execution_time": start_time}).Error
2059
+	return advice, err
2060
+}
2061
+
2042
 func GetTodayInforMation(orgid int64, record_date int64) (list []*NewDeviceInformation, err error) {
2062
 func GetTodayInforMation(orgid int64, record_date int64) (list []*NewDeviceInformation, err error) {
2043
 
2063
 
2044
 	err = UserReadDB().Where("user_org_id = ? and date = ? and status = 1", orgid, record_date).Find(&list).Error
2064
 	err = UserReadDB().Where("user_org_id = ? and date = ? and status = 1", orgid, record_date).Find(&list).Error
2054
 
2074
 
2055
 func GetDoctorAdviceCheckList(patient_id int64, advice_date int64, user_org_id int64) (doctor []*models.DoctorAdvice, err error) {
2075
 func GetDoctorAdviceCheckList(patient_id int64, advice_date int64, user_org_id int64) (doctor []*models.DoctorAdvice, err error) {
2056
 
2076
 
2057
-	err = XTReadDB().Where("patient_id = ? and advice_date = ? and user_org_id =? and status= 1 and check_state= 0", patient_id, advice_date, user_org_id).Find(&doctor).Error
2077
+	err = XTReadDB().Where("patient_id = ? and advice_date = ? and user_org_id =? and status= 1 and checker= 0", patient_id, advice_date, user_org_id).Find(&doctor).Error
2058
 	return doctor, err
2078
 	return doctor, err
2059
 }
2079
 }
2060
 
2080
 

+ 1 - 1
service/gobal_config_service.go 查看文件

1012
 
1012
 
1013
 func GetMobileScheduleList(orgid int64) (schedule []*models.MyVmBloodSchedule, err error) {
1013
 func GetMobileScheduleList(orgid int64) (schedule []*models.MyVmBloodSchedule, err error) {
1014
 
1014
 
1015
-	err = XTReadDB().Where("user_org_id = ? and status= 1 and schedule_date>=1667232000 and schedule_date<=1669737600", orgid).Preload("SchedualPatient", "user_org_id = ? and status = 1", orgid).Find(&schedule).Error
1015
+	err = XTReadDB().Where("user_org_id = ? and status= 1 and schedule_date=1676563200", orgid).Preload("SchedualPatient", "user_org_id = ? and status = 1", orgid).Find(&schedule).Error
1016
 	return schedule, err
1016
 	return schedule, err
1017
 }
1017
 }
1018
 
1018
 

+ 7 - 0
service/inspection_service.go 查看文件

46
 	return advice, err
46
 	return advice, err
47
 }
47
 }
48
 
48
 
49
+func UpdateDoctorAdvieByIdOne(id int64, prescription_number float64, single_dose float64) (models.DoctorAdvice, error) {
50
+
51
+	advice := models.DoctorAdvice{}
52
+	err := XTWriteDB().Model(&advice).Where("id=? and status= 1 ", id).Updates(map[string]interface{}{"prescribing_number": prescription_number, "single_dose": single_dose}).Error
53
+	return advice, err
54
+}
55
+
49
 func CreatePatientInspection(inspectins []models.Inspection) (err error) {
56
 func CreatePatientInspection(inspectins []models.Inspection) (err error) {
50
 	if len(inspectins) == 0 {
57
 	if len(inspectins) == 0 {
51
 		err = errors.New("Inspections Cant be nil.")
58
 		err = errors.New("Inspections Cant be nil.")

+ 2 - 0
service/print_data_service/schedule_dialysis/print_schedule_dialysis_models.go 查看文件

103
 	SchedualType   int64           `gorm:"column:schedual_type" json:"schedual_type"`
103
 	SchedualType   int64           `gorm:"column:schedual_type" json:"schedual_type"`
104
 	WashpipeNurse  int64           `gorm:"column:washpipe_nurse" json:"washpipe_nurse" form:"washpipe_nurse"`
104
 	WashpipeNurse  int64           `gorm:"column:washpipe_nurse" json:"washpipe_nurse" form:"washpipe_nurse"`
105
 	UserOrgId      int64           `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
105
 	UserOrgId      int64           `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
106
+	QualityNurseId int64           `gorm:"column:quality_nurse_id" json:"quality_nurse_id" form:"quality_nurse_id"`
106
 }
107
 }
107
 
108
 
108
 func (DialysisOrderVM) TableName() string {
109
 func (DialysisOrderVM) TableName() string {
554
 	BloodMonitor                float64 `gorm:"column:blood_monitor" json:"blood_monitor" form:"blood_monitor"`
555
 	BloodMonitor                float64 `gorm:"column:blood_monitor" json:"blood_monitor" form:"blood_monitor"`
555
 	BloodPressureMonitoringSite int64   `gorm:"column:blood_pressure_monitoring_site" json:"blood_pressure_monitoring_site" form:"blood_pressure_monitoring_site"`
556
 	BloodPressureMonitoringSite int64   `gorm:"column:blood_pressure_monitoring_site" json:"blood_pressure_monitoring_site" form:"blood_pressure_monitoring_site"`
556
 	UserOrgId                   int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
557
 	UserOrgId                   int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
558
+	FilterPressure              string  `gorm:"column:filter_pressure" json:"filter_pressure" form:"filter_pressure"`
557
 }
559
 }
558
 
560
 
559
 func (MonitoringRecordVM) TableName() string {
561
 func (MonitoringRecordVM) TableName() string {

+ 1 - 1
service/warhouse_service.go 查看文件

7445
 		}
7445
 		}
7446
 
7446
 
7447
 	}
7447
 	}
7448
-	fmt.Println("goods_yc2323323223323223232323232332wode", goods_yc)
7448
+
7449
 	if len(goods_yc) > 0 {
7449
 	if len(goods_yc) > 0 {
7450
 		for _, good_yc := range goods_yc {
7450
 		for _, good_yc := range goods_yc {
7451
 			out, _ := FindStockOutByIsSys(orgID, 1, record_time)
7451
 			out, _ := FindStockOutByIsSys(orgID, 1, record_time)