yangle
2022-03-29 e9e530471d536197ae7b620eb9e6ccda19453a30
WebAPI/Controllers/Éú²ú¹ÜÀí/Éú²úÈÎÎñµ¥/Sc_ICMOBillController.cs
@@ -75,7 +75,6 @@
        }
        #endregion
        #region å¢™å’”装箱单回车事件
        [Route("Sc_ICMOBill/QK_PackingBillByXSBill")]
        [HttpGet]
@@ -83,20 +82,16 @@
        {
            try
            {
                string sql = string.Format(@"select b.HMaterID,m.HNumber HMaterCode,m.HName HMaterName,b.HUnitID,u.HName HUnitName,
                                b.HQty HQty,a.HAddress HAddress,b.HDate HDate,b.HOutStockQty HOutStockQty,b.HInvoiceQty HInvoiceQty,
                                b.HTaxPrice HTaxPrice,b.HPrice HPrice,b.HMoney HMoney,a.HCusID HCusID,c.HName HCusName,a.HEmpID,e.HName HEmpName,
                                i.HInterID,i.HBillNo
                                from Xs_SeOrderBillMain a
                                left join  Xs_SeOrderBillSub b on a.HInterID=b.HInterID
                                left join Gy_Material m on b.HMaterID=m.HItemID
                                left join Gy_Unit u on b.HUnitID=u.HItemID
                                left join Gy_Customer c on a.HCusID=c.HItemID
                                left join Gy_Employee e on a.HEmpID=e.HItemID
                                left join Sc_ICMOBillMain i on i.HSeOrderInterID=a.HInterID
                                where a.HInterID=(select HSeOrderInterID from Sc_ICMOBillMain where HBillNo='" + HBillNo + "')");
                string sql = string.Format(@"select a.HInterID,a.HBillNo,a.HMaterID,m.HName HMaterName, a.HUnitID,u.HName HUnitName,a.HPlanQty,a.HCusID, c.HName HCusName,a.HEmpID,e.HName HEmpName,a.HDeptID,d.HName HDeptName,a.HPlanEndDate,0 HMinQty,0 HTotalQty,0 HSpsQty
                                            from Sc_ICMOBillMain a
                                            left join Gy_Material m on a.HMaterID=m.HItemID
                                            left join Gy_Unit u on a.HUnitID=u.HItemID
                                            left join Gy_Customer c on a.HCusID=c.HItemID
                                            left join Gy_Employee e on a.HEmpID=e.HItemID
                                            left join Gy_Department d on a.HDeptID=d.HItemID
                                            where HSeOrderInterID=(select HSeOrderInterID from Sc_ICMOBillMain where HBillNo='" + HBillNo + "')");
               
                ds = oCN.RunProcReturn(sql, "Xs_SeOrderBillMain");
                ds = oCN.RunProcReturn(sql, "Sc_ICMOBillMain");
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    objJsonResult.code = "1";
@@ -133,73 +128,157 @@
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();
            string msg4 = sArray[2].ToString();
            string msg5 = sArray[3].ToString();
            ListModels oListModels = new ListModels();
            DataSet ds = new DataSet();
            ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where HItemID=" + msg5, "Xt_ORGANIZATIONS");
            string OrgNum = ds.Tables[0].Rows[0]["HNumber"].ToString();//组织代码
            DataSet Ds1 = new DataSet();
            try
            {
                //表体数据
                //按 },{来拆分数组 //去掉【和】
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                                                //msg2 = msg2.Replace("'", "’");
                List<Models.ClsQK_PackingBill> ls = new List<Models.ClsQK_PackingBill>();
                ls = oListModels.getObjectByJson_QK_PackingBill(msg2);
                //获取年月日并拼接成字符串
                string year = DateTime.Now.Year.ToString();
                string month = DateTime.Now.Month.ToString();
                string day = DateTime.Now.Day.ToString();
                string nowDate = year + month + day;
                string materid = "";
                long sum = 0;
                if (msg4=="ZZ")
                {
                    //表体数据
                    //按 },{来拆分数组 //去掉【和】
                    msg2 = msg2.Replace("\\", "");
                    msg2 = msg2.Replace("\n", "");  //\n
                                                    //msg2 = msg2.Replace("'", "’");
                    List<Models.ClsQK_PackingBill> ls = new List<Models.ClsQK_PackingBill>();
                    ls = oListModels.getObjectByJson_QK_PackingBill(msg2);
                    oCN.BeginTran();
                    foreach (Models.ClsQK_PackingBill oItemSub in ls)
                    {
                        var HInterID = DBUtility.ClsPub.CreateBillID("3783", ref DBUtility.ClsPub.sExeReturnInfo);
                        var HBillNo = DBUtility.ClsPub.CreateBillCode("3783", ref DBUtility.ClsPub.sExeReturnInfo, true);
                        string sql = string.Format(@"Insert Sc_PackUnionBillMain(HYear,HPeriod,HBillType,HInterID,HDate,HBillNo,HBillStatus,HCheckItemNowID,HCheckItemNextID,
                                                    HRemark,HBacker,HChecker,HMaker,HMakeDate,HUpDater,HCloseMan,HCloseType,HDeleteMan,
                                                    HICMOInterID,HICMOBillNo,HBarCode_Pack,HMaterID,HUnitID,HWeight,HMWeight,HPWeight,
                                                    HProdOrgID,HDeptID,HEmpID,HSNum,HPackNum,HBarCode_Cus,HBatchNo,HBillSubType)
                                                    values('2022',1,'3783'," + HInterID + ",getdate(),'" + HBillNo + "',1,0,0," +
                                                        "'自动绑定','','', " + msg3 + ",getdate(),'','',0,''," +
                                                        oItemSub.HInterID + ",'" + oItemSub.HBillNo + "','" + HBillNo + "'," + oItemSub.HMaterID + "," + oItemSub.HUnitID + "," + oItemSub.HWeight + "," + oItemSub.HMWeight + "," + oItemSub.HPWeight + "," +
                                                        "0,0," + oItemSub.HEmpID + ",0,0,'','','')");
                        oCN.RunProc(sql);
                        //根据生成条数生成相应数量条码
                        foreach (var item in oItemSub.HTotalQty.ToString())
                        {
                            //生成唯一条码   æ¡ç å‰ç¼€ = ç»„织代码 + ç‰©æ–™ä»£ç  + å¹´ + æœˆ + æ—¥
                            string sTMNumber = OrgNum + oItemSub.HMaterNumber + nowDate;
                            Ds1 = oCN.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                            int LSH = ClsPub.isInt(Ds1.Tables[0].Rows[0][0]);//唯一码
                                                                             //获取内码
                            long HInterID = DBUtility.ClsPub.CreateBillID_Prod("85", ref DBUtility.ClsPub.sExeReturnInfo);
                            oCN.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
                                        ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
                                        ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " +
                                        ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " +
                                        ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " +
                                        ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID " +
                                        ",HGiveAwayFlag " +
                                        ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " +
                                        ") values ("
                                        + "'" + LSH + "','唯一条码'," + oItemSub.HMaterID.ToString() + "," + oItemSub.HUnitID.ToString() + "," + oItemSub.HMinQty.ToString()
                                        + ",'',0,0,'" + msg3 + "',getdate(),0," + oItemSub.HMinQty.ToString()
                                        + ", " + oItemSub.HInterID.ToString() + "," + oItemSub.HInterID.ToString() + ",'" + oItemSub.HBillNo + "','3710',''"
                                        + ",1,1," + oItemSub.HDeptID.ToString() + ",0,0,''"
                                        + ", " + oItemSub.HCusID.ToString() + ",'',getdate(),'',getdate()"
                                        + ", " + msg5.ToString() + "," + OrgNum.ToString() + ",''," + HInterID.ToString()
                                        + ",0"
                                        + ",'" + oItemSub.HMaterName + "','','',0,'','')");
                            string sql1 = string.Format(@"update Sc_ICMOBillMain set HPlanQty=" + oItemSub.HSpsQty + " where HInterID=" + oItemSub.HInterID);
                            oCN.RunProc(sql1);
                        }
                    }
                    oCN.Commit();
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "整装生成成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    msg2 = msg2.Replace("\\", "");
                    msg2 = msg2.Replace("\n", "");  //\n
                                                    //msg2 = msg2.Replace("'", "’");
                    List<Models.ClsQK_PackingBill> ls = new List<Models.ClsQK_PackingBill>();
                    ls = oListModels.getObjectByJson_QK_PackingBill(msg2);
                    var HInterID = DBUtility.ClsPub.CreateBillID("3783", ref DBUtility.ClsPub.sExeReturnInfo);
                    var HBillNo = DBUtility.ClsPub.CreateBillCode("3783", ref DBUtility.ClsPub.sExeReturnInfo, true);
                    oCN.BeginTran();
                    foreach (Models.ClsQK_PackingBill oItemSub in ls)
                    {
                        sum += oItemSub.HMinQty;
                        materid = oItemSub.HMaterNumber;
                        //获取内码
                        long HInterID2 = DBUtility.ClsPub.CreateBillID_Prod("85", ref DBUtility.ClsPub.sExeReturnInfo);
                        //生成唯一条码   æ¡ç å‰ç¼€ = ç»„织代码 + ç‰©æ–™ä»£ç  + å¹´ + æœˆ + æ—¥
                        string sTMNumber = OrgNum + oItemSub.HMaterNumber + nowDate;
                        Ds1 = oCN.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                        int LSH = ClsPub.isInt(Ds1.Tables[0].Rows[0][0]);//唯一码
                        //插入条码档案
                        oCN.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
                                    ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
                                    ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " +
                                    ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " +
                                    ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " +
                                    ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID " +
                                    ",HGiveAwayFlag " +
                                    ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " +
                                    ") values ("
                                    + "'" + LSH + "','唯一条码'," + oItemSub.HMaterID.ToString() + "," + oItemSub.HUnitID.ToString() + "," + oItemSub.HMinQty.ToString()
                                    + ",'',0,0,'" + msg3 + "',getdate(),0," + oItemSub.HMinQty.ToString()
                                    + ", " + oItemSub.HInterID.ToString() + "," + oItemSub.HInterID.ToString() + ",'" + oItemSub.HBillNo + "','3710',''"
                                    + ",1,1," + oItemSub.HDeptID.ToString() + ",0,0,''"
                                    + ", " + oItemSub.HCusID.ToString() + ",'',getdate(),'',getdate()"
                                    + ", " + msg5.ToString() + "," + OrgNum.ToString() + ",''," + HInterID2.ToString()
                                    + ",0"
                                    + ",'" + oItemSub.HMaterName + "','','',0,'','')");
                       //插入组托单子表
                        string sql = string.Format(@"insert into Sc_PackUnionBillSub(HInterID,HEntryID,HCloseMan,HCloseType,HRemark,
                                                    HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,
                                                    HRelationQty,HRelationMoney,HMaterID,HUnitID,HQty,HSourceID,HEquipID,HGroupID,HWorkerID,
                                                   HScanDate,HBarCode,HBarCode_Pack)
                                                    values("+HInterID+",'','',0,'自动绑定',"+oItemSub.HInterID+",'',"+oItemSub.HBillNo+",'3710',"+
                                                   "0,0,"+ oItemSub.HMaterID+","+ oItemSub.HUnitID+","+ oItemSub.HQty+", 0,0,0,0,"+
                                                   "getdate(),'',"+HBillNo+")");
                                                    values("+HInterID+",'','',0,'自动绑定',"+oItemSub.HInterID+",'','"+oItemSub.HBillNo+"','3710',"+
                                                   "0,0,"+ oItemSub.HMaterID+","+ oItemSub.HUnitID+","+ oItemSub.HPlanQty+", 0,0,0,0,"+
                                                   "getdate(),'"+ LSH + "','" +HBillNo+"')");
                        //更改生产订单的数量
                        string sql1 = string.Format(@"update Sc_ICMOBillMain set HPlanQty=" + oItemSub.HSpsQty + " where HInterID=" + oItemSub.HInterID);
                        oCN.RunProc(sql);
                        oCN.RunProc(sql1);
                    }
                    //生成组托单主表
                    string sql2 = string.Format(@"Insert Sc_PackUnionBillMain(HYear,HPeriod,HBillType,HInterID,HDate,HBillNo,HBillStatus,HCheckItemNowID,HCheckItemNextID,
                                                    HRemark,HBacker,HChecker,HMaker,HMakeDate,HUpDater,HCloseMan,HCloseType,HDeleteMan,HICMOInterID,HICMOBillNo,
                                                    HBarCode_Pack,HMaterID,HUnitID,HWeight,HMWeight,HPWeight,
                                                    HProdOrgID,HDeptID,HEmpID,HSNum,HPackNum,HBarCode_Cus,HBatchNo,HBillSubType)
                                                    values('2022',1,'3783'," + HInterID + ",getdate(),'" + HBillNo + "',1,0,0," +
                                                        "'自动绑定','','', " + msg3 + ",getdate(),'','',0,'',0,0,'" +
                                                         HBillNo + "',0,0,0,0,0" +
                                                        "'自动绑定','','', '" + msg3 + "',getdate(),'','',0,'',0,0,'" +
                                                         HBillNo + "',0,0,0,0,0," +
                                                        "0,0,0,0,0,'','','')");
                    oCN.RunProc(sql2);
                    //再次生成唯一码
                    //获取内码
                    long HInterID3 = DBUtility.ClsPub.CreateBillID_Prod("85", ref DBUtility.ClsPub.sExeReturnInfo);
                    //生成唯一条码   æ¡ç å‰ç¼€ = ç»„织代码 + ç‰©æ–™ä»£ç  + å¹´ + æœˆ + æ—¥
                    string sTMNumber1 = OrgNum  + materid+nowDate;
                    Ds1 = oCN.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber1 + "'", "h_p_WMS_GetMaxNo");    //获取最大流水号
                    int LSH1 = ClsPub.isInt(Ds1.Tables[0].Rows[0][0]);//唯一码
                    string sql3 = string.Format(@"insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
                                ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
                                ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " +
                                ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " +
                                ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " +
                                ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID " +
                                ",HGiveAwayFlag " +
                                ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " +
                                ") values ("
                                + "'" + LSH1 + "','唯一条码','" + materid.ToString() + "',0," + sum.ToString()
                                + ",'',0,0,'" + msg3 + "',getdate(),0," + sum.ToString()
                                + ", 0,0,'" + HBillNo + "','3710','',"
                                + sum.ToString() + "," + HInterID.ToString() + ",0,0,0,''"
                                + ",0,'',getdate(),'',getdate()"
                                + ", " + msg5.ToString() + "," + OrgNum.ToString() + ",''," + HInterID3.ToString()
                                + ",0"
                                + ",'','','',0,'','')");
                    oCN.RunProc(sql3);
                    oCN.Commit();
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
@@ -220,5 +299,183 @@
            }
        }
        #endregion
        # region[墙咔装箱点击主表带出从表]
        [Route("Sc_ICMOBillController/QK_GetPackingBillListByMainID")]
        [HttpGet]
        public object QK_GetPackingBillListByMainID(string HInterID)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                //获取保养项目编辑数据
                string sql = string.Format(@"select a.HInterID hmainid,a.HBarCode,a.HBillType,a.HBarCodeType,
                                     a.HMaterID,m.HName HMaterName,a.HUnitID,u.HName HUnitName,
                                     a.HEmpID,e.HName HEmpName,a.HDeptID,d.HItemID HDeptName,P.HBarCode_Pack,
                                    a.HMakeDate åˆ¶å•日期,a.HMaker åˆ¶å•人
                                    from Gy_BarCodeBill a
                                    left join Gy_Material m on a.HMaterID=m.HItemID
                                    left join Gy_Unit u on a.HUnitID=u.HItemID
                                    left join Gy_Employee e on a.HEmpID=e.HItemID
                                    left join Gy_Department d on a.HDeptID=d.HItemID
                                    left join Sc_PackUnionBillMain p on a.HSourceInterID=p.HInterID
                                    where a.HBarCode=(select HBarCode from  Sc_PackUnionBillSub where HInterID=
                                    (select HBarcodeNo from Gy_BarCodeBill where HBarCode='" + HInterID + "'))");
                ds = oCN.RunProcReturn(sql, "Sc_PackUnionBillSub");
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "获取信息成功!";
                objJsonResult.data = ds.Tables[0];
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
            }
            return objJsonResult;
        }
        #endregion
        #region[墙咔装箱列表]
        /// <summary>
        /// æ¨¡å…·ä¿å…»è®°å½•表列表
        /// </summary>
        /// <returns></returns>
        [Route("Sc_ICMOBillController/QK_GetPackingBillList")]
        [HttpGet]
        public object QK_GetPackingBillList(string sWhere)
        {
            try
            {
                ds = QK_GetPackingBillList_s(sWhere);
                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                //{
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
                //}
                //else
                //{
                //objJsonResult.code = "0";
                //objJsonResult.count = 0;
                //objJsonResult.Message = "无数据";
                //objJsonResult.data = null;
                //return objJsonResult;
                //}
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #region sql语句
        public static DataSet QK_GetPackingBillList_s(string sWhere)
        {
            if (sWhere == null || sWhere.Equals(""))
            {
                return new SQLHelper.ClsCN().RunProcReturn("select *  from h_v_QK_PackedBillList order by hmainid desc", "h_v_QK_PackedBillList");
            }
            else
            {
                string sql1 = "select * from h_v_QK_PackedBillList where 1 = 1 ";
                string sql = sql1 + sWhere + "order by hmainid desc";
                return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_QK_PackedBillList");
            }
            //return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainBillList ", "h_v_Sc_MouldMaintainBillList");
        }
        #endregion
        #endregion
        #region[墙咔装箱列表-删除]
        /// <summary>
        /// å¢™å’”装箱列表-删除
        /// </summary>
        /// <returns></returns>
        [Route("Sc_ICMOBillController/DeleteQK_GetPackingBillList")]
        [HttpGet]
        public object DeleteQK_GetPackingBillList(string HInterID,string Flag)
        {
            try
            {
                oCN.BeginTran();
                if (Flag=="0")
                {
                    DataSet ds = new DataSet();
                    ds = oCN.RunProcReturn("select * from Gy_BarCodeBill where HItemID=" + HInterID, "Gy_BarCodeBill");
                    DataRow dr = ds.Tables[0].Rows[0];
                    string sql = string.Format(@"delete from Gy_BarCodeBill where HItemID=" + HInterID);
                    string sql1 = string.Format(@"update Sc_ICMOBillMain set HPlanQty=HPlanQty+" + dr["HQty"] +" where HInterID=(select HSourceInterID from Gy_BarCodeBill where HItemID="+ HInterID + ")");
                    oCN.RunProc(sql);
                    oCN.RunProc(sql1);
                }
                else
                {
                    //通过条码id找到托条码,通过托条码找到组托单子表中的唯一码
                    string sql2 = "select HBarCode from Sc_PackUnionBillSub where HInterID=(select HBarcodeNo from Gy_BarCodeBill where HItemID=" + HInterID;
                    //string sql2 = "select HBarCode from Sc_PackUnionBillSub where HInterID=(select HBarcodeNo from Gy_BarCodeBill where HItemID=3250)";
                    DataSet ds1 = oCN.RunProcReturn(sql2, "Sc_PackUnionBillSub");
                    DataTable dt = ds1.Tables[0];
                    //遍历找到的唯一码删除条码档案里的相关数据,同时通过唯一码的源单找到生产订单更改生产订单的数量
                    if (dt.Rows.Count > 0)
                    {
                        foreach (DataRow dr in dt.Rows)
                        {
                            DataSet ds = new DataSet();
                            ds = oCN.RunProcReturn("select * from Gy_BarCodeBill where HBarCode='" + dr["HBarCode"].ToString()+"'", "Gy_BarCodeBill");
                            DataRow dr1 = ds.Tables[0].Rows[0];
                            string sql = string.Format(@"delete from Gy_BarCodeBill where HBarCode='" + dr["HBarCode"].ToString()+"'");
                            string sql1 = string.Format(@"update Sc_ICMOBillMain set HPlanQty=HPlanQty+" + dr1["HQty"] + " where HInterID=(select HSourceInterID from Gy_BarCodeBill where HBarCode='" + dr["HBarCode"].ToString() + "')");
                            oCN.RunProc(sql);
                            oCN.RunProc(sql1);
                        }
                    }
                    //遍历完后删除通过条码id找到托条码,通过托条码找到组托单子表的数据,以及主表数据
                    string sql3 = string.Format(@"delect from Sc_PackUnionBillSub where HInterID=(select HBarcodeNo from Gy_BarCodeBill where HItemID="+ HInterID);
                    string sql4 = string.Format(@"delect from Sc_PackUnionBillMain where HInterID=(select HBarcodeNo from Gy_BarCodeBill where HItemID=" + HInterID);
                    //删除最大的合成的唯一码
                    string sql5 = string.Format(@"delete from Gy_BarCodeBill where HItemID=" + HInterID);
                    oCN.RunProc(sql3);
                    oCN.RunProc(sql4);
                    oCN.RunProc(sql5);
                }
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception ex)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除失败" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}