Esempio n. 1
0
        public string GetCapacityByProductLineNo(string strProductLineNo, string strUserJson)
        {
            StockHead_Model stockHeadModel = new StockHead_Model();

            try
            {
                if (string.IsNullOrEmpty(strProductLineNo))
                {
                    stockHeadModel.Status  = "E";
                    stockHeadModel.Message = "请输入产线!";
                    return(JSONUtil.JSONHelper.ObjectToJson <StockHead_Model>(stockHeadModel));
                }

                UserInfo userModel = JSONUtil.JSONHelper.JsonToObject <UserInfo>(strUserJson);
                if (userModel == null || string.IsNullOrEmpty(userModel.UserNo))
                {
                    stockHeadModel.Status  = "E";
                    stockHeadModel.Message = "没有获取用户信息!";
                    return(JSONUtil.JSONHelper.ObjectToJson <StockHead_Model>(stockHeadModel));
                }

                Stock_DB        SD         = new Stock_DB();
                QueryConditions conditions = new QueryConditions();
                conditions.ProductLineNo    = strProductLineNo;
                conditions.StartTime        = DateTime.Today;
                conditions.EndTime          = DateTime.Today;
                stockHeadModel.lstStockInfo = SD.GetCapacity(conditions);

                if (stockHeadModel.lstStockInfo == null || stockHeadModel.lstStockInfo.Count == 0)
                {
                    stockHeadModel.Status  = "E";
                    stockHeadModel.Message = "您输入的产线没有记录!";
                    return(JSONUtil.JSONHelper.ObjectToJson <StockHead_Model>(stockHeadModel));
                }

                stockHeadModel.Status = "S";
                return(JSONUtil.JSONHelper.ObjectToJson <StockHead_Model>(stockHeadModel));
            }
            catch (Exception ex)
            {
                stockHeadModel.Status  = "E";
                stockHeadModel.Message = "Web异常:" + ex.Message;
                return(JSONUtil.JSONHelper.ObjectToJson <StockHead_Model>(stockHeadModel));
            }
        }
Esempio n. 2
0
        public bool GetCapacityForWMS(ref List <Stock_Model> modelList, QueryConditions list, ref string strError)
        {
            Stock_DB SD = new Stock_DB();

            try
            {
                modelList = SD.GetCapacity(list);
                return(true);
            }
            catch (Exception ex)
            {
                strError = ex.Message;
                return(false);
            }
            finally
            {
            }
        }
Esempio n. 3
0
        public string GetStockByAreaNo(string strAreaNo, string strUserJson)
        {
            StockHead_Model stockHeadModel = new StockHead_Model();

            try
            {
                if (string.IsNullOrEmpty(strAreaNo))
                {
                    stockHeadModel.Status  = "E";
                    stockHeadModel.Message = "请扫描或输入货位编号!";
                    return(JSONUtil.JSONHelper.ObjectToJson <StockHead_Model>(stockHeadModel));
                }

                UserInfo userModel = JSONUtil.JSONHelper.JsonToObject <UserInfo>(strUserJson);
                if (userModel == null || string.IsNullOrEmpty(userModel.UserNo))
                {
                    stockHeadModel.Status  = "E";
                    stockHeadModel.Message = "没有获取用户信息!";
                    return(JSONUtil.JSONHelper.ObjectToJson <StockHead_Model>(stockHeadModel));
                }

                Stock_DB SD = new Stock_DB();
                stockHeadModel.lstStockInfo = SD.GetStockByAreaNo(strAreaNo);
                if (stockHeadModel.lstStockInfo == null || stockHeadModel.lstStockInfo.Count == 0)
                {
                    stockHeadModel.Status  = "E";
                    stockHeadModel.Message = "该货位没有物料库存信息!";
                    return(JSONUtil.JSONHelper.ObjectToJson <StockHead_Model>(stockHeadModel));
                }
                stockHeadModel.Status = "S";
                return(JSONUtil.JSONHelper.ObjectToJson <StockHead_Model>(stockHeadModel));
            }
            catch (Exception ex)
            {
                stockHeadModel.Status  = "E";
                stockHeadModel.Message = "Web异常:" + ex.Message;
                return(JSONUtil.JSONHelper.ObjectToJson <StockHead_Model>(stockHeadModel));
            }
        }
Esempio n. 4
0
        private List <Stock_Model> GetStockBySerialNo(string strSerialNo)
        {
            Stock_DB SD = new Stock_DB();

            return(SD.GetStockBySerialNo(strSerialNo));
        }
Esempio n. 5
0
        private List <Stock_Model> GetStockByArrayMaterialNo(string VoucherNo, string strArrayMaterialNo)
        {
            Stock_DB SD = new Stock_DB();

            return(SD.GetStockByArrayMaterialNo(VoucherNo, strArrayMaterialNo));
        }