You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
4.8 KiB
84 lines
4.8 KiB
using SSWMS.Common;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
|
|
namespace SSWMS.Client
|
|
{
|
|
public class SystemCodeData
|
|
{
|
|
public static Dictionary<string, DataTable> DicDataTable = null;
|
|
public static Dictionary<string, DataView> DicDataView = null;
|
|
|
|
public static void Init()
|
|
{
|
|
DicDataTable = new Dictionary<string, DataTable>()
|
|
{
|
|
{ "APPLY_STATUS", SystemCode.APPLY_STATUS.GetCommonDataTable() },
|
|
{ "APPLY_TYPE", SystemCode.APPLY_TYPE.GetCommonDataTable() },
|
|
{ "CELL_CODE_IN", SystemCode.WH_CELL_CODE.GetCellCodeIn() },
|
|
{ "CELL_CODE_OUT", SystemCode.WH_CELL_CODE.GetCellCodeOut() },
|
|
{ "CELL_CODE_OUT_STOCK", SystemCode.WH_CELL_CODE.GetCellCodeOutStock() },
|
|
{ "CELL_MODEL", SystemCode.CELL_MODEL.GetCommonDataTable() },
|
|
{ "CELL_TYPE", SystemCode.CELL_TYPE.GetCommonDataTable() },
|
|
{ "CONTROL_ROUTE_TYPE", SystemCode.CONTROL_TYPE.GetRouteDataTable() },
|
|
{ "CONTROL_STATUS", SystemCode.CONTROL_STATUS.GetCommonDataTable() },
|
|
{ "CONTROL_TYPE", SystemCode.CONTROL_TYPE.GetCommonDataTable() },
|
|
{ "FLAG", SystemCode.FLAG.GetCommonDataTable() },
|
|
{ "FLOW_TYPE", SystemCode.FLOW_TYPE.GetCommonDataTable() },
|
|
{ "FORK_TYPE", SystemCode.FORK_TYPE.GetCommonDataTable() },
|
|
{ "GOODS_CLASS", SystemCode.GOODS_CLASS.GetCommonDataTable() },
|
|
{ "GOODS_CLASS_GOODS", SystemCode.GOODS_CLASS.GetGoodsDataTable() },
|
|
{ "GOODS_ID_STOCK", SystemCode.GOODS_ID.GetStockDataTable() },
|
|
{ "MANAGE_STATUS", SystemCode.MANAGE_STATUS.GetCommonDataTable() },
|
|
{ "MANAGE_TYPE", SystemCode.MANAGE_TYPE.GetCommonDataTable() },
|
|
{ "MANAGE_TYPE_WAREHOUSE", SystemCode.MANAGE_TYPE.GetWareHouseDataTable() },
|
|
{ "OPERATOR_COMPARE", SystemCode.OPERATOR.GetCompareDataTable() },
|
|
{ "OPERATOR_LOGICAL", SystemCode.OPERATOR.GetLogicalDataTable() },
|
|
{ "PLAN_STATUS", SystemCode.PLAN_STATUS.GetCommonDataTable() },
|
|
{ "PLAN_TYPE", SystemCode.PLAN_TYPE.GetCommonDataTable() },
|
|
{ "RELATION_TYPE", SystemCode.RELATION_TYPE.GetCommonDataTable() },
|
|
{ "STOCK_HEIGHT", SystemCode.STOCK_HEIGHT.GetCommonDataTable() },
|
|
{ "STOCK_SIZE", SystemCode.STOCK_SIZE.GetCommonDataTable() },
|
|
{ "SYS_MENU_PARENT", WCFChannel._I_SystemService.GetSystemMenuDataTable(true) },
|
|
{ "SYS_MENU_CHILDREN", WCFChannel._I_SystemService.GetSystemMenuDataTable(false) },
|
|
{ "WAREHOUSE_CODE", SystemCode.WAREHOUSE_CODE.GetCommonDataTable() }
|
|
};
|
|
foreach (DataRow drWarehouse in DicDataTable["WAREHOUSE_CODE"].Rows)
|
|
{
|
|
string sWarehouseCode = drWarehouse["value"].ToString();
|
|
DataTable dtWarehouseCellZ = new DataTable();
|
|
dtWarehouseCellZ.Columns.Add("NAME", Type.GetType("System.String"));
|
|
dtWarehouseCellZ.Columns.Add("VALUE", Type.GetType("System.Int32"));
|
|
foreach (DataRow drCellZ in WCFChannel._I_CellService.GetCellZ(sWarehouseCode).Rows)
|
|
{
|
|
string sFockType = drCellZ["FORK_TYPE"].ToString();
|
|
string sCellType = drCellZ["CELL_TYPE"].ToString();
|
|
int iCellZ = Convert.ToInt32(drCellZ["CELL_Z"]);
|
|
if (sCellType == SystemCode.CELL_TYPE.Ping)
|
|
{
|
|
dtWarehouseCellZ.Rows.Add(string.Format("第{0}排(平库)", iCellZ), iCellZ);
|
|
}
|
|
else if (sFockType == SystemCode.FORK_TYPE.CellFar)
|
|
{
|
|
dtWarehouseCellZ.Rows.Add(string.Format(" {0}-{1}(远)", (iCellZ - 1) / 4 + 1, (iCellZ - 1) % 4 + 1), iCellZ);
|
|
}
|
|
else if (sFockType == SystemCode.FORK_TYPE.CellNear)
|
|
{
|
|
dtWarehouseCellZ.Rows.Add(string.Format(" {0}-{1}(近)", (iCellZ - 1) / 4 + 1, (iCellZ - 1) % 4 + 1), iCellZ);
|
|
}
|
|
else if (sFockType == SystemCode.FORK_TYPE.Normal || sFockType == SystemCode.FORK_TYPE.ForkNear)
|
|
{
|
|
dtWarehouseCellZ.Rows.Add(string.Format("第{0}排", iCellZ), iCellZ);
|
|
}
|
|
}
|
|
DicDataTable.Add(string.Format("WAREHOUSE_CODE_{0}", sWarehouseCode), dtWarehouseCellZ);
|
|
}
|
|
DicDataView = new Dictionary<string, DataView>();
|
|
foreach (KeyValuePair<string, DataTable> kvp in DicDataTable)
|
|
{
|
|
DicDataView.Add(kvp.Key, kvp.Value.DefaultView);
|
|
}
|
|
}
|
|
}
|
|
}
|