zrg
2024-04-25 960ff2cf704b16190018cab0894b43421afc9208
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -2419,6 +2419,84 @@
        #region ç”Ÿäº§è¡¥æ–™    ä¸Šä¼ ç”Ÿå•
        #region ç”Ÿäº§è¡¥æ–™    æ–°å¢žæ¨¡å¼
        /// <summary>
        /// ç”Ÿäº§è¡¥æ–™æ–°å¢žä¸Šä¼ 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveMateReplenishOutBill_Json")]
        [HttpPost]
        public object set_SaveMateReplenishOutBill_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);
                WebS.ClsKf_MateReplenishOutBillMain websLsmain = new WebS.ClsKf_MateReplenishOutBillMain();
                string sSourceType = lsmain[0].HMainSourceBillType;
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = lsmain[0].HBillType;
                websLsmain.HDate = lsmain[0].HDate;
                websLsmain.HDeptID = lsmain[0].HDeptID;
                websLsmain.HWHID = lsmain[0].HWHID;
                websLsmain.HSCWHID = lsmain[0].HSCWHID;
                websLsmain.HSupID = lsmain[0].HSupID;
                websLsmain.HKeeperID = lsmain[0].HKeeperID;
                websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
                websLsmain.HEmpID = lsmain[0].HEmpID;
                websLsmain.HManagerID = lsmain[0].HManagerID;
                websLsmain.HRemark = lsmain[0].HRemark;
                websLsmain.HExplanation = lsmain[0].HExplanation;
                websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
                websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
                websLsmain.HBillSubType = lsmain[0].HBillSubType;
                if (lsmain[0].HMainSourceBillType == "3720")
                {
                    websLsmain.HMainSourceBillType = "生产用料清单";
                }
                else
                {
                    websLsmain.HMainSourceBillType = "手工录入";
                }
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HBillerID = lsmain[0].HBillerID;
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveMateReplenishOutBill_New(websLsmain, sSourceType, 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 ç”Ÿäº§è¡¥æ–™    æ ¡éªŒæ¨¡å¼
        /// <summary>
@@ -3285,6 +3363,48 @@
        #endregion
        #region ç”Ÿäº§è¡¥æ–™    æ‰«ææºå•条码
        /// <summary>
        /// ç”Ÿäº§è¡¥æ–™    æ‰«ææºå•条码
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_SourceBarCode_MateReplenishOut_Json")]
        [HttpGet]
        public object get_SourceBarCode_MateReplenishOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HStockOrgID)
        {
            try
            {
                WebSoBar = oWebs.get_SourceBarCode_MateReplenishOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
                if (WebSoBar == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功";
                    objJsonResult.data = WebSoBar;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç›´æŽ¥è°ƒæ‹¨    æ‰«ææºå•条码
        /// <summary>