Browse Source

2024/6/17

28169 1 month ago
parent
commit
86a01060e2

BIN
XT_New.exe View File


+ 4 - 4
controllers/base_api_controller.go View File

@@ -83,7 +83,7 @@ func (this *BaseAuthAPIController) Prepare() {
83 83
 		userAdmin.ModifyTime = 1530786071
84 84
 		var subscibe models.ServeSubscibe
85 85
 		subscibe.ID = 11
86
-		subscibe.OrgId = 10735 //机构id
86
+		subscibe.OrgId = 10164 //机构id
87 87
 		subscibe.PeriodStart = 1547447814
88 88
 		subscibe.PeriodEnd = 1550039814
89 89
 		subscibe.State = 1
@@ -93,7 +93,7 @@ func (this *BaseAuthAPIController) Prepare() {
93 93
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
94 94
 		subscibes[4] = &subscibe
95 95
 		var adminUserInfo service.AdminUserInfo
96
-		adminUserInfo.CurrentOrgId = 10735 //机构id小英9675或4
96
+		adminUserInfo.CurrentOrgId = 10164 //机构id小英9675或4
97 97
 		adminUserInfo.CurrentAppId = 12123 //4
98 98
 		adminUserInfo.AdminUser = &userAdmin
99 99
 		adminUserInfo.Subscibes = subscibes
@@ -329,7 +329,7 @@ func (this *BaseServeAPIController) Prepare() {
329 329
 		userAdmin.ModifyTime = 1530786071
330 330
 		var subscibe models.ServeSubscibe
331 331
 		subscibe.ID = 11
332
-		subscibe.OrgId = 10735 //机构id小英9675或4
332
+		subscibe.OrgId = 10164 //机构id小英9675或4
333 333
 		subscibe.PeriodStart = 1538035409
334 334
 		subscibe.PeriodEnd = 1569571409
335 335
 		subscibe.State = 1
@@ -339,7 +339,7 @@ func (this *BaseServeAPIController) Prepare() {
339 339
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
340 340
 		subscibes[4] = &subscibe
341 341
 		var adminUserInfo service.AdminUserInfo
342
-		adminUserInfo.CurrentOrgId = 10735 //机构id小英9675或4
342
+		adminUserInfo.CurrentOrgId = 10164 //机构id小英9675或4
343 343
 		adminUserInfo.CurrentAppId = 12123 //4
344 344
 		adminUserInfo.AdminUser = &userAdmin
345 345
 		adminUserInfo.Subscibes = subscibes

+ 1 - 1
controllers/his_api_controller.go View File

@@ -3855,7 +3855,7 @@ func (c *HisApiController) CreateHisPrescription() {
3855 3855
 										if is_user_total != no_user_total {
3856 3856
 											//出库
3857 3857
 											//针对御享天源
3858
-											if drug.IsUse == 1 && s.UserOrgId == 10635 {
3858
+											if drug.IsUse == 1 && s.UserOrgId == 10635 && s.UserOrgId == 9671 {
3859 3859
 
3860 3860
 												creater := adminInfo.AdminUser.Id
3861 3861
 												newadviceInfo := &models.HisDoctorAdviceInfo{

+ 1 - 1
controllers/mobile_api_controllers/check_weight_api_controller.go View File

@@ -977,7 +977,7 @@ func (c *CheckWeightApiController) SavePatientInfoDialysis() {
977 977
 		}
978 978
 
979 979
 		//针对患者称重两次没有数据的问题
980
-		if adminUserInfo.Org.Id == 10702 || adminUserInfo.Org.Id == 10723 || adminUserInfo.Org.Id == 10721 {
980
+		if adminUserInfo.Org.Id == 10702 || adminUserInfo.Org.Id == 10723 || adminUserInfo.Org.Id == 10721 || adminUserInfo.Org.Id == 10740 || adminUserInfo.Org.Id == 10742 || adminUserInfo.Org.Id == 10745 {
981 981
 
982 982
 			dewater_amount = evaluation.WeightBefore - evaluation.DryWeight - evaluation.AdditionalWeight
983 983
 			lastDialysisPrescription, _ := service.GetLastDialysisPrescription(id, adminUserInfo.Org.Id)

+ 21 - 2
controllers/mobile_api_controllers/dialysis_api_controller.go View File

@@ -3900,7 +3900,7 @@ func (this *DialysisAPIController) StartDialysis() {
3900 3900
 		if prescription.TargetUltrafiltration > 0 && prescription.DialysisDurationHour > 0 {
3901 3901
 
3902 3902
 			totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
3903
-			if (template.TemplateId == 6 || template.TemplateId == 32 || template.TemplateId == 65 || adminUserInfo.Org.Id == 10375 || adminUserInfo.Org.Id == 10599) && adminUserInfo.Org.Id != 9671 { //adminUserInfo.Org.Id == 9538
3903
+			if (template.TemplateId == 6 || template.TemplateId == 32 || template.TemplateId == 65 || adminUserInfo.Org.Id == 10375 || adminUserInfo.Org.Id == 10599 || adminUserInfo.Org.Id == 10742 || adminUserInfo.Org.Id == 10740 || adminUserInfo.Org.Id == 10745) && adminUserInfo.Org.Id != 9671 { //adminUserInfo.Org.Id == 9538
3904 3904
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
3905 3905
 			}
3906 3906
 
@@ -5182,7 +5182,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
5182 5182
 		if prescription.TargetUltrafiltration > 0 && prescription.DialysisDurationHour > 0 {
5183 5183
 
5184 5184
 			totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
5185
-			if (template.TemplateId == 6 || template.TemplateId == 65 || adminInfo.Org.Id == 10375 || adminInfo.Org.Id == 10599) && adminInfo.Org.Id != 9538 {
5185
+			if (template.TemplateId == 6 || template.TemplateId == 65 || adminInfo.Org.Id == 10375 || adminInfo.Org.Id == 10599 || adminInfo.Org.Id == 10742 || adminInfo.Org.Id == 10740 || adminInfo.Org.Id == 10745) && adminInfo.Org.Id != 9538 {
5186 5186
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
5187 5187
 				record.UltrafiltrationRate = ultrafiltration_rate
5188 5188
 
@@ -5425,6 +5425,25 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
5425 5425
 
5426 5426
 	}
5427 5427
 
5428
+	if adminInfo.Org.Id == 10740 || adminInfo.Org.Id == 10742 || adminInfo.Org.Id == 10745 {
5429
+
5430
+		var replacement_rate float64
5431
+		var displacement_quantity float64
5432
+		totalMin := prescription.DialysisDurationHour*60 + prescription.DialysisDurationMinute
5433
+		replacement_rate = math.Floor(prescription.DisplaceLiquiValue*1000/float64(totalMin)*60) / 1000
5434
+
5435
+		record.ReplacementRate = replacement_rate
5436
+
5437
+		fmt.Println(math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600))
5438
+		displacement_quantity = math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime)/3600) * replacement_rate
5439
+		record.DisplacementQuantity = displacement_quantity
5440
+	}
5441
+
5442
+	if adminInfo.Org.Id == 10740 || adminInfo.Org.Id == 10742 || adminInfo.Org.Id == 10745 {
5443
+		ultrafiltration_volume := math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600 * ultrafiltration_rate)
5444
+		record.UltrafiltrationVolume = ultrafiltration_volume
5445
+	}
5446
+
5428 5447
 	if adminInfo.Org.Id == 10731 || adminInfo.Org.Id == 10727 {
5429 5448
 
5430 5449
 		var replacement_rate float64

+ 2 - 0
service/his_service.go View File

@@ -2549,7 +2549,9 @@ func GetHisPrescriptionProjectsByID(id int64) (projects []*models.HisPrescriptio
2549 2549
 }
2550 2550
 
2551 2551
 func GetHisPrescriptionProjects(user_org_id int64, patient_id int64, record_time int64) (projects []*models.HisPrescriptionProject, err error) {
2552
+
2552 2553
 	err = readDb.Model(&models.HisPrescriptionProject{}).Preload("XtHisProjectTeam", "status = 1").Preload("HisProject", "status = 1").Preload("GoodInfo", "status = 1").Where("user_org_id = ? AND patient_id = ? AND record_date = ? AND  status = 1 AND team_id = 0", user_org_id, patient_id, record_time).Find(&projects).Error
2554
+
2553 2555
 	return
2554 2556
 }
2555 2557
 

+ 3 - 2
service/stock_service.go View File

@@ -666,11 +666,11 @@ func CreateNewDrugWarehousingInfo(warehousingInfo []*models.DrugWarehouseInfo, t
666 666
 	if len(warehousingInfo) > 0 {
667 667
 
668 668
 		if len(warehousingInfo) > 0 {
669
-			thisSQL := "INSERT INTO xt_drug_warehouse_info (warehousing_id, drug_id, number, product_date,expiry_date,warehousing_count,price,total_price,dealer,manufacturer,remark,ctime,mtime,status,org_id,warehousing_order,type,retail_price,retail_total_price,stock_max_number,max_unit,min_unit,batch_number,stock_min_number,storehouse_id) VALUES "
669
+			thisSQL := "INSERT INTO xt_drug_warehouse_info (warehousing_id, drug_id, number, product_date,expiry_date,warehousing_count,price,total_price,dealer,manufacturer,remark,ctime,mtime,status,org_id,warehousing_order,type,retail_price,retail_total_price,stock_max_number,max_unit,min_unit,batch_number,stock_min_number,storehouse_id,drug_code) VALUES "
670 670
 			insertParams := make([]string, 0)
671 671
 			insertData := make([]interface{}, 0)
672 672
 			for _, info := range warehousingInfo {
673
-				insertParams = append(insertParams, "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")
673
+				insertParams = append(insertParams, "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")
674 674
 				insertData = append(insertData, info.WarehousingId)
675 675
 				insertData = append(insertData, info.DrugId)
676 676
 				insertData = append(insertData, info.Number)
@@ -696,6 +696,7 @@ func CreateNewDrugWarehousingInfo(warehousingInfo []*models.DrugWarehouseInfo, t
696 696
 				insertData = append(insertData, info.BatchNumber)
697 697
 				insertData = append(insertData, info.StockMinNumber)
698 698
 				insertData = append(insertData, info.StorehouseId)
699
+				insertData = append(insertData, info.DrugCode)
699 700
 			}
700 701
 			thisSQL += strings.Join(insertParams, ", ")
701 702
 			err = tx.Exec(thisSQL, insertData...).Error