chenhaozhe
2026-01-19 8a29c0f8babf1f9e2d3c21c344bce4180d5f20a5
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -505,42 +505,22 @@
        {
            try
            {
                Int64 sHSPID = 0;
                Int64 sHWhID = 0;
                if (HBarCode.Contains(";"))
                //条码格式='HSP'+仓库内码+';'+仓位内码
                if (HBarCode.Contains("HSP") && HBarCode.Contains(";"))
                {
                    string[] sArray = HBarCode.Replace("HSP", "").Split(';');
                    sHSPID = DBUtility.ClsPub.isLong(sArray[1]);
                    sHWhID = DBUtility.ClsPub.isLong(sArray[0]);
                }
                    Int64 sHSPID = 0;
                    Int64 sHWhID = 0;
                    if (HBarCode.Contains(";"))
                    {
                        string[] sArray = HBarCode.Replace("HSP", "").Split(';');
                        sHSPID = DBUtility.ClsPub.isLong(sArray[1]);
                        sHWhID = DBUtility.ClsPub.isLong(sArray[0]);
                    }
                if (HWhID == 0)
                {
                    ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    if (HWhID == 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;
                    }
                }
                else
                {
                    ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
                        if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
                        ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
                        if (ds == null || ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
@@ -553,9 +533,53 @@
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "成功!";
                            objJsonResult.data = ds2.Tables[0];
                            objJsonResult.data = ds.Tables[0];
                            return objJsonResult;
                        }
                    }
                    else
                    {
                        ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
                        if (ds == null || ds.Tables[0].Rows.Count == 0)
                        {
                            DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
                            if (ds2 == null || ds2.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 = ds2.Tables[0];
                                return objJsonResult;
                            }
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "成功!";
                            objJsonResult.data = ds.Tables[0];
                            return objJsonResult;
                        }
                    }
                }
                else
                {
                    ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HBarCode='" + HBarCode + "' and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "没有返回任何记录,请确认所扫仓位条码是否属于该组织,且为非禁用状态!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
@@ -1094,7 +1118,7 @@
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
@@ -4846,6 +4870,62 @@
        #endregion
        #region ç”Ÿäº§é€€æ–™    æ ¡éªŒæ¨¡å¼
        /// <summary>
        /// ç”Ÿäº§é€€æ–™æ ¡éªŒä¸Šä¼ 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveMateOutBackBill_BillCheck_Json")]
        [HttpPost]
        public object set_SaveMateOutBackBill_BillCheck_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getICStockBillMainByJson(msg1);
                WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = "1244";
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveMateOutBackBill_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
        #region é”€å”®é€€è´§    ä¸Šä¼ ç”Ÿå•
@@ -5226,6 +5306,28 @@
                }
                else
                {
                    //删除前控制=========================================
                    DataSet dds = oCn.RunProcReturn("Exec h_p_KF_ICInventory_WorkShop_BeforeDelCtrl " + mainList[0].HInterID.ToString()  , "h_p_KF_ICInventory_WorkShop_BeforeDelCtrl");
                    if (dds == null)
                    {
                        oCn.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "删除前判断失败!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (DBUtility.ClsPub.isStrNull(dds.Tables[0].Rows[0]["HBack"]) != "0")
                    {
                        oCn.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "删除失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //更新车间物料库存
                    oCn.RunProc("EXEC h_p_WMS_UPDateICinventory_WorkShop " + mainList[0].HInterID.ToString() + ",'" + mainList[0].HBillType + "'");
                    //更新车间条码库存
@@ -6809,10 +6911,10 @@
        #endregion
        #region æ‰«æå•据条码  å‡ºå…¥åº“模块
        #region æ‰«æå•据条码   20251225
        /// <summary>
        /// æ‰«æå•据条码  å‡ºå…¥åº“模块   æ ¡éªŒæ¨¡å¼
        /// æ‰«æå•据条码   æ ¡éªŒæ¨¡å¼
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/get_BillBarCode_BillCheck_Json")]
@@ -6851,7 +6953,7 @@
        #endregion
        #region æ‰«æå•据条码  å·²å­˜åœ¨æ‰«ç è®°å½•且单据发生变更后两边数据不一致时,清空原扫码数据   20241216
        #region æ‰«æå•据条码  å·²å­˜åœ¨æ‰«ç è®°å½•且单据发生变更后两边数据不一致时,清空原扫码数据   20251225
        /// <summary>
        /// å·²å­˜åœ¨æ‰«ç è®°å½•且单据发生变更后两边数据不一致时,清空原扫码数据
@@ -6893,7 +6995,7 @@
        #endregion
        #region æ‰«æç‰©æ–™æ¡ç   å‡ºå…¥åº“模块
        #region æ‰«æç‰©æ–™æ¡ç    20251225
        /// <summary>
        /// ç‰©æ–™æ¡ç æ–‡æœ¬æ¡† æ ¡éªŒæ‰«ç è°ƒç”¨  æ ¡éªŒæ¨¡å¼
@@ -6901,7 +7003,7 @@
        /// <returns></returns>
        [Route("WEBSController/get_CheckTypeByBarCode_BillCheck_Json")]
        [HttpGet]
        public Object get_CheckTypeByBarCode_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, Int64 HStockOrgID)
        public Object get_CheckTypeByBarCode_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, Int64 HStockOrgID)
        {
            //获取系统参数
            string sErrMsg = "";
@@ -7052,6 +7154,76 @@
                        sAutoBarCode = "Y";
                    }
                }
                //采购退料单
                else if (HBillType == "1239")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //生产退库单
                else if (HBillType == "1245")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //生产退料单
                else if (HBillType == "1244")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //销售退货单
                else if (HBillType == "1247")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //委外退料单
                else if (HBillType == "1238")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                #endregion
                if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称     ç©ºç™½ä¸ºé€šç”¨
@@ -7097,11 +7269,19 @@
                    //原单据非扫码生成,校验时生成条码记录
                    else
                    {
                        WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
                        WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck_New(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, 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 if (WebSoBar.HRemark == "仅提示")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 2;
                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
@@ -7137,7 +7317,71 @@
        #endregion
        #region è¿”回单据列表信息    20241114
        #region æ‰«æç‰©æ–™æ¡ç   å¯ç”¨å…ˆè¿›å…ˆå‡ºä»…提示控制,条码不在先进先出列表中允许扫描写入   20251225
        /// <summary>
        /// å¯ç”¨å…ˆè¿›å…ˆå‡ºä»…提示控制,条码不在先进先出列表中  å­˜å…¥æ¡ç å‡ºå…¥åº“临时表
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/get_SavePonderationBillMain_Temp_BarCodeFIFO_BillCheck_Json")]
        [HttpGet]
        public Object get_SavePonderationBillMain_Temp_BarCodeFIFO_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, Int64 HStockOrgID)
        {
            //获取系统参数
            string sErrMsg = "";
            string sJXCode = "";
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称     ç©ºç™½ä¸ºé€šç”¨
                {
                    sJXCode = POStockInBillController.JX_Json(sBarCode, HBillID, HBillType, HStockOrgID, HBillNo, HMaker);
                }
                else
                {
                    sJXCode = sBarCode;
                }
                try
                {
                    WebSoBar = oWebs.get_SavePonderationBillMain_Temp_BarCodeFIFO_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, 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;
                }
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region è¿”回单据列表信息    20251225
        /// <summary>
        /// è¿”回单据列表信息    æ ¡éªŒæ¨¡å¼
@@ -7184,7 +7428,8 @@
                    objJsonResult.data = new
                    {
                        Materlist = ds.Tables[0],           //返回物料明细列表信息(0)
                        BarCodeDetailslist = ds.Tables[1],  //返回当前所扫描条码明细信息(5)
                        BarCodeDetailslist = ds.Tables[1],  //返回当前所扫描条码明细信息(1)
                        FIFOlist = ds.Tables[2],            //返回先进先出列表信息(2)
                    };
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
@@ -7253,7 +7498,7 @@
        #endregion
        #region æ ¡éªŒæ‰«ç æ¨¡å—,删除选中行条码出入库临时表记录    20241114
        #region æ ¡éªŒæ‰«ç æ¨¡å—,删除选中行条码出入库临时表记录    20251225
        /// <summary>
        /// æ‰«ç æ¨¡å—,删除选中行条码出入库临时表记录
@@ -7361,6 +7606,115 @@
        #endregion
        #region æ‰«ç æ¨¡å—    é€€å‡ºåŠŸèƒ½æŒ‰é’®è°ƒç”¨    æ›´æ–°å…ˆè¿›å…ˆå‡ºä¸´æ—¶è¡¨çŠ¶æ€ï¼ˆæ›´æ–° HlineStatus =1)  20251225
        /// <summary>
        /// æ‰«ç æ¨¡å—,退出时更新先进先出临时表状态 HlineStatus
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_UPDateFIFOTmp_BillCheck_Json")]
        [HttpGet]
        public object set_UPDateFIFOTmp_BillCheck_Json(long HInterID, string HBillType, Int64 HStockOrgID)
        {
            //获取系统参数
            string sErrMsg = "";
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                string sFIFOCtl = "N";          //先进先出控制(1、不控制仅显示下架清单 2、严格控制先进先出 3、仅提示和显示下架清单 4、不显示下架清单也不控制)
                #region ç³»ç»Ÿå‚数获取
                //生产领料单-先进先出控制
                if (HBillType == "1204"
                    && oSystemParameter.omodel.Kf_MateOutBillCheck_AutoBarCode.ToUpper() == "N"         //免扫物料条码模式('Y'为不扫物料条码)
                    && oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "N"    //校验-是否进行源单对应条码核对('Y'为核对)
                    && (oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl == "3"))
                {
                    sFIFOCtl = "Y";
                }
                //销售出库单-先进先出控制
                if (HBillType == "1205"
                    && oSystemParameter.omodel.Kf_SellOutBillCheck_AutoBarCode.ToUpper() == "N"         //免扫物料条码模式('Y'为不扫物料条码)
                    && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "N"    //校验-是否进行源单对应条码核对('Y'为核对)
                    && (oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl == "3"))
                {
                    sFIFOCtl = "Y";
                }
                //其他出库单-先进先出控制
                if (HBillType == "1206"
                    && oSystemParameter.omodel.Kf_OtherOutBillCheck_AutoBarCode.ToUpper() == "N"         //免扫物料条码模式('Y'为不扫物料条码)
                    && oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "N"    //校验-是否进行源单对应条码核对('Y'为核对)
                    && (oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl == "3"))
                {
                    sFIFOCtl = "Y";
                }
                //委外出库单-先进先出控制
                if (HBillType == "1211"
                    && oSystemParameter.omodel.Kf_EntrustOutBillCheck_AutoBarCode.ToUpper() == "N"         //免扫物料条码模式('Y'为不扫物料条码)
                    && oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "N"    //校验-是否进行源单对应条码核对('Y'为核对)
                    && (oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl == "3"))
                {
                    sFIFOCtl = "Y";
                }
                //生产补料单-先进先出控制
                if (HBillType == "1254"
                    && oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_AutoBarCode.ToUpper() == "N"         //免扫物料条码模式('Y'为不扫物料条码)
                    && oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "N"    //校验-是否进行源单对应条码核对('Y'为核对)
                    && (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl == "3"))
                {
                    sFIFOCtl = "Y";
                }
                //委外补料单-先进先出控制
                if (HBillType == "1255"
                    && oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_AutoBarCode.ToUpper() == "N"         //免扫物料条码模式('Y'为不扫物料条码)
                    && oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "N"    //校验-是否进行源单对应条码核对('Y'为核对)
                    && (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl == "3"))
                {
                    sFIFOCtl = "Y";
                }
                //直接调拨单-先进先出控制
                if (HBillType == "1207"
                    && oSystemParameter.omodel.Kf_MoveStockBillCheck_AutoBarCode.ToUpper() == "N"         //免扫物料条码模式('Y'为不扫物料条码)
                    && oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "N"    //校验-是否进行源单对应条码核对('Y'为核对)
                    && (oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl == "3"))
                {
                    sFIFOCtl = "Y";
                }
                #endregion
                try
                {
                    if (sFIFOCtl == "Y")
                    {
                        //更新先进先出临时表状态
                        oCn.RunProc("EXEC h_p_WMS_UPDateICInventory_FIFO_Tmp_BillCheck " + HInterID.ToString() + ",'" + HBillType + "'");
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                catch (Exception e)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "更新先进先出临时表HlineStatus值失败!" + e.ToString();
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region æ ¡éªŒç¼“存模块    è¿”回缓存列表信息
        /// <summary>
@@ -7412,7 +7766,7 @@
        #endregion
        #region æ ¡éªŒç¼“存模块    æ ¹æ®å•据ID,删除临时表记录    20241216
        #region æ ¡éªŒç¼“存模块    æ ¹æ®å•据ID,删除临时表记录    20251225
        /// <summary>
        /// æ ¹æ®å•据ID,删除临时表记录
@@ -7429,6 +7783,7 @@
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                string sFIFOCtl = "4";              //先进先出控制(1、不控制仅显示下架清单 2、严格控制先进先出 3、仅提示和显示下架清单 4、不显示下架清单也不控制)
                #region ç³»ç»Ÿå‚数获取
                //采购入库单
@@ -7466,6 +7821,8 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl;
                }
                //销售出库单
                else if (HBillType == "1205")
@@ -7475,6 +7832,8 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl;
                }
                //其他出库单
                else if (HBillType == "1206")
@@ -7484,6 +7843,8 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl;
                }
                //委外领料单
                else if (HBillType == "1211")
@@ -7493,6 +7854,8 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl;
                }
                //生产补料单
                else if (HBillType == "1254")
@@ -7502,6 +7865,8 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl;
                }
                //委外补料单
                else if (HBillType == "1255")
@@ -7511,12 +7876,61 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl;
                }
                //直接调拨单
                else if (HBillType == "1207")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl;
                }
                //采购退料单
                else if (HBillType == "1239")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //生产退库单
                else if (HBillType == "1245")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //生产退料单
                else if (HBillType == "1244")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //销售退货单
                else if (HBillType == "1247")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //委外退料单
                else if (HBillType == "1238")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -7557,6 +7971,12 @@
                    try
                    {
                        oCn.BeginTran();
                        //删除先进先出临时表记录
                        if (sFIFOCtl == "1" || sFIFOCtl == "2" || sFIFOCtl == "3")
                        {
                            oCn.RunProc("Delete from Kf_ICInventory_FIFO_Tmp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                        }
                        //删除条码出入库临时表记录
                        oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HSubBillType=1", ref DBUtility.ClsPub.sExeReturnInfo);
                        //写入日志
                        oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
@@ -7825,6 +8245,51 @@
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //采购退料单
                else if (HBillType == "1239")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //生产退库单
                else if (HBillType == "1245")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //生产退料单
                else if (HBillType == "1244")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //销售退货单
                else if (HBillType == "1247")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //委外退料单
                else if (HBillType == "1238")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -13361,7 +13826,7 @@
        #region æ£€éªŒå• æ‰«ææºå• æ ¹æ®å•据类型 æºå•类型 æºå•号 è§£æžå¹¶è¿”回检验项目
        [Route("WEBSController/get_CheckBillBarCode_Json_CheckItem")]
        [HttpGet]
        public Object get_CheckBillBarCode_Json_CheckItem(int HBillType, int HSourceBillType, string HBarCode, string HInterID, string HEntryID, int Mode)
        public Object get_CheckBillBarCode_Json_CheckItem(int HBillType, int HSourceBillType, string HBarCode, string HInterID, string HEntryID, int Mode,string user)
        {
            try
            {
@@ -13373,7 +13838,8 @@
                    exec h_p_CheckBillBarCode_AnalysisBarcode 
                        @HBillType={HBillType},
                        @HSourceBillType={HSourceBillType},
                        @HBarCode={HBarCode}
                        @HBarCode={HBarCode},
                        @user = '{user}'
                    ", "h_p_CheckBillBarCode_AnalysisBarcode");
                    if (ds.Tables[0].Rows.Count == 0)
@@ -13470,5 +13936,51 @@
        }
        #endregion
        #region æ·»åº·æ ¹æ®å°è½¦æ¡ç æ‰¾å‡ºç›¸åº”物料
        [Route("WEBSController/GetMaterIDByCarBarCode")]
        [HttpGet]
        public object GetMaterIDByCarBarCode(string CarBarCode)
        {
            try
            {
                ds = oCn.RunProcReturn("select * from GetMaterMesByCarBarCode where å°è½¦='" + CarBarCode.ToString() + "'" , "GetMaterMesByCarBarCode");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "根据物料返回缓存列表条码信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}