You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/Areas/WMS/Models/Op_WMS_STOREHOUSEModel.cs

246 lines
6.2 KiB
C#

3 years ago
using System;
using HcUtility.Core;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace DSWeb.WMS.Models.WMS_STOREHOUSE
{
[JsonObject]//仓库管理
public class WMS_STOREHOUSEmb : ModelObjectBillHead
{
public override Dictionary<string, ModelDBOprationType> GetPKey()
{//用于给扩展的动态数据提供主键字段名
var d = new Dictionary<string, ModelDBOprationType>() { { "GID", ModelDBOprationType.All } };
return d;
}
public Dictionary<string, string> SaveDic = new Dictionary<string, string>();
public static string getSQL()
{
return " SELECT [GID],AREACODE,STORAGEUNIT,isnull(STORAGEUNITVOLUME,0) STORAGEUNITVOLUME,ISLEAF FROM [dbo].[OP_WMS_STOREHOUSE]";
}
public void getDef(string USERID)
{
//将一个数据对象的有默认值的数据项 设置为默认
//设置一些数字字段的默认值:
setNoNullDef("STORAGEUNITVOLUME", "0");
setNoNullDef("ISLEAF", "0");
}
public WMS_STOREHOUSEmb()
{
TableName = "OP_WMS_STOREHOUSE";
}
public override string GetBillNoFieldName()
{
return "AREACODE";
}
public override string GetTimeMarkFieldName()
{
return "";
}
}
[JsonObject]//仓库的优先存储区 明细表
public class WMS_STOREHOUSE_GOODSTYPEmb : ModelObjectBillBody
{
public override Dictionary<string, ModelDBOprationType> GetPKey()
{//用于给扩展的动态数据提供主键字段名
var d = new Dictionary<string, ModelDBOprationType>() { { "GID", ModelDBOprationType.All } };
return d;
}
public Dictionary<string, string> SaveDic = new Dictionary<string, string>();
public static string getSQL()
{
return " select GID,AREACODE,isnull(LINENUM,999)LINENUM,GOODSCODE from OP_WMS_STOREHOUSE_GOODSTYPE ";
}
public WMS_STOREHOUSE_GOODSTYPEmb()
{
TableName = "OP_WMS_STOREHOUSE_GOODSTYPE";
}
public WMS_STOREHOUSE_GOODSTYPEmb(string AREACODE)
{
setDefault();
SetValue("AREACODE", AREACODE);
TableName = "OP_WMS_STOREHOUSE_GOODSTYPE";
}
public void setDefault()
{
SetValue("GID", System.Guid.NewGuid().ToString());
}
public override string GetBillNoFieldName()
{
return "AREACODE";
}
public override string GetTimeMarkFieldName()
{
return "";
}
}
[JsonObject]//仓库管理
public class WMS_STOREHOUSE_AREAmb : ModelObjectBillBody
{
public override Dictionary<string, ModelDBOprationType> GetPKey()
{//用于给扩展的动态数据提供主键字段名
var d = new Dictionary<string, ModelDBOprationType>() { { "AREACODE", ModelDBOprationType.All } };
return d;
}
public Dictionary<string, string> SaveDic = new Dictionary<string, string>();
public static string getSQL()
{
return " SELECT [GID],AREACODE,STORAGEUNIT,isnull(STORAGEUNITVOLUME,0) STORAGEUNITVOLUME,ISLEAF FROM [dbo].[OP_WMS_STOREHOUSE_AREA]";
}
public void getDef(string USERID)
{
//将一个数据对象的有默认值的数据项 设置为默认
//设置一些数字字段的默认值:
setNoNullDef("STORAGEUNITVOLUME", "0");
setNoNullDef("ISLEAF", "0");
setNoNullDef("INUSE", "1");
}
public WMS_STOREHOUSE_AREAmb()
{
TableName = "OP_WMS_STOREHOUSE_AREA";
}
public override string GetBillNoFieldName()
{
return "AREACODE";
}
public override string GetTimeMarkFieldName()
{
return "";
}
}
#region 用于树形显示的
[JsonObject]
public class StoreHoustTreeRefModel : ModelObjectBase
{
#region private Fields
private string _id = string.Empty;
private string _name = String.Empty;
private string _description = String.Empty;
private string _moduleurl = String.Empty;
private string _parentid = String.Empty;
private decimal _sort = 0;
private string _type = "0";
private Boolean _leaf = true;
private Boolean _expanded = true;
private Boolean _checked = true;
private string _ICON = String.Empty;
#endregion
#region Public Properties
[ModelDB]
public string id
{
get { return _id; }
set { _id = value; }
}
[ModelDB(MDBType = ModelDBOprationType.All, IsPrimary = true)]
public string NAME
{
get { return _name; }
set { _name = value; }
}
[ModelDB]
public string DESCRIPTION
{
get { return _description; }
set { _description = value; }
}
[ModelDB]
public string MODULEURL
{
get { return _moduleurl; }
set { _moduleurl = value; }
}
[ModelDB]
public string PARENTID
{
get
{
return _parentid;
}
set
{
_parentid = value;
}
}
[ModelDB]
public decimal SORT
{
get { return _sort; }
set { _sort = value; }
}
public string TYPE
{
get { return _type; }
set { _type = value; }
}
public Boolean leaf
{
get { return _leaf; }
set { _leaf = value; }
}
public Boolean expanded
{
get { return _expanded; }
set { _expanded = value; }
}
public string icon
{
get { return _ICON; }
set { _ICON = value; }
}
#endregion
public StoreHoustTreeRefModel()
{
TableName = "VW_WMS_STOREHOUSE";
}
}
#endregion
}