Browse Source

调整库位导入接口

master
lilili 2 years ago
parent
commit
90164b48b4
  1. 20
      WMS-BS/NFine.Application/WMS/BasicSettingsApp.cs
  2. 3
      WMS-BS/NFine.Application/WMS/PickMaterialApp.cs
  3. 12
      WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs

20
WMS-BS/NFine.Application/WMS/BasicSettingsApp.cs

@ -2129,11 +2129,11 @@ UPDATE dbo.ICSContainer set ContainerID='{0}',ContainerCODE='{1}',ContainerName=
var StackName = "";
//string GUID = Guid.NewGuid().ToString();
string KuFang = dr["库房编码"].ToString().Trim().ToUpper();
string Qu = dr["区"].ToString().Trim().ToUpper();
string Pai = dr[""].ToString().Trim().ToUpper();
string Qu = dr["区"].ToString().Trim().ToUpper();
string Pai = dr[""].ToString().Trim().ToUpper();
string Jia = dr["货架"].ToString().Trim().ToUpper();
string Ceng = dr[""].ToString().Trim().ToUpper();
string Ge = dr[""].ToString().Trim().ToUpper();
string Ceng = dr[""].ToString().Trim().ToUpper();
string Ge = dr[""].ToString().Trim().ToUpper();
if (KuFang == "" || KuFang == null)
{
throw new Exception("第 " + index + " 行库房编码不能为空!");
@ -2155,12 +2155,12 @@ UPDATE dbo.ICSContainer set ContainerID='{0}',ContainerCODE='{1}',ContainerName=
if (Qu != "")
{
StackCode += "-" + Qu;
StackName += Qu + "区";
StackName += Qu + "区";
}
if (Pai != "")
{
StackCode += "-" + Pai;
StackName += Pai + "";
StackName += Pai + "";
}
if (Jia != "")
{
@ -2170,12 +2170,12 @@ UPDATE dbo.ICSContainer set ContainerID='{0}',ContainerCODE='{1}',ContainerName=
if (Ceng != "")
{
StackCode += "-" + Ceng;
StackName += Ceng + "";
StackName += Ceng + "";
}
if (Ge != "")
{
StackCode += "-" + Ge;
StackName += Ge + "";
StackName += Ge + "";
}
string sqls = @"select LocationCode from ICSLocation where LocationCode='{0}' and WorkPoint='{1}'";
sqls = string.Format(sqls, StackCode, WorkPoint);
@ -2186,9 +2186,9 @@ UPDATE dbo.ICSContainer set ContainerID='{0}',ContainerCODE='{1}',ContainerName=
}
else
{
sql += @"Insert INto ICSLocation Values (newid(),'{0}','{1}','{2}','{3}','{4}',getdate(),'{5}','')";
sql += @"Insert INto ICSLocation Values (newid(),'{0}','{1}','{2}','{3}','{4}',getdate(),'{5}','','{6}','{7}','{8}','{9}','{10}')";
}
sql = string.Format(sql, StackCode, StackName, WHID, MUSER, MUSERNAME, WorkPoint);
sql = string.Format(sql, StackCode, StackName, WHID, MUSER, MUSERNAME, WorkPoint,Qu,Pai,Jia,Ceng,Ge);
}
count = SqlHelper.CmdExecuteNonQueryLi(sql);

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

@ -125,6 +125,7 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'";
f.cFree4 ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.ID
from ICSMOApply a
left JOIN ICSInventory b ON b.InvCode=a.InvCode
LEFT JOIN ICSInventoryDetail detail ON b.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 ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint
where a.WorkPoint='{WorkPoint}' ");
@ -150,7 +151,7 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'";
}
sqlString.Append(@" group by a.ApplyCode, a.WorkPoint,a.CreateDateTime,a.createperson,
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.WHCode,b.EATTRIBUTE1,a.ID,a.EATTRIBUTE,a.Sets,a.OrderInvCode,a.OrderInvDescribe,a.BillType,a.Remarks,a.Desks,a.DispatchNumber,a.DispatcherName,
f.cFree3,f.cFree4,f.cFree5,f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10,a.WHCode,detail.LocationCode,a.ID,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) as t where t.row=1");
#endregion

12
WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs

@ -577,7 +577,7 @@ CAST( (a.Quantity-ISNULL(c.LOTQTY,0)) as DECIMAL(18,{0})) as thisCreateQty,isnu
,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10
from ICSSDN a
left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint
LEFT JOIN ICSInventoryDetail detail WHERE b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
LEFT JOIN ICSInventoryDetail detail on b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join (
select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee
left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo and ee.type='4'
@ -743,7 +743,7 @@ CAST(a.Quantity AS DECIMAL(18,{0})) as Quantity,CAST(a.Amount AS DECIMAL(18,{0})
,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10
from ICSOtherIn a
left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint
LEFT JOIN ICSInventoryDetail detail WHERE b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
LEFT JOIN ICSInventoryDetail detail on b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join (
select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee
left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo and ee.type='5'
@ -904,7 +904,7 @@ insert into ICSInventoryLot
,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 from ICSReturn a
left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint
LEFT JOIN ICSInventoryDetail detail WHERE b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
LEFT JOIN ICSInventoryDetail detail on b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join (
select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee
left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo and ee.type='6'
@ -966,7 +966,7 @@ CAST(a.Quantity AS DECIMAL(18,{0})) as Quantity ,CAST(a.Amount AS DECIMAL(18,{0}
,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10
from ICSDeliveryNotice a
left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint
LEFT JOIN ICSInventoryDetail detail WHERE b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
LEFT JOIN ICSInventoryDetail detail on b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join (
select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee
left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo and ee.type='7'
@ -1043,7 +1043,7 @@ CAST(c.LOTQTY AS DECIMAL(18,{0})) as LOTQTY
,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10
from ICSODeliveryNotice a
left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint
LEFT JOIN ICSInventoryDetail detail WHERE b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
LEFT JOIN ICSInventoryDetail detail on b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join (
select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee
left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo and ee.type='8'
@ -1118,7 +1118,7 @@ CAST(a.Amount AS DECIMAL(18,{0})) as Amount,CAST(a.RCVQuantity AS DECIMAL(18,{0}
,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10
from ICSManufactureReceive a
left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint
LEFT JOIN ICSInventoryDetail detail WHERE b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
LEFT JOIN ICSInventoryDetail detail on b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint
left join (
select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee
left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo and ee.type='9'

Loading…
Cancel
Save