public void SetGsStatus(long gsID, bool status) { string reStr = ""; bllGs.UpdateGSEnabledStatusByID(gsID, status); GoodsSiteModel gsm = bllGs.GetModel(gsID); if (gsm == null) { return; } StoreHouseModel house = bllStoreHouse.GetModel(gsm.StoreHouseID); if (house == null) { return; } if (status == true) { this.view.AddLog("库存看板", "货位《" + gsm.GoodsSiteName + "》启用!", EnumLoglevel.提示); this.iStorageManage.AddGSOperRecord(house.StoreHouseName, new CellCoordModel(gsm.GoodsSiteRow, gsm.GoodsSiteColumn, gsm.GoodsSiteLayer) , EnumGSOperateType.手动启用货位, "手动启用货位", ref reStr); } else { this.iStorageManage.AddGSOperRecord(house.StoreHouseName, new CellCoordModel(gsm.GoodsSiteRow, gsm.GoodsSiteColumn, gsm.GoodsSiteLayer) , EnumGSOperateType.手动禁用货位, "手动禁用货位", ref reStr); this.view.AddLog("库存看板", "货位《" + gsm.GoodsSiteName + "》禁用!", EnumLoglevel.提示); } }
/// <summary> /// 获取立库单元格数量情况 /// </summary> /// <param name="houseName">库房名称</param> /// <param name="row">排 </param> /// <param name="col">列</param> /// <param name="layer">层</param> /// <param name="reStr">若失败,返回错误信息</param> /// <returns></returns> public bool GetCellCount(string houseName, ref int row, ref int col, ref int layer, ref string reStr) { StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (house == null) { reStr = "库房名称错误!"; return(false); } List <int> rows = bllGoodsSite.GetGsRCLData(house.StoreHouseID, 0); List <int> cols = bllGoodsSite.GetGsRCLData(house.StoreHouseID, 1); List <int> layers = bllGoodsSite.GetGsRCLData(house.StoreHouseID, 2); if (rows == null || cols == null || layers == null) { reStr = "数据库错误!"; return(false); } row = rows.Count; col = cols.Count; layer = layers.Count; return(true); }
public void ModifyGsStatus(List <GsPosModel> gsList, string gsStatus, string gsTaskStatus) { string reStr = ""; for (int i = 0; i < gsList.Count; i++) { StoreHouseModel house = bllStoreHouse.GetModelByName(gsList[i].HouseName); if (null == house) { return; } GoodsSiteModel oldgsm = bllGs.GetModelByRCL(house.StoreHouseID, gsList[i].Rowth, gsList[i].Colth, gsList[i].Layerth); if (oldgsm == null) { return; } if (oldgsm.GsEnabled == false) { this.view.AddLog("库存列表", "被禁用的货位不允许修改状态!", LogInterface.EnumLoglevel.提示); return; } bllGs.UpdateGSStatusByRCL(gsList[i].HouseName, gsList[i].Rowth, gsList[i].Colth, gsList[i].Layerth, (EnumCellStatus)Enum.Parse(typeof(EnumCellStatus), gsStatus)); bllGs.UpdateGsTaskStatusByRCL(gsList[i].HouseName, gsList[i].Rowth, gsList[i].Colth, gsList[i].Layerth, (EnumGSTaskStatus)Enum.Parse(typeof(EnumGSTaskStatus), gsTaskStatus)); string operteDetail = "[" + oldgsm.GoodsSiteName + "]货位状态由《" + oldgsm.GoodsSiteStatus + "》变更为《" + gsStatus + "》;" + "货位任务状态由《" + oldgsm.GoodsSiteTaskStatus + "》变更为《" + gsTaskStatus + "》"; this.iStorageManager.AddGSOperRecord(gsList[i].HouseName, new CellCoordModel(gsList[i].Rowth, gsList[i].Colth, gsList[i].Layerth), EnumGSOperateType.手动修改状态, operteDetail, ref reStr); QueryStock(this.currHouseName, this.currHouseArea, this.currRowth, this.currColth, this.currLayerth, this.gsStatus, this.gsTaskSta, this.currProBatch); this.view.AddLog("库存管理", operteDetail, LogInterface.EnumLoglevel.提示); } }
/// <summary> /// 获取库存料框条码列表 /// </summary> /// <param name="houseName">库房名称</param> /// <param name="cellCoord">货位位置</param> /// <param name="boxCodeList">料框条码列表</param> /// <returns>查询状态</returns> public bool GetStockDetail(string houseName, CellCoordModel cellCoord, ref List <string> boxCodeList) { boxCodeList = new List <string>(); if (cellCoord == null) { return(false); } StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName); if (houseModel == null) { return(false); } List <View_StockModel> stockList = bllViewStock.GetStockDetail(houseName, cellCoord.Row, cellCoord.Col, cellCoord.Layer); if (stockList == null) { return(false); } for (int i = 0; i < stockList.Count; i++) { boxCodeList.Add(stockList[i].MeterialboxCode); } return(true); }
/// <summary> /// 移除库存 /// </summary> /// <param name="houseName">库房信息</param> /// <param name="cellCoord">货位位置</param> /// <param name="reStr">执行状态描述</param> /// <returns>执行状态结果</returns> public bool RemoveStack(string houseName, CellCoordModel cellCoord, ref string reStr) { StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName); if (houseModel == null) { reStr = "不存在此库房!"; return(false); } GoodsSiteModel gsm = bllGoodsSite.GetModelByRCL(houseModel.StoreHouseID, cellCoord.Row, cellCoord.Col, cellCoord.Layer); if (gsm == null) { reStr = "不存在此库存!"; return(false); } bool deleSta = bllStock.DeleteModelByGSID(gsm.GoodsSiteID); if (deleSta == false) { reStr = "数据删除失败!"; return(false); } //string operateStr = "库房:" + houseName + ",货位:" + cellCoord.Row + "排" + cellCoord.Col + "列" // + cellCoord.Layer + "层," + "移除库存"; //AddGSOperRecord(houseName, cellCoord, EnumGSOperateType.系统移除库存, operateStr, ref reStr); return(true); }
/// <summary> /// 获取逻辑库区名称 /// </summary> /// <param name="houseName">库房名称</param> /// <param name="cell">货位位置</param> /// <param name="logicArea">库区名称</param> /// <returns>执行状态</returns> //public bool GetLogicAreaName(string houseName, CellCoordModel cell, ref EnumLogicArea logicArea) public bool GetLogicAreaName(string houseName, CellCoordModel cell, ref string logicArea) { try { StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName); if (houseModel == null) { return(false); } if (cell == null) { return(false); } GoodsSiteModel gsm = bllGoodsSite.GetModelByRCL(houseModel.StoreHouseID, cell.Row, cell.Col, cell.Layer); if (gsm == null) { return(false); } View_GoodsSiteModel viewGsm = bllViewGoodsSite.GetModelByGSID(gsm.GoodsSiteID); if (viewGsm == null) { return(false); } logicArea = viewGsm.StoreHouseAreaName;// (EnumLogicArea)Enum.Parse(typeof(EnumLogicArea), viewGsm.StoreHouseAreaName); return(true); } catch { return(false); } }
/// <summary> ///查询货位启用状态 /// </summary> /// <param name="houseName">库房名称</param> /// <param name="celCoord">货位位置</param> /// <param name="gsEnabledStatus">货位启用状态</param> /// <returns>查询状态</returns> public bool GetCellEnabledStatus(string houseName, CellCoordModel cellCoord, ref EnumGSEnabledStatus gsEnabledStatus) { StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName); if (houseModel == null) { return(false); } GoodsSiteModel gsm = bllGoodsSite.GetModelByRCL(houseModel.StoreHouseID, cellCoord.Row, cellCoord.Col, cellCoord.Layer); if (gsm == null) { return(false); } if (gsm.GsEnabled == true) { gsEnabledStatus = EnumGSEnabledStatus.启用; } else { gsEnabledStatus = EnumGSEnabledStatus.禁用; } return(true); }
/// <summary> /// 获取所有可以出库的货位,自动出库时调用 /// </summary> /// <param name="houseName">库房名称</param> /// <param name="gsList">货位列表</param> /// <param name="reStr">执行状态描述</param> /// <returns>执行状态结果</returns> public bool GetAllowLeftHouseGs(string houseName, ref List <CellCoordModel> gsList, ref string reStr) { gsList = new List <CellCoordModel>(); StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName); if (houseModel == null) { reStr = "不存在此库房!"; return(false); } DataTable allowOutDt = bllGoodsSite.GetModelListByTaskSta(houseModel.StoreHouseID, EnumGSTaskStatus.出库允许.ToString()); if (allowOutDt == null) { reStr = "没有允许出库的库存!"; return(false); } for (int i = 0; i < allowOutDt.Rows.Count; i++) { int rowth = int.Parse(allowOutDt.Rows[i]["GoodsSiteRow"].ToString()); int colth = int.Parse(allowOutDt.Rows[i]["GoodsSiteColumn"].ToString()); int layerth = int.Parse(allowOutDt.Rows[i]["GoodsSiteLayer"].ToString()); CellCoordModel ccm = new CellCoordModel(rowth, colth, layerth); gsList.Add(ccm); } return(true); }
/// <summary> /// 查询入库时间 /// </summary> /// <param name="houseName">库房名称</param> /// <param name="cellCoord">库存位置</param> /// <param name="inputDT">入库时间</param> /// <returns>若货位空,返回false</returns> public bool GetCellInputTime(string houseName, CellCoordModel cellCoord, ref System.DateTime inputDT) { if (cellCoord == null) { return(false); } StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName); if (houseModel == null) { return(false); } GoodsSiteModel gsm = bllGoodsSite.GetModelByRCL(houseModel.StoreHouseID, cellCoord.Row, cellCoord.Col, cellCoord.Layer); if (gsm == null) { return(false); } StockModel sm = bllStock.GetModelByGSID(gsm.GoodsSiteID); if (sm == null) { return(false); } StockListModel slm = bllStockList.GetModelByStockID(sm.StockID); if (slm == null) { return(false); } inputDT = slm.InHouseTime; return(true); }
/// <summary> /// 设置整行逻辑区域 /// </summary> /// <param name="houseName"></param> /// <param name="layerth"></param> /// <returns></returns> public bool SetSingleLayerArea(string houseName, int rowth, int layerth, string logicAreaName) { string reStr = ""; StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (null == house) { return(false); } StoreHouseLogicAreaModel logicArea = bllLogicArea.GetModelByName(logicAreaName); if (logicArea == null) { return(false); } bool status = bllGs.SetSingleLayerGsArea(house.StoreHouseID, logicArea.StoreHouseLogicAreaID, rowth, layerth); if (status == true) { this.iStorageManage.AddGSOperRecord(houseName, new CellCoordModel(rowth, 1, 1) , EnumGSOperateType.库存区域设置, "手动单层库存区域设置:货位层" + layerth + "为:" + logicArea.StoreHouseAreaName, ref reStr); RefreshPos(this.currHouseName, currRowth); return(true); } else { return(false); } }
public void ModifyGsStatus(string houseName, long gsID, string gsStatus, string gsTaskStatus) { string reStr = ""; StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (null == house) { return; } GoodsSiteModel oldgsm = bllGs.GetModel(gsID); if (oldgsm == null) { return; } if (oldgsm.GsEnabled == false) { this.view.AddLog("库存看板", "被禁用的货位不允许修改状态!", LogInterface.EnumLoglevel.提示); return; } bllGs.UpdateGSStatusByRCL(houseName, oldgsm.GoodsSiteRow, oldgsm.GoodsSiteColumn, oldgsm.GoodsSiteLayer, (EnumCellStatus)Enum.Parse(typeof(EnumCellStatus), gsStatus)); bllGs.UpdateGsTaskStatusByRCL(houseName, oldgsm.GoodsSiteRow, oldgsm.GoodsSiteColumn, oldgsm.GoodsSiteLayer, (EnumGSTaskStatus)Enum.Parse(typeof(EnumGSTaskStatus), gsTaskStatus)); string operteDetail = "[" + oldgsm.GoodsSiteName + "]货位状态由《" + oldgsm.GoodsSiteStatus + "》变更为《" + gsStatus + "》;" + "货位任务状态由《" + oldgsm.GoodsSiteTaskStatus + "》变更为《" + gsTaskStatus + "》"; this.iStorageManage.AddGSOperRecord(houseName, new CellCoordModel(oldgsm.GoodsSiteRow, oldgsm.GoodsSiteColumn, oldgsm.GoodsSiteLayer), EnumGSOperateType.手动修改状态, operteDetail, ref reStr); this.view.AddLog("库存看板", operteDetail, LogInterface.EnumLoglevel.提示); RefreshPos(houseName, oldgsm.GoodsSiteRow); }
/// <summary> /// 设置单个货位的逻辑区域 /// </summary> /// <param name="houseName"></param> /// <param name="gsName"></param> /// <returns></returns> public bool SetSingleGsArea(string houseName, string gsName, string logicAreaName) { string reStr = ""; StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (null == house) { return(false); } StoreHouseLogicAreaModel logicArea = bllLogicArea.GetModelByName(logicAreaName); if (logicArea == null) { return(false); } bool status = bllGs.SetSingleGsArea(house.StoreHouseID, logicArea.StoreHouseLogicAreaID, gsName); if (status == true) { string[] rcl = gsName.Split('-'); this.iStorageManage.AddGSOperRecord(houseName, new CellCoordModel(int.Parse(rcl[0]), int.Parse(rcl[1]), int.Parse(rcl[2])) , EnumGSOperateType.库存区域设置, "手动单货位库存区域设置:货位" + gsName + "为:" + logicArea.StoreHouseAreaName, ref reStr); RefreshPos(this.currHouseName, currRowth); return(true); } else { return(false); } }
/// <summary> /// 设置整列逻辑区域 /// </summary> /// <param name="houseName"></param> /// <param name="colth"></param> /// <returns></returns> public bool SetSingleColArea(string houseName, int rowth, int stCol, int edCol, string logicAreaName) { string reStr = ""; StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (null == house) { return(false); } StoreHouseLogicAreaModel logicArea = bllLogicArea.GetModelByName(logicAreaName); if (logicArea == null) { return(false); } for (int i = stCol; i <= edCol; i++) { bool status = bllGs.SetSingleColGsArea(house.StoreHouseID, logicArea.StoreHouseLogicAreaID, rowth, i); if (status == false) { continue; } this.iStorageManage.AddGSOperRecord(houseName, new CellCoordModel(rowth, i, 1) , EnumGSOperateType.库存区域设置, "手动单列库存区域设置:货位列" + i + "为:" + logicArea.StoreHouseAreaName, ref reStr); } RefreshPos(this.currHouseName, currRowth); return(true); }
public void RefreshPos(string houseName, int queryRow) { List <Positions> allPos = new List <Positions>(); StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (null == house) { return; } List <GoodsSiteModel> gsList = bllGs.GetModelListByRow(house.StoreHouseID, queryRow); if (gsList == null) { return; } for (int i = 0; i < gsList.Count; i++) { GoodsSiteModel gsModel = gsList[i]; Positions pos = new Positions(); bool status = CreatePos(gsModel, ref pos); if (status == false) { continue; } allPos.Add(pos); } this.view.RefreshPos(allPos); this.currHouseName = houseName; this.currRowth = queryRow; RefreshGsStatusNum(house.StoreHouseID, queryRow); }
/// <summary> /// 添加货位操作记录,任务完成时调用 /// </summary> /// <param name="houseName">库房名称</param> /// <param name="cellCoord">库存位置</param> /// <param name="gsOperType">货位操作类型</param> /// <param name="reStr">执行状态描述</param> /// <returns>执行状态结果</returns> public bool AddGSOperRecord(string houseName, CellCoordModel cellCoord, EnumGSOperateType gsOperType, string operateDetail, ref string reStr) { StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName); if (houseModel == null) { reStr = "不存在此库房!"; return(false); } StockOperRecdModel sorm = new StockOperRecdModel(); sorm.GoodsSitePos = cellCoord.Row.ToString() + "-" + cellCoord.Col.ToString() + "-" + cellCoord.Layer.ToString(); sorm.OPerateTime = DateTime.Now; sorm.OPerateType = gsOperType.ToString(); sorm.OperateDetail = operateDetail; sorm.StoreHouseID = houseModel.StoreHouseID; long addsta = bllStackOper.Add(sorm); if (addsta == 0) { reStr = "数据添加数据失败!"; return(false); } OnUpdateGsStatus(); return(true); }
public bool DeleteModelByRCL(string houseName, int row, int col, int layer) { StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (house == null) { return(false); } return(dal.DeleteModelByRCL(houseName, house.StoreHouseID, row, col, layer)); }
public bool SetMultiGsSinleGsEnbledStatus(string houseName, string gsName, bool status) { StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (house == null) { return(false); } return(dal.SetMultiGsSinleGsEnbledStatus(house.StoreHouseID, gsName, status)); }
public bool SetMultiGsSinleLayerEnbledStatus(string houseName, int rowth, int layerth, bool status) { StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (house == null) { return(false); } return(dal.SetMultiGsSinleLayerEnbledStatus(house.StoreHouseID, rowth, layerth, status)); }
public bool DeleteUnnecessaryGs(string houseName, int totalRow, int totalCol, int totalLayer) { StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (house == null) { return(false); } return(dal.DeleteUnnecessaryGs(house.StoreHouseID, totalRow, totalCol, totalLayer)); }
public bool UpdateOperateByRCL(string houseName, int row, int col, int layer, EnumGSOperate operate) { StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (house == null) { return(false); } return(dal.UpdateOperateByRCL(houseName, house.StoreHouseID, row, col, layer, operate.ToString())); }
/// <summary> /// 通过库房名称及排列层更新货位 /// </summary> /// <param name="houseName"></param> /// <param name="row"></param> /// <param name="col"></param> /// <param name="layer"></param> /// <param name="cellStatus"></param> /// <returns></returns> public bool UpdateModelByRCL(string houseName, int row, int col, int layer, EnumCellStatus cellStatus, EnumGSTaskStatus gsStatus) { // View_GoodsSiteModel gsModel = bllViewGs.GetModelByHouseName(houseName); StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (house == null) { return(false); } return(dal.UpdateModelByRCL(houseName, house.StoreHouseID, row, col, layer, cellStatus.ToString(), gsStatus.ToString())); }
public void BindHouseAreaData(string houseName) { if (houseName == "") { return; } StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (null == house) { return; } List <StoreHouseLogicAreaModel> houseAreaList = bllViewGS.GetHouseArea(house.StoreHouseID); this.view.BindHouseAreaData(houseAreaList); }
public bool UpdateGSStatusByRCL(string houseName, int row, int col, int layer, EnumCellStatus cellStatus) { StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (house == null) { return(false); } GoodsSiteModel gsm = GetModelByRCL(house.StoreHouseID, row, col, layer); if (gsm == null) { return(false); } gsm.GoodsSiteStatus = cellStatus.ToString(); return(Update(gsm)); }
/// <summary> /// 添加空料筐库存 /// </summary> /// <param name="houseName">库房名称</param> /// <param name="cellCoord">货位位置</param> /// <param name="reStr">执行状态描述</param> /// <returns>执行状态结果</returns> public bool AddEmptyMeterialBox(string houseName, CellCoordModel cellCoord, ref string reStr) { StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName); if (houseModel == null) { reStr = "不存在此库房!"; return(false); } GoodsSiteModel gsm = bllGoodsSite.GetModelByRCL(houseModel.StoreHouseID, cellCoord.Row, cellCoord.Col, cellCoord.Layer); if (gsm == null) { reStr = "不存在此库存!"; return(false); } gsm.Reserve = cellCoord.ExtProp1;//保存货位扩展属性,目前为空托盘型号 bllGoodsSite.Update(gsm); StockModel sm = new StockModel(); sm.GoodsSiteID = gsm.GoodsSiteID; sm.IsFull = true; sm.TrayID = "12345678";//测试 long stockID = bllStock.Add(sm); StockListModel slm = new StockListModel(); slm.InHouseTime = DateTime.Now; slm.StockID = stockID; slm.MeterialBatch = ""; //暂时没有 slm.MeterialboxCode = ""; slm.MeterialStatus = ""; //暂时没有赋值,若有库存详细应在此增加 long stockListID = bllStockList.Add(slm); StockDetailModel sdm = new StockDetailModel(); sdm.StockListID = stockListID; sdm.MeterialName = "空料筐"; bllStockDetail.Add(sdm); // string operateStr = "库房:" + houseName + ",货位:" + cellCoord.Row + "排" + cellCoord.Col + "列" //+ cellCoord.Layer + "层," + "添加空料框"; // AddGSOperRecord(houseName, cellCoord, EnumGSOperateType.系统添加空料框, operateStr, ref reStr); return(true); }
/// <summary> /// 查询货位状态 /// </summary> /// <param name="houseName">库房名称</param> /// <param name="cellCoord">货位位置</param> /// <param name="cellStatus">货位状态</param> /// <param name="taskStatus">货位任务状态</param> /// <returns>查询状态</returns> public bool GetCellStatus(string houseName, CellCoordModel cellCoord, ref EnumCellStatus cellStatus, ref EnumGSTaskStatus taskStatus) { StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName); if (houseModel == null) { return(false); } GoodsSiteModel gsm = bllGoodsSite.GetModelByRCL(houseModel.StoreHouseID, cellCoord.Row, cellCoord.Col, cellCoord.Layer); if (gsm == null) { return(false); } cellStatus = (EnumCellStatus)Enum.Parse(typeof(EnumCellStatus), gsm.GoodsSiteStatus); taskStatus = (EnumGSTaskStatus)Enum.Parse(typeof(EnumGSTaskStatus), gsm.GoodsSiteTaskStatus); return(true); }
/// <summary> /// 产品条码是否在库 /// </summary> /// <param name="houseName">库房名称</param> /// <param name="productCode">产品二维码</param> /// <param name="reStr">执行结果描述</param> /// <returns>若在库则返回在库货位,否则返回空字符串</returns> public string IsProductCodeInStore(string houseName, string productCode, ref string reStr) { StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (house == null) { reStr = "系统不存在此库房!"; return(string.Empty); } View_StockModel stockModel = bllViewStock.GetModel(houseName, productCode); if (stockModel == null)//所有货位没有库存的情况直接返回true { reStr = "此库房不存在此条码!"; return(string.Empty); } return(stockModel.GoodsSitePos); }
public void BindRCLData(string houseName) { if (houseName == "") { return; } StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (null == house) { return; } List <int> rowList = bllGs.GetGsRCLData(house.StoreHouseID, 0); List <int> colList = bllGs.GetGsRCLData(house.StoreHouseID, 1); List <int> layerList = bllGs.GetGsRCLData(house.StoreHouseID, 2); this.view.BindRowData(rowList); this.view.BindColData(colList); this.view.BindLayerData(layerList); }
/// <summary> /// 更新货位启用状态 /// </summary> /// <param name="houseName">库房名称</param> /// <param name="cellCoord">货位位置</param> /// <param name="enabledStatus">货位禁用状态</param> /// <param name="reStr">执行状态描述</param> /// <returns>执行状态</returns> public bool UpdateGsEnabledStatus(string houseName, CellCoordModel cellCoord, EnumGSEnabledStatus enabledStatus, ref string reStr) { StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName); if (houseModel == null) { return(false); } GoodsSiteModel gsm = bllGoodsSite.GetModelByRCL(houseModel.StoreHouseID, cellCoord.Row, cellCoord.Col, cellCoord.Layer); if (gsm == null) { return(false); } bool gsEnabledSta = false; if (enabledStatus == EnumGSEnabledStatus.启用) { gsEnabledSta = true; } else { gsEnabledSta = false; } bool updateStatus = bllGoodsSite.UpdateGSEnabledStatusByID(gsm.GoodsSiteID, gsEnabledSta); if (updateStatus == true) { OnUpdateGsStatus(); //string operateStr = "库房:" + houseName + ",货位:" + cellCoord.Row + "排" + cellCoord.Col + "列" + cellCoord.Layer + "层," + "货位启用状态更改为:" + enabledStatus.ToString(); //AddGSOperRecord(houseName, cellCoord, EnumGSOperateType.系统修改状态, operateStr, ref reStr); reStr = "货位更新成功!"; return(true); } else { reStr = "货位更新失败!"; return(false); } }
/// <summary> /// 设置整列逻辑区域 /// </summary> /// <param name="houseName"></param> /// <param name="colth"></param> /// <returns></returns> public bool SetMulLayerMulColArea(string houseName, int rowth, int stCol, int edCol, int stLayer, int edLayer, string logicAreaName) { string reStr = ""; StoreHouseModel house = bllStoreHouse.GetModelByName(houseName); if (null == house) { return(false); } StoreHouseLogicAreaModel logicArea = bllLogicArea.GetModelByName(logicAreaName); if (logicArea == null) { return(false); } //for (int i = stCol; i <= edCol; i++) //{ bool status = bllGs.SetMulLayerMulColGsArea(house.StoreHouseID, logicArea.StoreHouseLogicAreaID, rowth, stCol, edCol, stLayer, edLayer); if (status == false) { return(false); } //for (int layer = stLayer; layer <= edLayer;layer ++ ) //{ // for(int col = stCol;col<=edCol;col++) // { this.iStorageManage.AddGSOperRecord(houseName, new CellCoordModel(rowth, stCol, stLayer) , EnumGSOperateType.库存区域设置, "手动多层多列库存区域设置:起始列[" + stCol + "]终止列[" + edCol + "] 起始层[" + stLayer + "]" + "终止层[" + edLayer + "] 为->" + logicArea.StoreHouseAreaName, ref reStr); // } //} //} RefreshPos(this.currHouseName, currRowth); return(true); }
private bool CreateNewGS(string houseName, int rowth, int colth, int layerth, ref GoodsSiteModel gsModel) { GoodsSiteModel gsm = new GoodsSiteModel(); gsm.GoodsSiteColumn = colth; gsm.GoodsSiteOperate = EnumGSOperate.入库.ToString(); gsm.GoodsSiteLayer = layerth; gsm.GoodsSiteName = rowth.ToString() + "排" + colth.ToString() + "列" + layerth.ToString() + "层"; gsm.GoodsSitePos = rowth.ToString() + "-" + colth.ToString() + "-" + layerth.ToString(); gsm.GoodsSiteRow = rowth; gsm.GoodsSiteStatus = EnumCellStatus.空闲.ToString(); gsm.GsEnabled = true; StoreHouseModel houseModel = bllStoreHouse.GetModelByName(houseName);//默认简历库区1 if (houseModel == null) { return(false); } gsm.StoreHouseID = houseModel.StoreHouseID; gsm.GoodsSiteTaskStatus = EnumGSTaskStatus.完成.ToString(); gsModel = gsm; return(true); }