ch
2022-01-14 1f53d71884bb7f6264da7f2b2a1adb5351a8e420
WebAPI/Controllers/MateOutController.cs
@@ -70,56 +70,78 @@
        /// <returns></returns>
        [Route("MateOut/set_SavePonderationBillMain_Temp_Mate_Source_Fast_Json")]
        [HttpGet]
        public object set_SavePonderationBillMain_Temp_Mate_Source_Fast_Json(string HSourceBillType,string HSourceBillNo, Int64 sInterID, string sBillNo)
        public object set_SavePonderationBillMain_Temp_Mate_Source_Fast_Json(Int64 sInterID, string sBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string sMaker,double sPPQty,string sPlanMode,Int64 sFIFOWHID, Int64 HOWNERID)
        {
            try
            //try
            //{
            //   // DataSet ds = new DataSet();
            //   // WebServer webserver = new WebServer();
            //    string sWhere = " Where 单据号 like '%" + HSourceBillNo.Trim() + "%'";
            //    ds = webserver.GetSc_PPBomBillList(sWhere);
            //    if (ds == null || ds.Tables[0].Rows.Count <= 0)
            //    {
            //        objJsonResult.code = "0";
            //        objJsonResult.count = 0;
            //        objJsonResult.Message = "没有返回任何记录!";
            //        objJsonResult.data = null;
            //        return objJsonResult;
            //        //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
            //    }
            //    else
            //    {
            //        //HSupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSupID"]);
            //        //HSupName = Convert.ToString(ds.Tables[0].Rows[0]["HSupName"]);
            //        HDeptID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HDeptID"]);
            //        HDeptName = Convert.ToString(ds.Tables[0].Rows[0]["HDeptName"]);
            //        if (webserver.set_SavePonderationBillMain_Temp_Source_Fast(sInterID, sBillNo, HBillType, HSourceBillNo, HSourceBillType, "蓝字", ref DBUtility.ClsPub.sErrInfo))
            //        {
            //            objJsonResult.code = "0";
            //            objJsonResult.count = 1;
            //            objJsonResult.Message = "返回记录成功!";
            //            objJsonResult.data = null;
            //            return objJsonResult;
            //        }
            //        else
            //        {
            //            objJsonResult.code = "0";
            //            objJsonResult.count = 0;
            //            objJsonResult.Message = "扫码失败!" + DBUtility.ClsPub.sErrInfo;
            //            objJsonResult.data = null;
            //            return objJsonResult;
            //        }
            //    }
            //}
            //catch (Exception ex)
            //{
            //    objJsonResult.code = "0";
            //    objJsonResult.count = 0;
            //    objJsonResult.Message = "没有返回任何记录!"+ex.ToString();
            //    objJsonResult.data = null;
            //    return objJsonResult;
            //}
            WebS.WebService1 oWebs1 = new WebS.WebService1();
            WebSoBar = oWebs1.get_SourceBarCode_MateOut(sInterID, sBillNo, HBillType,  HSourceBillNo, HSourceBillType, sMaker, sPPQty, sPlanMode, sFIFOWHID, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
            //oBar = webserver.get_CheckTypeByBarCode_Out(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
            if (WebSoBar == null)
            {
               // DataSet ds = new DataSet();
               // WebServer webserver = new WebServer();
                string sWhere = " Where 单据号 like '%" + HSourceBillNo.Trim() + "%'";
                ds = webserver.GetSc_PPBomBillList(sWhere);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                    //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning);
                }
                else
                {
                    //HSupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSupID"]);
                    //HSupName = Convert.ToString(ds.Tables[0].Rows[0]["HSupName"]);
                    HDeptID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HDeptID"]);
                    HDeptName = Convert.ToString(ds.Tables[0].Rows[0]["HDeptName"]);
                    if (webserver.set_SavePonderationBillMain_Temp_Source_Fast(sInterID, sBillNo, HBillType, HSourceBillNo, HSourceBillType, "蓝字", ref DBUtility.ClsPub.sErrInfo))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "返回记录成功!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "扫码失败!" + DBUtility.ClsPub.sErrInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!"+ex.ToString();
                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                objJsonResult.data = null;
                return objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                objJsonResult.data = oBar;
                return objJsonResult;
            }
        }
        /// <summary>