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.

301 lines
8.5 KiB
C#

using System;
using HcUtility.Core;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace DSWeb.WMS.Models.WMS
{
[JsonObject]//库存 头表
public class WMSmb : 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],[BSNO],[BILLTYPE],[REMARK],[CUSTOMERNAME],[MATERIALNO],[GOODSCODE],[GOODSNAME],[GOODSHSCODE],isnull([KGS],0) KGS,isnull([CBM],0) CBM,isnull([PKGS],0) PKGS,[KINDPKGS],[STORAGEUNIT],isnull([STORAGEUNITCOUNT],0)STORAGEUNITCOUNT,[RULEUNIT],isnull([RULEUNITCOUNT],0) RULEUNITCOUNT,[ISCLEAR],[BSSTATUS],[FEESTATUS],OP,dbo.trimtime(OPTIME) OPTIME,CREATOR,dbo.trimtime(CREATETIME)CREATETIME ,CORPID,(select NAME from [COMPANY] where gid=CORPID) CORPIDREF FROM [dbo].[OP_WMS]";
}
public void getDef(string USERID)
{
//将一个数据对象的有默认值的数据项 设置为默认
SetValue("TIMEMARK", "0");
//设置一些数字字段的默认值:
setNoNullDef("ISCLEAR", "0");
setNoNullDef("BSSTATUS", "0");
setNoNullDef("KGS", "0");
setNoNullDef("CBM", "0");
setNoNullDef("PKGS", "0");
setNoNullDef("STORAGEUNITCOUNT", "0");
setNoNullDef("RULEUNITCOUNT", "0");
}
public WMSmb()
{
TableName = "OP_WMS";
}
public override string GetBillNoFieldName()
{
return "BSNO";
}
public override string GetTimeMarkFieldName()
{
return "TIMEMARK";
}
public override string GetStateFieldName()
{
return "OPSTATE";
}
}
[JsonObject]//逻辑仓储区 明细表
public class WMS_LOGICmb : 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,BSNO,NAME,VALUE from OP_WMS_LOGIC ";
}
public WMS_LOGICmb()
{
TableName = "OP_WMS_LOGIC";
}
public WMS_LOGICmb(string BSNO)
{
setDefault();
SetValue("BSNO", BSNO);
TableName = "OP_WMS_LOGIC";
}
public void setDefault() {
SetValue("GID", System.Guid.NewGuid().ToString());
}
public override string GetBillNoFieldName()
{
return "BSNO";
}
public override string GetTimeMarkFieldName()
{
return "";
}
}
[JsonObject]//逻辑仓储区 变动日志
public class WMS_LOGIC_LOGmb : 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,BSNO,PID,CHANGETYPE,NAME,VALUE,OP,dbo.trimtime(OPTIME) OPTIME from OP_WMS_LOGIC_LOG ";
}
public WMS_LOGIC_LOGmb()
{
TableName = "OP_WMS_LOGIC_LOG";
}
public WMS_LOGIC_LOGmb(string BSNO)
{
setDefault();
SetValue("BSNO", BSNO);
TableName = "OP_WMS_LOGIC_LOG";
}
public void setDefault()
{
SetValue("GID", System.Guid.NewGuid().ToString());
}
public override string GetBillNoFieldName()
{
return "BSNO";
}
public override string GetTimeMarkFieldName()
{
return "";
}
}
[JsonObject]//逻辑仓储区 明细表
public class WMS_PHYSICSmb : 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,BSNO,NAME,VALUE from OP_WMS_LOGIC ";
}
public WMS_PHYSICSmb()
{
TableName = "OP_WMS_LOGIC";
}
public WMS_PHYSICSmb(string BSNO)
{
setDefault();
SetValue("BSNO", BSNO);
TableName = "OP_WMS_LOGIC";
}
public void setDefault()
{
SetValue("GID", System.Guid.NewGuid().ToString());
//SetValue("FIXFEE","0");
//SetValue("WASHFEE", "0");
//SetValue("FWFEE", "0");
//SetValue("OVERFEE", "0");
//SetValue("LATEFEE", "0");
//SetValue("TOTALFEE", "0");
}
public override string GetBillNoFieldName()
{
return "BSNO";
}
public override string GetTimeMarkFieldName()
{
return "";
}
}
public class WMS_PHYSIC_CHANGEmb : 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,BSNO,NAME,VALUE from OP_WMS_LOGIC ";
}
public WMS_PHYSIC_CHANGEmb()
{
TableName = "OP_WMS_LOGIC";
}
public WMS_PHYSIC_CHANGEmb(string BSNO)
{
setDefault();
SetValue("BSNO", BSNO);
TableName = "OP_WMS_LOGIC";
}
public void setDefault()
{
SetValue("GID", System.Guid.NewGuid().ToString());
//SetValue("FIXFEE","0");
//SetValue("WASHFEE", "0");
//SetValue("FWFEE", "0");
//SetValue("OVERFEE", "0");
//SetValue("LATEFEE", "0");
//SetValue("TOTALFEE", "0");
}
public override string GetBillNoFieldName()
{
return "BSNO";
}
public override string GetTimeMarkFieldName()
{
return "";
}
}
public class WMS_PHYSIC_CHANGE_LOGmb : 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,BSNO,NAME,VALUE from OP_WMS_LOGIC ";
}
public WMS_PHYSIC_CHANGE_LOGmb()
{
TableName = "OP_WMS_LOGIC";
}
public WMS_PHYSIC_CHANGE_LOGmb(string BSNO)
{
setDefault();
SetValue("BSNO", BSNO);
TableName = "OP_WMS_LOGIC";
}
public void setDefault()
{
SetValue("GID", System.Guid.NewGuid().ToString());
//SetValue("FIXFEE","0");
//SetValue("WASHFEE", "0");
//SetValue("FWFEE", "0");
//SetValue("OVERFEE", "0");
//SetValue("LATEFEE", "0");
//SetValue("TOTALFEE", "0");
}
public override string GetBillNoFieldName()
{
return "BSNO";
}
public override string GetTimeMarkFieldName()
{
return "";
}
}
}