zoukankan      html  css  js  c++  java
  • 产品位置,设有可选配件(同组如电源系列必选一项的),如果用户没有选择,则发出错误提示。

    USE [erpdb1]
    GO
    /****** Object:  StoredProcedure [dbo].[sp_checkdingdan]    Script Date: 12/29/2014 15:38:30 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[sp_checkdingdan] @docid varchar(30),@ertext varchar(100) output
    AS
    DECLARE  @input_id varchar(20)
    DECLARE  @row_count int
    BEGIN 
        DECLARE cur_input CURSOR  FOR
       select inputid from cpmb_detail where biaodanid = (select chanpinmingchen from dingdanzhu where biaodanid= @docid) and xz='t'
       group by inputid order by inputid  
     set @input_id =0 
     set @row_count = 0 
     --/*
     set @ertext ='y' 
     OPEN cur_input
     
        FETCH  cur_input INTO @input_id
     WHILE @@FETCH_STATUS = 0
          BEGIN
             set @row_count = 0
             SELECT @row_count = count(*) from dingdanfu d,dingdanzhu a where  a.biaodanid  =@docid AND  a.biaodanid = d.biaodanid
        and xuhao in (select xuhao from cpmb_detail where inputid =@input_id and a.chanpinmingchen= cpmb_detail.biaodanid);
             if @row_count = 0
             BEGIN        
                set @ertext ='生产单录入无效,产品位置为:' +@input_id+ '的物料必须选择一项,请重新录入!'
                delete dingdanzhu where biaodanid = @docid;
                CLOSE cur_input
                   DEALLOCATE cur_input
                return
             END  
       FETCH  cur_input INTO @input_id
          END
        CLOSE cur_input
        DEALLOCATE cur_input 
        --*/
    END

  • 相关阅读:
    Java实现继承过程概述
    Java封装概述
    Java中包的介绍
    Java中final关键字概述
    Java继承概述
    mysql服务自动关闭的解决
    Unity3d碰撞检测中碰撞器与触发器的区别
    解决在Game模式下兼容编辑器模式
    GameObject.Find("")只能查找到显示的对象
    层(layer)的设置
  • 原文地址:https://www.cnblogs.com/szlixin/p/4191801.html
Copyright © 2011-2022 走看看