Browse Source

所有出库单据加上状态(未配料 已配料 已过账)

master
陆晔 2 years ago
parent
commit
efc78f9c8b
  1. 25
      WMS-BS/NFine.Application/WMS/PickMaterialApp.cs

25
WMS-BS/NFine.Application/WMS/PickMaterialApp.cs

@ -123,8 +123,11 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'";
a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.InvDescribe,a.Unit,a.StockIndicator, a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.InvDescribe,a.Unit,a.StockIndicator,
case when max(e.SourceID) is null then '' else '' end as IsNew,f.Colspan , case when max(e.SourceID) is null then '' else '' end as IsNew,f.Colspan ,
case when max(k.TransCode) is null then '' else '' end as IsOccupy, case when max(k.TransCode) is null then '' else '' end as IsOccupy,
case when (a.EATTRIBUTE='01' OR a.EATTRIBUTE='20') then(
case when sum(a.Quantity)=sum(IssueQuantity) and a.MUSERName != 'JOB' then '' case when sum(a.Quantity)=sum(IssueQuantity) and a.MUSERName != 'JOB' then ''
else (case when sum(a.Quantity) =sum(IssueQuantity) and a.MUSERName = 'JOB' then '' else '' end) end as Status,
when sum(a.Quantity) =sum(IssueQuantity) and a.MUSERName = 'JOB' then '' else '' end)
else (case when sum(a.Quantity) =sum(IssueQuantity) then ''
when sum(a.Quantity)!=sum(IssueQuantity) AND sum(IssueQuantity)>0 then '' else '' end) END as Status,
f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 , f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 ,
f.cFree4 ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.ID, f.cFree4 ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.ID,
case when a.MUSER!= 'JOB' then a.MUSER else '' end AS PickName case when a.MUSER!= 'JOB' then a.MUSER else '' end AS PickName
@ -303,8 +306,9 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'";
a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.InvDescribe,a.Unit,a.StockIndicator, a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.InvDescribe,a.Unit,a.StockIndicator,
case when max(e.SourceID) is null then '' else '' end as IsNew,f.Colspan , case when max(e.SourceID) is null then '' else '' end as IsNew,f.Colspan ,
case when max(k.TransCode) is null then '' else '' end as IsOccupy, case when max(k.TransCode) is null then '' else '' end as IsOccupy,
case when sum(a.Quantity) =sum(IssueQuantity) and a.MUSERName != 'JOB' then ''
else (case when sum(a.Quantity) =sum(IssueQuantity) and a.MUSERName = 'JOB' then '' else '' end) end as Status,
case when sum(a.Quantity) =sum(IssueQuantity) then ''
when sum(a.Quantity)!=sum(IssueQuantity) AND sum(IssueQuantity)>0 then ''
else '' end as Status,
f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 , f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 ,
f.cFree4 ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.ID f.cFree4 ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.ID
from ICSMOApply a from ICSMOApply a
@ -615,6 +619,9 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
else '' else ''
end as IsNew, end as IsNew,
case when max(k.TransCode) is null then '' else '' end as IsOccupy, case when max(k.TransCode) is null then '' else '' end as IsOccupy,
case when sum(a.Quantity) =sum(IssueQuantity) then ''
when sum(a.Quantity)!=sum(IssueQuantity) AND sum(IssueQuantity)>0 then ''
else '' end as Status,
f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1, f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1,
f.cFree2,f.cFree3,f.cFree4,f.cFree5,f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10,a.ID f.cFree2,f.cFree3,f.cFree4,f.cFree5,f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10,a.ID
from ICSOApply a from ICSOApply a
@ -808,6 +815,9 @@ left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLo
a.CusCode,a.CusName, a.CusCode,a.CusName,
(CASE WHEN max(e.SourceID) IS NULL THEN '' ELSE '' END) AS IsNew, (CASE WHEN max(e.SourceID) IS NULL THEN '' ELSE '' END) AS IsNew,
case when max(k.TransCode) is null then '' else '' end as IsOccupy, case when max(k.TransCode) is null then '' else '' end as IsOccupy,
case when sum(a.Quantity) =sum(SDNQuantity) then ''
when sum(a.Quantity)!=sum(SDNQuantity) AND sum(SDNQuantity)>0 then ''
else '' end as Status,
f.Colspan, f.ProjectCode, f.BatchCode, f.Version, f.Brand, f.Colspan, f.ProjectCode, f.BatchCode, f.Version, f.Brand,
f.cFree1, f.cFree2, f.cFree3, f.cFree4, f.cFree5, f.cFree6, f.cFree7, f.cFree8, f.cFree9, f.cFree10,a.ID f.cFree1, f.cFree2, f.cFree3, f.cFree4, f.cFree5, f.cFree6, f.cFree7, f.cFree8, f.cFree9, f.cFree10,a.ID
FROM ICSSDN a FROM ICSSDN a
@ -939,6 +949,9 @@ left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLo
else '' else ''
end as IsNew, end as IsNew,
case when max(k.TransCode) is null then '' else '' end as IsOccupy, case when max(k.TransCode) is null then '' else '' end as IsOccupy,
case when sum(a.Quantity)=sum(a.OutQuantity) then ''
when sum(a.Quantity)!=sum(a.OutQuantity) and sum(a.OutQuantity)>0 then ''
else '' END AS Status,
f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1, f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1,
f.cFree2,f.cFree3,f.cFree4,f.cFree5,f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10,a.ID f.cFree2,f.cFree3,f.cFree4,f.cFree5,f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10,a.ID
from ICSOtherOut a from ICSOtherOut a
@ -1129,6 +1142,9 @@ f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1,
else '' else ''
end as IsNew, end as IsNew,
case when max(k.TransCode) is null then '' else '' end as IsOccupy, case when max(k.TransCode) is null then '' else '' end as IsOccupy,
case when sum(a.Quantity)=sum(a.TransferQuantity) then ''
when sum(a.Quantity)!=sum(a.TransferQuantity) and a.TransferQuantity>0 then ''
else '' END AS Status,
f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1, f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1,
f.cFree2,f.cFree3,f.cFree4,f.cFree5,f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10 f.cFree2,f.cFree3,f.cFree4,f.cFree5,f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10
from ICSTransfer a from ICSTransfer a
@ -1912,6 +1928,8 @@ c.Sequence,
} }
} }
try try
{
if (table.Rows.Count != 0)
{ {
#region 拣料时增加条码出入库记录,修改库存锁定数量,以作占料处理 #region 拣料时增加条码出入库记录,修改库存锁定数量,以作占料处理
string BusinessCode = string.Empty; string BusinessCode = string.Empty;
@ -2034,6 +2052,7 @@ c.Sequence,
SqlHelper.CmdExecuteNonQueryLi(pikTbLogsql); SqlHelper.CmdExecuteNonQueryLi(pikTbLogsql);
#endregion #endregion
}
var result = ConvertCellToString(table); var result = ConvertCellToString(table);
if (Invmes.Rows.Count > 0) if (Invmes.Rows.Count > 0)

Loading…
Cancel
Save