作者 tangxvhui

修复 创建每日评估是 某些情况下 任务不能正常下发。

... ... @@ -443,9 +443,9 @@ func (srv StaffAssessServeice) buildTaskRecord(staffAssess *domain.StaffAssess)
if err != nil {
return nil, application.ThrowError(application.ARG_ERROR, "获取评估项EvaluationItemUsed信息"+err.Error())
}
if len(evaluationItemList) == 0 {
return nil, nil
}
// if len(evaluationItemList) == 0 {
// return nil, nil
// }
taskRecordList := []*domain.TaskRecord{}
for _, val := range evaluationItemList {
_, taskList, err := taskRepo.Find(map[string]interface{}{
... ...
package service
import (
"testing"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
)
func TestXxx(t *testing.T) {
srv := StaffAssessServeice{}
taskRecord, err := srv.buildTaskRecord(&domain.StaffAssess{
CompanyId: 8,
CycleId: 1667093923689926656,
EvaluationProjectId: 1675753960259981312,
Executor: domain.StaffDesc{
UserId: 3255361876566784,
},
})
if err != nil {
t.Error(err)
}
for _, val := range taskRecord {
t.Logf("%+v", *val)
}
}
... ...