Browse Source

大众备件未结更改

FoShanPG
44673626 3 years ago
parent
commit
8f7566baaa
  1. 14
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs
  2. 6
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
  3. 11
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs
  4. 12
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs

14
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs

@ -63,7 +63,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
/// <summary>
/// 大众备件调整导入(财务期初时用的功能)
/// 大众备件明细数据导入功能(以后正常使用的功能),包含导入有空的订单号
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
@ -101,8 +101,18 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
_bomList.Add(new SparePartVersion(_id, branchId, year, period, version, customerCode));
foreach (var itm in entityList)
{
if (string.IsNullOrEmpty(itm.PurchaseOrderNo))
{
//订单号不空
itm.SetValue(GuidGenerator.Create(), branchId, year, period, version, "not90", "NoOrder");
}
else
{
//赋值上主键ID
itm.SetValue(GuidGenerator.Create(), branchId, year, period, version, "not90");
}
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
@ -113,7 +123,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
}
/// <summary>
/// 大众备件明细数据导入功能(以后正常使用的功能)
/// 大众备件调整导入(财务期初时用的功能),订单号+物料号能一对一匹配
/// </summary>
/// <param name="files"></param>
/// <param name="branchId"></param>

6
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs

@ -256,9 +256,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
var _list90Summary = _excelHelper.ExcelToListOne<WmsSharePart90OutPutDetial>();//有单号
var _list = _listSummary.Where(p =>string.IsNullOrEmpty(p.OrderBillNum)).ToList();//没有采购订单号的集合
var _listBill = _list90Summary.Where(p =>!string.IsNullOrEmpty(p.OrderBillNum)).ToList();//有采购订单号的集合
//NoOrder用来标识采购订单号为空的数据
var _list = _listSummary.Where(p => p.OrderBillNum== "NoOrder").ToList();//有采购订单号的集合
var _listBill = _list90Summary.Where(p => !string.IsNullOrEmpty(p.OrderBillNum) && p.OrderBillNum != "NoOrder").ToList();//有采购订单号的集合
//var _list = _excelHelper.ExcelToList<WmsSharePartOutPutDetial>();

11
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs

@ -25,6 +25,17 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
BranchId = branchId;
Extend = extend;
}
public void SetValue(Guid guid, Guid branchId, string year, string peroid, string version, string extend,string purchaseOrderNo)
{
Period = peroid;
Year = year;
Id = guid;
Version = version;
BranchId = branchId;
Extend = extend;
PurchaseOrderNo = purchaseOrderNo;
}
public SparePart(Guid Id, string year, string period, string version, string lineNumber,
string purchaseType,string purchaseOrderNo, string purchaseOrderNoItem, string purchaseOrderNoText,
decimal receiptQty, decimal invoicedQty, decimal amountNoTax, decimal purchasePriceNoTax,

12
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs

@ -596,7 +596,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" WHERE\n" +
" Extend != 'is90' \n" +
" AND Version = '{0}' \n" +
" AND PurchaseOrderNo IS NULL \n" +
" AND PurchaseOrderNo='NoOrder' \n" +
" GROUP BY\n" +
" MaterialCode,\n" +
" PurchasePriceNoTax \n" +
@ -758,11 +758,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
string condition = "";
if (!string.IsNullOrEmpty(begintime))
if (!string.IsNullOrEmpty(begintime) && Convert.ToDateTime(begintime) != DateTime.MinValue)
{
condition += string.Format(" and a.SpareDate>='{0}' ", begintime);
}
if (!string.IsNullOrEmpty(endtime))
if (!string.IsNullOrEmpty(endtime) && Convert.ToDateTime(begintime) != DateTime.MinValue)
{
condition += string.Format(" and a.SpareDate<='{0}' ", endtime);
}
@ -1090,11 +1090,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
}
[ExporterHeader(DisplayName = "交货日期 ")]
public string { set; get; }
[ExporterHeader(DisplayName = "交货单号")]
public string { set; get; }
[ExporterHeader(DisplayName = "交货日期 ")]
public string { set; get; }
[ExporterHeader(DisplayName = "订单日期")]
public string { set; get; }

Loading…
Cancel
Save