正在显示
7 个修改的文件
包含
43 行增加
和
13 行删除
pkg/application/notify/app_message_test.go
0 → 100644
@@ -205,7 +205,10 @@ func (e *exportData3) FormatListValue(param []dao.DataStaffAssessContent2) { | @@ -205,7 +205,10 @@ func (e *exportData3) FormatListValue(param []dao.DataStaffAssessContent2) { | ||
205 | e.data[key] = &strings.Builder{} | 205 | e.data[key] = &strings.Builder{} |
206 | e.data[key].WriteString(val.Value + "\n") //填写的等级 | 206 | e.data[key].WriteString(val.Value + "\n") //填写的等级 |
207 | for _, vv := range val.Remark { | 207 | for _, vv := range val.Remark { |
208 | + vv.Title = strings.TrimSpace(vv.Title) | ||
209 | + if vv.Title != "填写自评反馈" { | ||
208 | e.data[key].WriteString(vv.Title + "\n") | 210 | e.data[key].WriteString(vv.Title + "\n") |
211 | + } | ||
209 | e.data[key].WriteString(vv.RemarkText + "\n") | 212 | e.data[key].WriteString(vv.RemarkText + "\n") |
210 | } | 213 | } |
211 | dayKey := val.TargetUserId + val.EvaluationProjectId + val.BeginDay | 214 | dayKey := val.TargetUserId + val.EvaluationProjectId + val.BeginDay |
@@ -174,7 +174,10 @@ func (e *exportData2) setData(param []dao.ExportData1) { | @@ -174,7 +174,10 @@ func (e *exportData2) setData(param []dao.ExportData1) { | ||
174 | e.data[key] = &strings.Builder{} | 174 | e.data[key] = &strings.Builder{} |
175 | e.data[key].WriteString(v.Value + "\n") | 175 | e.data[key].WriteString(v.Value + "\n") |
176 | for _, v2 := range v.Remark { | 176 | for _, v2 := range v.Remark { |
177 | + v2.Title = strings.TrimSpace(v2.Title) | ||
178 | + if v2.Title != "填写自评反馈" { | ||
177 | e.data[key].WriteString(v2.Title + "\n") | 179 | e.data[key].WriteString(v2.Title + "\n") |
180 | + } | ||
178 | e.data[key].WriteString(v2.RemarkText + "\n") | 181 | e.data[key].WriteString(v2.RemarkText + "\n") |
179 | } | 182 | } |
180 | } | 183 | } |
@@ -50,18 +50,18 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu | @@ -50,18 +50,18 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu | ||
50 | positionRepo := factory.CreatePositionRepository(map[string]interface{}{ | 50 | positionRepo := factory.CreatePositionRepository(map[string]interface{}{ |
51 | "transactionContext": transactionContext, | 51 | "transactionContext": transactionContext, |
52 | }) | 52 | }) |
53 | - limit := param.PageSize | ||
54 | - offset := (param.PageNumber - 1) * param.PageSize | 53 | + // limit := param.PageSize |
54 | + // offset := (param.PageNumber - 1) * param.PageSize | ||
55 | 55 | ||
56 | //获取评估列表信息 | 56 | //获取评估列表信息 |
57 | condition1 := map[string]interface{}{ | 57 | condition1 := map[string]interface{}{ |
58 | "cycleId": param.CycleId, | 58 | "cycleId": param.CycleId, |
59 | "types": int(domain.EvaluationFinish), | 59 | "types": int(domain.EvaluationFinish), |
60 | - "limit": limit, | ||
61 | - } | ||
62 | - if offset > 0 { | ||
63 | - condition1["offset"] = offset | 60 | + "limit": 5000, |
64 | } | 61 | } |
62 | + // if offset > 0 { | ||
63 | + // condition1["offset"] = offset | ||
64 | + // } | ||
65 | if len(param.TargetUserName) > 0 { | 65 | if len(param.TargetUserName) > 0 { |
66 | condition1["targetUserName"] = "%" + param.TargetUserName + "%" | 66 | condition1["targetUserName"] = "%" + param.TargetUserName + "%" |
67 | } | 67 | } |
@@ -147,6 +147,8 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu | @@ -147,6 +147,8 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu | ||
147 | firstSheetName := xlsxFile.GetSheetName(sheetIndex) | 147 | firstSheetName := xlsxFile.GetSheetName(sheetIndex) |
148 | tableHead := []string{"姓名", "部门", "职位", "最终绩效得分"} | 148 | tableHead := []string{"姓名", "部门", "职位", "最终绩效得分"} |
149 | tableHead = append(tableHead, ratingHeader...) | 149 | tableHead = append(tableHead, ratingHeader...) |
150 | + // 最后一列 | ||
151 | + tableHead = append(tableHead, "备注") | ||
150 | if len(evaluationList) > 0 { | 152 | if len(evaluationList) > 0 { |
151 | xlsxFile.SetSheetRow(firstSheetName, "A1", &[]string{evaluationList[0].CycleName + "最终成绩"}) | 153 | xlsxFile.SetSheetRow(firstSheetName, "A1", &[]string{evaluationList[0].CycleName + "最终成绩"}) |
152 | if len(tableHead) > 1 { | 154 | if len(tableHead) > 1 { |
@@ -171,7 +173,7 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu | @@ -171,7 +173,7 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu | ||
171 | } | 173 | } |
172 | } | 174 | } |
173 | } | 175 | } |
174 | - dataRaw := []string{ | 176 | + dataRow := []string{ |
175 | v.TargetUser.UserName, | 177 | v.TargetUser.UserName, |
176 | departmentName, | 178 | departmentName, |
177 | positinName, | 179 | positinName, |
@@ -179,12 +181,18 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu | @@ -179,12 +181,18 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu | ||
179 | } | 181 | } |
180 | for _, v2 := range ratingHeader { | 182 | for _, v2 := range ratingHeader { |
181 | if num, ok := evaluationRatingMap[v.Id][v2]; ok { | 183 | if num, ok := evaluationRatingMap[v.Id][v2]; ok { |
182 | - dataRaw = append(dataRaw, fmt.Sprintf("%d", num)) | 184 | + dataRow = append(dataRow, fmt.Sprintf("%d", num)) |
183 | } else { | 185 | } else { |
184 | - dataRaw = append(dataRaw, "0") | 186 | + dataRow = append(dataRow, "0") |
187 | + } | ||
185 | } | 188 | } |
189 | + if v.CheckResult == domain.EvaluationCheckCompleted { | ||
190 | + dataRow = append(dataRow, "已确认") | ||
191 | + } else { | ||
192 | + dataRow = append(dataRow, "未确认") | ||
186 | } | 193 | } |
187 | - xlsxFile.SetSheetRow(firstSheetName, fmt.Sprintf("A%d", i+firstDataRow), &dataRaw) | 194 | + //最后一列 |
195 | + xlsxFile.SetSheetRow(firstSheetName, fmt.Sprintf("A%d", i+firstDataRow), &dataRow) | ||
188 | } | 196 | } |
189 | return xlsxFile, nil | 197 | return xlsxFile, nil |
190 | } | 198 | } |
@@ -810,7 +810,11 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSuper(param *domain | @@ -810,7 +810,11 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSuper(param *domain | ||
810 | 810 | ||
811 | if len(evaluationList) > 0 { | 811 | if len(evaluationList) > 0 { |
812 | //上级评估的结束时间 | 812 | //上级评估的结束时间 |
813 | - evaluationList[0].BeginTime = param.EndTime | 813 | + // evaluationList[0].BeginTime = param.EndTime |
814 | + nowTime := time.Now() | ||
815 | + if evaluationList[0].BeginTime.After(nowTime) { | ||
816 | + evaluationList[0].BeginTime = nowTime | ||
817 | + } | ||
814 | evaluationList[0].Status = domain.EvaluationCompleted | 818 | evaluationList[0].Status = domain.EvaluationCompleted |
815 | err = evaluationRepo.Save(evaluationList[0]) | 819 | err = evaluationRepo.Save(evaluationList[0]) |
816 | if err != nil { | 820 | if err != nil { |
@@ -104,7 +104,7 @@ where 1=1 | @@ -104,7 +104,7 @@ where 1=1 | ||
104 | and staff_assess.cycle_id =? and "types" ='self' | 104 | and staff_assess.cycle_id =? and "types" ='self' |
105 | and staff_assess.evaluation_project_id in ( | 105 | and staff_assess.evaluation_project_id in ( |
106 | select t_project_4.project_id from t_project_4 | 106 | select t_project_4.project_id from t_project_4 |
107 | -) ` | 107 | +) order by evaluation_item_used.sort_by ` |
108 | condition := []interface{}{cycleId} | 108 | condition := []interface{}{cycleId} |
109 | if len(exportUserIds) > 0 { | 109 | if len(exportUserIds) > 0 { |
110 | sqlStr += ` and staff_assess.target_user->>'userId' in(?) ` | 110 | sqlStr += ` and staff_assess.target_user->>'userId' in(?) ` |
@@ -5,7 +5,9 @@ import "testing" | @@ -5,7 +5,9 @@ import "testing" | ||
5 | func TestPushInfo(t *testing.T) { | 5 | func TestPushInfo(t *testing.T) { |
6 | //测试消息推送 | 6 | //测试消息推送 |
7 | c := NewHttplibMmmOpenApiServiceGateway() | 7 | c := NewHttplibMmmOpenApiServiceGateway() |
8 | - resp, err := c.PushInfo(0, "mmm.ability.performance", []int64{3422174102828544}, "ceshi推送一个消息233", "消息内容xxxx332") | 8 | + //3436890424617728 |
9 | + //3422173870118400 | ||
10 | + resp, err := c.PushInfo(0, "mmm.ability.performance", []int64{3436890424617728}, "ceshi推送一个消息233", "消息内容xxxx332") | ||
9 | if err != nil { | 11 | if err != nil { |
10 | t.Error(err) | 12 | t.Error(err) |
11 | } | 13 | } |
-
请 注册 或 登录 后发表评论