1
wtt
9 天以前 aa51348d3501aa3a9bbda287929f3c8a05825063
WebAPI/Controllers/POStockInBillController.cs
@@ -3369,9 +3369,77 @@
        }
        #region  [通过 源单单号 进行 来料检验]
        /// <summary>
        /// 通过 源单单号 进行 来料检验
        /// </summary>
        /// <param name="HBarCode">源单单号</param>
        /// <param name="HOrgID">组织ID</param>
        /// <returns></returns>
        [Route("Kf_QCStockInCheckBill_Fast/BarCode_Json_SourceBillNo")]
        [HttpGet]
        public object BarCode_Json_SourceBillNo(string HBarCode, Int64 HOrgID)
        {
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                DataSet Dss;
                // 获取金蝶云中对应的组织
                Dss = oCN.RunProcReturn(" select HNumber from h_v_CLD_ORGANIZATIONSList where HItemID= " + HOrgID, "h_v_CLD_ORGANIZATIONSList");
                string HOrgNumber = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["HNumber"]);
                // 根据采购订单号获取 收料通知单 和 物料信息
                DataSet Dss2;
                Dss2 = oCn.RunProcReturn(" select fid,FMATERIALID,FENTRYID,FBILLNO from h_v_RECEIVEQuery where FSRCBILLNO= '" + HBarCode + "'", "h_v_RECEIVEQuery");
                if(Dss2 == null || Dss2.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string HPOStockInBillNo = Dss2.Tables[0].Rows[0]["FBILLNO"].ToString();
                DataSet ds;
                ds = oCN.RunProcReturn("select * from h_v_QCStockInCheckBill_Json_SourceBill where  HSourceBillNo ='" + HPOStockInBillNo.ToString() + "'", "h_v_QCStockInCheckBill_Json");
                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
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        [Route("Kf_QCStockInCheckBill_Fast/BarCode_Json")]
        [HttpGet]