mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Update demo
This commit is contained in:
@@ -137,6 +137,16 @@ namespace OrmTest.BugTest
|
||||
s.HeatNo,
|
||||
s.CmdNo
|
||||
}).ExecuteCommand();
|
||||
DB.CodeFirst.InitTables(typeof(VMaterialInfo),typeof(TStock),typeof(TTempStock));
|
||||
var GoodsList = DB.Queryable<VMaterialInfo, TStock>((vmg, ts) => new object[] {
|
||||
JoinType.Left,vmg.FMICode==ts.FMICode
|
||||
})
|
||||
.Select((vmg, ts) => new
|
||||
{
|
||||
|
||||
AbleQty = SqlFunc.ToInt32(ts.FQty - SqlFunc.Subqueryable<TTempStock>().Where(s => s.FMICode == vmg.FMICode && s.FK_Store =="")
|
||||
.Select(s => SqlFunc.AggregateSum(s.FKCSL)))
|
||||
}).ToList();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
158
Src/Asp.Net/SqlServerTest/BugTest/BugModels/TStock.cs
Normal file
158
Src/Asp.Net/SqlServerTest/BugTest/BugModels/TStock.cs
Normal file
@@ -0,0 +1,158 @@
|
||||
using System;
|
||||
|
||||
namespace OrmTest.BugTest
|
||||
{
|
||||
|
||||
public partial class TStock
|
||||
{
|
||||
public TStock()
|
||||
{ }
|
||||
#region Model
|
||||
private string _pkid;
|
||||
private string _fk_store;
|
||||
private string _fstorename;
|
||||
private string _fmicode;
|
||||
private string _fminame;
|
||||
private decimal _fqty = 0M;
|
||||
private string _fremark;
|
||||
private DateTime? _fupdatetime = DateTime.Now;
|
||||
private string _flaster;
|
||||
private string _fk_fsp_id;
|
||||
private string _fspname;
|
||||
private string _fk_sfsp_id;
|
||||
private string _sfspname;
|
||||
private decimal? _fprice = 0M;
|
||||
private string _fk_materialinfo;
|
||||
private decimal? _stocktotalcost = 0M;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PKID
|
||||
{
|
||||
set { _pkid = value; }
|
||||
get { return _pkid; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_Store
|
||||
{
|
||||
set { _fk_store = value; }
|
||||
get { return _fk_store; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FStoreName
|
||||
{
|
||||
set { _fstorename = value; }
|
||||
get { return _fstorename; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FMICode
|
||||
{
|
||||
set { _fmicode = value; }
|
||||
get { return _fmicode; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FMIName
|
||||
{
|
||||
set { _fminame = value; }
|
||||
get { return _fminame; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal FQty
|
||||
{
|
||||
set { _fqty = value; }
|
||||
get { return _fqty; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FRemark
|
||||
{
|
||||
set { _fremark = value; }
|
||||
get { return _fremark; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? FUpdateTime
|
||||
{
|
||||
set { _fupdatetime = value; }
|
||||
get { return _fupdatetime; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FLaster
|
||||
{
|
||||
set { _flaster = value; }
|
||||
get { return _flaster; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_FSP_ID
|
||||
{
|
||||
set { _fk_fsp_id = value; }
|
||||
get { return _fk_fsp_id; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FSPName
|
||||
{
|
||||
set { _fspname = value; }
|
||||
get { return _fspname; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_SFSP_ID
|
||||
{
|
||||
set { _fk_sfsp_id = value; }
|
||||
get { return _fk_sfsp_id; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string SFSPName
|
||||
{
|
||||
set { _sfspname = value; }
|
||||
get { return _sfspname; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal? FPrice
|
||||
{
|
||||
set { _fprice = value; }
|
||||
get { return _fprice; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_Materialinfo
|
||||
{
|
||||
set { _fk_materialinfo = value; }
|
||||
get { return _fk_materialinfo; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 库存总成本
|
||||
/// </summary>
|
||||
public decimal? stockTotalCost
|
||||
{
|
||||
set { _stocktotalcost = value; }
|
||||
get { return _stocktotalcost; }
|
||||
}
|
||||
#endregion Model
|
||||
|
||||
}
|
||||
}
|
112
Src/Asp.Net/SqlServerTest/BugTest/BugModels/TTempStock.cs
Normal file
112
Src/Asp.Net/SqlServerTest/BugTest/BugModels/TTempStock.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
using System;
|
||||
|
||||
namespace OrmTest.BugTest
|
||||
{
|
||||
public partial class TTempStock
|
||||
{
|
||||
public TTempStock()
|
||||
{ }
|
||||
#region Model
|
||||
private string _pkid;
|
||||
private string _fk_store;
|
||||
private string _fstore;
|
||||
private string _fmicode;
|
||||
private string _fminame;
|
||||
private decimal _fkcsl = 0M;
|
||||
private string _fbillno;
|
||||
private string _fbilltype;
|
||||
private string _fremark;
|
||||
private DateTime? _fupdatetime;
|
||||
private string _fk_materialinfo;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PKID
|
||||
{
|
||||
set { _pkid = value; }
|
||||
get { return _pkid; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_Store
|
||||
{
|
||||
set { _fk_store = value; }
|
||||
get { return _fk_store; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FStore
|
||||
{
|
||||
set { _fstore = value; }
|
||||
get { return _fstore; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FMICode
|
||||
{
|
||||
set { _fmicode = value; }
|
||||
get { return _fmicode; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FMIName
|
||||
{
|
||||
set { _fminame = value; }
|
||||
get { return _fminame; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal FKCSL
|
||||
{
|
||||
set { _fkcsl = value; }
|
||||
get { return _fkcsl; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FBillNo
|
||||
{
|
||||
set { _fbillno = value; }
|
||||
get { return _fbillno; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FBillType
|
||||
{
|
||||
set { _fbilltype = value; }
|
||||
get { return _fbilltype; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FRemark
|
||||
{
|
||||
set { _fremark = value; }
|
||||
get { return _fremark; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? FUpdateTime
|
||||
{
|
||||
set { _fupdatetime = value; }
|
||||
get { return _fupdatetime; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_Materialinfo
|
||||
{
|
||||
set { _fk_materialinfo = value; }
|
||||
get { return _fk_materialinfo; }
|
||||
}
|
||||
#endregion Model
|
||||
|
||||
}
|
||||
}
|
447
Src/Asp.Net/SqlServerTest/BugTest/BugModels/VMaterialInfo.cs
Normal file
447
Src/Asp.Net/SqlServerTest/BugTest/BugModels/VMaterialInfo.cs
Normal file
@@ -0,0 +1,447 @@
|
||||
using System;
|
||||
|
||||
namespace OrmTest.BugTest
|
||||
{
|
||||
|
||||
|
||||
public partial class VMaterialInfo
|
||||
{
|
||||
public VMaterialInfo()
|
||||
{ }
|
||||
#region Model
|
||||
private string _pkid;
|
||||
private string _fmicode;
|
||||
private string _fminame;
|
||||
private string _fpy;
|
||||
private string _fsiname;
|
||||
private string _fgauge;
|
||||
private string _foem;
|
||||
private string _fk_forigin;
|
||||
private string _fselfcode;
|
||||
private decimal? _flength;
|
||||
private decimal? _fwidth;
|
||||
private decimal? _fhigh;
|
||||
private decimal? _fweight;
|
||||
private bool _fishalf;
|
||||
private string _fbiname;
|
||||
private string _fuiname;
|
||||
private string _flsname;
|
||||
private int? _finboxqty;
|
||||
private string _fperformancetype;
|
||||
private bool _fassembly;
|
||||
private string _fptname;
|
||||
private decimal? _fretailprice;
|
||||
private decimal? _ftradeprice;
|
||||
private decimal? _fminimumprice;
|
||||
private decimal? _fminbuyqty;
|
||||
private string _fmanufacturernum;
|
||||
private string _fciname;
|
||||
private string _fspname;
|
||||
private string _deffspname;
|
||||
private DateTime? _fregdate;
|
||||
private string _fremark;
|
||||
private string _fadder;
|
||||
private string _bakspfspname;
|
||||
private string _fftname;
|
||||
private string _fstoretype;
|
||||
private string _fstate;
|
||||
private DateTime? _faddtime;
|
||||
private string _fk_seriesinfo;
|
||||
private string _fk_brandinfo;
|
||||
private string _fk_unitinfo;
|
||||
private string _fk_lablestyle;
|
||||
private string _fk_pricetype;
|
||||
private string _fk_clientinfo;
|
||||
private string _fk_storeplace;
|
||||
private string _fk_baksp;
|
||||
private string _fk_adder;
|
||||
private string _fk_flowtype;
|
||||
private string _lfptname;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PKID
|
||||
{
|
||||
set { _pkid = value; }
|
||||
get { return _pkid; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FMICode
|
||||
{
|
||||
set { _fmicode = value; }
|
||||
get { return _fmicode; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FMIName
|
||||
{
|
||||
set { _fminame = value; }
|
||||
get { return _fminame; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FPY
|
||||
{
|
||||
set { _fpy = value; }
|
||||
get { return _fpy; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FSIName
|
||||
{
|
||||
set { _fsiname = value; }
|
||||
get { return _fsiname; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FGauge
|
||||
{
|
||||
set { _fgauge = value; }
|
||||
get { return _fgauge; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FOEM
|
||||
{
|
||||
set { _foem = value; }
|
||||
get { return _foem; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_FOrigin
|
||||
{
|
||||
set { _fk_forigin = value; }
|
||||
get { return _fk_forigin; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FSelfCode
|
||||
{
|
||||
set { _fselfcode = value; }
|
||||
get { return _fselfcode; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal? FLength
|
||||
{
|
||||
set { _flength = value; }
|
||||
get { return _flength; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal? FWidth
|
||||
{
|
||||
set { _fwidth = value; }
|
||||
get { return _fwidth; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal? FHigh
|
||||
{
|
||||
set { _fhigh = value; }
|
||||
get { return _fhigh; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal? FWeight
|
||||
{
|
||||
set { _fweight = value; }
|
||||
get { return _fweight; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool FIsHalf
|
||||
{
|
||||
set { _fishalf = value; }
|
||||
get { return _fishalf; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FBIName
|
||||
{
|
||||
set { _fbiname = value; }
|
||||
get { return _fbiname; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FUIName
|
||||
{
|
||||
set { _fuiname = value; }
|
||||
get { return _fuiname; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FLSName
|
||||
{
|
||||
set { _flsname = value; }
|
||||
get { return _flsname; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? FInBoxQty
|
||||
{
|
||||
set { _finboxqty = value; }
|
||||
get { return _finboxqty; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FPerformanceType
|
||||
{
|
||||
set { _fperformancetype = value; }
|
||||
get { return _fperformancetype; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool FAssembly
|
||||
{
|
||||
set { _fassembly = value; }
|
||||
get { return _fassembly; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FPTName
|
||||
{
|
||||
set { _fptname = value; }
|
||||
get { return _fptname; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal? FRetailPrice
|
||||
{
|
||||
set { _fretailprice = value; }
|
||||
get { return _fretailprice; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal? FTradePrice
|
||||
{
|
||||
set { _ftradeprice = value; }
|
||||
get { return _ftradeprice; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal? FMinimumPrice
|
||||
{
|
||||
set { _fminimumprice = value; }
|
||||
get { return _fminimumprice; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public decimal? FMinBuyQty
|
||||
{
|
||||
set { _fminbuyqty = value; }
|
||||
get { return _fminbuyqty; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FManufacturerNum
|
||||
{
|
||||
set { _fmanufacturernum = value; }
|
||||
get { return _fmanufacturernum; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FCIName
|
||||
{
|
||||
set { _fciname = value; }
|
||||
get { return _fciname; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FSPName
|
||||
{
|
||||
set { _fspname = value; }
|
||||
get { return _fspname; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string DefFSPName
|
||||
{
|
||||
set { _deffspname = value; }
|
||||
get { return _deffspname; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? FRegDate
|
||||
{
|
||||
set { _fregdate = value; }
|
||||
get { return _fregdate; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FRemark
|
||||
{
|
||||
set { _fremark = value; }
|
||||
get { return _fremark; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FAdder
|
||||
{
|
||||
set { _fadder = value; }
|
||||
get { return _fadder; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string BakSPFSPName
|
||||
{
|
||||
set { _bakspfspname = value; }
|
||||
get { return _bakspfspname; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FFTName
|
||||
{
|
||||
set { _fftname = value; }
|
||||
get { return _fftname; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FStoreType
|
||||
{
|
||||
set { _fstoretype = value; }
|
||||
get { return _fstoretype; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FState
|
||||
{
|
||||
set { _fstate = value; }
|
||||
get { return _fstate; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? FAddTime
|
||||
{
|
||||
set { _faddtime = value; }
|
||||
get { return _faddtime; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_SeriesInfo
|
||||
{
|
||||
set { _fk_seriesinfo = value; }
|
||||
get { return _fk_seriesinfo; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_BrandInfo
|
||||
{
|
||||
set { _fk_brandinfo = value; }
|
||||
get { return _fk_brandinfo; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_UnitInfo
|
||||
{
|
||||
set { _fk_unitinfo = value; }
|
||||
get { return _fk_unitinfo; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_LableStyle
|
||||
{
|
||||
set { _fk_lablestyle = value; }
|
||||
get { return _fk_lablestyle; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_PriceType
|
||||
{
|
||||
set { _fk_pricetype = value; }
|
||||
get { return _fk_pricetype; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_ClientInfo
|
||||
{
|
||||
set { _fk_clientinfo = value; }
|
||||
get { return _fk_clientinfo; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_StorePlace
|
||||
{
|
||||
set { _fk_storeplace = value; }
|
||||
get { return _fk_storeplace; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_BakSP
|
||||
{
|
||||
set { _fk_baksp = value; }
|
||||
get { return _fk_baksp; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_Adder
|
||||
{
|
||||
set { _fk_adder = value; }
|
||||
get { return _fk_adder; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FK_FlowType
|
||||
{
|
||||
set { _fk_flowtype = value; }
|
||||
get { return _fk_flowtype; }
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string LFPTName
|
||||
{
|
||||
set { _lfptname = value; }
|
||||
get { return _lfptname; }
|
||||
}
|
||||
#endregion Model
|
||||
|
||||
}
|
||||
}
|
@@ -58,6 +58,9 @@
|
||||
<Compile Include="BugTest\BugModels\tLogonHistoryModel.cs" />
|
||||
<Compile Include="BugTest\BugModels\VipAccountsModel.cs" />
|
||||
<Compile Include="BugTest\BugModels\VipBenefitsModel.cs" />
|
||||
<Compile Include="BugTest\BugModels\TStock.cs" />
|
||||
<Compile Include="BugTest\BugModels\TTempStock.cs" />
|
||||
<Compile Include="BugTest\BugModels\VMaterialInfo.cs" />
|
||||
<Compile Include="Demos\H_Queue.cs" />
|
||||
<Compile Include="Demos\I_InsertOrUpdate.cs" />
|
||||
<Compile Include="Demos\J_Debugger.cs" />
|
||||
|
Reference in New Issue
Block a user