@ -1573,15 +1573,16 @@ namespace ICSSoft.DataProject
}
if ( PrintEnable . Equals ( "True" ) )
{
sql = @ "select A.LotNO AS OLDLotNo , C.Quantity AS OLDLotQty, A.eattribute1 as LotNO, B.Quantity AS LotQty ,b.InvCode,d.INVSTD,d.INVNAME,b.MTIME,A.TransCode
sql = @ "select A.LotNO , C.Quantity AS OLDLotQty, B.Quantity AS LotQty ,b.InvCode,d.INVSTD,d.INVNAME,b.MTIME,A.TransCode
from ICSWareHouseLotInfolog A
left join ICSInventoryLot B on A . LotNO = B . LotNO and a . WorkPoint = b . WorkPoint
left join ICSWareHouseLotInfo C ON A . LotNO = C . LotNO and a . WorkPoint = c . WorkPoint
left join ICSInventory D on b . INVCODE = d . INVCODE and b . WorkPoint = d . WorkPoint
where a . BusinessCode = ' 1 0 5 '
where ( a . BusinessCode = ' { 2 } ' or a . BusinessCode = ' 3 2 ' )
and A . lotno like ' { 0 } % ' and a . workpoint = ' { 1 } '
and a . TransCode = ' { 3 } ' and a . TransSequence = ' { 4 } '
";
sql = string . Format ( sql , LotNo , tranferWorkpoint ) ;
sql = string . Format ( sql , LotNo , WorkPoint , BusinessCode , TransCode , TransSequence ) ;
dtLotno = DBHelper . SQlReturnData ( sql , cmd ) ;
lstDt = dtLotno ;
}
@ -1786,12 +1787,34 @@ namespace ICSSoft.DataProject
/// <param name="TransType"></param>
/// <param name="BusinessCode"></param>
/// <param name="cmd"></param>
public static void WareHouseLotInfoLog ( string Identification , string LotNo , string User , string WorkPoint , string TransType , string BusinessCode , SqlCommand cmd , Dictionary < string , string > language )
public static DataTable WareHouseLotInfoLog ( string Identification , string LotNo , string User , string WorkPoint , string TransType , string BusinessCode , SqlCommand cmd , Dictionary < string , string > language )
{
String LotEnable = "" ;
String PrintEnable = "" ;
DataTable dtLotno = new DataTable ( ) ;
DataTable lstDt = new DataTable ( ) ;
try
{
//检验是否分批
string sql = @ "SELECT b.LotEnable,b.PrintEnable FROM ICSInventoryLot a
LEFT JOIN ICSInventory b ON a . InvCode = b . InvCode AND a . WorkPoint = b . WorkPoint
where a . LotNo = ' { 0 } ' and a . WorkPoint = ' { 1 } '
";
sql = string . Format ( sql , LotNo , WorkPoint ) ;
DataTable dt = DBHelper . SQlReturnData ( sql , cmd ) ;
if ( dt . Rows . Count = = 0 )
{
throw new Exception ( language . GetNameByCode ( "WMSAPIInfo369" ) ) ;
}
else
{
LotEnable = dt . Rows [ 0 ] [ "LotEnable" ] . ToString ( ) ;
PrintEnable = dt . Rows [ 0 ] [ "PrintEnable" ] . ToString ( ) ;
}
///添加日志
string sql = @ "IF NOT EXISTS(SELECT F_Account FROM Sys_SRM_User WHERE F_Account='{2}' AND F_Location='{1}')
sql = @ "IF NOT EXISTS(SELECT F_Account FROM Sys_SRM_User WHERE F_Account='{2}' AND F_Location='{1}')
BEGIN
RAISERROR ( ' " + string.Format(language.GetNameByCode(" WMSAPIInfo060 "), " { 2 } ") + @" ' , 1 6 , 1 ) ;
RETURN
@ -1819,11 +1842,27 @@ namespace ICSSoft.DataProject
{
throw new Exception ( language . GetNameByCode ( "WMSAPIInfo166" ) ) ;
}
if ( PrintEnable . Equals ( "True" ) )
{
sql = @ "select A.LotNO , C.Quantity AS OLDLotQty, B.Quantity AS LotQty ,b.InvCode,d.INVSTD,d.INVNAME,b.MTIME,A.TransCode
from ICSWareHouseLotInfolog A
left join ICSInventoryLot B on A . LotNO = B . LotNO and a . WorkPoint = b . WorkPoint
left join ICSWareHouseLotInfo C ON A . LotNO = C . LotNO and a . WorkPoint = c . WorkPoint
left join ICSInventory D on b . INVCODE = d . INVCODE and b . WorkPoint = d . WorkPoint
where a . BusinessCode = ' 3 2 '
and A . lotno like ' { 0 } % ' and a . workpoint = ' { 1 } '
";
sql = string . Format ( sql , LotNo , WorkPoint , BusinessCode ) ;
dtLotno = DBHelper . SQlReturnData ( sql , cmd ) ;
lstDt = dtLotno ;
}
}
catch ( Exception )
{
throw ;
}
return lstDt ;
}
/// <summary>