正在显示
1 个修改的文件
包含
42 行增加
和
13 行删除
@@ -588,7 +588,11 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | @@ -588,7 +588,11 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | ||
588 | } | 588 | } |
589 | if len(anomalyList) == 0 { | 589 | if len(anomalyList) == 0 { |
590 | return map[string]interface{}{ | 590 | return map[string]interface{}{ |
591 | - "have": false, | 591 | + "have": false, |
592 | + "cycleId": "0", | ||
593 | + "beginDay": "", | ||
594 | + "taskRecordId": "0", | ||
595 | + "userId": "0", | ||
592 | }, nil | 596 | }, nil |
593 | } | 597 | } |
594 | 598 | ||
@@ -610,7 +614,14 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | @@ -610,7 +614,14 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | ||
610 | } | 614 | } |
611 | // c :找上级 , | 615 | // c :找上级 , |
612 | if !(param.MarkType == "a" || param.MarkType == "b") { | 616 | if !(param.MarkType == "a" || param.MarkType == "b") { |
613 | - return map[string]interface{}{"have": false}, nil | 617 | + rst := map[string]interface{}{ |
618 | + "have": false, | ||
619 | + "cycleId": "0", | ||
620 | + "beginDay": "", | ||
621 | + "taskRecordId": "0", | ||
622 | + "userId": "0", | ||
623 | + } | ||
624 | + return rst, nil | ||
614 | } | 625 | } |
615 | 626 | ||
616 | taskId := anomalyData.TaskId | 627 | taskId := anomalyData.TaskId |
@@ -657,9 +668,11 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | @@ -657,9 +668,11 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | ||
657 | } | 668 | } |
658 | if len(recordList) == 0 { | 669 | if len(recordList) == 0 { |
659 | result := map[string]interface{}{ | 670 | result := map[string]interface{}{ |
660 | - "have": false, | ||
661 | - "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), | ||
662 | - "beginDay": today, | 671 | + "have": false, |
672 | + "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), | ||
673 | + "beginDay": today, | ||
674 | + "taskRecordId": "0", | ||
675 | + "userId": strconv.Itoa(assessList[0].Executor.UserId), | ||
663 | } | 676 | } |
664 | return result, nil | 677 | return result, nil |
665 | } | 678 | } |
@@ -671,7 +684,8 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | @@ -671,7 +684,8 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | ||
671 | "have": false, | 684 | "have": false, |
672 | "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), | 685 | "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), |
673 | "beginDay": today, | 686 | "beginDay": today, |
674 | - "taskRecordId": recordList[0].Id, | 687 | + "taskRecordId": strconv.Itoa(recordList[0].Id), |
688 | + "userId": strconv.Itoa(assessList[0].Executor.UserId), | ||
675 | } | 689 | } |
676 | return result, nil | 690 | return result, nil |
677 | } | 691 | } |
@@ -679,7 +693,7 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | @@ -679,7 +693,7 @@ func (srv TaskService) MarkTaskAnomaly(param *command.MarkTaskAnomalyCommand) (m | ||
679 | "have": true, | 693 | "have": true, |
680 | "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), | 694 | "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), |
681 | "beginDay": today, | 695 | "beginDay": today, |
682 | - "taskRecordId": recordList[0].Id, | 696 | + "taskRecordId": strconv.Itoa(recordList[0].Id), |
683 | "userId": strconv.Itoa(assessList[0].Executor.UserId), | 697 | "userId": strconv.Itoa(assessList[0].Executor.UserId), |
684 | } | 698 | } |
685 | return result, nil | 699 | return result, nil |
@@ -986,7 +1000,11 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | @@ -986,7 +1000,11 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | ||
986 | } | 1000 | } |
987 | if len(taskList) == 0 { | 1001 | if len(taskList) == 0 { |
988 | return map[string]interface{}{ | 1002 | return map[string]interface{}{ |
989 | - "have": false, | 1003 | + "have": false, |
1004 | + "cycleId": "0", | ||
1005 | + "beginDay": "", | ||
1006 | + "taskRecordId": "0", | ||
1007 | + "userId": "0", | ||
990 | }, nil | 1008 | }, nil |
991 | } | 1009 | } |
992 | taskData := taskList[0] | 1010 | taskData := taskList[0] |
@@ -1012,7 +1030,11 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | @@ -1012,7 +1030,11 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | ||
1012 | } | 1030 | } |
1013 | if len(anomalyList) == 0 { | 1031 | if len(anomalyList) == 0 { |
1014 | return map[string]interface{}{ | 1032 | return map[string]interface{}{ |
1015 | - "have": false, | 1033 | + "have": false, |
1034 | + "cycleId": "0", | ||
1035 | + "beginDay": "", | ||
1036 | + "taskRecordId": "0", | ||
1037 | + "userId": "0", | ||
1016 | }, nil | 1038 | }, nil |
1017 | } | 1039 | } |
1018 | for _, val := range anomalyList { | 1040 | for _, val := range anomalyList { |
@@ -1047,7 +1069,11 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | @@ -1047,7 +1069,11 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | ||
1047 | } | 1069 | } |
1048 | if len(assessList) == 0 { | 1070 | if len(assessList) == 0 { |
1049 | return map[string]interface{}{ | 1071 | return map[string]interface{}{ |
1050 | - "have": false, | 1072 | + "have": false, |
1073 | + "cycleId": "0", | ||
1074 | + "beginDay": "", | ||
1075 | + "taskRecordId": "0", | ||
1076 | + "userId": "0", | ||
1051 | }, nil | 1077 | }, nil |
1052 | } | 1078 | } |
1053 | taskRecordReps := factory.CreateTaskRecordRepository(map[string]interface{}{"transactionContext": transactionContext}) | 1079 | taskRecordReps := factory.CreateTaskRecordRepository(map[string]interface{}{"transactionContext": transactionContext}) |
@@ -1057,9 +1083,11 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | @@ -1057,9 +1083,11 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | ||
1057 | } | 1083 | } |
1058 | if len(recordList) == 0 { | 1084 | if len(recordList) == 0 { |
1059 | result := map[string]interface{}{ | 1085 | result := map[string]interface{}{ |
1060 | - "have": false, | ||
1061 | - "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), | ||
1062 | - "beginDay": today, | 1086 | + "have": false, |
1087 | + "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), | ||
1088 | + "beginDay": today, | ||
1089 | + "taskRecordId": "0", | ||
1090 | + "userId": "0", | ||
1063 | } | 1091 | } |
1064 | return result, nil | 1092 | return result, nil |
1065 | } | 1093 | } |
@@ -1073,6 +1101,7 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | @@ -1073,6 +1101,7 @@ func (srv TaskService) MarkTaskAnomalyByTask(param *command.MarkTaskAnomalyComma | ||
1073 | "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), | 1101 | "cycleId": strconv.FormatInt(assessList[0].CycleId, 10), |
1074 | "beginDay": today, | 1102 | "beginDay": today, |
1075 | "taskRecordId": recordList[0].Id, | 1103 | "taskRecordId": recordList[0].Id, |
1104 | + "userId": strconv.Itoa(assessList[0].Executor.UserId), | ||
1076 | } | 1105 | } |
1077 | return result, nil | 1106 | return result, nil |
1078 | } | 1107 | } |
-
请 注册 或 登录 后发表评论