diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsDapperRepository.cs index 1f4d490e..7da63a86 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsDapperRepository.cs @@ -20,28 +20,28 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report public class SalesStockSum { - public string Version {set;get;} - public string PartCode {set;get;} - public string LocCode {set;get;} - public decimal StartQty {set;get;} - public decimal InQty {set;get;} - - public decimal OutQty {set;get;} - - public decimal EndQty {set;get;} - - public string Remark {set;get;} - public DateTime CreateTime {set;get;} - - public string OperName {set;get;} - - public DateTime StartTime { set; get; } - - public DateTime EndTime { set; get; } + public string Version { set; get; } + public string PartCode { set; get; } + public string LocCode { set; get; } + public decimal StartQty { set; get; } + public decimal InQty { set; get; } + + public decimal OutQty { set; get; } + + public decimal EndQty { set; get; } + + public string Remark { set; get; } + public DateTime CreateTime { set; get; } + + public string OperName { set; get; } + + public DateTime StartTime { set; get; } + + public DateTime EndTime { set; get; } public string PartDesc { 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}'"; string str = " SELECT A.*, \n" + " B.PartDesc, \n" + -" B.PartGroup \n" + +" B.PartGroup, \n" + +" B.PartGroupDesc \n" + " FROM \n" + " TM_PG_TIME_STOCK_DETAIL \n" + " A LEFT JOIN ( \n" + " SELECT DISTINCT \n" + " PartCode, \n" + " ( ISNULL ( [PartDesc1], '' ) + ISNULL ( [PartDesc2], '' ) ) PartDesc, \n" + -" PartGroup \n" + +" PartGroup ,PartGroupDesc\n" + + + " FROM \n" + " VIEW_PG_SIMPLE_PART \n" + " ) B ON A.PartCode = B.PartCode where a.version='{0}'"; diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs index 19f6643c..b84cd7ef 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs +++ b/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 _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 _compareLs = _ls.Where(p => p.DiffQty == 0).Select(p => new { p.ChassisNumber, p.KENNCode, p.ParentSapMaterialCode }); var rangeList = _erpdapperRepository.GetSapList(_ls, version, false); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs index 81cb61b8..17549ba3 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs @@ -368,7 +368,8 @@ into temp 版本 = itm.Version, 物料号 = itm.PartCode, 物料描述 = itm.PartDesc, - 物料组车型 = itm.PartGroup, + 物料组编码= itm.PartGroup, + 物料组车型 = itm.PartGroupDesc, SAS未结明细汇总 = tm == null ? "0" : tm.SAS未结明细汇总, WMS期初库存 = itm.StartQty.ToString(), WMS期末库存 = itm.EndQty.ToString(),