Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
e22efa7c71
  1. 9
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsDapperRepository.cs
  2. 9
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs
  3. 3
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs

9
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsDapperRepository.cs

@ -41,7 +41,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public string PartDesc { set; get; } public string PartDesc { set; get; }
public string PartGroup { set; get; } public string PartGroup { set; get; }
public string PartGroupDesc { set; get; }
} }
@ -94,14 +94,17 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//" ) B ON A.PartCode = B.PartCode where a.version='{0}'"; //" ) B ON A.PartCode = B.PartCode where a.version='{0}'";
string str = " SELECT A.*, \n" + string str = " SELECT A.*, \n" +
" B.PartDesc, \n" + " B.PartDesc, \n" +
" B.PartGroup \n" + " B.PartGroup, \n" +
" B.PartGroupDesc \n" +
" FROM \n" + " FROM \n" +
" TM_PG_TIME_STOCK_DETAIL \n" + " TM_PG_TIME_STOCK_DETAIL \n" +
" A LEFT JOIN ( \n" + " A LEFT JOIN ( \n" +
" SELECT DISTINCT \n" + " SELECT DISTINCT \n" +
" PartCode, \n" + " PartCode, \n" +
" ( ISNULL ( [PartDesc1], '' ) + ISNULL ( [PartDesc2], '' ) ) PartDesc, \n" + " ( ISNULL ( [PartDesc1], '' ) + ISNULL ( [PartDesc2], '' ) ) PartDesc, \n" +
" PartGroup \n" + " PartGroup ,PartGroupDesc\n" +
" FROM \n" + " FROM \n" +
" VIEW_PG_SIMPLE_PART \n" + " VIEW_PG_SIMPLE_PART \n" +
" ) B ON A.PartCode = B.PartCode where a.version='{0}'"; " ) B ON A.PartCode = B.PartCode where a.version='{0}'";

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

@ -339,6 +339,15 @@ namespace SettleAccount.Job.Services.Report
//var cp7end = p_list.Where(p => p.Name == "CP7End").FirstOrDefault().Value; //var cp7end = p_list.Where(p => p.Name == "CP7End").FirstOrDefault().Value;
var _list = _dapper1.GetDiffReport(DateTime.Now.Year.ToString(), begin, end, string.Empty, version, materialCode, materialGroup, sapCode); var _list = _dapper1.GetDiffReport(DateTime.Now.Year.ToString(), begin, end, string.Empty, version, materialCode, materialGroup, sapCode);
foreach (var itm in _list)
{
if (itm.UnSettleQty > 0)
{
itm.UnSettleQty = 1;
}
}
var _ls = _list.Where(p => p.Flag != "L").Where(p => p.ParentSapMaterialCode != p.SapMaterialCode).GroupBy(p => new { p.KENNCode, p.ChassisNumber, p.ParentSapMaterialCode }).Select(p => p.FirstOrDefault()).ToList(); var _ls = _list.Where(p => p.Flag != "L").Where(p => p.ParentSapMaterialCode != p.SapMaterialCode).GroupBy(p => new { p.KENNCode, p.ChassisNumber, p.ParentSapMaterialCode }).Select(p => p.FirstOrDefault()).ToList();
var _compareLs = _ls.Where(p => p.DiffQty == 0).Select(p => new { p.ChassisNumber, p.KENNCode, p.ParentSapMaterialCode }); var _compareLs = _ls.Where(p => p.DiffQty == 0).Select(p => new { p.ChassisNumber, p.KENNCode, p.ParentSapMaterialCode });
var rangeList = _erpdapperRepository.GetSapList(_ls, version, false); var rangeList = _erpdapperRepository.GetSapList(_ls, version, false);

3
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs

@ -368,7 +368,8 @@ into temp
= itm.Version, = itm.Version,
= itm.PartCode, = itm.PartCode,
= itm.PartDesc, = itm.PartDesc,
= itm.PartGroup, = itm.PartGroup,
= itm.PartGroupDesc,
SAS未结明细汇总 = tm == null ? "0" : tm.SAS未结明细汇总, SAS未结明细汇总 = tm == null ? "0" : tm.SAS未结明细汇总,
WMS期初库存 = itm.StartQty.ToString(), WMS期初库存 = itm.StartQty.ToString(),
WMS期末库存 = itm.EndQty.ToString(), WMS期末库存 = itm.EndQty.ToString(),

Loading…
Cancel
Save