存储过程 :ASRS_SPPR024B154行注释了,增加后面的判断函数 --and x.IOEND = 'O'; if @iOUTEND = '1' Set @STNO = '20'+@v_crane Else Begin Select TOP 1 @STNO = STNO FROM ASRS_STNOFL x where x.CRANE = @v_CRANE and x.IOEND = 'I'; End;