Browse Source

大众备件未结更改

FoShanPG
44673626 3 years ago
parent
commit
8f7566baaa
  1. 16
      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

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

@ -63,7 +63,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
/// <summary> /// <summary>
/// 大众备件调整导入(财务期初时用的功能) /// 大众备件明细数据导入功能(以后正常使用的功能),包含导入有空的订单号
/// </summary> /// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns> /// <returns></returns>
@ -101,7 +101,17 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
_bomList.Add(new SparePartVersion(_id, branchId, year, period, version, customerCode)); _bomList.Add(new SparePartVersion(_id, branchId, year, period, version, customerCode));
foreach (var itm in entityList) foreach (var itm in entityList)
{ {
itm.SetValue(GuidGenerator.Create(), branchId, year, period, version, "not90"); 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) if (checkList.Count > 0)
{ {
@ -113,7 +123,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
} }
/// <summary> /// <summary>
/// 大众备件明细数据导入功能(以后正常使用的功能) /// 大众备件调整导入(财务期初时用的功能),订单号+物料号能一对一匹配
/// </summary> /// </summary>
/// <param name="files"></param> /// <param name="files"></param>
/// <param name="branchId"></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 _list90Summary = _excelHelper.ExcelToListOne<WmsSharePart90OutPutDetial>();//有单号
var _list = _listSummary.Where(p =>string.IsNullOrEmpty(p.OrderBillNum)).ToList();//没有采购订单号的集合 //NoOrder用来标识采购订单号为空的数据
var _listBill = _list90Summary.Where(p =>!string.IsNullOrEmpty(p.OrderBillNum)).ToList();//有采购订单号的集合 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>(); //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; BranchId = branchId;
Extend = extend; 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, public SparePart(Guid Id, string year, string period, string version, string lineNumber,
string purchaseType,string purchaseOrderNo, string purchaseOrderNoItem, string purchaseOrderNoText, string purchaseType,string purchaseOrderNo, string purchaseOrderNoItem, string purchaseOrderNoText,
decimal receiptQty, decimal invoicedQty, decimal amountNoTax, decimal purchasePriceNoTax, 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" + " WHERE\n" +
" Extend != 'is90' \n" + " Extend != 'is90' \n" +
" AND Version = '{0}' \n" + " AND Version = '{0}' \n" +
" AND PurchaseOrderNo IS NULL \n" + " AND PurchaseOrderNo='NoOrder' \n" +
" GROUP BY\n" + " GROUP BY\n" +
" MaterialCode,\n" + " MaterialCode,\n" +
" PurchasePriceNoTax \n" + " PurchasePriceNoTax \n" +
@ -758,11 +758,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
string condition = ""; string condition = "";
if (!string.IsNullOrEmpty(begintime)) if (!string.IsNullOrEmpty(begintime) && Convert.ToDateTime(begintime) != DateTime.MinValue)
{ {
condition += string.Format(" and a.SpareDate>='{0}' ", begintime); 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); 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 = "交货单号")] [ExporterHeader(DisplayName = "交货单号")]
public string { set; get; } public string { set; get; }
[ExporterHeader(DisplayName = "交货日期 ")]
public string { set; get; }
[ExporterHeader(DisplayName = "订单日期")] [ExporterHeader(DisplayName = "订单日期")]
public string { set; get; } public string { set; get; }

Loading…
Cancel
Save