Commit 5ec60f79 authored by mjadhav's avatar mjadhav

changes done in case 2 itemchanged,display itemcode,lot no,loc code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94986 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1b40b690
...@@ -6,7 +6,6 @@ import java.sql.*; ...@@ -6,7 +6,6 @@ import java.sql.*;
import org.w3c.dom.*; import org.w3c.dom.*;
import ibase.webitm.utility.ITMException;
import ibase.webitm.utility.*; import ibase.webitm.utility.*;
import ibase.system.config.*; import ibase.system.config.*;
import ibase.webitm.ejb.*; import ibase.webitm.ejb.*;
...@@ -31,6 +30,8 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In ...@@ -31,6 +30,8 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In
public void ejbPassivate() public void ejbPassivate()
{ {
}*/ }*/
public String wfValData() throws RemoteException,ITMException public String wfValData() throws RemoteException,ITMException
{ {
return ""; return "";
...@@ -291,7 +292,8 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In ...@@ -291,7 +292,8 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("siteCode :"+siteCode);
System.out.println("siteCode1 :"+siteCode1);
if(! (siteCode.equals(siteCode1))) if(! (siteCode.equals(siteCode1)))
{ {
errCode = "VMSITEINV"; errCode = "VMSITEINV";
...@@ -490,6 +492,8 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In ...@@ -490,6 +492,8 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In
PreparedStatement vPStmt = null; PreparedStatement vPStmt = null;
ResultSet vRs = null; ResultSet vRs = null;
String sql = null; String sql = null;
String itemDescr=null;
String lockDescr=null;
int currentFormNo = 0; int currentFormNo = 0;
StringBuffer valueXmlString = new StringBuffer(); StringBuffer valueXmlString = new StringBuffer();
String columnValue = null; String columnValue = null;
...@@ -501,6 +505,13 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In ...@@ -501,6 +505,13 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In
String childNodeName = null; String childNodeName = null;
int childNodeListLength = 0; int childNodeListLength = 0;
int ctr = 0; int ctr = 0;
int line_no_hold=0;
String tran_id_hold=null;
String itemCode=null;
String locCode=null;
String lotNo=null;
String lotSl=null;
int lineNoSl=0;
String loginSite = null; String loginSite = null;
...@@ -518,8 +529,8 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In ...@@ -518,8 +529,8 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In
System.out.println("[EpaymentICEJB] [itemChanged] :currentFormNo ....." +currentFormNo); System.out.println("[EpaymentICEJB] [itemChanged] :currentFormNo ....." +currentFormNo);
valueXmlString = new StringBuffer("<?xml version=\"1.0\"?><Root><header><editFlag>"); valueXmlString = new StringBuffer("<?xml version=\"1.0\"?><Root><header><editFlag>");
valueXmlString.append(editFlag).append("</editFlag></header>"); valueXmlString.append(editFlag).append("</editFlag></header>");
valueXmlString.append("<Detail1>");
System.out.println("Current Form No ["+currentFormNo+"]"); System.out.println("Current Form No 19 APr 14!!!["+currentFormNo+"]");
switch (currentFormNo) switch (currentFormNo)
{ {
case 1: case 1:
...@@ -527,6 +538,7 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In ...@@ -527,6 +538,7 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In
parentNodeList = dom.getElementsByTagName("Detail1"); parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
valueXmlString.append("<Detail1>");
ctr = 0; ctr = 0;
childNodeListLength = childNodeList.getLength(); childNodeListLength = childNodeList.getLength();
do do
...@@ -613,9 +625,122 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In ...@@ -613,9 +625,122 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In
//end getting site bank //end getting site bank
valueXmlString.append("<site_descr>").append("<![CDATA[" + ( siteDescr != null ? siteDescr : "" )+ "]]>").append("</site_descr>"); valueXmlString.append("<site_descr>").append("<![CDATA[" + ( siteDescr != null ? siteDescr : "" )+ "]]>").append("</site_descr>");
} }
valueXmlString.append("</Detail1>"); valueXmlString.append("</Detail1>");
break;
case 2:
System.out.println("case 2");
parentNodeList = dom.getElementsByTagName("Detail2");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
valueXmlString.append("<Detail2>");
childNodeListLength = childNodeList.getLength();
do
{
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
if(childNodeName.equals(currentColumn))
{
if (childNode.getFirstChild() != null)
{
columnValue=childNode.getFirstChild().getNodeValue();
}
}
ctr++;
}while(ctr < childNodeListLength && !childNodeName.equals(currentColumn));
System.out.println("[" + currentColumn + "] ==> '" + columnValue + "'");
if (currentColumn.equals("line_no__hold"))
{
System.out.println("entering in line_no__hold !!!");
line_no_hold=Integer.parseInt(genericUtility.getColumnValue("line_no__hold", dom));
System.out.println("line_no_sl :"+line_no_hold);
tran_id_hold=checkNull(genericUtility.getColumnValue("tran_id__hold", dom));
System.out.println("tran_id_hold :"+tran_id_hold);
sql = "select item_code,loc_code,lot_no,lot_sl,line_no_sl from inv_hold_det where tran_id=? and line_no=?";
vPStmt = conn.prepareStatement( sql );
vPStmt.setString(1,tran_id_hold);
vPStmt.setInt(2,line_no_hold);
vRs = vPStmt.executeQuery();
//Changed by Dharmesh on 09/08/11 [WM1ESUN004] to bind variable dynamically instead of statically.end
if( vRs.next() )
{
itemCode = vRs.getString("item_code");
locCode= vRs.getString("loc_code");
lotNo=vRs.getString("lot_no");
lotSl=vRs.getString("lot_sl");
lineNoSl=vRs.getInt("line_no_sl");
}
System.out.println("itemCode "+itemCode);
System.out.println("locCode "+locCode);
System.out.println("lotNo "+lotNo);
System.out.println("lineNoSl "+lineNoSl);
vRs.close();
vRs = null;
vPStmt.close();
vPStmt = null;
sql = "select DESCR from item where ITEM_CODE=?";
vPStmt = conn.prepareStatement( sql );
vPStmt.setString(1,itemCode);
vRs = vPStmt.executeQuery();
//Changed by Dharmesh on 09/08/11 [WM1ESUN004] to bind variable dynamically instead of statically.end
if( vRs.next() )
{
itemDescr=vRs.getString("DESCR");
}
System.out.println("itemDescr "+itemDescr);
vRs.close();
vRs = null;
vPStmt.close();
vPStmt = null;
sql = "select DESCR from location where LOC_CODE =?";
vPStmt = conn.prepareStatement( sql );
vPStmt.setString(1,locCode);
vRs = vPStmt.executeQuery();
//Changed by Dharmesh on 09/08/11 [WM1ESUN004] to bind variable dynamically instead of statically.end
if( vRs.next() )
{
lockDescr=vRs.getString("DESCR");
}
System.out.println("lockDescr "+lockDescr);
vRs.close();
vRs = null;
vPStmt.close();
vPStmt = null;
valueXmlString.append("<item_code>").append("<![CDATA[" + itemCode + "]]>").append("</item_code>");
valueXmlString.append("<item_descr>").append("<![CDATA[" + itemDescr + "]]>").append("</item_descr>");
valueXmlString.append("<loc_code>").append("<![CDATA[" + locCode + "]]>").append("</loc_code>");
valueXmlString.append("<descr>").append("<![CDATA[" + lockDescr + "]]>").append("</descr>");
valueXmlString.append("<lot_no>").append("<![CDATA[" + lotNo + "]]>").append("</lot_no>");
valueXmlString.append("<lot_sl>").append("<![CDATA[" + lotNo + "]]>").append("</lot_sl>");
valueXmlString.append("<line_no_sl>").append("<![CDATA[" + lineNoSl + "]]>").append("</line_no_sl>");
}
valueXmlString.append("</Detail2>");
break;
}//END OF switch
valueXmlString.append("</Root>"); valueXmlString.append("</Root>");
}//END OF TRY
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -671,4 +796,15 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In ...@@ -671,4 +796,15 @@ public class InvHoldRelIC extends ValidatorEJB implements InvHoldRelICLocal , In
} }
return s; return s;
} }
private String checkNull(String input)
{
if (input == null)
{
input = "";
}
return input;
}
} }
\ No newline at end of file
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