Commit ddf8c276 authored by mjadhav's avatar mjadhav

add validation for lot level,lotNo manadtory


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96826 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f7098740
...@@ -70,7 +70,7 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI ...@@ -70,7 +70,7 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
@Override @Override
public String wfValData(Document dom, Document dom1,Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException public String wfValData(Document dom, Document dom1,Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{ {
String errString = " "; String errString = " ",lockCode="";
NodeList parentNodeList = null; NodeList parentNodeList = null;
NodeList childNodeList = null; NodeList childNodeList = null;
Node parentNode = null; Node parentNode = null;
...@@ -234,7 +234,7 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI ...@@ -234,7 +234,7 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
if ( childNodeName.equalsIgnoreCase( "lock_code" ) ) if ( childNodeName.equalsIgnoreCase( "lock_code" ) )
{ {
String lockCode = null; //String lockCode = null;
lockCode = genericUtility.getColumnValue( "lock_code", dom, "1" ); lockCode = genericUtility.getColumnValue( "lock_code", dom, "1" );
if(lockCode == null)//checking for null if(lockCode == null)//checking for null
{ {
...@@ -310,6 +310,23 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI ...@@ -310,6 +310,23 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
childNodeListLength = childNodeList.getLength(); childNodeListLength = childNodeList.getLength();
String lockLevel="";
lockCode = genericUtility.getColumnValue( "lock_code", dom1, "1" );//added by mahendra
System.out.println("lockCode !!!"+lockCode);
sql = " select lock_level from inv_lock where lock_code= ?";
pstmt = conn.prepareStatement( sql );
pstmt.setString(1,lockCode);
rs = pstmt.executeQuery();
if(rs.next())
{
lockLevel=rs.getString("lock_level");
}
//rs.close();
//rs = null;
pstmt.close();
pstmt = null;
System.out.println("lockLevel "+lockLevel);
for(ctr = 0; ctr < childNodeListLength; ctr++) for(ctr = 0; ctr < childNodeListLength; ctr++)
{ {
cnt = 0; cnt = 0;
...@@ -323,6 +340,8 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI ...@@ -323,6 +340,8 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
lineNoSl = genericUtility.getColumnValue( "line_no_sl", dom, "2" ); lineNoSl = genericUtility.getColumnValue( "line_no_sl", dom, "2" );
System.out.println("lineNoSl =["+lineNoSl+"]"); System.out.println("lineNoSl =["+lineNoSl+"]");
if( lineNoSl != null && lineNoSl.trim().length() > 0 ) if( lineNoSl != null && lineNoSl.trim().length() > 0 )
{ {
lineNoSlPrsnt = true; lineNoSlPrsnt = true;
...@@ -336,6 +355,14 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI ...@@ -336,6 +355,14 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
itemCode = genericUtility.getColumnValue( "item_code", dom, "2" ); itemCode = genericUtility.getColumnValue( "item_code", dom, "2" );
errCode = null; errCode = null;
System.out.println(" itemCode =====> [" + itemCode + "]"); System.out.println(" itemCode =====> [" + itemCode + "]");
System.out.println("lockLevel :"+lockLevel);
/*if(itemCode == null && (lockLevel.equalsIgnoreCase("I") || lockLevel.equalsIgnoreCase("L")))
{
errCode = "VMITEMBLK";
errString = getErrorString( "item_code", errCode, userId );
System.out.println("item code cannot be blank!!!!!");
break;
}*/
if( itemCode != null && itemCode.length() > 0 ) if( itemCode != null && itemCode.length() > 0 )
{ {
//Changed by Dharmesh on 09/08/11 [WM1ESUN004] to bind variable dynamically instead of statically.start //Changed by Dharmesh on 09/08/11 [WM1ESUN004] to bind variable dynamically instead of statically.start
...@@ -556,6 +583,15 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI ...@@ -556,6 +583,15 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
{ {
String lotNo = null; String lotNo = null;
lotNo = genericUtility.getColumnValue( "lot_no", dom, "2" ); lotNo = genericUtility.getColumnValue( "lot_no", dom, "2" );
System.out.println("lotNo :"+lotNo);
if(lotNo == null && lockLevel.equalsIgnoreCase("L"))
{
errCode = "VMEMTLTNO";
errString = getErrorString( "lot_no", errCode, userId );
System.out.println("Lot no cannot be blank!!!!!");
break;
}
if( lineNoSlPrsnt ) if( lineNoSlPrsnt )
{ {
......
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