|
|
@ -32,10 +32,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
|
string condition = " where 1=1 "; |
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(materialCode)) |
|
|
|
{ |
|
|
|
condition += string.Format(" d.MaterialCode='{0}' ", materialCode); |
|
|
|
} |
|
|
|
//if (!string.IsNullOrEmpty(materialCode))
|
|
|
|
//{
|
|
|
|
// condition += string.Format(" d.MaterialCode='{0}' ", materialCode);
|
|
|
|
//}
|
|
|
|
if (!string.IsNullOrEmpty(begin)) |
|
|
|
{ |
|
|
|
condition += string.Format(" a.BeginTime>='{0}' ", begin); |
|
|
@ -52,14 +52,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
|
{ |
|
|
|
condition += string.Format(" B.cp7Time<='{0}' ", cp7end); |
|
|
|
} |
|
|
|
if (!string.IsNullOrEmpty(kennCode)) |
|
|
|
{ |
|
|
|
condition += string.Format(" B.kenncode='{0}' ", kennCode); |
|
|
|
} |
|
|
|
if (!string.IsNullOrEmpty(chassisNumber)) |
|
|
|
{ |
|
|
|
condition += string.Format(" B.chassisNumber='{0}' ", chassisNumber); |
|
|
|
} |
|
|
|
//if (!string.IsNullOrEmpty(kennCode))
|
|
|
|
//{
|
|
|
|
// condition += string.Format(" B.kenncode='{0}' ", kennCode);
|
|
|
|
//}
|
|
|
|
//if (!string.IsNullOrEmpty(chassisNumber))
|
|
|
|
//{
|
|
|
|
// condition += string.Format(" B.chassisNumber='{0}' ", chassisNumber);
|
|
|
|
//}
|
|
|
|
|
|
|
|
string str = |
|
|
|
"SELECT\n" + |
|
|
@ -88,11 +88,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report |
|
|
|
" c.InvoicePrice,\n" + |
|
|
|
" Round( c.InvoicePrice * a.qty,2 ) InvoiceAmt,\n" + |
|
|
|
" Round( c.InvoicePrice * a.Qty,2 ) SettleAmt,\n" + |
|
|
|
" a.Qty - IsNull( B.Qty, 0 ) DiffSettleFisQty,\n" + |
|
|
|
" 0 DiffSettleFisQty,\n" + |
|
|
|
" 0 DiffSettleInvQty,\n" + |
|
|
|
" a.Qty InvoiceQty \n" + |
|
|
|
" FROM\n" + |
|
|
|
" ( SELECT * FROM set_settle WHERE version = '202110' ) a\n" + |
|
|
|
" ( SELECT * FROM set_settle WHERE version = '{0}' ) a\n" + |
|
|
|
" LEFT JOIN Set_fis b ON a.ChassisNumber = b.ChassisNumber2 \n" + |
|
|
|
" AND a.KENNCode = b.KENNCode \n" + |
|
|
|
" AND a.MaterialCode = b.ItemCode\n" + |
|
|
|