|
@@ -399,14 +399,19 @@ func (this *StaffScheduleApiController) GetAllZonePb() {
|
399
|
399
|
}
|
400
|
400
|
}
|
401
|
401
|
|
|
402
|
+ timenow := time.Now().Format("2006-01-02")
|
|
403
|
+ timeNewDate, _ := utils.ParseTimeStringToTime("2006-01-02", timenow)
|
402
|
404
|
//针对百霖和贝尔
|
403
|
405
|
if orgid == 10138 || orgid == 10278 || orgid == 3877 {
|
404
|
406
|
//获取今日的排班数据
|
405
|
407
|
list, _ := service.GetMobileScheduleListByScheduleDate(orgid, startTime)
|
406
|
408
|
for _, item := range list {
|
407
|
|
- solution, _ := service.GetLongSolutionByModeId(item.PatientId, item.ModeId, item.UserOrgId)
|
408
|
|
- var str = solution.DialysisDialyszers + "/" + solution.DialysisIrrigation
|
409
|
|
- service.UpdateScheduleByDialysis(item.PatientId, item.ModeId, item.ScheduleDate, item.UserOrgId, str, item.ScheduleType)
|
|
409
|
+ if item.ScheduleDate >= timeNewDate.Unix() {
|
|
410
|
+ solution, _ := service.GetLongSolutionByModeId(item.PatientId, item.ModeId, item.UserOrgId)
|
|
411
|
+ var str = solution.DialysisDialyszers + "/" + solution.DialysisIrrigation
|
|
412
|
+ service.UpdateScheduleByDialysis(item.PatientId, item.ModeId, item.ScheduleDate, item.UserOrgId, str, item.ScheduleType)
|
|
413
|
+ }
|
|
414
|
+
|
410
|
415
|
}
|
411
|
416
|
}
|
412
|
417
|
|
|
@@ -414,9 +419,12 @@ func (this *StaffScheduleApiController) GetAllZonePb() {
|
414
|
419
|
//获取今日的排班数据
|
415
|
420
|
list, _ := service.GetMobileScheduleListByScheduleDate(orgid, startTime)
|
416
|
421
|
for _, item := range list {
|
417
|
|
- solution, _ := service.GetLongSolutionByModeId(item.PatientId, item.ModeId, item.UserOrgId)
|
418
|
|
- var str = solution.DialyzerPerfusionApparatus
|
419
|
|
- service.UpdateScheduleByDialysis(item.PatientId, item.ModeId, item.ScheduleDate, item.UserOrgId, str, item.ScheduleType)
|
|
422
|
+ if item.ScheduleDate >= timeNewDate.Unix() {
|
|
423
|
+ solution, _ := service.GetLongSolutionByModeId(item.PatientId, item.ModeId, item.UserOrgId)
|
|
424
|
+ var str = solution.DialyzerPerfusionApparatus
|
|
425
|
+ service.UpdateScheduleByDialysis(item.PatientId, item.ModeId, item.ScheduleDate, item.UserOrgId, str, item.ScheduleType)
|
|
426
|
+ }
|
|
427
|
+
|
420
|
428
|
}
|
421
|
429
|
}
|
422
|
430
|
|
|
@@ -426,20 +434,23 @@ func (this *StaffScheduleApiController) GetAllZonePb() {
|
426
|
434
|
schedulesFive, _ := service.GetMobileScheduleListByScheduleDateOne(orgid, startTime)
|
427
|
435
|
|
428
|
436
|
for _, item := range schedulesFive {
|
429
|
|
- solution, _ := service.GetLongSolutionByModeId(item.PatientId, item.ModeId, item.UserOrgId)
|
430
|
|
- var DialysisMachineName string
|
431
|
|
- if len(solution.DialysisDialyszers) > 0 {
|
432
|
|
- DialysisMachineName = solution.DialysisDialyszers
|
433
|
|
- }
|
434
|
|
- if len(solution.DialyzerPerfusionApparatus) > 0 {
|
435
|
|
- DialysisMachineName = DialysisMachineName + "," + solution.DialyzerPerfusionApparatus
|
436
|
|
- }
|
|
437
|
+ if item.ScheduleDate >= timeNewDate.Unix() {
|
|
438
|
+ solution, _ := service.GetLongSolutionByModeId(item.PatientId, item.ModeId, item.UserOrgId)
|
|
439
|
+ var DialysisMachineName string
|
|
440
|
+ if len(solution.DialysisDialyszers) > 0 {
|
|
441
|
+ DialysisMachineName = solution.DialysisDialyszers
|
|
442
|
+ }
|
|
443
|
+ if len(solution.DialyzerPerfusionApparatus) > 0 {
|
|
444
|
+ DialysisMachineName = DialysisMachineName + "," + solution.DialyzerPerfusionApparatus
|
|
445
|
+ }
|
437
|
446
|
|
438
|
|
- if len(solution.DialysisIrrigation) > 0 {
|
439
|
|
- DialysisMachineName = DialysisMachineName + "," + solution.DialysisIrrigation
|
|
447
|
+ if len(solution.DialysisIrrigation) > 0 {
|
|
448
|
+ DialysisMachineName = DialysisMachineName + "," + solution.DialysisIrrigation
|
|
449
|
+ }
|
|
450
|
+ item.DialysisMachineName = DialysisMachineName
|
|
451
|
+ service.UpdateSchOne(item.ID, item.DialysisMachineName)
|
440
|
452
|
}
|
441
|
|
- item.DialysisMachineName = DialysisMachineName
|
442
|
|
- service.UpdateSchOne(item.ID, item.DialysisMachineName)
|
|
453
|
+
|
443
|
454
|
}
|
444
|
455
|
|
445
|
456
|
}
|