|
@ -29,7 +29,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount |
|
|
string sqlString = " SELECT a.Id, a.Year, a.Period, a.Version, a.Factory, a.TextCode, a.MaterialCode, a.MaterialDesc, a.InputDate, a.Qty, a.Amt, \n" + |
|
|
string sqlString = " SELECT a.Id, a.Year, a.Period, a.Version, a.Factory, a.TextCode, a.MaterialCode, a.MaterialDesc, a.InputDate, a.Qty, a.Amt, \n" + |
|
|
" a.Number, a.Accounting, a.AccountDate, b.BeginDate, b.EndDate, isnull(b.Price,0) Price, b.Type\n" + |
|
|
" a.Number, a.Accounting, a.AccountDate, b.BeginDate, b.EndDate, isnull(b.Price,0) Price, b.Type\n" + |
|
|
" FROM Set_Invoice AS a Left JOIN\n" + |
|
|
" FROM Set_Invoice AS a Left JOIN\n" + |
|
|
" Set_PriceList AS b ON a.MaterialCode = b.MaterialCode\n" + |
|
|
" (select * from Set_PriceList where customercode='100001') AS b ON a.MaterialCode = b.MaterialCode\n" + |
|
|
" WHERE (a.InputDate BETWEEN b.BeginDate AND b.EndDate) " ; |
|
|
" WHERE (a.InputDate BETWEEN b.BeginDate AND b.EndDate) " ; |
|
|
var _query = DbConnection.Query<InvoicePriceListDiff>(sqlString); |
|
|
var _query = DbConnection.Query<InvoicePriceListDiff>(sqlString); |
|
|
var _list = _query.ToList(); |
|
|
var _list = _query.ToList(); |
|
|