Browse Source

调整接口

master
lilili 2 years ago
parent
commit
8ec0009997
  1. 36
      WMS-BS/NFine.Application/WMS/PickMaterialApp.cs

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

@ -170,13 +170,14 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'";
a.ID,a.ApplyCode as Code,a.Sequence,a.MTIME,a.MUSERName,a.MUSER,a.WHCode,b.WarehouseName ,a.InvCode, a.ID,a.ApplyCode as Code,a.Sequence,a.MTIME,a.MUSERName,a.MUSER,a.WHCode,b.WarehouseName ,a.InvCode,
a.EATTRIBUTE,a.Sets,a.OrderInvCode,a.OrderInvDescribe,a.BillType,a.Remarks,a.Desks,a.DispatchNumber,a.DispatcherName, a.EATTRIBUTE,a.Sets,a.OrderInvCode,a.OrderInvDescribe,a.BillType,a.Remarks,a.Desks,a.DispatchNumber,a.DispatcherName,
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,
d.InvName,d.InvDesc,d.InvStd,d.InvUnit,d.EATTRIBUTE1 AS Area,
d.InvName,d.InvDesc,d.InvStd,d.InvUnit,detail.LocationCode AS Area,
case when e.SourceID is null then '' else '' end as IsNew,a.Quantity case when e.SourceID is null then '' else '' end as IsNew,a.Quantity
,f.Colspan ,f.ProjectCode ,f.BatchCode ,f.Version,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 ,f.cFree4 ,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.IssueQuantity as IssueQuantity ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.IssueQuantity as IssueQuantity
from ICSMOApply a from ICSMOApply a
left join ICSWarehouse b on a.WHCode=b.WarehouseCode and a.WorkPoint=b.WorkPoint left join ICSWarehouse b on a.WHCode=b.WarehouseCode and a.WorkPoint=b.WorkPoint
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
LEFT JOIN ICSInventoryDetail detail ON d.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint
left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint
where a.ApplyCode='{0}' and a.WorkPoint='{1}'"; where a.ApplyCode='{0}' and a.WorkPoint='{1}'";
@ -188,7 +189,7 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'";
} }
if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString()))
{ {
sql += " and d.EATTRIBUTE1 like '%" + queryParam["Area"].ToString() + "%' ";
sql += " and detail.LocationCode like '%" + queryParam["Area"].ToString() + "%' ";
} }
if (!string.IsNullOrWhiteSpace(queryParam["InvCode"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["InvCode"].ToString()))
{ {
@ -364,6 +365,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
left join ICSMOPickMerge e on a.ID = e.SourceID and a.WorkPoint = e.WorkPoint left join ICSMOPickMerge e on a.ID = e.SourceID and a.WorkPoint = e.WorkPoint
left join ICSExtension f on a.ExtensionID = f.ID and a.WorkPoint = f.WorkPoint left join ICSExtension f on a.ExtensionID = f.ID and a.WorkPoint = f.WorkPoint
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
LEFT JOIN ICSInventoryDetail detail ON d.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
where a.WorkPoint = '{WorkPoint}'"); where a.WorkPoint = '{WorkPoint}'");
if (!string.IsNullOrWhiteSpace(queryJson)) if (!string.IsNullOrWhiteSpace(queryJson))
{ {
@ -381,7 +383,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
} }
if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString()))
{ {
sqlString.Append($@" and d.EATTRIBUTE1 like '%{queryParam["Area"]}%' ");
sqlString.Append($@" and detail.LocationCode like '%{queryParam["Area"]}%' ");
} }
} }
@ -402,12 +404,13 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
List<DbParameter> parameter = new List<DbParameter>(); List<DbParameter> parameter = new List<DbParameter>();
string sql = @"SELECT * FROM (select row_number() over(partition by a.ApplyCode,a.InvCode,a.Sequence ORDER BY a.ApplyCode) as row, string sql = @"SELECT * FROM (select row_number() over(partition by a.ApplyCode,a.InvCode,a.Sequence ORDER BY a.ApplyCode) as row,
a.ID,a.ApplyCode as Code,a.Sequence,a.MTIME,a.MUSERName,a.MUSER,a.WHCode,b.WarehouseName,a.InvCode,d.InvName,d.InvDesc,d.InvStd,d.InvUnit, a.ID,a.ApplyCode as Code,a.Sequence,a.MTIME,a.MUSERName,a.MUSER,a.WHCode,b.WarehouseName,a.InvCode,d.InvName,d.InvDesc,d.InvStd,d.InvUnit,
case when e.SourceID is null then '' else '' end as IsNew,a.Quantity,d.EATTRIBUTE1 AS Area,
case when e.SourceID is null then '' else '' end as IsNew,a.Quantity,detail.LocationCode AS Area,
f.Colspan ,f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 ,f.cFree4 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.IssueQuantity as IssueQuantity ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.IssueQuantity as IssueQuantity
from ICSOApply a from ICSOApply a
left join ICSWarehouse b on a.WHCode=b.WarehouseCode and a.WorkPoint=b.WorkPoint left join ICSWarehouse b on a.WHCode=b.WarehouseCode and a.WorkPoint=b.WorkPoint
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
LEFT JOIN ICSInventoryDetail detail ON d.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint
left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint
where a.ApplyCode='{0}' and a.WorkPoint='{1}'"; where a.ApplyCode='{0}' and a.WorkPoint='{1}'";
@ -419,7 +422,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
} }
if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString()))
{ {
sql += " and d.EATTRIBUTE1 like '%" + queryParam["Area"].ToString() + "%' ";
sql += " and detail.LocationCode like '%" + queryParam["Area"].ToString() + "%' ";
} }
if (!string.IsNullOrWhiteSpace(queryParam["InvCode"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["InvCode"].ToString()))
{ {
@ -556,7 +559,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
} }
if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString()))
{ {
sqlString.Append($@" and d.EATTRIBUTE1 like '%{queryParam["Area"]}%' ");
sqlString.Append($@" and detail.LocationCode like '%{queryParam["Area"]}%' ");
} }
} }
@ -578,12 +581,13 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
,a.WorkPoint,a.Points,a.DeliveryType,a.DeliveryDescribe,a.InvDescribe,a.OtherDescribe, ,a.WorkPoint,a.Points,a.DeliveryType,a.DeliveryDescribe,a.InvDescribe,a.OtherDescribe,
a.SalesUnit,a.StockIndicator,a.IsSerialNumber, a.SalesUnit,a.StockIndicator,a.IsSerialNumber,
d.InvName,d.InvDesc,d.InvStd,d.InvUnit, d.InvName,d.InvDesc,d.InvStd,d.InvUnit,
case when e.SourceID is null then '' else '' end as IsNew,a.Quantity,d.EATTRIBUTE1 AS Area
case when e.SourceID is null then '' else '' end as IsNew,a.Quantity,detail.LocationCode AS Area
,f.Colspan ,f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 ,f.cFree4 ,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.SDNQuantity as IssueQuantity ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.SDNQuantity as IssueQuantity
from ICSSDN a from ICSSDN a
left join ICSWarehouse b on a.WHCode=b.WarehouseCode and a.WorkPoint=b.WorkPoint left join ICSWarehouse b on a.WHCode=b.WarehouseCode and a.WorkPoint=b.WorkPoint
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
LEFT JOIN ICSInventoryDetail detail ON d.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint
left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint
where a.SDNCode='{0}' and a.WorkPoint='{1}'"; where a.SDNCode='{0}' and a.WorkPoint='{1}'";
@ -595,7 +599,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
} }
if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString()))
{ {
sql += " and d.EATTRIBUTE1 like '%" + queryParam["Area"].ToString() + "%' ";
sql += " and detail.LocationCode like '%" + queryParam["Area"].ToString() + "%' ";
} }
if (!string.IsNullOrWhiteSpace(queryParam["InvCode"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["InvCode"].ToString()))
{ {
@ -637,6 +641,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
left join ICSMOPickMerge e on a.ID = e.SourceID and a.WorkPoint = e.WorkPoint left join ICSMOPickMerge e on a.ID = e.SourceID and a.WorkPoint = e.WorkPoint
left join ICSExtension f on a.ExtensionID = f.ID and a.WorkPoint = f.WorkPoint left join ICSExtension f on a.ExtensionID = f.ID and a.WorkPoint = f.WorkPoint
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
LEFT JOIN ICSInventoryDetail detail ON d.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
where a.WorkPoint = '{WorkPoint}'"); where a.WorkPoint = '{WorkPoint}'");
#endregion #endregion
@ -656,7 +661,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
} }
if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString()))
{ {
sqlString.Append($@" and d.EATTRIBUTE1 like '%{queryParam["Area"]}%' ");
sqlString.Append($@" and detail.LocationCode like '%{queryParam["Area"]}%' ");
} }
} }
@ -679,12 +684,13 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
a.InvCode,a.WorkPoint,a.OrderType, a.TypeDescribe,a.CostCenter,a.Remarks,a.PersonNumber,a.InvDescribe, a.InvCode,a.WorkPoint,a.OrderType, a.TypeDescribe,a.CostCenter,a.Remarks,a.PersonNumber,a.InvDescribe,
a.Unit,a.StockIndicator, a.Unit,a.StockIndicator,
d.InvName,d.InvDesc,d.InvStd,d.InvUnit, d.InvName,d.InvDesc,d.InvStd,d.InvUnit,
case when e.SourceID is null then '' else '' end as IsNew,d.EATTRIBUTE1 AS Area
case when e.SourceID is null then '' else '' end as IsNew,detail.LocationCode AS Area
,f.Colspan ,f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 ,f.cFree4 ,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.OutQuantity as IssueQuantity ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.OutQuantity as IssueQuantity
from ICSOtherOut a from ICSOtherOut a
left join ICSWarehouse b on a.WHCode=b.WarehouseCode and a.WorkPoint=b.WorkPoint left join ICSWarehouse b on a.WHCode=b.WarehouseCode and a.WorkPoint=b.WorkPoint
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
LEFT JOIN ICSInventoryDetail detail ON d.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint
left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint
where a.OutCode='{0}' and a.WorkPoint='{1}'"; where a.OutCode='{0}' and a.WorkPoint='{1}'";
@ -696,7 +702,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
} }
if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString()))
{ {
sql += " and d.EATTRIBUTE1 like '%" + queryParam["Area"].ToString() + "%' ";
sql += " and detail.LocationCode like '%" + queryParam["Area"].ToString() + "%' ";
} }
if (!string.IsNullOrWhiteSpace(queryParam["InvCode"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["InvCode"].ToString()))
{ {
@ -810,6 +816,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
left join ICSMOPickMerge e on a.ID = e.SourceID and a.WorkPoint = e.WorkPoint left join ICSMOPickMerge e on a.ID = e.SourceID and a.WorkPoint = e.WorkPoint
left join ICSExtension f on a.ExtensionID = f.ID and a.WorkPoint = f.WorkPoint left join ICSExtension f on a.ExtensionID = f.ID and a.WorkPoint = f.WorkPoint
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
LEFT JOIN ICSInventoryDetail detail ON d.InvCode=detail.INVCode AND a.ToWarehouseCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
where a.WorkPoint = '{WorkPoint}' and a.Status = '2'"); where a.WorkPoint = '{WorkPoint}' and a.Status = '2'");
if (!string.IsNullOrWhiteSpace(queryJson)) if (!string.IsNullOrWhiteSpace(queryJson))
{ {
@ -827,7 +834,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
} }
if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString()))
{ {
sqlString.Append($@" and d.EATTRIBUTE1 like '%{queryParam["Area"]}%' ");
sqlString.Append($@" and detail.LocationCode like '%{queryParam["Area"]}%' ");
} }
} }
@ -846,7 +853,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
var queryParam = queryJson.ToJObject(); var queryParam = queryJson.ToJObject();
List<DbParameter> parameter = new List<DbParameter>(); List<DbParameter> parameter = new List<DbParameter>();
string sql = @"SELECT * from (select row_number() over(partition by a.TransferNO,a.InvCode, string sql = @"SELECT * from (select row_number() over(partition by a.TransferNO,a.InvCode,
a.Sequence ORDER BY a.TransferNO) as row, a.ID,a.TransferNO as Code,a.Sequence,a.MTIME,a.MUSERName,a.MUSER,a.FromWarehouseCode as WHCode,b.WarehouseName,d.EATTRIBUTE1 AS Area,
a.Sequence ORDER BY a.TransferNO) as row, a.ID,a.TransferNO as Code,a.Sequence,a.MTIME,a.MUSERName,a.MUSER,a.FromWarehouseCode as WHCode,b.WarehouseName,detail.LocationCode AS Area,
a.InvCode,a.ToWarehouseCode,a.EATTRIBUTE1 AS ReceiveWork,a.WorkPoint,a.OrderType, a.InvCode,a.ToWarehouseCode,a.EATTRIBUTE1 AS ReceiveWork,a.WorkPoint,a.OrderType,
a.TypeDescribe,a.Remarks,a.PersonNumber,a.InvDescribe, a.TypeDescribe,a.Remarks,a.PersonNumber,a.InvDescribe,
a.Unit,a.StockIndicator,a.ReceiveInvCode,a.ReceiveInvDescribe, a.Unit,a.StockIndicator,a.ReceiveInvCode,a.ReceiveInvDescribe,
@ -858,6 +865,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
from ICSTransfer a from ICSTransfer a
left join ICSWarehouse b on a.FromWarehouseCode=b.WarehouseCode and a.WorkPoint=b.WorkPoint left join ICSWarehouse b on a.FromWarehouseCode=b.WarehouseCode and a.WorkPoint=b.WorkPoint
left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint left join ICSInventory d on a.InvCode=d.InvCode and a.WorkPoint=d.WorkPoint
LEFT JOIN ICSInventoryDetail detail ON d.InvCode=detail.INVCode AND a.ToWarehouseCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint
left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint
where a.TransferNO='{0}' and b.WorkPoint='{1}'"; where a.TransferNO='{0}' and b.WorkPoint='{1}'";
@ -869,7 +877,7 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
} }
if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["Area"].ToString()))
{ {
sql += " and d.EATTRIBUTE1 like '%" + queryParam["Area"].ToString() + "%' ";
sql += " and detail.LocationCode like '%" + queryParam["Area"].ToString() + "%' ";
} }
if (!string.IsNullOrWhiteSpace(queryParam["InvCode"].ToString())) if (!string.IsNullOrWhiteSpace(queryParam["InvCode"].ToString()))
{ {

Loading…
Cancel
Save