Browse Source

库存调拨修改

28169 2 years ago
parent
commit
76111fdbdc

+ 20 - 7
controllers/dialysis_api_controller.go View File

@@ -331,6 +331,8 @@ func (c *DialysisApiController) PostPrescription() {
331 331
 	prescription_sodium := c.GetString("prescription_sodium")
332 332
 	start_sodium := c.GetString("start_sodium")
333 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 336
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentOrgId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
335 337
 	//template, _ := service.GetOrgInfoTemplate(adminUserInfo.CurrentOrgId)
336 338
 
@@ -444,6 +446,8 @@ func (c *DialysisApiController) PostPrescription() {
444 446
 		PrescriptionSodium:         prescription_sodium,
445 447
 		StartSodium:                start_sodium,
446 448
 		SodiumCurve:                sodium_curve,
449
+		DialysisFluidFlow:          dialysis_fluid_flow,
450
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
447 451
 	}
448 452
 
449 453
 	//长沙南雅医院,自动生成抗凝剂的临时处方
@@ -669,7 +673,7 @@ func (c *DialysisApiController) PostPrescription() {
669 673
 			advicePrescription, _ := service.GetAdvicesByPrescription(adminUserInfo.CurrentOrgId, patient, recordDate.Unix())
670 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 678
 				key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patient, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":doctor_advices"
675 679
 				redis := service.RedisClient()
@@ -829,6 +833,8 @@ func (c *DialysisApiController) PostSoulution() {
829 833
 	prescription_sodium := c.GetString("prescription_sodium")
830 834
 	start_sodium := c.GetString("start_sodium")
831 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 838
 	var prescription_doctor int64
833 839
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.CurrentAppId, adminUserInfo.AdminUser.Id, adminUserInfo.CurrentAppId)
834 840
 
@@ -962,6 +968,8 @@ func (c *DialysisApiController) PostSoulution() {
962 968
 		PrescriptionSodium:         prescription_sodium,
963 969
 		SodiumCurve:                sodium_curve,
964 970
 		TreatmentRemark:            treatment_remark,
971
+		DialysisFluidFlow:          dialysis_fluid_flow,
972
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
965 973
 	}
966 974
 
967 975
 	//查询最近透析准备表里是否存在 透析器 灌流器
@@ -1138,6 +1146,8 @@ func (c *DialysisApiController) PostSoulution() {
1138 1146
 		PrescriptionSodium:         prescription_sodium,
1139 1147
 		SodiumCurve:                sodium_curve,
1140 1148
 		TreatmentRemark:            treatment_remark,
1149
+		DialysisFluidFlow:          dialysis_fluid_flow,
1150
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
1141 1151
 	}
1142 1152
 
1143 1153
 	//针对河间咸得
@@ -5801,12 +5811,15 @@ func (this *DialysisApiController) GetMobileScheduleList() {
5801 5811
 
5802 5812
 	if len(schedule) > 0 {
5803 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 View File

@@ -554,6 +554,7 @@ type EditMonitorParamObject struct {
554 554
 	BloodMonitor                float64 `gorm:"column:blood_monitor" json:"blood_monitor" form:"blood_monitor"`
555 555
 	HeparinAmount               float64 `gorm:"column:heparin_amount" json:"heparin_amount" form:"heparin_amount"`
556 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 560
 // /api/dislysis/monitor/edit [post]
@@ -675,6 +676,7 @@ func (this *DialysisRecordAPIController) EditMonitor() {
675 676
 			BloodMonitor:                monitorParam.BloodMonitor,
676 677
 			HeparinAmount:               monitorParam.HeparinAmount,
677 678
 			Dehydration:                 monitorParam.Dehydration,
679
+			FilterPressure:              monitorParam.FilterPressure,
678 680
 		}
679 681
 		createErr := service.CreateMonitor(&monitor)
680 682
 		key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(scheduleDate, 10) + ":monitor_records"
@@ -759,6 +761,7 @@ func (this *DialysisRecordAPIController) EditMonitor() {
759 761
 		monitor.BloodMonitor = monitorParam.BloodMonitor
760 762
 		monitor.HeparinAmount = monitorParam.HeparinAmount
761 763
 		monitor.Dehydration = monitorParam.Dehydration
764
+		monitor.FilterPressure = monitorParam.FilterPressure
762 765
 		updateErr := service.UpdateMonitor(monitor)
763 766
 		key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(scheduleDate, 10) + ":monitor_records"
764 767
 		redis := service.RedisClient()

+ 35 - 28
controllers/mobile_api_controllers/dialysis_api_controller.go View File

@@ -786,30 +786,30 @@ func (c *DialysisAPIController) PostDoubleCheck() {
786 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 814
 	doubleCheck := models.DoubleCheck{
815 815
 		UserOrgId:                  adminUserInfo.Org.Id,
@@ -1462,7 +1462,8 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
1462 1462
 	start_sodium := c.GetString("start_sodium")
1463 1463
 	sodium_curve := c.GetString("sodium_curve")
1464 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 1467
 	appRole, _ := service.FindAdminRoleTypeById(adminUserInfo.Org.Id, adminUserInfo.AdminUser.Id, adminUserInfo.App.Id)
1467 1468
 
1468 1469
 	//template, _ := service.GetOrgInfoTemplate(adminUserInfo.Org.Id)
@@ -1593,6 +1594,8 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
1593 1594
 		SodiumCurve:                sodium_curve,
1594 1595
 		TreatmentRemark:            treatment_remark,
1595 1596
 		PrescriptionSodium:         prescription_sodium,
1597
+		DialysisFluidFlow:          dialysis_fluid_flow,
1598
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
1596 1599
 	}
1597 1600
 
1598 1601
 	//查询最近透析准备表里是否存在 透析器 灌流器
@@ -1894,7 +1897,7 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
1894 1897
 			advicePrescription, _ := service.GetAdvicesByPrescription(adminUserInfo.Org.Id, id, recordDate.Unix())
1895 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 1902
 				key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":doctor_advices"
1900 1903
 				redis := service.RedisClient()
@@ -3009,6 +3012,8 @@ func (c *DialysisAPIController) PostSolution() {
3009 3012
 	dry_water_hour := c.GetString("dry_water_hour")
3010 3013
 	water_machine := c.GetString("water_machine")
3011 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 3017
 	if mode_id > 0 {
3013 3018
 
3014 3019
 		var str string
@@ -3137,6 +3142,8 @@ func (c *DialysisAPIController) PostSolution() {
3137 3142
 		StartSodium:                start_sodium,
3138 3143
 		SodiumCurve:                sodium_curve,
3139 3144
 		TreatmentRemark:            treatment_remark,
3145
+		DialysisFluidFlow:          dialysis_fluid_flow,
3146
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
3140 3147
 	}
3141 3148
 
3142 3149
 	_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, recordDate.Unix(), adminUserInfo.Org.Id)
@@ -3241,6 +3248,8 @@ func (c *DialysisAPIController) PostSolution() {
3241 3248
 		StartSodium:                start_sodium,
3242 3249
 		SodiumCurve:                sodium_curve,
3243 3250
 		TreatmentRemark:            treatment_remark,
3251
+		SodiumBicarbonateFlow:      sodium_bicarbonate_flow,
3252
+		DialysisFluidFlow:          dialysis_fluid_flow,
3244 3253
 	}
3245 3254
 
3246 3255
 	//针对河间咸的
@@ -6350,7 +6359,6 @@ func (c *DialysisAPIController) CreateOtherStockOutInfo() {
6350 6359
 	for _, item := range beforePrepares {
6351 6360
 		storeConfig, _ := service.GetAllStoreHouseConfig(adminInfo.Org.Id)
6352 6361
 		warehouse, _ := service.FindFirstWarehousingInfoByStockTwo(item.GoodId, item.GoodTypeId, storeConfig.StorehouseOutInfo)
6353
-
6354 6362
 		if item.Count > warehouse.Count {
6355 6363
 			goodObj, _ := service.GetGoodInformationByGoodId(item.GoodId)
6356 6364
 			c.ServeSuccessJSON(map[string]interface{}{
@@ -6360,7 +6368,6 @@ func (c *DialysisAPIController) CreateOtherStockOutInfo() {
6360 6368
 			})
6361 6369
 			return
6362 6370
 		}
6363
-
6364 6371
 	}
6365 6372
 
6366 6373
 	//出库逻辑

+ 4 - 1
controllers/mobile_api_controllers/dialysis_api_controller_extend.go View File

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

+ 7 - 6
controllers/mobile_api_controllers/patient_api_controller.go View File

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

+ 2 - 0
models/dialysis.go View File

@@ -759,6 +759,7 @@ type MonitoringRecord struct {
759 759
 	BloodMonitor                float64 `gorm:"column:blood_monitor" json:"blood_monitor" form:"blood_monitor"`
760 760
 	HeparinAmount               float64 `gorm:"column:heparin_amount" json:"heparin_amount" form:"heparin_amount"`
761 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 765
 func (MonitoringRecord) TableName() string {
@@ -1101,6 +1102,7 @@ type DialysisBeforePrepareGoods struct {
1101 1102
 	StorehouseId      int64  `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
1102 1103
 	PatientId         int64  `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
1103 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 1108
 type NewDialysisBeforePrepareGoods struct {

+ 4 - 0
models/patient_models.go View File

@@ -362,6 +362,8 @@ type DialysisPrescription struct {
362 362
 	PrescriptionSodium         string        `gorm:"column:prescription_sodium" json:"prescription_sodium" form:"prescription_sodium"`
363 363
 	StartSodium                string        `gorm:"column:start_sodium" json:"start_sodium" form:"start_sodium"`
364 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 369
 func (DialysisPrescription) TableName() string {
@@ -574,6 +576,8 @@ type DialysisSolution struct {
574 576
 	PrescriptionSodium         string  `gorm:"column:prescription_sodium" json:"prescription_sodium" form:"prescription_sodium"`
575 577
 	StartSodium                string  `gorm:"column:start_sodium" json:"start_sodium" form:"start_sodium"`
576 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 583
 func (DialysisSolution) TableName() string {

+ 21 - 1
service/dialysis_service.go View File

@@ -1137,6 +1137,19 @@ func ModifyExceDoctorAdviceByGroupNo(m *models.DoctorAdvice, groupNo int64, org_
1137 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 1153
 func BatchModifyExceOldDoctorAdvice(m *models.DoctorAdvice, ids []string) (err error) {
1141 1154
 
1142 1155
 	ut := writeDb.Begin()
@@ -2039,6 +2052,13 @@ func GetLastOrder(user_org_id int64, patient_id int64, dialysis_date int64) (mod
2039 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 2062
 func GetTodayInforMation(orgid int64, record_date int64) (list []*NewDeviceInformation, err error) {
2043 2063
 
2044 2064
 	err = UserReadDB().Where("user_org_id = ? and date = ? and status = 1", orgid, record_date).Find(&list).Error
@@ -2054,7 +2074,7 @@ func GetFiledConfig(orgid int64) (models.FiledConfig, error) {
2054 2074
 
2055 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 2078
 	return doctor, err
2059 2079
 }
2060 2080
 

+ 1 - 1
service/gobal_config_service.go View File

@@ -1012,7 +1012,7 @@ func GetAllBaseDrugListTwenty(orgid int64) (drug []*models.BaseDrugLibTwenty, er
1012 1012
 
1013 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 1016
 	return schedule, err
1017 1017
 }
1018 1018
 

+ 7 - 0
service/inspection_service.go View File

@@ -46,6 +46,13 @@ func UpdateDoctorAdvieById(id int64, prescription_number float64) (models.Doctor
46 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 56
 func CreatePatientInspection(inspectins []models.Inspection) (err error) {
50 57
 	if len(inspectins) == 0 {
51 58
 		err = errors.New("Inspections Cant be nil.")

+ 2 - 0
service/print_data_service/schedule_dialysis/print_schedule_dialysis_models.go View File

@@ -103,6 +103,7 @@ type DialysisOrderVM struct {
103 103
 	SchedualType   int64           `gorm:"column:schedual_type" json:"schedual_type"`
104 104
 	WashpipeNurse  int64           `gorm:"column:washpipe_nurse" json:"washpipe_nurse" form:"washpipe_nurse"`
105 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 109
 func (DialysisOrderVM) TableName() string {
@@ -554,6 +555,7 @@ type MonitoringRecordVM struct {
554 555
 	BloodMonitor                float64 `gorm:"column:blood_monitor" json:"blood_monitor" form:"blood_monitor"`
555 556
 	BloodPressureMonitoringSite int64   `gorm:"column:blood_pressure_monitoring_site" json:"blood_pressure_monitoring_site" form:"blood_pressure_monitoring_site"`
556 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 561
 func (MonitoringRecordVM) TableName() string {

+ 1 - 1
service/warhouse_service.go View File

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