Browse Source

调整接口

master
lilili 2 years ago
parent
commit
bf0e5c18f4
  1. 34
      WMS-BS/NFine.Application/WMS/PickMaterialApp.cs
  2. 4
      WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml

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

@ -2333,8 +2333,8 @@ b.InvUnit,
quantity = "b.IssueQuantity";
sql += @"INSERT INTO dbo.ICSMOPickMerge
( ID ,MergeID ,SourceID ,Type,MUSER, MUSERName,MTIME,WorkPoint)
select NEWID(),'{0}',a.ID ,'{1}','{2}','{3}',GETDATE(),'{4}'
( ID ,MergeID ,SourceID ,Type,MUSER, MUSERName,MTIME,WorkPoint,EATTRIBUTE1)
select NEWID(),'{0}',a.ID ,'{1}','{2}','{3}',GETDATE(),'{4}',a.ApplyCode
from ICSMOApply a
where a.ApplyCode in ({5})";
}
@ -2360,8 +2360,8 @@ b.InvUnit,
orderCode = "b.ApplyCode";
quantity = "b.IssueQuantity";
sql += @"INSERT INTO dbo.ICSMOPickMerge
( ID ,MergeID ,SourceID ,Type,MUSER, MUSERName,MTIME,WorkPoint)
select NEWID(),'{0}',a.ID ,'{1}','{2}','{3}',GETDATE(),'{4}'
( ID ,MergeID ,SourceID ,Type,MUSER, MUSERName,MTIME,WorkPoint,EATTRIBUTE1)
select NEWID(),'{0}',a.ID ,'{1}','{2}','{3}',GETDATE(),'{4}',a.ApplyCode
from ICSOApply a
where a.ApplyCode in ({5})";
}
@ -2379,8 +2379,8 @@ b.InvUnit,
orderCode = "b.SDNCode";
quantity = "b.SDNQuantity";
sql += @"INSERT INTO dbo.ICSMOPickMerge
( ID ,MergeID ,SourceID ,Type,MUSER, MUSERName,MTIME,WorkPoint)
select NEWID(),'{0}',a.ID ,'{1}','{2}','{3}',GETDATE(),'{4}'
( ID ,MergeID ,SourceID ,Type,MUSER, MUSERName,MTIME,WorkPoint,EATTRIBUTE1)
select NEWID(),'{0}',a.ID ,'{1}','{2}','{3}',GETDATE(),'{4}',a.SDNCode
from ICSSDN a
where a.SDNCode in ({5}) AND a.Type='1' ";
}
@ -2390,8 +2390,8 @@ b.InvUnit,
orderCode = "b.OutCode";
quantity = "b.OutQuantity";
sql += @"INSERT INTO dbo.ICSMOPickMerge
( ID ,MergeID ,SourceID ,Type,MUSER, MUSERName,MTIME,WorkPoint)
select NEWID(),'{0}',a.ID ,'{1}','{2}','{3}',GETDATE(),'{4}'
( ID ,MergeID ,SourceID ,Type,MUSER, MUSERName,MTIME,WorkPoint,EATTRIBUTE1)
select NEWID(),'{0}',a.ID ,'{1}','{2}','{3}',GETDATE(),'{4}',a.OutCode
from ICSOtherOut a
where a.OutCode in ({5})";
}
@ -2409,8 +2409,8 @@ b.InvUnit,
orderCode = "b.TransferNO";
quantity = "b.TransferQuantity";
sql += @"INSERT INTO dbo.ICSMOPickMerge
( ID ,MergeID ,SourceID ,Type,MUSER, MUSERName,MTIME,WorkPoint)
select NEWID(),'{0}',a.ID ,'{1}','{2}','{3}',GETDATE(),'{4}'
( ID ,MergeID ,SourceID ,Type,MUSER, MUSERName,MTIME,WorkPoint,EATTRIBUTE1)
select NEWID(),'{0}',a.ID ,'{1}','{2}','{3}',GETDATE(),'{4}',a.TransferNO
from ICSTransfer a
where a.TransferNO in ({5})
";
@ -2473,7 +2473,7 @@ b.InvUnit,
dataList = dataList.TrimEnd(',');
}
}
string sqls = $@" SELECT ID FROM ICSMOPickMerge WHERE SourceID IN({dataList}) ";
string sqls = $@" SELECT SourceID FROM ICSMOPickMerge WHERE EATTRIBUTE1 IN({dataList}) ";
DataSet ds = SqlHelper.GetDataSetBySql(sqls);
DataTable dts = ds.Tables[0];
@ -2486,27 +2486,27 @@ b.InvUnit,
string sqlStrring=string.Empty;
if (Type == "2")//工单发料
{
sqlStrring = $@"select ID from ICSMOApply a where a.ID in ({dataList}) and a.IssueQuantity=0 ";
sqlStrring = $@"select ID from ICSMOApply a where a.ID in ({sqls}) and a.IssueQuantity=0 ";
}
if (Type == "5")//委外领料
{
sqlStrring = $@"select ID from ICSOApply a where a.ID in ({dataList}) and a.IssueQuantity=0 ";
sqlStrring = $@"select ID from ICSOApply a where a.ID in ({sqls}) and a.IssueQuantity=0 ";
}
if (Type == "7")//销售发货
{
sqlStrring = $@"select ID from ICSSDN a where a.ID in ({dataList}) and a.SDNQuantity=0 AND a.Type='1' ";
sqlStrring = $@"select ID from ICSSDN a where a.ID in ({sqls}) and a.SDNQuantity=0 AND a.Type='1' ";
}
if (Type == "8")//其它出库
{
sqlStrring = $@"select ID
from ICSOtherOut a
where a.ID in ({dataList}) and a.OutQuantity=0";
where a.ID in ({sqls}) and a.OutQuantity=0";
}
if (Type == "10")//物料调拨
{
sqlStrring = $@"select ID from ICSTransfer a where a.ID in ({dataList}) and a.TransferQuantity=0 ";
sqlStrring = $@"select ID from ICSTransfer a where a.ID in ({sqls}) and a.TransferQuantity=0 ";
}
DataSet dsdata = SqlHelper.GetDataSetBySql(sqlStrring);
@ -2518,7 +2518,7 @@ b.InvUnit,
return msg;
}
sql = $@"DELETE FROM ICSMOPickMerge WHERE SourceID IN({dataList})";
sql = $@"DELETE FROM ICSMOPickMerge WHERE SourceID IN({sqls})";
try
{

4
WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml

@ -425,8 +425,8 @@
for (var i = 0; i < objList.length; i++) {
var rowId = objList[i];
var rowData = $("#gridList").jqGrid('getRowData', rowId);
obj += rowData.ID + ",";
objArr += "'" + rowData.ID + "',";
obj += rowData.Code + ",";
objArr += "'" + rowData.Code + "',";
}
$.submitForm({

Loading…
Cancel
Save