1
yangle
2023-05-22 43d58c9cafae2edfb38e0287c53c71e9c9e369e6
WebAPI/Controllers/LMESController.cs
@@ -472,6 +472,48 @@
        }
        /// <summary>
        /// 工序流转卡的末道工序
        /// </summary>
        /// <param name="sBillBarCode"></param>
        /// <returns></returns>
        [Route("LEMS/TxtHBarCode_KeyDown_Last")]
        [HttpGet]
        public object TxtHBarCode_KeyDown_Last(string sBillBarCode)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sBillBarCode == null || sBillBarCode.Equals(""))
                {
                    return CustomError("未输入条形码!");
                }
                else
                {
                    //拆分条形码
                    string[] NewBarCode;
                    if (sBillBarCode.CompareTo("#") > 0)
                    {
                        NewBarCode = sBillBarCode.Split(Convert.ToChar("#"));
                        sBillBarCode = NewBarCode[0];
                    }
                    string sBillNo = sBillBarCode;
                    ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList  where 单据号= '" + sBillNo + "' and 末道工序='是' ", "h_v_Sc_ProcessExchangeBillList");
                    if (ds == null || ds.Tables[0].Rows.Count == 0)
                    {
                        return CustomError("不存在此流转卡号!");
                    }
                }
            }
            catch (Exception e)
            {
                ds = null;
            }
            return CustomCorrect(ds);
        }
        /// <summary>
        /// 流水号回车方法(进站接收单、出站汇报单)
        ///参数:string sql。
        ///返回值:object。
@@ -1273,6 +1315,34 @@
            }
        }
        #region 打印查询数据
        [Route("Gy_SOPBillList/WindowPrintList")]
        [HttpGet]
        public object WindowPrintList(string sWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn(sWhere, "WindowPrint");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        //
    }
}