zzr99
2022-03-25 f3e1b2eac8a806b3ae8d5a8854d694204e2468ad
WebAPI/Controllers/SCGL/Sc_ComplementGoodsController.cs
@@ -81,10 +81,46 @@
        }
        #endregion
        #region 拣料配送单 删除
        [Route("Sc_ComplementGoods/DelComplementGoodsList")]
        [HttpGet]
        public object DelComplementGoodsList(string HInterID, string HEntryID,string HOrgID, string user)
        {
            try
            {
                //删除权限
                if (!DBUtility.ClsPub.Security_Log("Cj_ComplementGoodsBill_Drop", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无删除权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.RunProc($"exec Del_ComplementGoodsBillInfo {HInterID},{HEntryID},{HOrgID}");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region 配料单列表
        [Route("Sc_ComplementGoods/ComplementGoodsBill")]
        [HttpGet]
        public object ComplementGoodsBill(string sWhere, string user)
        public object ComplementGoodsBill(string sWhere)
        {
            try
            {
@@ -96,12 +132,45 @@
                    objJsonResult.data = new DataTable();
                    return objJsonResult;
                }
                //反序列化传递的值
                ComplementGoods com = JsonConvert.DeserializeObject<ComplementGoods>(sWhere.ToString());
                ds = oCN.RunProcReturn($"exec h_p_JIT_ComplementGoods_Load '{sWhere}'", "h_p_JIT_ComplementGoods_Load");
                //ds = oCN.RunProcReturn($"exec h_p_JIT_ComplementGoods_Load '{com.MaterialNumber}','{com.MaterialName}','{com.MaterialModel}','{com.HGD}'," +
                //    $"'{com.HWHName}','{com.HDeptName}','{com.Organization}','{com.user}','{com.HJLStatus}','{com.HBeginDate}','{com.HEndDate}'", "h_p_JIT_ComplementGoodsBillList_Query");
                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;
            }
        }
        #endregion
        #region 匹配库存
        [Route("Sc_ComplementGoods/ComplementGoodsBill_C")]
        [HttpGet]
        public object ComplementGoodsBill_C(string sWhere)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = new DataTable();
                    return objJsonResult;
                }
                oCN.RunProc($"exec h_p_JIT_ComplementGoodsBill_C_Add '{sWhere}'");
                ds = oCN.RunProcReturn("exec h_p_JIT_GetComplementGoodsBill_C  " + sWhere, "h_p_JIT_GetComplementGoodsBill_C");
                objJsonResult.code = "1";
                objJsonResult.count = 1;