Browse Source

no message

master
yangtm 6 months ago
parent
commit
9f3ee31f36
  1. 16
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs
  2. 2
      WMS-BS/NFine.Application/WMS/PickMaterialApp.cs

16
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs

@ -553,6 +553,7 @@ namespace ICSSoft.DataProject
string LocationCode = ""; string LocationCode = "";
string WHCode = ""; string WHCode = "";
string LotNo = ""; string LotNo = "";
DateTime createDate = DateTime.Now;
#region 根据传入的料号和数量自动生成条码 #region 根据传入的料号和数量自动生成条码
if (BusinessCode == "2") if (BusinessCode == "2")
{ {
@ -649,6 +650,17 @@ namespace ICSSoft.DataProject
{ {
throw new Exception(language.GetNameByCode("WMSAPIInfo215")); throw new Exception(language.GetNameByCode("WMSAPIInfo215"));
} }
var getDate = string.Format(@"SELECT top 1 MTIME FROM ICSWareHouseLotInfo WHERE InvCode=(select InvCode
from ICSMOApplyNegDetail where ApplyNegCode='{1}' and Sequence='{2}' and WorkPoint='{0}') AND Quantity>0 ORDER BY MTIME ",
WorkPoint, TransCode, TransLine);
var date = DBHelper.ExecuteScalar(getDate, cmd);
if (date != null)
{
createDate = Convert.ToDateTime(date).AddDays(-1);
}
} }
#endregion #endregion
#region 正常入库 #region 正常入库
@ -713,12 +725,12 @@ namespace ICSSoft.DataProject
} }
string sql = string.Empty; string sql = string.Empty;
sql = @" INSERT INTO ICSWareHouseLotInfo(ID,LotNO,WarehouseCode,LocationCode,InvCode,Quantity,InDate,LockQuantity,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1) sql = @" INSERT INTO ICSWareHouseLotInfo(ID,LotNO,WarehouseCode,LocationCode,InvCode,Quantity,InDate,LockQuantity,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1)
SELECT NEWID(),a.LotNo ,'{4}','{5}',a.InvCode ,'{3}',SYSDATETIME(),'0','{2}',isnull(f.F_RealName,'{2}'),SYSDATETIME() ,a.WorkPoint ,''
SELECT NEWID(),a.LotNo ,'{4}','{5}',a.InvCode ,'{3}','{6}','0','{2}',isnull(f.F_RealName,'{2}'),'{6}' ,a.WorkPoint ,''
FROM ICSInventoryLot a FROM ICSInventoryLot a
INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint
left JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location left JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}'"; WHERE a.LotNo='{0}' AND a.WorkPoint='{1}'";
sql = string.Format(sql, LotNo, WorkPoint, User, Quantity, WHCode, LocationCode);
sql = string.Format(sql, LotNo, WorkPoint, User, Quantity, WHCode, LocationCode, createDate);
if (!DBHelper.ExecuteNonQuery(sql, cmd)) if (!DBHelper.ExecuteNonQuery(sql, cmd))
{ {

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

@ -2508,7 +2508,7 @@ a.Sequence,
if (Type == "5") if (Type == "5")
{ {
#region 委外领料SQL #region 委外领料SQL
chksql = @" select InvCode,WHCode,SUM(Quantity) as Quantity from ICSOApply
chksql = @" select InvCode,WHCode,(SUM(Quantity)-SUM(ISNULL(IssueQuantity, 0))) as Quantity from ICSOApply
where ApplyCode in ({0}) and WorkPoint='{1}' where ApplyCode in ({0}) and WorkPoint='{1}'
GROUP BY InvCode,WHCode"; GROUP BY InvCode,WHCode";
updateName = "ICSOApply"; updateName = "ICSOApply";

Loading…
Cancel
Save