jhz
2022-08-09 9d93f219367a57659c6641319922dee224e68d39
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_CompleteController..cs
@@ -1,4 +1,5 @@
using DBUtility;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -115,5 +116,47 @@
            }
        }
        #endregion
        #region é½å¥—分析报表
        public class ReportMOMaterReadysBill
        {
            public int? HORGID;//组织
            public int? HMATERIALID;//物料
            public int? HDeptID;//生产车间
            public int? HSCZYID;//生产资源
            public string HXQD;//需求单号
            public string HMOBILLNO;//生产订单号
        }
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        [Route("JIT_Complete/ReportMOMaterReadysBillList")]
        [HttpGet]
        public object ReportMOMaterReadysBillList(string sWhere)
        {
            try
            {
                ReportMOMaterReadysBill Report = JsonConvert.DeserializeObject<ReportMOMaterReadysBill>(sWhere);
                ds = oCN.RunProcReturn($"exec  PR_Complete_Report '{Report.HXQD}','{Report.HMOBILLNO}',{Report.HORGID},{Report.HDeptID},{Report.HSCZYID},{Report.HMATERIALID}", "PR_Complete_Report");
                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 = e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}