...
|
...
|
@@ -21,6 +21,17 @@ func NewEvaluationCycleTemplateRepository(transactionContext *pgTransaction.Tran |
|
|
}
|
|
|
|
|
|
func (repo *EvaluationCycleTemplateRepository) TransformToDomain(m *models.EvaluationCycleTemplate) domain.EvaluationCycleTemplate {
|
|
|
// 历史旧数据,默认输出转成1
|
|
|
if m.Template != nil {
|
|
|
for i := range m.Template.LinkNodes {
|
|
|
node := m.Template.LinkNodes[i]
|
|
|
for j := range node.NodeContents {
|
|
|
if node.NodeContents[j].Required == 0 {
|
|
|
node.NodeContents[j].Required = domain.NodeRequiredYes
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return domain.EvaluationCycleTemplate{
|
|
|
Id: m.Id,
|
|
|
Name: m.Name,
|
...
|
...
|
|