Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
fa329b5ad1
  1. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs
  2. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettleDiffDapperRepository.cs
  3. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs
  4. 6
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs

@ -264,7 +264,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" AND b.MaterialCode = a.ItemCode\n" + " AND b.MaterialCode = a.ItemCode\n" +
" LEFT JOIN ( SELECT SUM( amt )/ SUM( Qty ) InvoicePrice, MaterialCode FROM set_invoice WHERE version = '{0}' GROUP BY materialcode ) c ON a.ItemCode = c.MaterialCode\n" + " LEFT JOIN ( SELECT SUM( amt )/ SUM( Qty ) InvoicePrice, MaterialCode FROM set_invoice WHERE version = '{0}' GROUP BY materialcode ) c ON a.ItemCode = c.MaterialCode\n" +
" LEFT JOIN set_material d ON a.ItemCode = d.CustomerPartCode\n" + " LEFT JOIN set_material d ON a.ItemCode = d.CustomerPartCode\n" +
" LEFT JOIN (select max(CreationTime) CreateTime,MaterialCode,MaterialDesc from Set_material group by MaterialCode,MaterialDesc) e ON a.ErpMaterialCode = e.MaterialCode {1} \n" + " LEFT JOIN (select max(Id) Id,MaterialCode,MaterialDesc from Set_material group by MaterialCode,MaterialDesc) e ON a.ErpMaterialCode = e.MaterialCode {1} \n" +
" ) TEMP1\n" + " ) TEMP1\n" +
" LEFT JOIN (\n" + " LEFT JOIN (\n" +
" SELECT\n" + " SELECT\n" +

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettleDiffDapperRepository.cs

@ -206,7 +206,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" AND a.KENNCode = b.KENNCode\n" + " AND a.KENNCode = b.KENNCode\n" +
" LEFT JOIN Set_material c ON a.MaterialCode = c.CustomerPartCode {0}\n" + " LEFT JOIN Set_material c ON a.MaterialCode = c.CustomerPartCode {0}\n" +
" ) temp1\n" + " ) temp1\n" +
" LEFT JOIN Set_material temp2 ON temp1.ParentSapMaterialCode = temp2.MaterialCode \n" + " LEFT JOIN (select max(Id) Id,MaterialCode,MaterialDesc from Set_material group by MaterialCode,MaterialDesc) temp2 ON temp1.ParentSapMaterialCode = temp2.MaterialCode \n" +
" ) t1\n" + " ) t1\n" +
" LEFT JOIN (\n" + " LEFT JOIN (\n" +
" SELECT\n" + " SELECT\n" +

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs

@ -118,7 +118,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" left join (select * from Set_Unsettle where version='{1}') f \n" + " left join (select * from Set_Unsettle where version='{1}') f \n" +
" on a.MaterialCode=f.MaterialCode and a.KENNCode2=f.KENNCode and a.ChassisNumber2=f.ChassisNumber \n"+ " on a.MaterialCode=f.MaterialCode and a.KENNCode2=f.KENNCode and a.ChassisNumber2=f.ChassisNumber \n"+
" LEFT JOIN Set_material B ON a.MaterialCode = b.CustomerPartCode \n" + " LEFT JOIN Set_material B ON a.MaterialCode = b.CustomerPartCode \n" +
" LEFT JOIN Set_material d ON a.ParentSapMaterialCode = d.MaterialCode \n" + " LEFT JOIN (select max(Id) Id,MaterialCode,MaterialDesc from Set_material group by MaterialCode,MaterialDesc) d ON a.ParentSapMaterialCode = d.MaterialCode \n" +
" ) temp1\n" + " ) temp1\n" +
" LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE version = ( SELECT Max( Version ) FROM Set_PriceList ) ) temp2 ON temp1.SapMaterialCode = temp2.MaterialCode"; " LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE version = ( SELECT Max( Version ) FROM Set_PriceList ) ) temp2 ON temp1.SapMaterialCode = temp2.MaterialCode";

6
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs

@ -111,9 +111,9 @@ namespace SettleAccount.Job.Services.Report
Price = itm1.Price, Price = itm1.Price,
Amt = itm1.Amt, Amt = itm1.Amt,
Qty = 1, Qty = 1,
UNSettleQty = !string.IsNullOrEmpty(tm1.ParentSapMaterialCode) ? 1 : 0, UNSettleQty = tm1!=null ? 1 : 0,
DiffQty = !string.IsNullOrEmpty(tm1.ParentSapMaterialCode) ? 0 : -1, DiffQty = tm1!=null ? 0 : -1,
DiffAmt = !string.IsNullOrEmpty(tm1.ParentSapMaterialCode) ? 0 : Math.Round(itm1.Qty * itm1.Price) DiffAmt = tm1!=null ? 0 : Math.Round(itm1.Qty * itm1.Price)
}; };
rangeList = query.ToList(); rangeList = query.ToList();

Loading…
Cancel
Save