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.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