Administrator 3 years ago
parent
commit
89b24baa18
  1. 22
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs
  2. 26
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs

22
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs

@ -179,8 +179,8 @@ namespace Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput
public string MaterialDesc { set; get; }
[Display(Name = "备注")]
public string Remark1 { set; get; }
[Display(Name = "状态")]
public int State { set; get; }
//[Display(Name = "状态")]
//public int State { set; get; }
}
@ -254,8 +254,8 @@ namespace Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput
{
}
[Display(Name = "版本号")]
public string Version { set; get; }
//[Display(Name = "版本号")]
//public string Version { set; get; }
[Display(Name = "客户")]
public string Client { set; get; }
@ -282,24 +282,24 @@ namespace Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput
public decimal OutputQty { set; get; }
[Display(Name = "差异数量")]
public decimal DiffQty { set; get; }
//[Display(Name = "开票单价")]
//public decimal Price { set; get; }
//[Display(Name = "结算金额")]
//public decimal Amt { set; get; }
[Display(Name = "开票单价")]
public decimal Price { set; get; }
[Display(Name = "结算金额")]
public decimal Amt { set; get; }
//[Display(Name = "已出库金额")]
//public decimal OutPutAmt { set; get; }
//[Display(Name = "WMS待出库金额")]
//public decimal DiffAmt { set; get; }
[Display(Name = "物料组编码")]
public string MaterialGroupCode { set; get; }
public string EstimateType { set; get; }
[Display(Name = "物料组(车型)")]
public string MaterialGroup { set; get; }
[Display(Name = "物料组描述")]
public string MaterialDesc { set; get; }
[Display(Name = "备注")]
public string Remark1 { set; get; }
[Display(Name = "状态")]
public int State { set; get; }
//[Display(Name = "状态")]
//public int State { set; get; }
}

26
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs

@ -292,9 +292,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
var error = from itm1 in outPutDetail
join itm2 in _lst on
new { itm1.MaterialCode, itm1.Kanban }
new { itm1.SapMaterialCode, itm1.Kanban }
equals
new { itm2.MaterialCode, itm2.Kanban }
new { itm2.SapMaterialCode, itm2.Kanban }
select itm1;
var errList = error.GroupBy(p => new { p.BillNum }).Select(p => new { BillNum = p.Key.BillNum, Number = p.Sum(itm => itm.Qty) });
if (errList.Count() == 0)
@ -302,9 +302,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
var query = from itm1 in _lst
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.Kanban }
new { itm1.SapMaterialCode, itm1.Kanban }
equals
new { itm2.MaterialCode, itm2.Kanban } into temp1
new { itm2.SapMaterialCode, itm2.Kanban } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
@ -459,7 +459,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
//检验1:导入模板中的第一页签数据不能为空
if (result == null || result.Count() == 0)
{
checkList.Add(new ErrorExportDto(version, "红旗批量出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, "导入模板中第一页签没有数据,请检查!", string.Empty));
checkList.Add(new ErrorExportDto(version, "自定义出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, "导入模板中第一页签没有数据,请检查!", string.Empty));
}
if (checkList.Count > 0)
{
@ -474,7 +474,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
if (itm.Qty == 0)
{
checkList.Add(new ErrorExportDto(version, "红旗批量出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中看板号{0}的结算数量为0,影响出库请检查!", itm.Kanban), string.Empty));
checkList.Add(new ErrorExportDto(version, "自定义出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中看板号{0}的结算数量为0,影响出库请检查!", itm.Kanban), string.Empty));
}
}
@ -487,7 +487,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
GuidGenerator.Create(),
!string.IsNullOrEmpty(itm.WmsBillNum) ? itm.WmsBillNum : string.Empty,
itm.Kanban,
itm.MaterialCode,
itm.SapMaterialCode,
itm.MaterialDesc,
itm.MaterialGroup,
string.Empty,
@ -512,13 +512,13 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
//检验3:导入模板中看板号+物料号,不能重复
var _isRepeatOfReportList = from arc in _lst
group arc by new { arc.Kanban, arc.MaterialCode, arc.Version }
group arc by new { arc.Kanban, arc.SapMaterialCode, arc.Version }
into g
where g.Count() > 1
select g;
foreach (var itm in _isRepeatOfReportList)
{
checkList.Add(new ErrorExportDto(version, "红旗批量出库单", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中看板号{0}组合物料号{1}有重复,请检查!", itm.Key.Kanban, itm.Key.MaterialCode), string.Empty));
checkList.Add(new ErrorExportDto(version, "自定义出库单", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中看板号{0}组合物料号{1}有重复,请检查!", itm.Key.Kanban, itm.Key.SapMaterialCode), string.Empty));
}
if (checkList.Count > 0)
{
@ -532,9 +532,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
var error = from itm1 in outPutDetail
join itm2 in _lst on
new { itm1.MaterialCode, itm1.Kanban }
new { itm1.SapMaterialCode, itm1.Kanban }
equals
new { itm2.MaterialCode, itm2.Kanban}
new { itm2.SapMaterialCode, itm2.Kanban}
select itm1;
var errList = error.GroupBy(p => new { p.BillNum }).Select(p => new { BillNum = p.Key.BillNum, Number = p.Count() });
@ -551,9 +551,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
var query = from itm1 in _lst
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.Kanban }
new { itm1.SapMaterialCode, itm1.Kanban }
equals
new { itm2.MaterialCode, itm2.Kanban } into temp1
new { itm2.SapMaterialCode, itm2.Kanban } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;

Loading…
Cancel
Save