yusijie
2022-11-25 494c68c9ad1cc3b085c27e87865269c4593c24e8
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -32,6 +32,74 @@
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        #region åŸºç¡€èµ„æ–™
        #region ä»“库资料
        //根据仓库ID、组织ID,返回仓库信息
        public Model.ClsGy_Warehouse_Model GetWhInfoByIDandOrg(long sHWhID, long HUSEORGID, ref string sErr)
        {
            DAL.ClsIF_Warehouse_View dal = new DAL.ClsIF_Warehouse_View();
            if (dal.GetInfoByIDandOrgID(sHWhID, HUSEORGID))
            {
                return dal.omodel;
            }
            else
            {
                return null;
            }
        }
        #endregion
        #region ä»“位资料
        #endregion
        #endregion
        #region åˆ é™¤æ¡ç å‡ºå…¥åº“临时表记录
        /// <summary>
        /// åˆ é™¤æ¡ç å‡ºå…¥åº“临时表记录
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json")]
        [HttpPost]
        public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType)
        {
            try
            {
                if (oWebs.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, HBillType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除条码出入库临时表记录失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region æäº¤ç”Ÿå•处理方法
@@ -96,6 +164,66 @@
        #endregion
        #region ç”Ÿäº§è¡¥æ–™    ä¸Šä¼ ç”Ÿå•
        #region ç”Ÿäº§è¡¥æ–™    æ ¡éªŒæ¨¡å¼
        /// <summary>
        /// ç”Ÿäº§è¡¥æ–™æ ¡éªŒä¸Šä¼ 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveMateReplenishOutBill_BillCheck_Json")]
        [HttpPost]
        public object set_SaveMateReplenishOutBill_BillCheck_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_MateReplenishOutBillMain> lsmain = new List<Model.ClsKf_MateReplenishOutBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getMateReplenishOutBillMainByJson(msg1);
                WebAPI.WebS.ClsKf_MateReplenishOutBillMain websLsmain = new WebS.ClsKf_MateReplenishOutBillMain();
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = "1254";
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveMateReplenishOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "生产补料校验失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #endregion