1
llj
16 小时以前 e3f218a023f0625f415a1526b278636c3e39aa4f
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -658,6 +658,44 @@
            }
        }
        /// <summary>
        /// èŽ·å–éƒ¨é—¨åˆ—è¡¨ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetDepartmentList_Json")]
        [HttpGet]
        public object GetDepartmentList_Json(string Department, Int64 HStockOrgID)
        {
            try
            {
                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Department with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Department + "%' or HName like '%" + Department + "%')", "Gy_Department");
                if (ds == null || ds.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 = 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 ä¾›åº”商资料
@@ -1453,28 +1491,107 @@
        {
            try
            {
                if (oWebs.set_DelPonderationBillMain_Temp_FIFO(HInterID, 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;
                }
                //更新先进先出临时表状态
                oCn.RunProc("EXEC h_p_WMS_UPDateICInventory_FIFO_Tmp " + 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;
            }
        }
        /// <summary>
        /// å‡ºåº“扫码模块,退出时更新先进先出临时表状态 HlineStatus  20250722
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_DelPonderationBillMain_Temp_FIFO_New_Json")]
        [HttpGet]
        public object set_DelPonderationBillMain_Temp_FIFO_New_Json(long HInterID, string HBillType, Int64 HStockOrgID)
        {
            //获取系统参数
            string sErrMsg = "";
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                string sERPMode = oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode;   //库存控制-WMS库存控制ERP模式   (WISE、CLOUD、MES)
                string sFIFOCtl = "N";          //先进先出控制('Y'为控制)
                //生产领料单-先进先出控制
                if (HBillType == "1204" && (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MateOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //销售出库单-先进先出控制
                else if (HBillType == "1205" && (oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_SellOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //其他出库单-先进先出控制
                else if (HBillType == "1206" && (oSystemParameter.omodel.Kf_OtherOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_OtherOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //委外出库单-先进先出控制
                else if (HBillType == "1211" && (oSystemParameter.omodel.Kf_EntrustOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_EntrustOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //直接调拨单-先进先出控制
                else if (HBillType == "1207" && (oSystemParameter.omodel.Kf_MoveStockBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MoveStockBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //分步式调出单-先进先出控制
                else if (HBillType == "1250" && (oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //生产补料单-先进先出控制
                else if (HBillType == "1254" && (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //委外补料单-先进先出控制
                else if (HBillType == "1255" && (oSystemParameter.omodel.Kf_EntrustReplenishOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_EntrustReplenishOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                try
                {
                    if(sFIFOCtl == "Y")
                    {
                        //更新先进先出临时表状态
                        oCn.RunProc("EXEC h_p_WMS_UPDateICInventory_FIFO_Tmp " + 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;
            }
@@ -1629,6 +1746,101 @@
        #endregion
        #region æ ·å“é”€å”®å‡ºåº“缓存列表界面,返回缓存列表信息
        /// <summary>
        /// ç¼“存列表界面,返回缓存列表信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetKf_PonderationBillMain_TempList_New_Json_YPSellOut")]
        [HttpGet]
        public object GetKf_PonderationBillMain_TempList_New_Json_YPSellOut(string HBillType, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_KF_GetPonderationBillMain_TempList_New_YPSellOut '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_KF_GetPonderationBillMain_TempList_New_YPSellOut");
                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
        #region æ ·å“é”€å”®å‡ºåº“缓存列表界面,返回已上传列表信息
        [Route("WEBSController/GetKf_ICStockBillList_Json_YPSellOut")]
        [HttpGet]
        public object GetKf_ICStockBillList_Json_YPSellOut(string HBillType, string HBillNo, string HSourceBillNo, string HMaker, Int64 HStockOrgID, string sWhere)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_Kf_ICStockBillQueryList_New_YPSellOut '" + HBillType + "','" + HBillNo + "','" + HSourceBillNo + "','" + HMaker + "'," + HStockOrgID.ToString() + ",'" + sWhere + "'", "h_p_Kf_ICStockBillQueryList_New_YPSellOut");
                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
        #region ç¼“存列表    ç¼–辑功能调用
@@ -1956,27 +2168,114 @@
        }
        /// <summary>
        /// åˆ é™¤ç¼“存列表单据
        /// åˆ é™¤ç¼“存列表单据,删除时判断单据是否异常,写入日志   20250722
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_DelPonderationBillMain_Temp_Json")]
        [HttpGet]
        public object set_DelPonderationBillMain_Temp_Json(long HInterID, string HBillType)
        public object set_DelPonderationBillMain_Temp_Json(long HInterID, string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID, string MvarReportTitle)
        {
            try
            //获取系统参数
            string sErrMsg = "";
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功";
                objJsonResult.data = null;
                return objJsonResult;
                string sERPMode = oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode;   //库存控制-WMS库存控制ERP模式   (WISE、CLOUD、MES)
                string sFIFOCtl = "N";          //先进先出控制('Y'为控制)
                //生产领料单-先进先出控制
                if (HBillType == "1204" && (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MateOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //销售出库单-先进先出控制
                else if (HBillType == "1205" && (oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_SellOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //其他出库单-先进先出控制
                else if (HBillType == "1206" && (oSystemParameter.omodel.Kf_OtherOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_OtherOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //委外出库单-先进先出控制
                else if (HBillType == "1211" && (oSystemParameter.omodel.Kf_EntrustOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_EntrustOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //直接调拨单-先进先出控制
                else if (HBillType == "1207" && (oSystemParameter.omodel.Kf_MoveStockBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MoveStockBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //分步式调出单-先进先出控制
                else if (HBillType == "1250" && (oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //生产补料单-先进先出控制
                else if (HBillType == "1254" && (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                //委外补料单-先进先出控制
                else if (HBillType == "1255" && (oSystemParameter.omodel.Kf_EntrustReplenishOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_EntrustReplenishOutBill_FIFOList.ToUpper() == "Y"))
                {
                    sFIFOCtl = "Y";
                }
                try
                {
                    string WorkList = "删除缓存单据,单据号:" + HBillNo;
                    string SystemName = "WMS-" + MvarReportTitle + "模块";
                    oCn.BeginTran();
                    ds = oCn.RunProcReturn("exec h_p_WMS_PonderationBillMain_Temp_Delete " + HInterID + ",'" + HBillNo + "','" + HBillType + "','" + sFIFOCtl + "','" + sERPMode + "'", "h_p_WMS_PonderationBillMain_Temp_Delete");
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        oCn.RollBack();
                        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)
                    {
                        oCn.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;  //失败!
                        objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        //写入日志
                        oCn.RunProc("Insert into  System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
                            "(getdate(),'" + HMaker + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','','删除')"
                            );
                        oCn.Commit();
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "单据号:" + HBillNo + " åˆ é™¤æˆåŠŸ";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                catch (Exception e)
                {
                    oCn.RollBack();
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "删除条码出入库缓存列表单据失败!" + e.ToString();
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除条码出入库缓存列表单据失败!" + e.ToString();
                objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -2849,6 +3148,105 @@
        #endregion
        #region é”€å”®å‡ºåº“    æ–°å¢žæ¨¡å¼ï¼ˆæ ·å“é”€å”®å‡ºåº“)
        /// <summary>
        /// é”€å”®å‡ºåº“新增上传
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveSellOutBill_Json_YP")]
        [HttpPost]
        public object set_SaveSellOutBill_Json_YP([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_SellOutBillMain> lsmain = new List<Model.ClsKf_SellOutBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getSellOutBillMainByJson(msg1);
                WebS.ClsKf_SellOutBillMain websLsmain = new WebS.ClsKf_SellOutBillMain();
                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 == "1402")
                {
                    websLsmain.HMainSourceBillType = "发货通知单";
                }
                else if (lsmain[0].HMainSourceBillType == "1401")
                {
                    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_SaveSellOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
                {
                    oCn.BeginTran();
                    try
                    {
                        string sql_reWriteTaxData = "exec h_p_Kf_SellOutBill_withOutSourceBill_ReWriteTax " + lsmain[0].HInterID + "," + lsmain[0].HIsTaxRate + "," + lsmain[0].HIsTaxRate_upper;
                        oCn.RunProc(sql_reWriteTaxData);
                        oCn.Commit();
                    }
                    catch (Exception e3)
                    {
                        oCn.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "销售出库单上传成功!!税率计算失败!!" + e3.ToString();
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    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>
@@ -2956,6 +3354,8 @@
                websLsmain.HBillerID = lsmain[0].HBillerID;
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveEntrustOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
                {
@@ -4409,7 +4809,7 @@
        /// å°è½¦é”å®šå•新增上传
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveTrolleyPositionBill_Json2")]
        [Route("WEBSController/set_SaveTrolleyPositionBill_Json")]
        [HttpPost]
        public object set_SaveTrolleyPositionBill_Json([FromBody] JObject msg)
        {
@@ -5913,6 +6313,7 @@
            string sJXCode = "";
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                string sAutoBarCode = "N";        //免扫物料条码模式('Y'为不扫物料条码)
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                #region ç³»ç»Ÿå‚数获取
@@ -5920,90 +6321,140 @@
                if (HBillType == "1201")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //生产入库单
                if (HBillType == "1202")
                else if (HBillType == "1202")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //其他入库单
                if (HBillType == "1203")
                else if (HBillType == "1203")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //领料出库单
                else if (HBillType == "1204")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //销售出库单
                else if (HBillType == "1205")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //其他出库单
                else if (HBillType == "1206")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //委外领料单
                else if (HBillType == "1211")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //生产补料单
                else if (HBillType == "1254")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //委外补料单
                else if (HBillType == "1255")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                //直接调拨单
                else if (HBillType == "1207")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_AutoBarCode.ToUpper() == "Y")
                    {
                        sAutoBarCode = "Y";
                    }
                }
                #endregion
@@ -6018,8 +6469,17 @@
                }
                try
                {
                    //免扫物料条码模式('Y'为不扫物料条码)
                    if (sAutoBarCode == "Y")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "免扫物料条码模式,无需扫描物料条码!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //原单据为扫码生成,校验时不生成条码记录,只对原扫描的条码进行核对
                    if (sSourceBarCodeCtl == "Y")
                    else if (sSourceBarCodeCtl == "Y")
                    {
                        WebSoBar = oWebs.get_BillBarCode_Verify(HBillID, HBillNo, HBillType, sJXCode, HQty, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
                        if (WebSoBar == null)
@@ -6257,7 +6717,7 @@
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                {
                    //销售出库单
                    sSourceBarCodeCtl = "Y";
@@ -6380,25 +6840,25 @@
                if (HBillType == "1201")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //生产入库单
                if (HBillType == "1202")
                else if (HBillType == "1202")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //其他入库单
                if (HBillType == "1203")
                else if (HBillType == "1203")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6407,7 +6867,7 @@
                else if (HBillType == "1204")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6416,7 +6876,7 @@
                else if (HBillType == "1205")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6425,7 +6885,7 @@
                else if (HBillType == "1206")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6434,7 +6894,7 @@
                else if (HBillType == "1211")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6443,7 +6903,7 @@
                else if (HBillType == "1254")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6452,7 +6912,7 @@
                else if (HBillType == "1255")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6461,7 +6921,7 @@
                else if (HBillType == "1207")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6552,7 +7012,7 @@
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                {
                    //销售出库单
                    sSourceBarCodeCtl = "Y";
@@ -6688,25 +7148,25 @@
                if (HBillType == "1201")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //生产入库单
                if (HBillType == "1202")
                else if (HBillType == "1202")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
                }
                //其他入库单
                if (HBillType == "1203")
                else if (HBillType == "1203")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6715,7 +7175,7 @@
                else if (HBillType == "1204")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6724,7 +7184,7 @@
                else if (HBillType == "1205")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6733,7 +7193,7 @@
                else if (HBillType == "1206")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6742,7 +7202,7 @@
                else if (HBillType == "1211")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6751,7 +7211,7 @@
                else if (HBillType == "1254")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6760,7 +7220,7 @@
                else if (HBillType == "1255")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6769,7 +7229,7 @@
                else if (HBillType == "1207")
                {
                    //校验-是否进行源单对应条码核对('Y'为核对)
                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl == "Y")
                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                    {
                        sSourceBarCodeCtl = "Y";
                    }
@@ -6849,7 +7309,7 @@
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                {
                    //销售出库单
                    sSourceBarCodeCtl = "Y";
@@ -7518,28 +7978,18 @@
        {
            try
            {
                string WorkList = "单据号:"+@HBillNo+ ",对应箱(托)条码:" + @HBarCode_Pack+ ",拆箱(拆托)成功!";
                string SystemName = "WMS-拆箱(拆托)模块";
                oCn.BeginTran();
                //删除组托单记录
                oCn.RunProc("Delete from Sc_PackUnionBillMain where HInterID=" + HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo);
                oCn.RunProc("Delete from Sc_PackUnionBillSub where HInterID=" + HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo);
                //回填条码档案托条码数量
                oCn.RunProc("Update Gy_BarCodeBill Set HQty=0 where HBarCodeType='托盘条码' and HBarCode='" + HBarCode_Pack+"'", ref DBUtility.ClsPub.sExeReturnInfo);
                //写入日志
                oCn.RunProc("Insert into  System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
                    "(getdate(),'" + HMaker + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','','拆箱(拆托)')"
                    );
                oCn.Commit();
                string HIPAddress = "";                         //IP
                string HModCaption = "WMS-拆箱(拆托)模块";    //模块名
                ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_Delete_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBarCode_Pack + "','" + HMaker + "','" + ComputerName + "','" + HIPAddress + "','" + HModCaption + "'", "h_p_Sc_PackUnionBill_Delete_New");
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "条码:" + HBarCode_Pack + " æ‹†ç®±ï¼ˆæ‹†æ‰˜ï¼‰æˆåŠŸ";
                objJsonResult.Message = "成功";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCn.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "拆箱(拆托)失败!" + e.ToString();
@@ -8796,7 +9246,7 @@
        #endregion
        #region ä¸Šæž¶ã€ä¸‹æž¶å•模块调用方法     20250520
        #region ä¸Šæž¶ã€ä¸‹æž¶å•、小车锁定模块调用方法     20250520
        #region ä¸‹æž¶å•扫码模块  æ‰«ææºå•条码调用方法
        /// <summary>
@@ -8993,6 +9443,147 @@
        }
        #endregion
        #region ä¸‹æž¶å•模块,扫源单条码查询物料库存信息
        /// <summary>
        /// èŽ·å–å•æ®åˆ—è¡¨ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/MaterialLowerBill_MaterInv")]
        [HttpGet]
        public object MaterialLowerBill_MaterInv(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_Kf_MaterialInventory " + HInterID + "," + HBillType + "," + HStockOrgID, "h_p_Kf_MaterialInventory");
                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
        #region å°è½¦æ‰«ç ç»‘定时,判断其是否已绑定库位信息
        [Route("WEBSController/CarIsused")]
        [HttpGet]
        public object CarIsused(string HCarBarCode)
        {
            try
            {
                ds = oCn.RunProcReturn("select * from h_v_Gy_MouldIsUsed where å°è½¦æ¡ç ='" + HCarBarCode + "'" , "h_v_Gy_MouldIsUsed");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "小车条码:" + HCarBarCode + ",不在系统中,请核对!";
                    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 = "1";
                    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 = "查询小车在库状态失败err!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å°è½¦ç»‘定机台时,判断所扫机台(设备)条码是否存在于设备档案
        [Route("WEBSController/IsExistEquip")]
        [HttpGet]
        public object IsExistEquip(string HEquipBarCode)
        {
            try
            {
                ds = oCn.RunProcReturn("select * from h_v_Gy_EquipIsExist where æœºå°æ¡ç ='" + HEquipBarCode + "'", "h_v_Gy_EquipIsExist");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "机台条码:" + HEquipBarCode + ",不在系统中,请核对!";
                    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 = "1";
                    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 = "查询机台信息失败err!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
@@ -9168,6 +9759,69 @@
                    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
        #region [根据单据号 ç‰©æ–™ç¼–码 ç‰©æ–™åç§° ç”Ÿäº§è®¢å• å·¥åº éƒ¨é—¨èŽ·å– å·¥åºæµè½¬å¡]
        /// <summary>
        /// èŽ·å–æ¡ç ä¿¡æ¯ æ·»åŠ å·¥åº éƒ¨é—¨æŸ¥è¯¢æ¡ä»¶
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetMES_ProcessExchangeBillList_APP_HaiCheng")]
        [HttpGet]
        public object GetMES_ProcessExchangeBillList_APP_HaiCheng(string HBillNo, string HNumber, string HName, string HICMOBillNo, string user, string HProcID, string HDeptID)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_MES_ProcessExchangeBillList_APP_HaiCheng " +
                    "@HBillNo = N'" + HBillNo + "', " +
                    "@HNumber = N'" + HNumber + "', " +
                    "@HName = N'" + HName + "', "  +
                    "@HICMOBillNo = N'" + HICMOBillNo + "'," +
                    "@HProcID = N'" + HProcID + "', " +
                    "@HDeptID = N'" + HDeptID + "'"
                    , "h_p_MES_ProcessExchangeBillList_PDA_QiaoYi");
                if((bool)ds.Tables[1].Rows[0]["returntype"] == false)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = ds.Tables[1].Rows[0]["mesg"].ToString();
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else if (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>();
                    //添加列名
@@ -11534,7 +12188,7 @@
                                string sJXCode = "";
                                if (oSystemParameter.ShowBill(ref sErrMsg) == true)
                                {
                                    if (oSystemParameter.omodel.Kf_StockInRequestBill_AutoCheck == "Y") //系统参数  è‡ªåŠ¨å®¡æ ¸
                                    if (oSystemParameter.omodel.Kf_StockInRequestBill_AutoCheck.ToUpper() == "Y") //系统参数  è‡ªåŠ¨å®¡æ ¸
                                    {
                                        result1 = InvokeHelper.Submit("k18d2ab4f14034c569576ec8e0835a80c", JsonConvert.SerializeObject(json));//提交
                                        result2 = InvokeHelper.Audit("k18d2ab4f14034c569576ec8e0835a80c", JsonConvert.SerializeObject(json));//审核