schangxiang@126.com
2024-04-25 17507355c8587d5f0f7f7f477937a354d89c8333
iWare_RawMaterialWarehouse_Wms/Admin.NET.Web.Entry/wwwroot/Template/Service.cs.vm
@@ -362,14 +362,17 @@
        /// <returns></returns>
        private async Task CheckExisit( @(@Model.ClassName) input,bool isEdit=false)
        {
            @{
                var columnIndex = 0;
                string my_message = string.Empty;
             }
           
                                      @foreach (var column in Model.TableField)
                                      {
                                           if (@column.WhetherUnionKey == "Y")
                {
                    my_message += "," + @column.ColumnComment + "[{input." + @column.ColumnName + "}]";
                }
                                          if (@column.WhetherUnionKey == "Y")
                                          {   
                                              columnIndex++;
@@ -424,10 +427,8 @@
               @:}
                    }
               
      @if(columnIndex>0){
            @:if (isExist) throw Oops.Oh(ErrorCode.E0001);
            @:if (isExist) throw Oops.Oh($"验证失败@(@my_message)已存在");
       }else{
            @://没有配置联合主键,不需要验重
       }