正在显示
1 个修改的文件
包含
5 行增加
和
2 行删除
@@ -1723,9 +1723,12 @@ func (srv StaffAssessServeice) SaveAssessInfo(param *command.SaveAssessInfoComma | @@ -1723,9 +1723,12 @@ func (srv StaffAssessServeice) SaveAssessInfo(param *command.SaveAssessInfoComma | ||
1723 | if !ok { | 1723 | if !ok { |
1724 | continue | 1724 | continue |
1725 | } | 1725 | } |
1726 | + if v.Required == domain.NodeRequiredYes && len(item.Value) == 0 { | ||
1727 | + return nil, application.ThrowError(application.BUSINESS_ERROR, v.Category+"-"+v.Name+":必填项") | ||
1728 | + } | ||
1726 | v.Value = item.Value | 1729 | v.Value = item.Value |
1727 | - if v.Required == domain.NodeRequiredYes { | ||
1728 | - //转换填入的评估值 | 1730 | + if len(item.Value) > 0 { |
1731 | + // 转换填入的评估值 | ||
1729 | err = v.TransformValue() | 1732 | err = v.TransformValue() |
1730 | if err != nil { | 1733 | if err != nil { |
1731 | return nil, application.ThrowError(application.BUSINESS_ERROR, v.Category+"-"+v.Name+":"+err.Error()) | 1734 | return nil, application.ThrowError(application.BUSINESS_ERROR, v.Category+"-"+v.Name+":"+err.Error()) |
-
请 注册 或 登录 后发表评论