yusijie
2023-11-15 c022f537f5b80dbe5294c0ea40e2d7933d4f4ce4
WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_SOPBillController.cs
@@ -179,5 +179,42 @@
            }
        }
        /// <summary>
        /// æ ¹æ®ç‰©æ–™ï¼Œå·¥å•查找作业指导书
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_SopBill/getListByMaterID")]
        [HttpGet]
        public object getListByMaterID(Int64 HMaterID, string HSourceNo)
        {
            try
            {
                var sWhere = "";
                if (Convert.ToInt32(HMaterID) != 0 && HMaterID.ToString() != "" && HSourceNo != null && HSourceNo.ToString() != "" )
                {
                    sWhere += " and HMaterID = " + HMaterID + " and HSourceNo = '" + HSourceNo + "'";
                }
                string sql1 = string.Format(@"select * from h_v_Sc_ICMOBillList_ToSop where 1 = 1 " + sWhere);
                ds = oCN.RunProcReturn(sql1, "h_v_Sc_ICMOBillList_ToSop");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
    }
}