if @nReturntype=-101 goto error111 if @nReturntype=-102 goto error112 if @nReturntype=-103 goto error113
Exec @checkValue=mzw_CheckBasicSet if @checkValue=1 -- 查找编号和全名不能完全相同 begin if exists(Select [typeid] From ptype Where [typeId]=@EtypeId_1 or ([fullname]=@fullname and [usercode]=@usercode) and [deleted]<>1) goto error114 end if @checkValue=2--全名不能完全相同 begin if exists(Select [typeid] From ptype Where [typeId]=@EtypeId_1 or ([fullname]=@fullname ) and [deleted]<>1) goto error114 end if @checkValue=3--编号不能完全相同 begin if exists(Select [typeid] From ptype Where [typeId]=@EtypeId_1 or ( [usercode]=@usercode) and [deleted]<>1) goto error114 end if @checkValue=4 -- 查找编号和全名不能完全相同 begin if exists(Select [typeid] From ptype Where [typeId]=@EtypeId_1 or ([fullname]=@fullname or [usercode]=@usercode) and [deleted]<>1) goto error114 end if (len(@Barcode)>0) begin if exists(Select * From ptype Where ([Barcode]=@Barcode) and [deleted]<>1) return -5