king
2020-05-26 a2df1bad33874fc6d9f96b0ceb1a6ce97b2e7e80
src/utils/utils.js
@@ -1141,11 +1141,11 @@
        /* 同类数据验证 */
        Set @tbid=''
        Select top 1 @tbid='X' from (select ${item.field}${_primaryKey},1 an n from ${datasource} ) tb  inner join (select ID from  dbo.SplitComma(@ID@)) sp on tb.${primaryKey}=sp.ID group by ${item.field} having sum(n)>1
        Select top 1 @tbid='X' from (select ${item.field}${_primaryKey},1 as n from ${datasource} ) tb  inner join (select ID from  dbo.SplitComma(@ID@)) sp on tb.${primaryKey}=sp.ID group by ${item.field} having sum(n)>1
        
        If @tbid!=''
        Begin
          Set @errorcode='E' ,Set @remsg='${item.fieldlabel} 值不唯一'
          Set @ErrorCode='E' Set @retmsg='${item.fieldlabel} 值不唯一'
          goto aaa
        end
        `