@ -1911,6 +1911,8 @@ c.Sequence,
table . Rows . RemoveAt ( item ) ;
}
}
try
{
#region 拣料时增加条码出入库记录,修改库存锁定数量,以作占料处理
string BusinessCode = string . Empty ;
string TransType = "" ;
@ -2009,7 +2011,9 @@ c.Sequence,
#endregion
foreach ( DataRow PickLog in table . Rows )
{
pikTbLogsql + = @ "INSERT INTO ICSWareHouseLotInfoLog(ID,Identification,TransCode,TransSequence,LotNo,InvCode,
pikTbLogsql + = @ " IF NOT EXISTS(SELECT TransCode FROM ICSWareHouseLotInfoLog WHERE TransCode='{1}' AND TransSequence='{2}' AND LotNo='{9}' AND WorkPoint='{8}' AND TransType='15')
BEGIN
INSERT INTO ICSWareHouseLotInfoLog ( ID , Identification , TransCode , TransSequence , LotNo , InvCode ,
FromWarehouseCode , FromLocationCode , ToWarehouseCode , ToLocationCode , Quantity ,
Memo , Lock , TransType , BusinessCode , ERPUpload , ERPID ,
ERPDetailID , ERPCode , ERPSequence , MUSER , MUSERName ,
@ -2020,9 +2024,12 @@ c.Sequence,
' ',' ',' ',' { 5 } ' , ' { 6 } ' ,
' { 7 } ' , ' { 8 } ' , ' '
FROM ICSWareHouseLotInfo a
WHERE a . LotNo = ' { 9 } ' AND a . WorkPoint = ' { 8 } ' ";
pikTbLogsql + = @"update ICSWareHouseLotInfo set LockQuantity=LockQuantity+'{3}' where LotNo='{9}' " ;
pikTbLogsql = string . Format ( pikTbLogsql , Identification , PickLog [ "Code" ] . ToString ( ) , PickLog [ "Sequence" ] . ToString ( ) , PickLog [ "SendQTY" ] . ToString ( ) , BusinessCode , MUSER , MUSERNAME , pikTbLogTime , WorkPoint , PickLog [ "LotNO" ] . ToString ( ) ) ;
WHERE a . LotNo = ' { 9 } ' AND a . WorkPoint = ' { 8 } '
update ICSWareHouseLotInfo set LockQuantity = LockQuantity + ' { 3 } ' where LotNo = ' { 9 } ' AND WorkPoint = ' { 8 } '
END ";
pikTbLogsql = string . Format ( pikTbLogsql , Identification , PickLog [ "Code" ] . ToString ( ) , PickLog [ "Sequence" ] . ToString ( ) , PickLog [ "SendQTY" ] . ToString ( )
, BusinessCode , MUSER , MUSERNAME , pikTbLogTime , WorkPoint , PickLog [ "LotNO" ] . ToString ( ) ) ;
}
SqlHelper . CmdExecuteNonQueryLi ( pikTbLogsql ) ;
@ -2057,6 +2064,11 @@ c.Sequence,
}
return result ;
}
catch ( Exception ex )
{
throw new Exception ( ex . Message ) ;
}
}
/// <summary>
/// 工单领料推荐