Browse Source

历史排班

28169 1 year ago
parent
commit
d1ffc45d7f

BIN
XT_New.exe View File


+ 5 - 2
conf/app.conf View File

@@ -1,6 +1,6 @@
1 1
 appname = 血透
2 2
 httpport = 9531
3
-runmode = dev
3
+runmode = prod
4 4
 #dev/prod
5 5
 
6 6
 #
@@ -154,7 +154,10 @@ front_end_domain = "http://xt.test.sgjyun.com/#"
154 154
 
155 155
 sign_appid ="eac17a142dd046"
156 156
 serviceKye = "da8b09dce3684e6ebfbb7f70dba707a0"
157
-serviceCode ="msg0001"
157
+#serviceCode ="msg0001"
158
+
159
+serviceCode ="signSDK0001S"
160
+
158 161
 
159 162
 readmysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
160 163
 readmysqlport = 3306

+ 4 - 4
controllers/base_api_controller.go View File

@@ -81,7 +81,7 @@ func (this *BaseAuthAPIController) Prepare() {
81 81
 		userAdmin.ModifyTime = 1530786071
82 82
 		var subscibe models.ServeSubscibe
83 83
 		subscibe.ID = 11
84
-		subscibe.OrgId = 10191 //机构id 10344
84
+		subscibe.OrgId = 10340 //机构id 10344
85 85
 		subscibe.PeriodStart = 1547447814
86 86
 		subscibe.PeriodEnd = 1550039814
87 87
 		subscibe.State = 1
@@ -91,7 +91,7 @@ func (this *BaseAuthAPIController) Prepare() {
91 91
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
92 92
 		subscibes[4] = &subscibe
93 93
 		var adminUserInfo service.AdminUserInfo
94
-		adminUserInfo.CurrentOrgId = 10191 //机构id小英9675或4
94
+		adminUserInfo.CurrentOrgId = 10340 //机构id小英9675或4
95 95
 		adminUserInfo.CurrentAppId = 3467  //4
96 96
 		adminUserInfo.AdminUser = &userAdmin
97 97
 		adminUserInfo.Subscibes = subscibes
@@ -327,7 +327,7 @@ func (this *BaseServeAPIController) Prepare() {
327 327
 		userAdmin.ModifyTime = 1530786071
328 328
 		var subscibe models.ServeSubscibe
329 329
 		subscibe.ID = 11
330
-		subscibe.OrgId = 10191 //机构id小英10344或4
330
+		subscibe.OrgId = 10340 //机构id小英10344或4
331 331
 		subscibe.PeriodStart = 1538035409
332 332
 		subscibe.PeriodEnd = 1569571409
333 333
 		subscibe.State = 1
@@ -337,7 +337,7 @@ func (this *BaseServeAPIController) Prepare() {
337 337
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
338 338
 		subscibes[4] = &subscibe
339 339
 		var adminUserInfo service.AdminUserInfo
340
-		adminUserInfo.CurrentOrgId = 10191 //机构id小英9675或4
340
+		adminUserInfo.CurrentOrgId = 10340 //机构id小英9675或4
341 341
 		adminUserInfo.CurrentAppId = 3467  //4
342 342
 		adminUserInfo.AdminUser = &userAdmin
343 343
 		adminUserInfo.Subscibes = subscibes

+ 5 - 0
controllers/mobile_api_controllers/dialysis_api_controller.go View File

@@ -2587,6 +2587,11 @@ func (c *DialysisAPIController) Finish() {
2587 2587
 		if adminUserInfo.Org.Id == 10485 {
2588 2588
 			tempassessmentAfterDislysis.ActualUltrafiltration = endmonitorRecords.UltrafiltrationVolume / 1000
2589 2589
 		}
2590
+		if adminUserInfo.Org.Id == 10551 {
2591
+			//获取最后一条透析处方数据
2592
+			lastprescription, _ := service.GetLastDialysisPrescriptionByPatientIdTwo(adminUserInfo.Org.Id, id, recordDate.Unix())
2593
+			tempassessmentAfterDislysis.ActualUltrafiltration = lastprescription.TargetUltrafiltration * 1000
2594
+		}
2590 2595
 
2591 2596
 	}
2592 2597
 

+ 6 - 5
controllers/schedule_api_controller.go View File

@@ -128,10 +128,11 @@ func (c *ScheduleApiController) CoverSch() {
128 128
 	err := service.SaveSchTwo(sch, sch_two)
129 129
 	//生成新的排班
130 130
 	if err == nil {
131
-		err2 := service.SaveSch(new_sch)
131
+		err2 := service.SaveSch(&new_sch)
132 132
 		if err2 == nil {
133 133
 			c.ServeSuccessJSON(map[string]interface{}{
134
-				"msg": "覆盖成功",
134
+				"msg":     "覆盖成功",
135
+				"new_sch": new_sch,
135 136
 			})
136 137
 		} else {
137 138
 			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
@@ -680,7 +681,7 @@ func (c *ScheduleApiController) BatchPostSmartSch() {
680 681
 					}
681 682
 
682 683
 					schedule.Status = 0
683
-					service.SaveSch(schedule)
684
+					service.SaveSch(&schedule)
684 685
 				}
685 686
 				HandleRedis(adminInfo.CurrentOrgId, schedule.ScheduleDate)
686 687
 			}
@@ -833,7 +834,7 @@ func (c *ScheduleApiController) BatchPostSmartSch() {
833 834
 					}
834 835
 					schedule.DialysisMachineName = DialysisMachineName
835 836
 					schedule.IsExport = 3000
836
-					service.SaveSch(schedule)
837
+					service.SaveSch(&schedule)
837 838
 				} else { //新的排班信息
838 839
 
839 840
 					if items["schedule_date"] == nil || reflect.TypeOf(items["schedule_date"]).String() != "string" {
@@ -1015,7 +1016,7 @@ func (c *ScheduleApiController) BatchPostSmartSch() {
1015 1016
 							daySchedule.BedId = schedule.BedId
1016 1017
 							daySchedule.DialysisMachineName = schedule.DialysisMachineName
1017 1018
 							existSchedule.IsExport = 3002
1018
-							service.SaveSch(daySchedule)
1019
+							service.SaveSch(&daySchedule)
1019 1020
 						} else {
1020 1021
 							existSchedule.IsExport = 3003
1021 1022
 							service.CreateScheduleTwo(&schedule)

+ 1 - 1
service/app_version.go View File

@@ -1036,7 +1036,7 @@ func UpdateSch(sch Schedule) (err error) {
1036 1036
 	return
1037 1037
 }
1038 1038
 
1039
-func SaveSch(sch models.Schedule) (err error) {
1039
+func SaveSch(sch *models.Schedule) (err error) {
1040 1040
 	err = writeDb.Save(&sch).Error
1041 1041
 	return
1042 1042
 }