Commit 7ef7233a authored by ppatro's avatar ppatro

updated src


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92541 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 5479779e
......@@ -144,7 +144,9 @@ public class MasterPackIC extends ValidatorEJB implements MasterPackICRemote, Ma
String status = "";
String itemCode = "";
String sqlInner = "";
double weight = 0.0;
double weight = 0.0;
double cartVolume = 0.0;
double selectCartVolume = 0.0;
int noCases = 0;
double masterPackCount = 0.0, masterPackWeight = 0.0; // Added by sumit on 16/01/13
......@@ -668,6 +670,23 @@ public class MasterPackIC extends ValidatorEJB implements MasterPackICRemote, Ma
case 3 :
{
System.out.println("Inside case3 validation");
//Changed By Pragyan 21/01/13.start
outerCarton = checkNull(genericUtility.getColumnValue( "outer_carton_no", hdrDom ));
System.out.println("outerCarton["+outerCarton+"]");
sql = "SELECT C.PACK_CODE,(P.LENGTH * P.WIDTH * P.HEIGHT) FROM CARTON_MASTER C,PACKING P WHERE C.CARTON_TYPE = 'M' AND C.CARTON_NO = ? AND " +
" C.PACK_CODE = P.PACK_CODE ";
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, outerCarton );
rs = pstmt.executeQuery();
if( rs.next() )
{
cartVolume = rs.getDouble(2);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//Changed By Pragyan 21/01/12.end
parentList = allDom.getElementsByTagName( "Detail" + currentFormNo );
int noOfParent = parentList.getLength();
System.out.println("no of parent="+noOfParent);
......@@ -712,13 +731,16 @@ public class MasterPackIC extends ValidatorEJB implements MasterPackICRemote, Ma
System.out.println("item Code="+itemCode+" weight ="+weight+" no of item"+noCases);
noCases++;
sqlInner = "select gross_weight from item_lot_packsize where item_code = ? ";
//sqlInner = "select gross_weight from item_lot_packsize where item_code = ? ";
sqlInner = "select gross_weight,(length*width*height) from item_lot_packsize where item_code = ? ";
pstmtInner = conn.prepareStatement( sqlInner );
pstmtInner.setString( 1,itemCode );
rsInner = pstmtInner.executeQuery();
while( rsInner.next() )
{
weight += rsInner.getDouble("gross_weight");
selectCartVolume += rsInner.getDouble(2);
}
rsInner.close();
rsInner = null;
......@@ -732,7 +754,8 @@ public class MasterPackIC extends ValidatorEJB implements MasterPackICRemote, Ma
//if(weight > 70 || noCases > 60)
masterPackCount = Double.parseDouble(discommon.getDisparams("999999","MASTER_PACK_CASE_COUNT",conn));
masterPackWeight = Double.parseDouble(discommon.getDisparams("999999","MASTER_PACK_WEIGHT",conn));
if(weight > masterPackWeight || noCases > masterPackCount )
//if(weight > masterPackWeight || noCases > masterPackCount )
if(weight > masterPackWeight || selectCartVolume > cartVolume || noCases > masterPackCount )
{
//Changed by sumit on 16/01/13 changing weight size as well getting these value from dispram end
errList.add( "VTWGTEXD" );
......
......@@ -28855,6 +28855,11 @@ INSERT INTO MESSAGES (
NULL,
NULL);
//Pragyan 21/01/13
update messages set msg_str='Weight/Volume Exceeded', msg_descr='Master Carton Weight/Volume/No. Of Cases is Exceeded'
where msg_no='VTWGTEXD';
COMMIT;
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