Commit 451df461 authored by dsawant's avatar dsawant

changes done for new jsp and new requirement


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94242 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9e88cb2a
package ibase.webitm.ejb.dis; package ibase.webitm.ejb.dis;
import ibase.webitm.utility.*; import ibase.system.config.ConnDriver;
import ibase.webitm.ejb.*;
import ibase.system.config.*;
import java.rmi.RemoteException;
import ibase.system.config.AppConnectParm;
import java.text.SimpleDateFormat;
import ibase.utility.CommonConstants; import ibase.utility.CommonConstants;
import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import java.util.*;
import java.sql.*;
import java.io.Serializable; import java.io.Serializable;
import javax.ejb.*; import java.sql.Connection;
import javax.naming.InitialContext; import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import javax.ejb.SessionContext;
import javax.ejb.Stateless;
//import javax.ejb.SessionBean; //import javax.ejb.SessionBean;
import javax.ejb.Stateless; // added for ejb3 // added for ejb3
@Stateless // added for ejb3 @Stateless // added for ejb3
public class StockHelp implements StockHelpLocal,StockHelpRemote public class StockHelp implements StockHelpLocal,StockHelpRemote
...@@ -101,6 +104,119 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote ...@@ -101,6 +104,119 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote
return itemDescr; return itemDescr;
} }
// end 24/08/11 manoharan // end 24/08/11 manoharan
public ArrayList loadData(String lotno,String sitecode,String itemcode) throws ITMException
{
GenericUtility genericUtility = null;
genericUtility = GenericUtility.getInstance();
PreparedStatement pstmt = null;
ResultSet rs = null;
Connection conn = null;
StockDtlParams thisBean = null;
ArrayList stkHelpList = new ArrayList();
try{
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false);
connDriver = null;
int i = 1;
double lotWiseQuant = 0, lotWiseAllocQuant = 0, lotWiseAvailQuant = 0;
double lotWiseHoldQuant = 0, avl = 0;
String quantKey = "", sql = "";
String allcQuantKey = "", prevLocCode = "", prevLotNo = "";
String holdQuanKey = "", prevLotSl = "";
System.out.println("itemCode>>>>>>>>>>>>>>>>"+itemcode);
System.out.println("siteCode>>>>>>>>>>>>>>>>"+sitecode);
System.out.println("LOTNO>>>>>>>>>>>>>>>>"+lotno);
sql= "select TRAN_ID,TRAN_DATE,REF_SER,REF_ID,REF_LINE,ORDER_ID,ITEM_CODE,"
+ "SITE_CODE,LOC_CODE,UNIT,LOT_NO,LOT_SL,QUANTITY,EFF_QTY,EFF_DATE,"
+ "CHG_WIN,QTY_BEFORE,QTY_AFTER,REAS_CODE,SUNDRY_TYPE,SUNDRY_CODE,"
+ "REF_DATE,REF_SER__FOR,REF_ID__FOR,ACCT_CODE__DR,CCTR_CODE__DR,"
+ "ACCT_CODE__CR,CCTR_CODE__CR,GRADE,RATE,GROSS_RATE,NO_ART,DIMENSION,"
+ "ACTUAL_QTY,CONV__QTY_STDUOM,AMOUNT,INV_STAT,RATE_INSU from invtrace where "
+ "site_code = '"+sitecode+"' AND ITEM_CODE = '"+itemcode+"' AND LOT_NO = '"+lotno+"' "
+ "and ref_ser in ('P-RCP','D-RCP','ADJRCP')";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
while(rs.next())
{
thisBean = new StockDtlParams();
thisBean.tranid = rs.getString(1);
thisBean.trandate = rs.getString(2) == null ? "" : genericUtility.getValidDateString(rs.getString(2),genericUtility.getDBDateFormat(),genericUtility.getApplDateFormat());
thisBean.refser = rs.getString(3);
thisBean.refid = rs.getString(4);
thisBean.refline = rs.getString(5);
thisBean.orderid = rs.getString(6);
thisBean.itemCode1 = rs.getString(7);
thisBean.siteCode1 = rs.getString(8);
thisBean.currLocCode = rs.getString(9);
thisBean.unit = rs.getString(10);
thisBean.currLotNo = rs.getString(11);
thisBean.currLotSl = rs.getString(12);
thisBean.quantity = rs.getDouble(13);
thisBean.effqty = rs.getDouble(14);
thisBean.efedate = rs.getString(15) == null ? "" : genericUtility.getValidDateString(rs.getString(15),genericUtility.getDBDateFormat(),genericUtility.getApplDateFormat());
thisBean.chgwin = rs.getString(16);
thisBean.qtybefore = rs.getDouble(17);
thisBean.qtyaft = rs.getDouble(18);
thisBean.reascode = rs.getString(19);
thisBean.sundrytype = rs.getString(20);
thisBean.sundrycode = rs.getString(21);
thisBean.refdate = rs.getString(22) == null ? "" : genericUtility.getValidDateString(rs.getString(22),genericUtility.getDBDateFormat(),genericUtility.getApplDateFormat());
thisBean.refserfor = rs.getString(23);
thisBean.refidfor = rs.getString(24);
thisBean.acctcddr = rs.getString(25);
thisBean.cctrcddr = rs.getString(26);
thisBean.acctcdcr = rs.getString(27);
thisBean.cctrcdcr = rs.getString(28);
thisBean.grade = rs.getString(29);
thisBean.rateinv = rs.getDouble(30);
thisBean.grossrate = rs.getDouble(31);
thisBean.noartinv = rs.getDouble(32);
thisBean.dimention = rs.getString(33);
thisBean.actqty = rs.getDouble(34);
thisBean.convqty = rs.getDouble(35);
thisBean.amount = rs.getDouble(36);
thisBean.invStat1 = rs.getString(37);
thisBean.rateinsu = rs.getDouble(38);
stkHelpList.add(thisBean);
}
}catch(Exception e)
{
e.printStackTrace();
}
finally
{
try
{
genericUtility = null;
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(conn != null)
{
conn.close();
conn=null;
}
}
catch(Exception e)
{
System.out.println("Exception :StockHelpEJB:==>\n"+e.getMessage());
}
}
return stkHelpList;
}
public ArrayList getDetails(String siteCode, String itemCode) throws ITMException public ArrayList getDetails(String siteCode, String itemCode) throws ITMException
{ {
GenericUtility genericUtility = null; GenericUtility genericUtility = null;
...@@ -129,7 +245,7 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote ...@@ -129,7 +245,7 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote
sql = "SELECT stock.site_code ,site.descr ,stock.item_code ,item.descr ,stock.loc_code , " sql = "SELECT stock.site_code ,site.descr ,stock.item_code ,item.descr ,stock.loc_code , "
+" stock.lot_no ,stock.lot_sl ,location.inv_stat ,stock.retest_date ,stock.exp_date ," +" stock.lot_no ,stock.lot_sl ,location.inv_stat ,stock.retest_date ,stock.exp_date ,"
+" sum(stock.quantity) qty,sum(stock.alloc_qty) alloc_qty,invstat.available ,stock.unit , " +" sum(stock.quantity) qty,sum(stock.alloc_qty) alloc_qty,invstat.available ,stock.unit , "
+" stock.potency_perc ,stock.batch_no ,stock.dimension ,stock.supp_code__mfg , "; +" stock.potency_perc , stock.partial_used, stock.batch_no ,stock.dimension ,stock.supp_code__mfg , ";
if((CommonConstants.DB_NAME).equalsIgnoreCase("mssql")) if((CommonConstants.DB_NAME).equalsIgnoreCase("mssql"))
{ {
sql = sql + " dbo.fn_ppo_qty('"+siteCode+"','"+itemCode+"') as ppo_qty,dbo.fn_pind_qty('"+siteCode+"','"+itemCode+"') as pind_qty,stock.pack_code , "; sql = sql + " dbo.fn_ppo_qty('"+siteCode+"','"+itemCode+"') as ppo_qty,dbo.fn_pind_qty('"+siteCode+"','"+itemCode+"') as pind_qty,stock.pack_code , ";
...@@ -152,7 +268,7 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote ...@@ -152,7 +268,7 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote
+" and ( stock.quantity <> 0 ) " +" and ( stock.quantity <> 0 ) "
+" GROUP BY stock.site_code ,site.descr ,stock.item_code ,item.descr ,stock.loc_code , " +" GROUP BY stock.site_code ,site.descr ,stock.item_code ,item.descr ,stock.loc_code , "
+" stock.lot_no ,stock.lot_sl ,location.inv_stat ,invstat.available ,stock.retest_date , " +" stock.lot_no ,stock.lot_sl ,location.inv_stat ,invstat.available ,stock.retest_date , "
+" stock.exp_date ,stock.unit ,stock.potency_perc ,stock.batch_no ,stock.dimension , " +" stock.exp_date ,stock.unit ,stock.potency_perc ,stock.partial_used ,stock.batch_no ,stock.dimension , "
+" stock.supp_code__mfg ,stock.pack_code ,stock.qty_per_art , " +" stock.supp_code__mfg ,stock.pack_code ,stock.qty_per_art , "
+" stock.batch_size, stock.mfg_date, stock.no_art, stock.rate,stock.pack_ref " +" stock.batch_size, stock.mfg_date, stock.no_art, stock.rate,stock.pack_ref "
+" ORDER BY stock.site_code ASC, stock.item_code ASC, " +" ORDER BY stock.site_code ASC, stock.item_code ASC, "
...@@ -166,6 +282,45 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote ...@@ -166,6 +282,45 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote
thisBean.itemCode = rs.getString(3); thisBean.itemCode = rs.getString(3);
thisBean.currLocCode = rs.getString(5); thisBean.currLocCode = rs.getString(5);
// sql = "";
// sql= "SELECT inv_stat FROM LOCATION WHERE LOC_CODE = ?";
//
// pstmt = conn.prepareStatement(sql);
// pstmt.setString(1, thisBean.currLocCode);
// rs = pstmt.executeQuery();
// if(rs.next())
// {
// thisBean.invstst = rs.getString("inv_stat") == null ? "":rs.getString("inv_stat");
//
// }
//
// pstmt.close();
// pstmt = null;
// sql = null;
// rs.close();
// rs = null;
//
// sql = "";
// sql= "select available from invstat where inv_stat = ?";
//
// pstmt = conn.prepareStatement(sql);
// pstmt.setString(1, thisBean.invstst);
// rs = pstmt.executeQuery();
// if(rs.next())
// {
// thisBean.availableinv = rs.getString("available") == null ? "":rs.getString("available");
//
// }
//
// pstmt.close();
// pstmt = null;
// sql = null;
// rs.close();
// rs = null;
thisBean.currLotNo = rs.getString(6); thisBean.currLotNo = rs.getString(6);
thisBean.currLotSl = rs.getString(7); thisBean.currLotSl = rs.getString(7);
thisBean.invStat = rs.getString(8); thisBean.invStat = rs.getString(8);
...@@ -173,22 +328,39 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote ...@@ -173,22 +328,39 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote
thisBean.expDate = rs.getString(10) == null ? "" : genericUtility.getValidDateString(rs.getString(10),genericUtility.getDBDateFormat(),genericUtility.getApplDateFormat()); thisBean.expDate = rs.getString(10) == null ? "" : genericUtility.getValidDateString(rs.getString(10),genericUtility.getDBDateFormat(),genericUtility.getApplDateFormat());
thisBean.quantity = rs.getDouble(11); thisBean.quantity = rs.getDouble(11);
thisBean.allocQuant = rs.getDouble(12); thisBean.allocQuant = rs.getDouble(12);
if(thisBean.allocQuant == 0 || thisBean.allocQuant == 0.0)
{
thisBean.allocQuantLable = "N";
}
else
{
thisBean.allocQuantLable = "Y";
}
thisBean.available = rs.getString(13); thisBean.available = rs.getString(13);
thisBean.unit = rs.getString(14); thisBean.unit = rs.getString(14);
thisBean.potencyPerc = rs.getString(15); thisBean.potencyPerc = rs.getString(15);
thisBean.batchNo = rs.getString(16); thisBean.partialused = rs.getString(16); // added by deepak sawant
thisBean.dimention = rs.getString(17); if(thisBean.partialused == null)
thisBean.suppCodeMfg = rs.getString(18); {
thisBean.ppoQty = rs.getString(19); thisBean.partialused = "Intact";
thisBean.pindQty = rs.getString(20); }
thisBean.packCode = rs.getString(21); else
thisBean.qtyPerArt = rs.getString(22); {
thisBean.batchSize = rs.getString(23); thisBean.partialused = "Yes";
thisBean.holdQuant = rs.getDouble(24); }
thisBean.mfgDate = rs.getString(25) == null ? "" : genericUtility.getValidDateString(rs.getString(25),genericUtility.getDBDateFormat(),genericUtility.getApplDateFormat()); thisBean.batchNo = rs.getString(17);
thisBean.noArt = rs.getString(26); //Changed By Dipak Chattar On 15 Nov 2011 thisBean.dimention = rs.getString(18);
thisBean.rate = rs.getString(27); thisBean.suppCodeMfg = rs.getString(19);
thisBean.packRef = rs.getString(28);//added By Swati Bade On 09 May 2013 thisBean.ppoQty = rs.getString(20);
thisBean.pindQty = rs.getString(21);
thisBean.packCode = rs.getString(22);
thisBean.qtyPerArt = rs.getString(23);
thisBean.batchSize = rs.getString(24);
thisBean.holdQuant = rs.getDouble(25);
thisBean.mfgDate = rs.getString(26) == null ? "" : genericUtility.getValidDateString(rs.getString(26),genericUtility.getDBDateFormat(),genericUtility.getApplDateFormat());
thisBean.noArt = rs.getString(27); //Changed By Dipak Chattar On 15 Nov 2011
thisBean.rate = rs.getString(28);
thisBean.packRef = rs.getString(29);//added By Swati Bade On 09 May 2013
thisBean.currDateTs = getCurrdateTimestmp(); thisBean.currDateTs = getCurrdateTimestmp();
avl = thisBean.quantity - thisBean.allocQuant; avl = thisBean.quantity - thisBean.allocQuant;
...@@ -287,12 +459,17 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote ...@@ -287,12 +459,17 @@ public class StockHelp implements StockHelpLocal,StockHelpRemote
class StockDtlParams implements Serializable class StockDtlParams implements Serializable
{ {
HashMap lotQuantMap = new HashMap(); HashMap lotQuantMap = new HashMap();
String currLocCode = "", currLotNo = "", currLotSl = "", invStat = "", retestDate = ""; String currLocCode = "", currLotNo = "", currLotSl = "", invStat = "", retestDate = "", availableinv = "", invstst = "";
String expDate = "",unit = "", potencyPerc = "", batchNo = "", netAvailable = ""; String expDate = "",unit = "", potencyPerc = "", partialused = "", batchNo = "", netAvailable = "",allocQuantLable = "";
String dimention = "", suppCodeMfg = "", ppoQty = "", pindQty = "", packCode = ""; String dimention = "", suppCodeMfg = "", ppoQty = "", pindQty = "", packCode = "";
String qtyPerArt = "", batchSize = "", mfgDate = "", rate = "", noArt = "" , packRef = ""; String qtyPerArt = "", batchSize = "", mfgDate = "", rate = "", noArt = "" , packRef = "";
String itemCode = "", available = ""; String itemCode = "", available = "";
double quantity = 0, availQuant = 0, holdQuant = 0, allocQuant = 0; double quantity = 0, availQuant = 0, holdQuant = 0, allocQuant = 0,effqty = 0,qtybefore = 0,qtyaft = 0,rateinv = 0,noartinv = 0,grossrate = 0,actqty = 0,convqty = 0,amount = 0,rateinsu = 0;
String trandate = "",tranid ="",refser = "",refid = "",refline = "",orderid = "",siteCode = "",efedate = "",chgwin = "",reascode = "",itemCode1 = "",siteCode1 = "";
String sundrytype = "",sundrycode = "",refdate = "",refserfor = "",refidfor = "",acctcddr = "",cctrcddr = "",acctcdcr = "",cctrcdcr = "",grade = "",invStat1 = "";
java.sql.Timestamp currDateTs = null; java.sql.Timestamp currDateTs = null;
} }
} }
\ No newline at end of file
package ibase.webitm.ejb.dis; package ibase.webitm.ejb.dis;
import ibase.webitm.utility.ITMException;
import ibase.webitm.utility.GenericUtility;
import ibase.system.config.ConnDriver;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.*;
import ibase.system.config.AppConnectParm; import ibase.system.config.AppConnectParm;
import ibase.webitm.utility.ITMException;
import java.util.ArrayList;
import java.util.HashMap;
import javax.naming.InitialContext; import javax.naming.InitialContext;
import java.sql.*;
import java.util.*;
import javax.ejb.*;
public class StockHelpBean public class StockHelpBean
{ {
String siteCode = ""; String siteCode = "";
String itemCode = ""; String itemCode = "";
public String locCode = "",lotNo = "",locSl = "",unit = "",dimention = "", mfgDate = ""; public String locCode = "",lotNo = "",locSl = "",unit = "",dimention = "", mfgDate = "";
public String quantity = "",allocQty = "",netAvailable = "",available = "", noArt = "", itemCodeStk = ""; public String quantity = "",allocQty = "",netAvailable = "",available = "", noArt = "", itemCodeStk = "",siteCodeStk= "";
public String retestDate = "",expDate = "",potency = "",suppCodeMfg = "",batchNo = "", rate = "", packRef = ""; public String retestDate = "",expDate = "",potency = "",partialusedc = "",allocQuantLableC = "", suppCodeMfg = "",batchNo = "", rate = "", packRef = "";
public String packCode = "", invStat = "", holdQuant = "", qtyPerArt = "", batchSize = ""; public String packCode = "", invStat = "", holdQuant = "", qtyPerArt = "", batchSize = "";
public String ppoQty = "", pindQty = ""; public String ppoQty = "", pindQty = "",lotNo1 = "";
public String effqty = "",qtybefore = "",qtyaft = "",rateinv = "",noartinv = "",grossrate = "",actqty = "",convqty = "",amount = "",rateinsu = "";
public String trandate = "",tranidhere ="",refser = "",refid = "",refline = "",orderid = "",efedate = "",chgwin = "",reascode = "";
public String sundrytype = "",sundrycode = "",refdate = "",refserfor = "",refidfor = "",acctcddr = "",cctrcddr = "",acctcdcr = "",cctrcdcr = "",grade = "",currLocCode1 = "",currLotNo1 = "",currLotSl1 = "",invStat1 = "";
public HashMap beanLotQuantMap = new HashMap(); public HashMap beanLotQuantMap = new HashMap();
public java.sql.Timestamp currDateTs = null; public java.sql.Timestamp currDateTs = null;
...@@ -31,6 +36,10 @@ public class StockHelpBean ...@@ -31,6 +36,10 @@ public class StockHelpBean
{ {
this.itemCode = itemCodeJsp; this.itemCode = itemCodeJsp;
} }
public void setLotNo(String lotNoJsp)
{
this.lotNo = lotNoJsp;
}
public ArrayList getDetails() throws Exception public ArrayList getDetails() throws Exception
{ {
...@@ -69,11 +78,13 @@ public class StockHelpBean ...@@ -69,11 +78,13 @@ public class StockHelpBean
stkHlpBean.unit = stkParms.unit; stkHlpBean.unit = stkParms.unit;
stkHlpBean.quantity = Double.toString(stkParms.quantity); stkHlpBean.quantity = Double.toString(stkParms.quantity);
stkHlpBean.allocQty = Double.toString(stkParms.allocQuant); stkHlpBean.allocQty = Double.toString(stkParms.allocQuant);
stkHlpBean.allocQuantLableC = stkParms.allocQuantLable;
stkHlpBean.holdQuant = Double.toString(stkParms.holdQuant); stkHlpBean.holdQuant = Double.toString(stkParms.holdQuant);
stkHlpBean.netAvailable = stkParms.netAvailable; stkHlpBean.netAvailable = stkParms.netAvailable;
stkHlpBean.retestDate = stkParms.retestDate; stkHlpBean.retestDate = stkParms.retestDate;
stkHlpBean.expDate = stkParms.expDate; stkHlpBean.expDate = stkParms.expDate;
stkHlpBean.potency = stkParms.potencyPerc; stkHlpBean.potency = stkParms.potencyPerc;
stkHlpBean.partialusedc = stkParms.partialused; //added by deepak sawant
stkHlpBean.suppCodeMfg = stkParms.suppCodeMfg; stkHlpBean.suppCodeMfg = stkParms.suppCodeMfg;
stkHlpBean.batchNo = stkParms.batchNo; stkHlpBean.batchNo = stkParms.batchNo;
stkHlpBean.dimention = stkParms.dimention; stkHlpBean.dimention = stkParms.dimention;
...@@ -89,6 +100,8 @@ public class StockHelpBean ...@@ -89,6 +100,8 @@ public class StockHelpBean
thisBeanArray.add(stkHlpBean); thisBeanArray.add(stkHlpBean);
} }
} }
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -104,8 +117,99 @@ public class StockHelpBean ...@@ -104,8 +117,99 @@ public class StockHelpBean
stkHlpRetArr = null; stkHlpRetArr = null;
stkParms = null; stkParms = null;
} }
System.out.println(">>>>>>>>>>>>>>ddDD"+thisBeanArray);
return thisBeanArray; return thisBeanArray;
} }
public ArrayList loaddata() throws Exception
{
ArrayList stkHlpRetArr = new ArrayList();
ArrayList thisBeanArray = new ArrayList();
InitialContext ctx = null;
StockHelp.StockDtlParams stkParms = null;
StockHelpBean stkHlpBean = null;
AppConnectParm appConnect = null;
StockHelpLocal homeObj = null;
StockHelpRemote stkHelpRemote = null;
try
{
appConnect = new AppConnectParm();
ctx = new InitialContext(appConnect.getProperty());
//homeObj = (StockHelpLocal)ctx.lookup("StockHelp"); for ejb2
homeObj = (StockHelpLocal)ctx.lookup("ibase/StockHelp/local"); // for BaseInfo ejb3
//stkHelpRemote = (StockHelpRemote)ctx.lookup(HelloEjb.class.getName()); // standard
//stkHelpRemote = (StockHelpRemote)(homeObj.create()); //for ejb2
System.out.println(">>>>>>BEFORE ADDING LOADDATA"+lotNo);
stkHlpRetArr = homeObj.loadData(this.lotNo, this.siteCode,this.itemCode);
if(stkHlpRetArr.size() > 0)
{
for (int i=0; i<stkHlpRetArr.size(); i++ )
{
stkParms = (StockHelp.StockDtlParams)(stkHlpRetArr.get(i));
stkHlpBean = new StockHelpBean();
stkHlpBean.tranidhere = stkParms.tranid;
stkHlpBean.trandate = stkParms.trandate;
stkHlpBean.refser =stkParms.refser;
stkHlpBean.refid = stkParms.refid;
stkHlpBean.refline = stkParms.refline;
stkHlpBean.orderid = stkParms.orderid;
stkHlpBean.itemCodeStk = stkParms.itemCode1;
stkHlpBean.siteCodeStk = stkParms.siteCode1;
stkHlpBean.currLocCode1 = stkParms.currLocCode;
stkHlpBean.unit = stkParms.unit;
stkHlpBean.currLotNo1 = stkParms.currLotNo;
stkHlpBean.currLotSl1 = stkParms.currLotSl;
stkHlpBean.quantity = Double.toString(stkParms.quantity);
stkHlpBean.effqty = Double.toString(stkParms.effqty);
stkHlpBean.efedate = stkParms.efedate;
stkHlpBean.chgwin = stkParms.chgwin;
stkHlpBean.qtybefore = Double.toString(stkParms.qtybefore);
stkHlpBean.qtyaft = Double.toString(stkParms.qtyaft);
stkHlpBean.reascode = stkParms.reascode;
stkHlpBean.sundrytype = stkParms.sundrytype;
stkHlpBean.sundrycode = stkParms.sundrycode;
stkHlpBean.refdate = stkParms.refdate;
stkHlpBean.refserfor = stkParms.refserfor;
stkHlpBean.refidfor = stkParms.refidfor;
stkHlpBean.acctcddr = stkParms.acctcddr;
stkHlpBean.cctrcddr = stkParms.cctrcddr;
stkHlpBean.acctcdcr = stkParms.acctcdcr;
stkHlpBean.cctrcdcr = stkParms.cctrcdcr;
stkHlpBean.grade = stkParms.grade;
stkHlpBean.rateinv = Double.toString(stkParms.rateinv);
stkHlpBean.grossrate = Double.toString(stkParms.grossrate);
stkHlpBean.noartinv = Double.toString(stkParms.noartinv);
stkHlpBean.dimention = stkParms.dimention;
stkHlpBean.actqty = Double.toString(stkParms.actqty);
stkHlpBean.convqty = Double.toString(stkParms.convqty);
stkHlpBean.amount = Double.toString(stkParms.amount);
stkHlpBean.invStat1 = stkParms.invStat1;
stkHlpBean.rateinsu = Double.toString(stkParms.rateinsu);
thisBeanArray.add(stkHlpBean);
}
}
}catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
appConnect = null;
ctx = null;
homeObj = null;
stkHelpRemote = null;
stkHlpRetArr = null;
stkParms = null;
}
System.out.println(">>>>>>>>>>>>>>"+thisBeanArray);
return thisBeanArray;
}
public String getItemDescr(String itemCode) throws Exception public String getItemDescr(String itemCode) throws Exception
{ {
InitialContext ctx = null; InitialContext ctx = null;
...@@ -133,4 +237,10 @@ public class StockHelpBean ...@@ -133,4 +237,10 @@ public class StockHelpBean
return itemDescr; return itemDescr;
} }
} }
\ No newline at end of file
package ibase.webitm.ejb.dis; package ibase.webitm.ejb.dis;
import java.rmi.RemoteException; import java.rmi.RemoteException;
//import javax.ejb.CreateException; //import javax.ejb.CreateException;
//import javax.ejb.EJBHome; //import javax.ejb.EJBHome;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.util.*; import java.util.*;
//import ibase.webitm.ejb.*; //import ibase.webitm.ejb.*;
//import ibase.webitm.ejb.ValidatorLocal; //import ibase.webitm.ejb.ValidatorLocal;
import javax.ejb.Local; // added for ejb3 import javax.ejb.Local; // added for ejb3
...@@ -15,4 +18,5 @@ public interface StockHelpLocal// extends ValidatorLocal ...@@ -15,4 +18,5 @@ public interface StockHelpLocal// extends ValidatorLocal
//public StockHelp create() throws RemoteException, CreateException; //public StockHelp create() throws RemoteException, CreateException;
public ArrayList getDetails(String siteCode, String itemCode) throws RemoteException,ITMException; public ArrayList getDetails(String siteCode, String itemCode) throws RemoteException,ITMException;
public String getItemDescr(String itemCode) throws ITMException; public String getItemDescr(String itemCode) throws ITMException;
public ArrayList loadData(String lotno,String sitecode,String itemCode) throws ITMException;
} }
\ 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