Commit 72261dff authored by jshinde's avatar jshinde

Request Id:W15HSUN003,pallet request with stock details.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99211 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 94678800
...@@ -883,7 +883,7 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -883,7 +883,7 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
String siteCode = "",lotNo="",lotSl="",itemCode="",palletNo="",noArtStr="",quantityStr=""; String siteCode = "",lotNo="",lotSl="",itemCode="",palletNo="",noArtStr="",quantityStr="";
int currentFormNo = 0; int currentFormNo = 0;
ResultSet rs=null; ResultSet rs=null;
double quantity=0,noArt=0,qtyPerArt,noArtQuot=0,noArtRem =0 , notArt = 0, totalQuantity = 0, noArtD=0; double quantity=0,noArt=0,qtyPerArt=0,noArtQuot=0,noArtRem =0 , notArt = 0, totalQuantity = 0, noArtD=0;
System.out.println("xtraParams=["+xtraParams+"]"); System.out.println("xtraParams=["+xtraParams+"]");
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
...@@ -1042,8 +1042,8 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -1042,8 +1042,8 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
} }
else else
{ {
valueXmlString.append( "<quantity><![CDATA[" ).append( "" ).append( "]]></quantity>\r\n" ); valueXmlString.append( "<quantity><![CDATA[" ).append( 0 ).append( "]]></quantity>\r\n" );
valueXmlString.append( "<no_art><![CDATA[" ).append( "" ).append( "]]></no_art>\r\n" ); valueXmlString.append( "<no_art><![CDATA[" ).append( 0 ).append( "]]></no_art>\r\n" );
} }
rs.close(); rs.close();
pstmt.close(); pstmt.close();
...@@ -1075,26 +1075,39 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -1075,26 +1075,39 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
if(rs.next()) if(rs.next())
{ {
qtyPerArt = rs.getDouble("QTY_PER_ART"); qtyPerArt = rs.getDouble("QTY_PER_ART");
}
rs.close();
pstmt.close();
noArtQuot= quantity / qtyPerArt ;
noArtRem = quantity % qtyPerArt ;
if(noArtRem > 0)
{
noArtRem = 1;
}
noArtQuot = (int) noArtQuot;
noArt = noArtQuot + noArtRem;
System.out.println( "noArt>>>>>>>::"+noArt);
System.out.println( "noArtQuot>>>>>>>::"+noArtQuot);
System.out.println( "noArtRem>>>>>>>::"+noArtRem);
System.out.println( "qtyPerArt>>>>>>>::"+qtyPerArt);
System.out.println( "quantity()>>>>>>>::"+quantity);
noArtQuot= quantity / qtyPerArt ;
noArtRem = quantity % qtyPerArt ;
if(noArtRem > 0)
{
noArtRem = 1;
}
noArtQuot = (int) noArtQuot;
noArt = noArtQuot + noArtRem;
System.out.println( "noArt>>>>>>>::"+noArt);
System.out.println( "noArtQuot>>>>>>>::"+noArtQuot);
System.out.println( "noArtRem>>>>>>>::"+noArtRem);
System.out.println( "qtyPerArt>>>>>>>::"+qtyPerArt);
System.out.println( "quantity()>>>>>>>::"+quantity);
if(quantity <= 0)
{
valueXmlString.append( "<quantity><![CDATA[" ).append( 0 ).append( "]]></quantity>\r\n" );
valueXmlString.append( "<lot_sl><![CDATA[" ).append( " " ).append( "]]></lot_sl>\r\n" );
valueXmlString.append( "<no_art><![CDATA[" ).append( 0 ).append( "]]></no_art>\r\n" );
}
else
{
valueXmlString.append( "<no_art><![CDATA[" ).append( noArt ).append( "]]></no_art>\r\n" ); valueXmlString.append( "<no_art><![CDATA[" ).append( noArt ).append( "]]></no_art>\r\n" );
} }
rs.close();
pstmt.close();
} }
else if( currentColumn.trim().equalsIgnoreCase( "no_art" ) ) else if( currentColumn.trim().equalsIgnoreCase( "no_art" ) )
{ {
...@@ -1126,16 +1139,27 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle ...@@ -1126,16 +1139,27 @@ public class PalletReqIC extends ValidatorEJB implements PalletReqICLocal, Palle
{ {
qtyPerArt = rs.getDouble("QTY_PER_ART"); qtyPerArt = rs.getDouble("QTY_PER_ART");
quantity = noArtD* qtyPerArt ;
System.out.println( "noArt>>>>>>>::"+noArt);
System.out.println( "qtyPerArt>>>>>>>::"+qtyPerArt);
System.out.println( "quantity()>>>>>>>::"+quantity);
valueXmlString.append( "<quantity><![CDATA[" ).append( quantity ).append( "]]></quantity>\r\n" );
} }
rs.close(); rs.close();
pstmt.close(); pstmt.close();
quantity = noArtD* qtyPerArt ;
System.out.println( "noArtD>>>>>>>::"+noArtD);
System.out.println( "qtyPerArt>>>>>>>::"+qtyPerArt);
System.out.println( "quantity()>>>>>>>::"+quantity);
if(noArtD <= 0)
{
valueXmlString.append( "<quantity><![CDATA[" ).append( 0 ).append( "]]></quantity>\r\n" );
valueXmlString.append( "<lot_sl><![CDATA[" ).append( " " ).append( "]]></lot_sl>\r\n" );
valueXmlString.append( "<no_art><![CDATA[" ).append( 0 ).append( "]]></no_art>\r\n" );
}
else
{
valueXmlString.append( "<quantity><![CDATA[" ).append( quantity ).append( "]]></quantity>\r\n" );
}
} }
valueXmlString.append( "</Detail2>\r\n" ); valueXmlString.append( "</Detail2>\r\n" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment