Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
e22efa7c71
  1. 45
      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

45
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}'";

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 _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);

3
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(),

Loading…
Cancel
Save