Commit 95c988c5 authored by manohar's avatar manohar

RCP support changes as required by subu


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91173 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b2d6ed7a
...@@ -162,7 +162,7 @@ public class DistIssueAct extends ActionHandlerEJB implements DistIssueActLocal, ...@@ -162,7 +162,7 @@ public class DistIssueAct extends ActionHandlerEJB implements DistIssueActLocal,
{ {
String siteCode = "", quantity = "", locCode = "", itemCode = ""; String siteCode = "", quantity = "", locCode = "", itemCode = "";
String availableYn = "", tracShelfLife = "", mfgDate1 = ""; String availableYn = "", tracShelfLife = "", mfgDate1 = "";
String expDate1 = ""; String expDate1 = "", lotNo = "", lotSl = "";
java.sql.Date currDate = null; java.sql.Date currDate = null;
java.sql.Date mfgDate = null; java.sql.Date mfgDate = null;
java.sql.Date expDate = null; java.sql.Date expDate = null;
...@@ -271,10 +271,35 @@ public class DistIssueAct extends ActionHandlerEJB implements DistIssueActLocal, ...@@ -271,10 +271,35 @@ public class DistIssueAct extends ActionHandlerEJB implements DistIssueActLocal,
expDate1 = sdf.format(expDate); expDate1 = sdf.format(expDate);
System.out.println("expDate1 :"+expDate1); System.out.println("expDate1 :"+expDate1);
} }
// 12/10/09 manoharan to handle empty/null
if (mfgDate1 == null || "null".equals(mfgDate1))
{
mfgDate1 = "";
}
if (expDate1 == null || "null".equals(expDate1))
{
expDate1 = "";
}
if (expDate1 == null || "null".equals(expDate1))
{
expDate1 = "";
}
lotNo = rs.getString(2);
if (lotNo == null || "null".equals(lotNo) || lotNo.trim().length() == 0)
{
lotNo = " ";
}
lotSl = rs.getString(3);
if (lotSl == null || "null".equals(lotSl) || lotSl.trim().length() == 0)
{
lotSl = " ";
}
// end 12/10/09 manoharan to handle empty/null
valueXmlString.append("<Detail>\r\n"); valueXmlString.append("<Detail>\r\n");
valueXmlString.append("<item_code>").append("<![CDATA[").append(rs.getString(1).trim()).append("]]>").append("</item_code>\r\n"); valueXmlString.append("<item_code>").append("<![CDATA[").append(rs.getString(1).trim()).append("]]>").append("</item_code>\r\n");
valueXmlString.append("<lot_no>").append("<![CDATA[").append(rs.getString(2).trim()).append("]]>").append("</lot_no>\r\n"); valueXmlString.append("<lot_no>").append("<![CDATA[").append(lotNo).append("]]>").append("</lot_no>\r\n");
valueXmlString.append("<lot_sl>").append("<![CDATA[").append(rs.getString(3).trim()).append("]]>").append("</lot_sl>\r\n"); valueXmlString.append("<lot_sl>").append("<![CDATA[").append(lotSl).append("]]>").append("</lot_sl>\r\n");
valueXmlString.append("<alloc_qty>").append("<![CDATA[").append(rs.getDouble(4)).append("]]>").append("</alloc_qty>\r\n"); valueXmlString.append("<alloc_qty>").append("<![CDATA[").append(rs.getDouble(4)).append("]]>").append("</alloc_qty>\r\n");
valueXmlString.append("<mfg_date>").append("<![CDATA[").append(mfgDate1).append("]]>").append("</mfg_date>\r\n"); valueXmlString.append("<mfg_date>").append("<![CDATA[").append(mfgDate1).append("]]>").append("</mfg_date>\r\n");
valueXmlString.append("<exp_date>").append("<![CDATA[").append(expDate1).append("]]>").append("</exp_date>\r\n"); valueXmlString.append("<exp_date>").append("<![CDATA[").append(expDate1).append("]]>").append("</exp_date>\r\n");
...@@ -408,6 +433,16 @@ public class DistIssueAct extends ActionHandlerEJB implements DistIssueActLocal, ...@@ -408,6 +433,16 @@ public class DistIssueAct extends ActionHandlerEJB implements DistIssueActLocal,
locCode = genericUtility.getColumnValueFromNode("loc_code",currDetail); locCode = genericUtility.getColumnValueFromNode("loc_code",currDetail);
lotNo = genericUtility.getColumnValueFromNode("lot_no",currDetail); lotNo = genericUtility.getColumnValueFromNode("lot_no",currDetail);
lotSl = genericUtility.getColumnValueFromNode("lot_sl",currDetail); lotSl = genericUtility.getColumnValueFromNode("lot_sl",currDetail);
// 12/10/09 manoharan to take care of empty/null
if (lotNo == null || "null".equals(lotNo) || lotNo.trim().length() == 0)
{
lotNo = " ";
}
if (lotSl == null || "null".equals(lotSl) || lotSl.trim().length() == 0)
{
lotSl = " ";
}
// end 12/10/09 manoharan to take care of empty/null
if (packCode == null || packCode.trim().length() == 0) if (packCode == null || packCode.trim().length() == 0)
{ {
sql = "SELECT PACK_CODE FROM STOCK WHERE ITEM_CODE = '"+itemCode+"' AND SITE_CODE = '"+siteCode+ sql = "SELECT PACK_CODE FROM STOCK WHERE ITEM_CODE = '"+itemCode+"' AND SITE_CODE = '"+siteCode+
......
...@@ -54,15 +54,18 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde ...@@ -54,15 +54,18 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde
try try
{ {
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
if(xmlString != null && xmlString.trim().length()!=0) if(xmlString != null && xmlString.trim().length()!=0)
{ {
System.out.println("XML String :"+xmlString); System.out.println("XML String :"+xmlString);
dom = genericUtility.parseString(xmlString); dom = genericUtility.parseString(xmlString);
} }
if (actionType.equalsIgnoreCase("Quotation")) if (actionType.equalsIgnoreCase("Quotation"))
{ {
resString = actionQuotation(dom, objContext, xtraParams); resString = actionQuotation(dom, objContext, xtraParams) ;
} }
if (actionType.equalsIgnoreCase("Indent")) if (actionType.equalsIgnoreCase("Indent"))
{ {
resString = actionIndent(dom, objContext, xtraParams); resString = actionIndent(dom, objContext, xtraParams);
...@@ -150,7 +153,7 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde ...@@ -150,7 +153,7 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde
StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n"); StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n");
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
ITMDBAccessEJB itmDBAccess = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
try try
{ {
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
...@@ -289,7 +292,7 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde ...@@ -289,7 +292,7 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde
} }
if (!errCode.equals("")) if (!errCode.equals(""))
{ {
errString = itmDBAccess.getErrorString("", errCode, "", "", conn); errString = itmDBAccessEJB.getErrorString("", errCode, "", "", conn);
System.out.println("Errcode found not null"); System.out.println("Errcode found not null");
return errString; return errString;
} }
...@@ -330,7 +333,7 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde ...@@ -330,7 +333,7 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde
String stationFr = "",stationTo = ""; String stationFr = "",stationTo = "";
java.sql.Date reqDate = new java.sql.Date(System.currentTimeMillis()); java.sql.Date reqDate = new java.sql.Date(System.currentTimeMillis());
ArrayList acctDetrList = new ArrayList(); ArrayList acctDetrList = new ArrayList();
ITMDBAccessEJB itmDBAccess = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n"); StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n");
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
try try
...@@ -426,7 +429,7 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde ...@@ -426,7 +429,7 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde
acctDetrList = GenericUtility.getInstance().getTokenList(acctDetrType,"\t"); acctDetrList = GenericUtility.getInstance().getTokenList(acctDetrType,"\t");
valueXmlString.append("<acct_code__dr isSrvCallOnChg='0'>").append(acctDetrList.get(0)).append("</acct_code__dr>"); valueXmlString.append("<acct_code__dr isSrvCallOnChg='0'>").append(acctDetrList.get(0)).append("</acct_code__dr>");
valueXmlString.append("<cctr_code__dr isSrvCallOnChg='0'>").append(acctDetrList.get(1)).append("</cctr_code__dr>"); valueXmlString.append("<cctr_code__dr isSrvCallOnChg='0'>").append(acctDetrList.get(1)).append("</cctr_code__dr>");
invAcct = itmDBAccess.getEnvFin("999999","INV_ACCT_PORCP",conn); invAcct = itmDBAccessEJB.getEnvFin("999999","INV_ACCT_PORCP",conn);
if (invAcct != null && invAcct.trim().equalsIgnoreCase("Y")) if (invAcct != null && invAcct.trim().equalsIgnoreCase("Y"))
{ {
acctDetrType = acctDetrTType(itemCode,itemSer,"PORCP",pordType); //return acctCode and cctrCode acctDetrType = acctDetrTType(itemCode,itemSer,"PORCP",pordType); //return acctCode and cctrCode
...@@ -443,14 +446,16 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde ...@@ -443,14 +446,16 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde
suppCode = GenericUtility.getInstance().getColumnValue("supp_code",dom1); suppCode = GenericUtility.getInstance().getColumnValue("supp_code",dom1);
siteCode = GenericUtility.getInstance().getColumnValue("site_code",dom); siteCode = GenericUtility.getInstance().getColumnValue("site_code",dom);
/* // 12/10/09 manoharan commented as same is set from pb component
taxChapHdr = GenericUtility.getInstance().getColumnValue("tax_chap",dom1); taxChapHdr = GenericUtility.getInstance().getColumnValue("tax_chap",dom1);
taxClassHdr = GenericUtility.getInstance().getColumnValue("tax_class",dom1); taxClassHdr = GenericUtility.getInstance().getColumnValue("tax_class",dom1);
taxEnvHdr = GenericUtility.getInstance().getColumnValue("tax_env",dom1); taxEnvHdr = GenericUtility.getInstance().getColumnValue("tax_env",dom1);
if ( (taxClassHdr == null || taxClassHdr.trim().length() == 0 ) && (taxChapHdr == null || taxChapHdr.trim().length() == 0 ) || (taxEnvHdr == null || taxEnvHdr.trim().length() == 0 )) if ( (taxClassHdr == null || taxClassHdr.trim().length() == 0 ) && (taxChapHdr == null || taxChapHdr.trim().length() == 0 ) || (taxEnvHdr == null || taxEnvHdr.trim().length() == 0 ))
{ {
taxChap = itmDBAccess.getTaxChapter(itemCode,itemSer,'S',suppCode,siteCode,conn); taxChap = itmDBAccessEJB.getTaxChapter(itemCode,itemSer,'S',suppCode,siteCode,conn);
taxClass = itmDBAccess.getTaxClass('S',suppCode,itemCode,siteCode,conn); taxClass = itmDBAccessEJB.getTaxClass('S',suppCode,itemCode,siteCode,conn);
stationFr = GenericUtility.getInstance().getColumnValue("station_stan_code",dom1); stationFr = GenericUtility.getInstance().getColumnValue("station_stan_code",dom1);
sql = "SELECT STAN_CODE FROM SITE WHERE SITE_CODE = '"+siteCode+"'"; sql = "SELECT STAN_CODE FROM SITE WHERE SITE_CODE = '"+siteCode+"'";
stmt = conn.createStatement(); stmt = conn.createStatement();
...@@ -459,7 +464,7 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde ...@@ -459,7 +464,7 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde
{ {
stationTo = rs.getString(1); stationTo = rs.getString(1);
} }
taxEnv = itmDBAccess.getTaxEnv(stationFr,stationTo,taxChap,taxClass,siteCode,conn); taxEnv = itmDBAccessEJB.getTaxEnv(stationFr,stationTo,taxChap,taxClass,siteCode,conn);
valueXmlString.append("<tax_chap isSrvCallOnChg='0'>").append(taxChap).append("</tax_chap>"); valueXmlString.append("<tax_chap isSrvCallOnChg='0'>").append(taxChap).append("</tax_chap>");
valueXmlString.append("<tax_class isSrvCallOnChg='0'>").append(taxClass).append("</tax_class>"); valueXmlString.append("<tax_class isSrvCallOnChg='0'>").append(taxClass).append("</tax_class>");
valueXmlString.append("<tax_env isSrvCallOnChg='0'>").append(taxEnv).append("</tax_env>"); valueXmlString.append("<tax_env isSrvCallOnChg='0'>").append(taxEnv).append("</tax_env>");
...@@ -470,6 +475,8 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde ...@@ -470,6 +475,8 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde
valueXmlString.append("<tax_class isSrvCallOnChg='0'>").append(taxClassHdr).append("</tax_class>"); valueXmlString.append("<tax_class isSrvCallOnChg='0'>").append(taxClassHdr).append("</tax_class>");
valueXmlString.append("<tax_env isSrvCallOnChg='0'>").append(taxEnvHdr).append("</tax_env>"); valueXmlString.append("<tax_env isSrvCallOnChg='0'>").append(taxEnvHdr).append("</tax_env>");
} }
*/
acctDetrList.clear(); acctDetrList.clear();
valueXmlString.append("</Detail>"); valueXmlString.append("</Detail>");
} }
...@@ -477,7 +484,7 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde ...@@ -477,7 +484,7 @@ public class PorderAct extends ActionHandlerEJB implements PorderActLocal, Porde
} }
catch (Exception e) catch (Exception e)
{ {
System.out.println("Exception PorderAct quotationTransform :: "+e.getMessage()); System.out.println("Exception PorderActEJB quotationTransform :: "+e.getMessage());
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
......
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