Commit 432ee0a4 authored by manohar's avatar manohar

This commit was generated by cvs2svn to compensate for changes in r504,

which included commits to RCS files with non-trunk default branches.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91569 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1837d432
package ibase.webitm.ejb.mfg.adv;
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 javax.naming.InitialContext;
import java.sql.*;
import java.util.*;
import javax.ejb.*;
public class BOMStockBean
{
public String itemCode = "",reqType = "",descr = "", bomCode = "",batchQtyD ="",iCode ="",iDescr="";
public double stock = 0.0,batchQty = 0.0,qtyPar = 0.0,minQty = 0.0, reqQty = 0.0,stkQty = 0.0,nonStkQty = 0.0,quantity=0.0,allockQty=0.0;
public void setBomCode(String bomCodeJsp)
{
this.bomCode = bomCodeJsp;
}
public void setBatchQtyD(String batchQtyDJsp)
{
this.batchQtyD = batchQtyDJsp;
}
public ArrayList getDetails() throws Exception
{
ArrayList stkBomRetArr = new ArrayList();
ArrayList thisBeanArray = new ArrayList();
InitialContext ctx = null;
BOMAct.BOMStockDtlParams stkParms = null;
BOMStockBean stkBomBean = null;
AppConnectParm appConnect = null;
BOMActLocal homeObj = null;
try
{
appConnect = new AppConnectParm();
ctx = new InitialContext(appConnect.getProperty());
homeObj = (BOMActLocal)ctx.lookup("ibase/BOMAct/local"); // for BaseInfo ejb3
stkBomRetArr = homeObj.getDetails(this.bomCode,this.batchQtyD);
if(stkBomRetArr.size() > 0)
{
for (int i=0; i<stkBomRetArr.size(); i++ )
{
stkParms = (BOMAct.BOMStockDtlParams)(stkBomRetArr.get(i));
stkBomBean = new BOMStockBean();
System.out.println("reqQty is in bean:::"+stkParms.reqQty);
stkBomBean.itemCode = stkParms.itemCode;
stkBomBean.reqType = stkParms.reqType;
stkBomBean.minQty = stkParms.minQty;
stkBomBean.qtyPar = stkParms.qtyPar;
stkBomBean.batchQty = stkParms.batchQty;
stkBomBean.bomCode = stkParms.bomCode;
stkBomBean.descr = stkParms.descr;
stkBomBean.reqQty = stkParms.reqQty;
stkBomBean.stkQty = stkParms.stkQty;
stkBomBean.nonStkQty = stkParms.nonStkQty;
//stkBomBean.stock = stkParms.stock;
// stkBomBean.quantity = Double.toString(stkParms.quantity);
stkBomBean.allockQty = stkParms.allockQty;
// stkBomBean.reqQty = stkParms.reqQty;
thisBeanArray.add(stkBomBean);
}
}
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
appConnect = null;
ctx = null;
homeObj = null;
stkBomRetArr = null;
stkParms = null;
}
return thisBeanArray;
}
}
\ No newline at end of file
package ibase.webitm.ejb.mfg.adv;
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 javax.naming.InitialContext;
import java.sql.*;
import java.util.*;
import javax.ejb.*;
public class WoStockBean
{
public String itemCode = "",descr = "",workOrder = "",allockQty = "";
public double stkQty = 0.0,nonStkQty = 0.0;
public void setWorkOrder(String workOrderJsp)
{
this.workOrder = workOrderJsp;
}
/*public void setWoQty(String woQtyJsp)
{
this.woQty = woQtyJsp;
}
*/
public ArrayList getDetails() throws Exception
{
ArrayList stkWoRetArr = new ArrayList();
ArrayList thisBeanArray = new ArrayList();
InitialContext ctx = null;
WOrderIssueAct.woStockDtlParams stkParms = null;
WoStockBean stkWoBean = null;
AppConnectParm appConnect = null;
WOrderIssueActLocal homeObj = null;
try
{
appConnect = new AppConnectParm();
ctx = new InitialContext(appConnect.getProperty());
homeObj = (WOrderIssueActLocal)ctx.lookup("ibase/WOrderIssueAct/local"); // for BaseInfo ejb3
stkWoRetArr = homeObj.getDetails(this.workOrder);
if(stkWoRetArr.size() > 0)
{
for (int i=0; i<stkWoRetArr.size(); i++ )
{
stkParms = (WOrderIssueAct.woStockDtlParams)(stkWoRetArr.get(i));
stkWoBean = new WoStockBean();
stkWoBean.itemCode = stkParms.itemCode;
stkWoBean.workOrder = stkParms.woCode;
stkWoBean.descr = stkParms.descr;
stkWoBean.stkQty = stkParms.stkQty;
stkWoBean.nonStkQty = stkParms.nonStkQty;
stkWoBean.allockQty = stkParms.allockQty;
thisBeanArray.add(stkWoBean);
}
}
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
appConnect = null;
ctx = null;
homeObj = null;
stkWoRetArr = null;
stkParms = null;
}
return thisBeanArray;
}
}
\ No newline at end of file
<% System.out.println(" *****BOMStockButton.jsp***** "); %>
<%@page import = "java.util.*"%>
<%@page import ="ibase.webitm.utility.*"%>
<%@page import = "ibase.webitm.ejb.mfg.adv.*"%>
<%@page import = "java.sql.*"%>
<%@page import = "java.text.DecimalFormat"%>
<%@page import = "ibase.webitm.utility.GenericUtility"%>
<jsp:useBean id="BOMStkBean" scope="session" class="ibase.webitm.ejb.mfg.adv.BOMStockBean"/>
<html>
<head>
<title>Bom Stock</title>
<script type="text/javascript">
function callValidate()
{
var bomCd = document.form1.bom_code.value;
var batchQty = document.form1.batch_qty.value;
if( bomCd == "" )
{
alert("Please enter Bom Code.");
document.form1.bom_code.focus();
return false;
}
if( batchQty == "" )
{
alert("Please enter batchQtyD.");
document.form1.batch_qty.focus();
return false;
}
}
function CloseWindow()
{
var win=window.open("about:blank","_self");
win.close();
}
</script>
</head>
<body>
<a style="position:absolute;top:10;left:0;height:50;width:1200;background:url(/ibase/webitm/images/title_bar_bg_blue.jpg);font-family:Verdana"></a>
<%
GenericUtility genericUtility = GenericUtility.getInstance();
DecimalFormat df = new DecimalFormat( "##.000" );
if((request.getParameter("form") == null ) || (request.getParameter("form").equals("2")))
{
%>
<Form name = "form1" action = "BOMStockButton.jsp?form=2" method = "post">
<%
String bom = request.getParameter("PK_VALUES");
String bomCode = request.getParameter("bom_code");
String batchQtyD = request.getParameter("batch_qty");
System.out.println("bomCode of bean ==>"+bomCode+" batchQtyD of bean ==>"+batchQtyD);
String itemDescr = "";
if (bomCode == null)
{
bomCode = request.getParameter("bom_code") == null ? "" : request.getParameter("bom_code");
}
if (batchQtyD == null)
{
batchQtyD = request.getParameter("batch_qty") == null ? "" : request.getParameter("batch_qty");
}
System.out.println("bomCode [" + bomCode + "]");
System.out.println("batchQtyD [" + batchQtyD + "]");
%>
<br/><br/><br/><br/>
<table align = "center">
<tr>
<td> Bom Code:</td>
<td> <input type = "text" name = "bom_code" size = "10" value = "<%= bomCode %>" onChange = "javascript: this.value = this.value.toUpperCase();"/></td>
<td> &nbsp;&nbsp;Batch Quantity:</td>
<td> <input type = "text" name = "batch_qty" size = "10" value = "<%= batchQtyD %>" onChange = "javascript: this.value = this.value.toUpperCase();"/></td>
</tr>
<tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tr>
<tr>
<td></td>
<td> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "submit" VALUE = "Retrieve" onClick = "return callValidate();" /></td>
</td>
<td></td>
</tr>
</table>
</FORM>
<%
}
if((request.getParameter("form") != null ) &&(request.getParameter("form").equals("2")))
{
%>
<Form name = "form2" action = "BOMStockButton.jsp" method = "POST">
<%
String bomCode = request.getParameter("bom_code");
String batchQtyD = request.getParameter("batch_qty");
System.out.println("bomCode of bean ==>"+bomCode+" batchQtyD of bean ==>"+batchQtyD);
BOMStkBean.setBomCode( bomCode.toUpperCase() );
if(batchQtyD != null && batchQtyD.trim().length() > 0)
{
BOMStkBean.setBatchQtyD( batchQtyD.toUpperCase() );
}
ArrayList BOMStockHelpList = BOMStkBean.getDetails();
if( BOMStockHelpList.size() > 0 )
{
%>
<br/>
<DIV ID="TableBorder" class="tableborderDiv">
<TABLE name="main" border = "1" id="main" CLASS="sort-table" STYLE="class:header_css;POSITION:relative;TOP:20;left:10;width:790" >
<thead>
<!--TH WIDTH=39><P>Stock</P></TH-->
<TH WIDTH=66><P>Bom Code</P></TH>
<TH WIDTH=59><P>Item Code</P></TH>
<TH WIDTH=128><P>Item Description</P></TH>
<TH WIDTH=71><P>Required Type</P></TH>
<TH WIDTH=72><P>Minimum Quantity</P></TH>
<TH WIDTH=61><P>Quantity Per</P></TH>
<TH WIDTH=62><P>Batch Quantity</P></TH>
<TH WIDTH=97><P>Stock Usable Quantity</P></TH>
<TH WIDTH=126><P>Stock NonUsable Quantity</P></TH>
<TH WIDTH=75><P>Required Quantity</P></TH>
<TH WIDTH=66><P>Allocated Quantity</P></TH>
<!--TH WIDTH=56><P>Quantity</P></TH-->
</thead>
<%
for(int i=0;i<BOMStockHelpList.size();i++)
{
BOMStkBean = ( ibase.webitm.ejb.mfg.adv.BOMStockBean)(BOMStockHelpList.get(i));
%>
<tr BGCOLOR="#FFFFFF">
<td align = "right"><font size="-1"><%=(BOMStkBean.bomCode != null && BOMStkBean.bomCode.equals("")) ? "-" : BOMStkBean.bomCode%></font></td>
<td align = "right"><font size="-1"><%=(BOMStkBean.itemCode != null && BOMStkBean.itemCode.equals("")) ? "-" : BOMStkBean.itemCode%></font></td>
<td align = "right"><font size="-1"><%=(BOMStkBean.descr != null && BOMStkBean.descr.equals("")) ? "-" : BOMStkBean.descr%></font></td>
<td align = "right"><font size="-1"><%=(BOMStkBean.reqType != null && BOMStkBean.reqType.equals("")) ? "-" : BOMStkBean.reqType%></font></td>
<td align = "right"><font size="-1"><%=((BOMStkBean.minQty == 0) ? "0.000" : df.format(BOMStkBean.minQty))%></font></td>
<td align = "right"><font size="-1"><%=((BOMStkBean.qtyPar == 0) ? "0.000" :df.format(BOMStkBean.qtyPar))%></font></td>
<td align = "right"><font size="-1"><%= batchQtyD %></font></td>
<td align = "right"><font size="-1"><%=((BOMStkBean.stkQty == 0) ? "0.000" :df.format(BOMStkBean.stkQty))%></font></td>
<td align = "right"><font size="-1"><%=((BOMStkBean.nonStkQty == 0) ? "0.000" :df.format(BOMStkBean.nonStkQty))%></font></td>
<td align = "right"><font size="-1"><%=((BOMStkBean.reqQty == 0) ? "0.000" :df.format(BOMStkBean.reqQty))%></font></td>
<td align = "right"><font size="-1"><%=((BOMStkBean.allockQty == 0) ? "0.000" :df.format(BOMStkBean.allockQty))%></font></td>
</tr>
<%
}
%>
</TABLE>
</DIV>
<%
}
else
{
System.out.println("Inside else");
%>
<BR/><BR/><BR/><BR/>
<p><b><center><h2>
No any stock detail found for entered data.
</h2></center></b></p>
<%
}
%>
<BR/><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!-- <input type = "button" VALUE = "Back" onClick = "history.back()"/> -->
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--input type = "button" value = "Close" onclick="return CloseWindow();"/-->
<!--<a href="javascript:window.opener='x';window.close();">Close me</a>-->
<!-- Running code in mozilla 1.5 -->
<!-- <a href="javascript:window.open('','_parent','');window.close();">
<input type="button" value="Close Window"/></a> -->
</FORM>
<%
}
%>
</body>
</html>
<% System.out.println(" *****WoStockButton.jsp***** "); %>
<%@page import = "java.util.*"%>
<%@page import ="ibase.webitm.utility.*"%>
<%@page import = "ibase.webitm.ejb.mfg.adv.*"%>
<%@page import = "java.sql.*"%>
<%@page import = "java.text.DecimalFormat"%>
<%@page import = "ibase.webitm.utility.GenericUtility"%>
<jsp:useBean id="WoStkBean" scope="session" class="ibase.webitm.ejb.mfg.adv.WoStockBean"/>
<html>
<head>
<title>Work order Stock</title>
<script type="text/javascript">
function callValidate()
{
var woOrd = document.form1.work_order.value;
if( woOrd == "" )
{
alert("Please enter work Order.");
document.form1.work_order.focus();
return false;
}
}
function CloseWindow()
{
var win=window.open("about:blank","_self");
win.close();
}
</script>
</head>
<body>
<a style="position:absolute;top:10;left:0;height:50;width:1200;background:url(/ibase/webitm/images/title_bar_bg_blue.jpg);font-family:Verdana"></a>
<%
GenericUtility genericUtility = GenericUtility.getInstance();
DecimalFormat df = new DecimalFormat( "##.000" );
if((request.getParameter("form") == null ) || (request.getParameter("form").equals("2")))
{
%>
<Form name = "form1" action = "WoStockButton.jsp?form=2" method = "post">
<%
//String bom = request.getParameter("PK_VALUES");
String workOrder = request.getParameter("work_order");
System.out.println("workOrder of bean ==>"+workOrder);
if (workOrder == null)
{
workOrder = request.getParameter("work_order") == null ? "" : request.getParameter("work_order");
}
System.out.println("workOrderQuantity [" + workOrder+ "]");
%>
<br/><br/><br/><br/>
<table align = "center">
<tr>
<td> Work Order:</td>
<td> <input type = "text" name = "work_order" size = "10" value = "<%= workOrder %>" onChange = "javascript: this.value = this.value.toUpperCase();"/></td>
</tr>
<tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tr>
<tr>
<td></td>
<td> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "submit" VALUE = "Retrieve" onClick = "return callValidate();" /></td>
</td>
<td></td>
</tr>
</table>
</FORM>
<%
}
if((request.getParameter("form") != null ) &&(request.getParameter("form").equals("2")))
{
%>
<Form name = "form2" action = "WoStockButton.jsp" method = "POST">
<%
String workOrder = request.getParameter("work_order");
System.out.println("workOrder of bean ==>"+workOrder);
WoStkBean.setWorkOrder( workOrder.toUpperCase() );
ArrayList WoStockHelpList = WoStkBean.getDetails();
if( WoStockHelpList.size() > 0 )
{
%>
<br/>
<DIV ID="TableBorder" class="tableborderDiv">
<TABLE name="main" border = "1" id="main" CLASS="sort-table" STYLE="class:header_css;POSITION:relative;TOP:20;left:10;width:790" >
<thead>
<TH WIDTH=66><P>Work Order</P></TH>
<TH WIDTH=59><P>Item Code</P></TH>
<TH WIDTH=128><P>Item Description</P></TH>
<TH WIDTH=97><P>Stock Usable Quantity</P></TH>
<TH WIDTH=126><P>Stock NonUsable Quantity</P></TH>
<TH WIDTH=66><P>Allocated Quantity</P></TH>
</thead>
<%
for(int i=0;i<WoStockHelpList.size();i++)
{
WoStkBean = ( ibase.webitm.ejb.mfg.adv.WoStockBean)(WoStockHelpList.get(i));
%>
<tr BGCOLOR="#FFFFFF">
<td align = "right"><font size="-1"><%= workOrder %></font></td>
<td align = "right"><font size="-1"><%=(WoStkBean.itemCode != null && WoStkBean.itemCode.equals("")) ? "-" : WoStkBean.itemCode%></font></td>
<td align = "right"><font size="-1"><%=(WoStkBean.descr != null && WoStkBean.descr.equals("")) ? "-" : WoStkBean.descr%></font></td>
<td align = "right"><font size="-1"><%=df.format(WoStkBean.stkQty)%></font></td>
<td align = "right"><font size="-1"><%=df.format(WoStkBean.nonStkQty)%></font></td>
<td align = "right"><font size="-1"><%= WoStkBean.allockQty %></font></td>
</tr>
<%
}
%>
</TABLE>
</DIV>
<%
}
else
{
System.out.println("Inside else");
%>
<BR/><BR/><BR/><BR/>
<p><b><center><h2>
No any stock detail found for entered data.
</h2></center></b></p>
<%
}
%>
<BR/><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!-- <input type = "button" VALUE = "Back" onClick = "history.back()"/> -->
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--input type = "button" value = "Close" onclick="return CloseWindow();"/-->
<!--<a href="javascript:window.opener='x';window.close();">Close me</a>-->
<!-- Running code in mozilla 1.5 -->
<!-- <a href="javascript:window.open('','_parent','');window.close();">
<input type="button" value="Close Window"/></a> -->
</FORM>
<%
}
%>
</body>
</html>
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