llj
2025-10-31 b8d7145eadce706aef50ef95be75cff9ef79b518
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÌõÂëÉú³É/Sc_BarCodeController.cs
@@ -25,6 +25,7 @@
        public WebServer webserver = new WebServer();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        private WebS.WebService1 oWebs = new WebS.WebService1();
        public WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
        //获取系统参数
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        public Int64 HInterID = 0;      //内码
@@ -2752,30 +2753,42 @@
        #region [条码生成接口_小卫镭雕码]
        [Route("Sc_BarCode/SaveSNByICMO_XW")]
        [HttpGet]
        public object SaveSNByICMO_XW(String HBillNo,string HSN, int HBeginNo, int HEndNo, int HCount)
        public object SaveSNByICMO_XW(String HBillNo,string HSN, int HBeginNo, int HEndNo, int HCount,string HMachineCode)
        {
            try
            {
                //ds = oCN.RunProcReturn("exec h_p_WMS_GetSNByICMO_XW '" + HCount + "', "+ HSeq, "h_p_WMS_GetSNByICMO_XW");
                if(oWebs.GetWebAPIToLocal_ICMO(HBillNo, "3710", "admin", ref DBUtility.ClsPub.sErrInfo)==false)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "[0000-2-020]单据同步失败请联系管理员,"+ DBUtility.ClsPub.sErrInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    ds = oCN.RunProcReturn("exec h_p_WMS_SaveSNByICMO_XW '" + @HBillNo + "', " + HSN +","+HBeginNo+","+HEndNo+","+HCount+",'"+HMachineCode+"'", "h_p_WMS_SaveSNByICMO_XW");
                //if (ds == null)
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "[0000-2-020]没有返回任何结果,条码保存失败!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = ds.Tables[0].Rows[0]["HRemark"].ToString();
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                    if (ds == null)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "[0000-2-020]没有返回任何结果,条码保存失败!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "[0000-2-020]条码绑定失败!"+ ds.Tables[0].Rows[0]["HRemark"].ToString();
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "[0000-1-037]条码生成成功!";