Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
5d5b2a44df
  1. 10
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
  2. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs
  3. 1
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListManager.cs
  4. 28
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnInvoiceSettledDetailDiffDapperRepository.cs

10
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

@ -164,15 +164,9 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
var result = await _exportImporter.UploadExcelImport<PriceListImportDto>(files, _excelImportService); var result = await _exportImporter.UploadExcelImport<PriceListImportDto>(files, _excelImportService);
var list=result.Where(p => p.Type == 20).ToList();
var entityList = ObjectMapper.Map<List<PriceListImportDto>, List<PriceList>>(result); var entityList = ObjectMapper.Map<List<PriceListImportDto>, List<PriceList>>(result);
var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault()); var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).OrderByDescending(p => p.BeginDate).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault());
foreach (var itm in _ls) foreach (var itm in _ls)
{ {

2
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs

@ -165,7 +165,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
var result = await _exportImporter.UploadExcelImport<PriceListBJImportDto>(files, _excelImportService); var result = await _exportImporter.UploadExcelImport<PriceListBJImportDto>(files, _excelImportService);
var entityList = ObjectMapper.Map<List<PriceListBJImportDto>, List<PriceListBJ>>(result); var entityList = ObjectMapper.Map<List<PriceListBJImportDto>, List<PriceListBJ>>(result);
var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault()); var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).OrderByDescending(p => p.BeginDate).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault());
foreach (var itm in _ls) foreach (var itm in _ls)
{ {

1
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListManager.cs

@ -78,7 +78,6 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
var pricelist = GetPriceList(version); var pricelist = GetPriceList(version);
//var LeftJoin = from emp in ListOfEmployees //var LeftJoin = from emp in ListOfEmployees
// join dept in ListOfDepartment // join dept in ListOfDepartment
// on emp.DeptID equals dept.ID into JoinedEmpDept // on emp.DeptID equals dept.ID into JoinedEmpDept

28
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnInvoiceSettledDetailDiffDapperRepository.cs

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

Loading…
Cancel
Save