1
zrg
16 小时以前 41e5436d8a03b7e3f3412dad1e4b040043ba7b3f
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -16132,6 +16132,60 @@
        #endregion
        #region 器具处理出库单 返回源单数据
        /// <summary>
        /// 返回源单数据
        /// </summary>
        /// <returns></returns>
        [Route("Sc_MouldScrapOutHouseBill/GetSourceBill_MouldScrapOutHouse_Json")]
        [HttpGet]
        public object GetSourceBill_MouldScrapOutHouse_Json(Int64 HInterID, Int64 HEntryID, string HBillType)
        {
            try
            {
                string sViewName = "";
                //器具领用申请单
                if (HBillType == "3823")
                {
                    sViewName = "h_v_Sc_MouldScrapRequestBillList";
                }
                if (sViewName == "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "不支持该源单类型!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCn.RunProcReturn("select * from h_v_Sc_MouldScrapRequestBillList where hmainid="+ HInterID.ToString()+ "and hsubid="+ HEntryID, "h_v_Sc_MouldScrapRequestBillList");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "未查询到源单信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                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
    }
}