Commit 71afcefa authored by ppatro's avatar ppatro

ship conf validation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92574 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c0e3def9
...@@ -531,6 +531,24 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen ...@@ -531,6 +531,24 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
//Changed by sumit on 25/01/13 validating whether this ptcn is already used in ship_docs or not start.
sql = "SELECT PTCN FROM SHIP_DOCS WHERE PTCN = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
rs = pstmt.executeQuery();
if( rs.next() )
{
errList.add( "VTPTCNALLX");
errFields.add( childNodeName.toLowerCase() );
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//Changed by sumit on 25/01/13 validating whether this ptcn is already used in ship_docs or not end
// added by cpatil // added by cpatil
sql = "SELECT D.TRAN_CODE FROM WAVE_TASK_DET W, DESPATCH D WHERE REF_ID = D.DESP_ID AND D.CONFIRMED != 'Y' and W.PTCN= ? "; sql = "SELECT D.TRAN_CODE FROM WAVE_TASK_DET W, DESPATCH D WHERE REF_ID = D.DESP_ID AND D.CONFIRMED != 'Y' and W.PTCN= ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -569,21 +587,7 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen ...@@ -569,21 +587,7 @@ public class ShipmentIC extends ValidatorEJB implements ShipmentICRemote,Shipmen
s.clear(); s.clear();
//Changed by sumit on 23/01/13 validating repeat ptcn end //Changed by sumit on 23/01/13 validating repeat ptcn end
//Changed by sumit on 25/01/13 validating whether this ptcn is already used in ship_docs or not start.
sql = "SELECT PTCN FROM SHIP_DOCS WHERE PTCN = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue);
rs = pstmt.executeQuery();
if( rs.next() )
{
errList.add( "VTPTCNALLX");
errFields.add( childNodeName.toLowerCase() );
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//Changed by sumit on 25/01/13 validating whether this ptcn is already used in ship_docs or not end
} }
......
...@@ -29367,7 +29367,7 @@ INSERT INTO MESSAGES ( ...@@ -29367,7 +29367,7 @@ INSERT INTO MESSAGES (
VALUES ( VALUES (
'VTPTCNALLX', 'VTPTCNALLX',
'Invalid PTCN Number', 'Invalid PTCN Number',
'Entered PTCN number is already confirmed !', 'Entered PTCN number is already added on a shipment !',
'E', 'E',
'Y', 'Y',
NULL, NULL,
......
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