1
wtt
2026-01-05 55b631a6857913ba01bdf258ac979ed033b98b64
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
                    {
@@ -6809,10 +6833,10 @@
        #endregion
        #region æ‰«æå•据条码  å‡ºå…¥åº“模块
        #region æ‰«æå•据条码   20251225
        /// <summary>
        /// æ‰«æå•据条码  å‡ºå…¥åº“模块   æ ¡éªŒæ¨¡å¼
        /// æ‰«æå•据条码   æ ¡éªŒæ¨¡å¼
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/get_BillBarCode_BillCheck_Json")]
@@ -6851,7 +6875,7 @@
        #endregion
        #region æ‰«æå•据条码  å·²å­˜åœ¨æ‰«ç è®°å½•且单据发生变更后两边数据不一致时,清空原扫码数据   20241216
        #region æ‰«æå•据条码  å·²å­˜åœ¨æ‰«ç è®°å½•且单据发生变更后两边数据不一致时,清空原扫码数据   20251225
        /// <summary>
        /// å·²å­˜åœ¨æ‰«ç è®°å½•且单据发生变更后两边数据不一致时,清空原扫码数据
@@ -6893,7 +6917,7 @@
        #endregion
        #region æ‰«æç‰©æ–™æ¡ç   å‡ºå…¥åº“模块
        #region æ‰«æç‰©æ–™æ¡ç    20251225
        /// <summary>
        /// ç‰©æ–™æ¡ç æ–‡æœ¬æ¡† æ ¡éªŒæ‰«ç è°ƒç”¨  æ ¡éªŒæ¨¡å¼
@@ -6901,7 +6925,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 = "";
@@ -7097,11 +7121,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 +7169,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 +7280,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 +7350,7 @@
        #endregion
        #region æ ¡éªŒæ‰«ç æ¨¡å—,删除选中行条码出入库临时表记录    20241114
        #region æ ¡éªŒæ‰«ç æ¨¡å—,删除选中行条码出入库临时表记录    20251225
        /// <summary>
        /// æ‰«ç æ¨¡å—,删除选中行条码出入库临时表记录
@@ -7361,6 +7458,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 +7618,7 @@
        #endregion
        #region æ ¡éªŒç¼“存模块    æ ¹æ®å•据ID,删除临时表记录    20241216
        #region æ ¡éªŒç¼“存模块    æ ¹æ®å•据ID,删除临时表记录    20251225
        /// <summary>
        /// æ ¹æ®å•据ID,删除临时表记录
@@ -7429,6 +7635,7 @@
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                string sFIFOCtl = "4";              //先进先出控制(1、不控制仅显示下架清单 2、严格控制先进先出 3、仅提示和显示下架清单 4、不显示下架清单也不控制)
                #region ç³»ç»Ÿå‚数获取
                //采购入库单
@@ -7466,6 +7673,8 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl;
                }
                //销售出库单
                else if (HBillType == "1205")
@@ -7475,6 +7684,8 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl;
                }
                //其他出库单
                else if (HBillType == "1206")
@@ -7484,6 +7695,8 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl;
                }
                //委外领料单
                else if (HBillType == "1211")
@@ -7493,6 +7706,8 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl;
                }
                //生产补料单
                else if (HBillType == "1254")
@@ -7502,6 +7717,8 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl;
                }
                //委外补料单
                else if (HBillType == "1255")
@@ -7511,6 +7728,8 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl;
                }
                //直接调拨单
                else if (HBillType == "1207")
@@ -7520,6 +7739,8 @@
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //先进先出控制
                    sFIFOCtl = oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl;
                }
                #endregion
@@ -7557,6 +7778,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 " +
@@ -8118,11 +8345,7 @@
        #endregion
        #region ç”Ÿäº§ç»„托单模块 æ‰«æå®¢æˆ·ç®±ï¼ˆæ‰˜ï¼‰æ¡ç  -凯贝装箱单     20251103
        /// <summary>
        /// ç”Ÿäº§ç»„托单模块 æ‰«æç®±ï¼ˆæ‰˜ï¼‰æ¡ç 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_PackBarCode_PackUnionBill_New_Json_Cus")]
        [HttpGet]
        public object Get_PackBarCode_PackUnionBill_New_Json_Cus(Int64 HInterID, string HBillNo, string HBillType, string HBillSubType, string HBarCode_Pack, string HSourceBillNo)
@@ -13158,11 +13381,11 @@
        /// <returns></returns>
        [Route("WEBSController/BindCarAndWH")]
        [HttpGet]
        public object BindCarAndWH( string HMaker, Int64 HWhID, Int64 HSPID, string HCarBarCode, Int64 HStockOrgID)
        public object BindCarAndWH( string HMaker, Int64 HWhID, Int64 HSPID, string HCarBarCode, Int64 HStockOrgID,int bindsignal)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_bindingCarintoWh "  + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "','" + HMaker+ "'," + HStockOrgID.ToString(), "h_p_bindingCarintoWh");
                ds = oCn.RunProcReturn("exec h_p_bindingCarintoWh "  + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "','" + HMaker+ "'," + HStockOrgID.ToString()+","+ bindsignal, "h_p_bindingCarintoWh");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
@@ -13202,7 +13425,8 @@
        }
        #endregion
        //转移模块
        #region è½¬ç§»æ¨¡å—
        // è½¬ç§»æ¨¡å—
        [Route("WEBSController/CheckHW")]
        [HttpGet]
        public object CheckHW(int  HWhID,int HSPID,int HWhID2,int HSPID2,string HBarCode,string HCarBarCode1,string HCarBarCode2,string UserID)
@@ -13247,8 +13471,9 @@
                return objJsonResult;
            }
        }
        #endregion
       #region æƒ åº· ç”Ÿäº§é¢†æ–™å•校验 æ‰«ææºå• èŽ·å–ç”Ÿäº§é¢†æ–™å•å’Œä¸‹æ¸¸é¢†æ–™å•æœªå®¡æ ¸ å•据
        #region æƒ åº· ç”Ÿäº§é¢†æ–™å•校验 æ‰«ææºå• èŽ·å–ç”Ÿäº§é¢†æ–™å•å’Œä¸‹æ¸¸é¢†æ–™å•æœªå®¡æ ¸ å•据
        [Route("WEBSController/get_BillBarCode_BillCheck_Json_MateOut_HuiKang")]
        [HttpGet]
        public Object get_BillBarCode_BillCheck_Json_MateOut_HuiKang(string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID)
@@ -13360,5 +13585,163 @@
        #endregion
        #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,string user)
        {
            try
            {
                // Mode = 1 è¡¨ç¤º æ‰«ç æ¨¡å¼ Mode = 2 è¡¨ç¤º é€‰å•模式
                if(Mode == 1)
                {
                    //扫码模式需要解析条码获取HInterID和HEntryID
                    ds = oCn.RunProcReturn($@"
                    exec h_p_CheckBillBarCode_AnalysisBarcode
                        @HBillType={HBillType},
                        @HSourceBillType={HSourceBillType},
                        @HBarCode={HBarCode},
                        @user = '{user}'
                    ", "h_p_CheckBillBarCode_AnalysisBarcode");
                    if (ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "扫描单据条码失败!条码解析失败!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    HInterID = ds.Tables[0].Rows[0]["HInterID"].ToString();
                    HEntryID = ds.Tables[0].Rows[0]["HEntryID"].ToString();
                }
                // é€‰å•模式直接递入HInterID å’Œ HEntryID æ ¹æ® å–质检方案来源 èŽ·å– æ£€éªŒé¡¹ç›®
                ds = oCn.RunProcReturn($@"
                    exec h_p_CheckBillBarCode_CheckItem
                        @HBillType={HBillType},
                        @HSourceBillType={HSourceBillType},
                        @HInterID={HInterID},
                        @HEntryID={HEntryID}
                ", "h_p_CheckBillBarCode_CheckItem");
                if(ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "扫描单据条码失败!无绑定质检方案信息";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "success!";
                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
        #region å‡¯è´ è£…箱单扫描箱条码查询是否在客户条码档案,不在就解析保存客户条码档案表
        [Route("WEBSController/GetHBarCode_CusJX")]
        [HttpGet]
        public object GetHBarCode_CusJX(Int64 HInterID, string HBillNo, string HBillType, string HBillSubType, string HBarCode_Pack, string HSourceBillNo)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_PackUnionBill_New_CusJX " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "','" + HSourceBillNo + "'", "h_p_WMS_AddPackBarCode_PackUnionBill_New_CusJX");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "扫描箱、托条码发生错误!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    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
        #region æ·»åº·æ ¹æ®å°è½¦æ¡ç æ‰¾å‡ºç›¸åº”物料
        #endregion
        [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;
            }
        }
    }
}