Sfoglia il codice sorgente

库存调拨修改

28169 2 anni fa
parent
commit
c372014fb1

+ 11 - 1
controllers/mobile_api_controllers/check_weight_api_controller.go Vedi File

269
 
269
 
270
 	template, _ := service.GetOrgInfoTemplate(adminUserInfo.Org.Id)
270
 	template, _ := service.GetOrgInfoTemplate(adminUserInfo.Org.Id)
271
 
271
 
272
-	if template.TemplateId == 22 || template.TemplateId == 17 || template.TemplateId == 21 || template.TemplateId == 26 || template.TemplateId == 27 || template.TemplateId == 34 || template.TemplateId == 30 || template.TemplateId == 32 || template.TemplateId == 36 || template.TemplateId == 40 || template.TemplateId == 38 || template.TemplateId == 43 || template.TemplateId == 46 || template.TemplateId == 53 || template.TemplateId == 48 || adminUserInfo.Org.Id == 10345 || adminUserInfo.Org.Id == 10432 || adminUserInfo.Org.Id == 10441 || adminUserInfo.Org.Id == 10445 || adminUserInfo.Org.Id == 10138 || adminUserInfo.Org.Id == 10278 {
272
+	if template.TemplateId == 22 || template.TemplateId == 17 || template.TemplateId == 21 || template.TemplateId == 26 || template.TemplateId == 27 || template.TemplateId == 34 || template.TemplateId == 30 || template.TemplateId == 32 || template.TemplateId == 36 || template.TemplateId == 40 || template.TemplateId == 38 || template.TemplateId == 43 || template.TemplateId == 46 || template.TemplateId == 53 || template.TemplateId == 48 || adminUserInfo.Org.Id == 10345 || adminUserInfo.Org.Id == 10432 || adminUserInfo.Org.Id == 10441 || adminUserInfo.Org.Id == 10445 || adminUserInfo.Org.Id == 10138 || adminUserInfo.Org.Id == 10278 || adminUserInfo.Org.Id == 9829 {
273
 		if adminUserInfo.Org.Id != 10447 {
273
 		if adminUserInfo.Org.Id != 10447 {
274
 			dewater_amount = dewater_amount * 1000
274
 			dewater_amount = dewater_amount * 1000
275
 		}
275
 		}
677
 				if adminUserInfo.Org.Id == 10445 {
677
 				if adminUserInfo.Org.Id == 10445 {
678
 					evaluation.VenousCatheterization = lastPredialysisEvaluation.VenousCatheterization
678
 					evaluation.VenousCatheterization = lastPredialysisEvaluation.VenousCatheterization
679
 				}
679
 				}
680
+
681
+				if adminUserInfo.Org.Id == 9829 {
682
+					evaluation.PulseFrequency = 80
683
+				}
680
 			}
684
 			}
681
 		} else {
685
 		} else {
682
 			evaluation.UpdatedTime = time.Now().Unix()
686
 			evaluation.UpdatedTime = time.Now().Unix()
751
 			afterevaluation.ActualDisplacement = prescribe.DisplaceLiquiValue
755
 			afterevaluation.ActualDisplacement = prescribe.DisplaceLiquiValue
752
 		}
756
 		}
753
 
757
 
758
+		//蓬安济民
759
+
760
+		if adminUserInfo.Org.Id == 9829 {
761
+			afterevaluation.PulseFrequency = 80
762
+		}
763
+
754
 		err := service.UpdateAssessmentAfterDislysisRecord(&afterevaluation)
764
 		err := service.UpdateAssessmentAfterDislysisRecord(&afterevaluation)
755
 		key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":assessment_after_dislysis"
765
 		key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":assessment_after_dislysis"
756
 		redis := service.RedisClient()
766
 		redis := service.RedisClient()

+ 24 - 3
service/device_service.go Vedi File

843
 	return item, err
843
 	return item, err
844
 }
844
 }
845
 
845
 
846
-//某模板下,某周几下,该床位是否有患者
846
+// 某模板下,某周几下,该床位是否有患者
847
 func GetScheduleTemplateOne(orgID int64, deviceNumberID int64, template_id int64, week_type int64, time_type int64) (models.PatientScheduleTemplateItem, error) {
847
 func GetScheduleTemplateOne(orgID int64, deviceNumberID int64, template_id int64, week_type int64, time_type int64) (models.PatientScheduleTemplateItem, error) {
848
 	var item models.PatientScheduleTemplateItem
848
 	var item models.PatientScheduleTemplateItem
849
 	err := readDb.Model(&models.PatientScheduleTemplateItem{}).Where("device_number_id = ? AND org_id = ? AND status = 1 AND template_id = ? AND weekday = ? AND time_type = ?", deviceNumberID, orgID, template_id, week_type, time_type).First(&item).Error
849
 	err := readDb.Model(&models.PatientScheduleTemplateItem{}).Where("device_number_id = ? AND org_id = ? AND status = 1 AND template_id = ? AND weekday = ? AND time_type = ?", deviceNumberID, orgID, template_id, week_type, time_type).First(&item).Error
850
 	return item, err
850
 	return item, err
851
 }
851
 }
852
 
852
 
853
-//某模板下,某周几下,是否有排班
853
+// 某模板下,某周几下,是否有排班
854
 func GetScheduleTemplateTwo(orgID int64, template_id int64, week_type int64, patient_id int64) (models.PatientScheduleTemplateItem, error) {
854
 func GetScheduleTemplateTwo(orgID int64, template_id int64, week_type int64, patient_id int64) (models.PatientScheduleTemplateItem, error) {
855
 	var item models.PatientScheduleTemplateItem
855
 	var item models.PatientScheduleTemplateItem
856
 	err := readDb.Model(&models.PatientScheduleTemplateItem{}).Where("patient_id = ? AND org_id = ? AND status = 1 AND template_id = ? AND weekday = ?", patient_id, orgID, template_id, week_type).First(&item).Error
856
 	err := readDb.Model(&models.PatientScheduleTemplateItem{}).Where("patient_id = ? AND org_id = ? AND status = 1 AND template_id = ? AND weekday = ?", patient_id, orgID, template_id, week_type).First(&item).Error
857
 	return item, err
857
 	return item, err
858
 }
858
 }
859
 
859
 
860
-//某模板下,某周几下,该床位是否有患者(不包括当前排班的人)
860
+// 某模板下,某周几下,该床位是否有患者(不包括当前排班的人)
861
+func GetScheduleTemplateThree(orgID int64, deviceNumberID int64, template_id int64, week_type int64, time_type int64, patient_id int64) (models.PatientScheduleTemplateItem, error) {
862
+	var item models.PatientScheduleTemplateItem
863
+	err := readDb.Model(&models.PatientScheduleTemplateItem{}).Where("device_number_id = ? AND org_id = ? AND status = 1 AND template_id = ? AND weekday = ? AND time_type = ? AND patient_id <> ?", deviceNumberID, orgID, template_id, week_type, time_type, patient_id).First(&item).Error
864
+	return item, err
865
+}
866
+
867
+// 某模板下,某周几下,该床位是否有患者(不包括当前排班的人)
868
+func GetScheduleTemplateThree(orgID int64, deviceNumberID int64, template_id int64, week_type int64, time_type int64, patient_id int64) (models.PatientScheduleTemplateItem, error) {
869
+	var item models.PatientScheduleTemplateItem
870
+	err := readDb.Model(&models.PatientScheduleTemplateItem{}).Where("device_number_id = ? AND org_id = ? AND status = 1 AND template_id = ? AND weekday = ? AND time_type = ? AND patient_id <> ?", deviceNumberID, orgID, template_id, week_type, time_type, patient_id).First(&item).Error
871
+	return item, err
872
+}
873
+
874
+// 某模板下,某周几下,该床位是否有患者(不包括当前排班的人)
875
+func GetScheduleTemplateThree(orgID int64, deviceNumberID int64, template_id int64, week_type int64, time_type int64, patient_id int64) (models.PatientScheduleTemplateItem, error) {
876
+	var item models.PatientScheduleTemplateItem
877
+	err := readDb.Model(&models.PatientScheduleTemplateItem{}).Where("device_number_id = ? AND org_id = ? AND status = 1 AND template_id = ? AND weekday = ? AND time_type = ? AND patient_id <> ?", deviceNumberID, orgID, template_id, week_type, time_type, patient_id).First(&item).Error
878
+	return item, err
879
+}
880
+
881
+// 某模板下,某周几下,该床位是否有患者(不包括当前排班的人)
861
 func GetScheduleTemplateThree(orgID int64, deviceNumberID int64, template_id int64, week_type int64, time_type int64, patient_id int64) (models.PatientScheduleTemplateItem, error) {
882
 func GetScheduleTemplateThree(orgID int64, deviceNumberID int64, template_id int64, week_type int64, time_type int64, patient_id int64) (models.PatientScheduleTemplateItem, error) {
862
 	var item models.PatientScheduleTemplateItem
883
 	var item models.PatientScheduleTemplateItem
863
 	err := readDb.Model(&models.PatientScheduleTemplateItem{}).Where("device_number_id = ? AND org_id = ? AND status = 1 AND template_id = ? AND weekday = ? AND time_type = ? AND patient_id <> ?", deviceNumberID, orgID, template_id, week_type, time_type, patient_id).First(&item).Error
884
 	err := readDb.Model(&models.PatientScheduleTemplateItem{}).Where("device_number_id = ? AND org_id = ? AND status = 1 AND template_id = ? AND weekday = ? AND time_type = ? AND patient_id <> ?", deviceNumberID, orgID, template_id, week_type, time_type, patient_id).First(&item).Error