Commit 2199771f authored by dpawar's avatar dpawar

added source for firmplan AWMS


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99963 ce508802-f39f-4f6c-b175-0d175dae99d5
parent eb141f42
package ibase.webitm.ejb.mfg;
public class SiteItemSummaryBean
{
private String siteCode = "",itemCode = "",workOrder = "",siteCodeShip = "",transTran = "";
private double otherSiteQty = 0;
public String getTransTran() {
return transTran;
}
public void setTransTran(String transTran) {
this.transTran = transTran;
}
public String getSiteCodeShip() {
return siteCodeShip;
}
public void setSiteCodeShip(String siteCodeShip) {
this.siteCodeShip = siteCodeShip;
}
public String getWorkOrder() {
return workOrder;
}
public void setWorkOrder(String workOrder) {
this.workOrder = workOrder;
}
public double getOtherSiteQty() {
return otherSiteQty;
}
public void setOtherSiteQty(double otherSiteQty) {
this.otherSiteQty = otherSiteQty;
}
/*public double getSoftAllocQty() {
return softAllocQty;
}
public void setSoftAllocQty(double softAllocQty) {
this.softAllocQty = softAllocQty;
}
public double getNonAllocQty() {
return nonAllocQty;
}
public void setNonAllocQty(double nonAllocQty) {
this.nonAllocQty = nonAllocQty;
}*/
public String getSiteCode() {
return siteCode;
}
public void setSiteCode(String siteCode) {
this.siteCode = siteCode;
}
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
package ibase.webitm.ejb.mfg;
import java.rmi.RemoteException;
import org.w3c.dom.*;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
@javax.ejb.Local
public interface WoFirmplanPrcLocal extends ProcessLocal
{
public String process() throws RemoteException,ITMException;
public String process(Document headerDom, Document detailDom, String windowName, String xtraParams) throws RemoteException,ITMException;
public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException,ITMException;
public String getData(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException,ITMException;
public String getData(Document headerDom, Document detailDom, String windowName, String xtraParams) throws RemoteException,ITMException;
}
package ibase.webitm.ejb.mfg;
import java.rmi.RemoteException;
import org.w3c.dom.*;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
@javax.ejb.Remote
public interface WoFirmplanPrcRemote extends ProcessRemote
{
public String process() throws RemoteException,ITMException;
public String process(Document headerDom, Document detailDom, String windowName, String xtraParams) throws RemoteException,ITMException;
public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException,ITMException;
public String getData(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException,ITMException;
public String getData(Document headerDom, Document detailDom, String windowName, String xtraParams) throws RemoteException,ITMException;
}
This diff is collapsed.
package ibase.webitm.ejb.mfg;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import java.rmi.RemoteException;
import org.w3c.dom.*;
@javax.ejb.Local
public interface WoFirmplanWizICLocal extends ValidatorLocal
{
public String wfValData() throws RemoteException, ITMException;
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext,String editFlag, String xtraParams) throws RemoteException, ITMException;
public String wfValData(Document currFormDataDom, Document hdrDataDom, Document allFormDataDom, String objContext, String xtraParams) throws RemoteException, ITMException;
public String itemChanged() throws RemoteException, ITMException;
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException;
public String itemChanged(Document currFormDataDom, Document hdrDataDom, Document allFormDataDom, String objContext, String currentColumn,String editFlag, String xtraParams ) throws RemoteException, ITMException;
}
package ibase.webitm.ejb.mfg;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import java.rmi.RemoteException;
import org.w3c.dom.*;
@javax.ejb.Remote
public interface WoFirmplanWizICRemote extends ValidatorRemote
{
public String wfValData() throws RemoteException, ITMException;
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext,String editFlag, String xtraParams) throws RemoteException, ITMException;
public String wfValData(Document currFormDataDom, Document hdrDataDom, Document allFormDataDom, String objContext, String xtraParams) throws RemoteException, ITMException;
public String itemChanged() throws RemoteException, ITMException;
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException;
public String itemChanged(Document currFormDataDom, Document hdrDataDom, Document allFormDataDom, String objContext, String currentColumn,String editFlag, String xtraParams ) throws RemoteException, ITMException;
}
package ibase.webitm.ejb.mfg;
import java.util.ArrayList;
public class WorderStkBean
{
private double potencyAdj = 0,stkQuantityNew = 0;
java.sql.Timestamp expDate = null,mfgDate = null;
private String locCode = "",lotNo = "",lotSl = "",siteCode = "",itemCode = "",itemRef = "",alternateItem = "",itemDescr = "",
workOrder = "",expLevel = "",critItem = "",unit = "",dimension = "",reserveStk = "",reserveStkTranId = "",
siteCodeMfg ="",otherSiteYN = "",stockSufficient = "";
public String getStockSufficient() {
return stockSufficient;
}
public void setStockSufficient(String stockSufficient) {
this.stockSufficient = stockSufficient;
}
public String getOtherSiteYN() {
return otherSiteYN;
}
public void setOtherSiteYN(String otherSiteYN) {
this.otherSiteYN = otherSiteYN;
}
int reserveLineNo = 0;
public int getReserveLineNo() {
return reserveLineNo;
}
public void setReserveLineNo(int reserveLineNo) {
this.reserveLineNo = reserveLineNo;
}
public java.sql.Timestamp getMfgDate() {
return mfgDate;
}
public void setMfgDate(java.sql.Timestamp mfgDate) {
this.mfgDate = mfgDate;
}
public java.sql.Timestamp getExpDate() {
return expDate;
}
public void setExpDate(java.sql.Timestamp expDate) {
this.expDate = expDate;
}
public String getSiteCodeMfg() {
return siteCodeMfg;
}
public void setSiteCodeMfg(String siteCodeMfg) {
this.siteCodeMfg = siteCodeMfg;
}
public String getItemDescr() {
return itemDescr;
}
public void setItemDescr(String itemDescr) {
this.itemDescr = itemDescr;
}
public String getReserveStkTranId() {
return reserveStkTranId;
}
public void setReserveStkTranId(String reserveStkTranId) {
this.reserveStkTranId = reserveStkTranId;
}
public String getAlternateItem() {
return alternateItem;
}
public void setAlternateItem(String alternateItem) {
this.alternateItem = alternateItem;
}
ArrayList<String> altItemCodeList = new ArrayList<String>();
public String getReserveStk() {
return reserveStk;
}
public void setReserveStk(String reserveStk) {
this.reserveStk = reserveStk;
}
public double getPotencyAdj() {
return potencyAdj;
}
public void setPotencyAdj(double potencyAdj) {
this.potencyAdj = potencyAdj;
}
public double getStkQuantityNew() {
return stkQuantityNew;
}
public void setStkQuantityNew(double stkQuantityNew) {
this.stkQuantityNew = stkQuantityNew;
}
public String getDimension() {
return dimension;
}
public void setDimension(String dimension) {
this.dimension = dimension;
}
private double allocQty = 0,stkQuantity = 0,stkPotencyPerc = 0;
public double getStkPotencyPerc() {
return stkPotencyPerc;
}
public void setStkPotencyPerc(double stkPotencyPerc)
{
this.stkPotencyPerc = stkPotencyPerc;
}
public String getLocCode() {
return locCode;
}
public void setLocCode(String locCode) {
this.locCode = locCode;
}
public String getLotNo() {
return lotNo;
}
public void setLotNo(String lotNo) {
this.lotNo = lotNo;
}
public String getLotSl() {
return lotSl;
}
public void setLotSl(String lotSl) {
this.lotSl = lotSl;
}
public String getSiteCode() {
return siteCode;
}
public void setSiteCode(String siteCode) {
this.siteCode = siteCode;
}
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getItemRef() {
return itemRef;
}
public void setItemRef(String itemRef) {
this.itemRef = itemRef;
}
public String getWorkOrder() {
return workOrder;
}
public void setWorkOrder(String workOrder) {
this.workOrder = workOrder;
}
public String getExpLevel() {
return expLevel;
}
public void setExpLevel(String expLevel) {
this.expLevel = expLevel;
}
public double getAllocQty() {
return allocQty;
}
public void setAllocQty(double allocQty) {
this.allocQty = allocQty;
}
public double getStkQuantity() {
return stkQuantity;
}
public void setStkQuantity(double stkQuantity) {
this.stkQuantity = stkQuantity;
}
public String getCritItem() {
return critItem;
}
public void setCritItem(String critItem) {
this.critItem = critItem;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public ArrayList<String> getAltItemCodeList() {
return altItemCodeList;
}
public void setAltItemCodeList(ArrayList<String> altItemCodeList) {
this.altItemCodeList = altItemCodeList;
}
}
package ibase.webitm.ejb.mfg;
public class WorkOrderDetailBean
{
int operation = 0;
double avaQty = 0,reqQty = 0,itemStdPotency = 0;
private double batchQty =0,qtyPer = 0,quantity = 0,minQty = 0,roundTo =0,minPotencyPerc = 0,minReqQty =0,potencyAdjQty = 0;
private String expLev = "",lineType = "",critItem = "",dueDate = "",quantityRef = "",active = "",
itemRef = "",itemCode = "",bomCode = "",siteCode = "",unit= "",reqType= "",matchPotency= "",
usageType= "",allocateType= "",adjPotency= "",considerLotNoIssue= "",locUsageType= "",itemActive= "",
round= "",workOrder ="",suppCodeMfg = "",mfgRef,dimension = "",useInvStatus = "",itemCategory = "" ;
public double getAvaQty() {
return avaQty;
}
public void setAvaQty(double avaQty) {
this.avaQty = avaQty;
}
public double getReqQty() {
return reqQty;
}
public void setReqQty(double reqQty) {
this.reqQty = reqQty;
}
public double getItemStdPotency() {
return itemStdPotency;
}
public void setItemStdPotency(double itemStdPotency) {
this.itemStdPotency = itemStdPotency;
}
public String getActive() {
return active;
}
public void setActive(String active) {
this.active = active;
}
public double getPotencyAdjQty() {
return potencyAdjQty;
}
public void setPotencyAdjQty(double potencyAdjQty) {
this.potencyAdjQty = potencyAdjQty;
}
public String getItemCategory() {
return itemCategory;
}
public void setItemCategory(String itemCategory) {
this.itemCategory = itemCategory;
}
public double getMinReqQty() {
return minReqQty;
}
public void setMinReqQty(double minReqQty) {
this.minReqQty = minReqQty;
}
public String getUseInvStatus() {
return useInvStatus;
}
public void setUseInvStatus(String useInvStatus) {
this.useInvStatus = useInvStatus;
}
public String getSuppCodeMfg() {
return suppCodeMfg;
}
public void setSuppCodeMfg(String suppCodeMfg) {
this.suppCodeMfg = suppCodeMfg;
}
public String getMfgRef() {
return mfgRef;
}
public void setMfgRef(String mfgRef) {
this.mfgRef = mfgRef;
}
public String getDimension() {
return dimension;
}
public void setDimension(String dimension) {
this.dimension = dimension;
}
public double getBatchQty() {
return batchQty;
}
public void setBatchQty(double batchQty) {
this.batchQty = batchQty;
}
public double getQtyPer() {
return qtyPer;
}
public void setQtyPer(double qtyPer) {
this.qtyPer = qtyPer;
}
public double getQuantity() {
return quantity;
}
public void setQuantity(double quantity) {
this.quantity = quantity;
}
public double getMinQty() {
return minQty;
}
public void setMinQty(double minQty) {
this.minQty = minQty;
}
public double getRoundTo() {
return roundTo;
}
public void setRoundTo(double roundTo) {
this.roundTo = roundTo;
}
public double getMinPotencyPerc() {
return minPotencyPerc;
}
public void setMinPotencyPerc(double minPotencyPerc) {
this.minPotencyPerc = minPotencyPerc;
}
public String getExpLev() {
return expLev;
}
public void setExpLev(String expLev) {
this.expLev = expLev;
}
public int getOperation() {
return operation;
}
public void setOperation(int operation) {
this.operation = operation;
}
public String getLineType() {
return lineType;
}
public void setLineType(String lineType) {
this.lineType = lineType;
}
public String getCritItem() {
return critItem;
}
public void setCritItem(String critItem) {
this.critItem = critItem;
}
public String getDueDate() {
return dueDate;
}
public void setDueDate(String dueDate) {
this.dueDate = dueDate;
}
public String getQuantityRef() {
return quantityRef;
}
public void setQuantityRef(String quantityRef) {
this.quantityRef = quantityRef;
}
public String getItemRef() {
return itemRef;
}
public void setItemRef(String itemRef) {
this.itemRef = itemRef;
}
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getBomCode() {
return bomCode;
}
public void setBomCode(String bomCode) {
this.bomCode = bomCode;
}
public String getSiteCode() {
return siteCode;
}
public void setSiteCode(String siteCode) {
this.siteCode = siteCode;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getReqType() {
return reqType;
}
public void setReqType(String reqType) {
this.reqType = reqType;
}
public String getMatchPotency() {
return matchPotency;
}
public void setMatchPotency(String matchPotency) {
this.matchPotency = matchPotency;
}
public String getUsageType() {
return usageType;
}
public void setUsageType(String usageType) {
this.usageType = usageType;
}
public String getAllocateType() {
return allocateType;
}
public void setAllocateType(String allocateType) {
this.allocateType = allocateType;
}
public String getAdjPotency() {
return adjPotency;
}
public void setAdjPotency(String adjPotency) {
this.adjPotency = adjPotency;
}
public String getConsiderLotNoIssue() {
return considerLotNoIssue;
}
public void setConsiderLotNoIssue(String considerLotNoIssue) {
this.considerLotNoIssue = considerLotNoIssue;
}
public String getLocUsageType() {
return locUsageType;
}
public void setLocUsageType(String locUsageType) {
this.locUsageType = locUsageType;
}
public String getItemActive() {
return itemActive;
}
public void setItemActive(String itemActive) {
this.itemActive = itemActive;
}
public String getRound() {
return round;
}
public void setRound(String round) {
this.round = round;
}
public String getWorkOrder()
{
return workOrder;
}
public void setWorkOrder(String workOrder)
{
this.workOrder = workOrder;
}
}
package ibase.webitm.ejb.mfg;
import java.rmi.RemoteException;
import java.sql.*;
import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
public class WorkOrderRoute
{
public String createWorderRoute(String workOrder, Connection conn) throws RemoteException, ITMException
{
PreparedStatement pstmt =null,pstmtInsert = null;
ResultSet rs = null;
String sql = "",sqlInsert = "",retString = "",itemCode = "";
String routeCode = "",descr = "",procCode = "",workCtr = "",mcCode,
qcReqd = "",deptCode = "",autoIssue = "",mcAllocreq = "",parntOperation = "",wrkCtrlAlt = "",
mcCodeAlt = "",chgUser = "",chgTerm = "";
Timestamp chgDate = null;
double runTime = 0,resetTime = 0,waitTime = 0,setTime = 0,procSize = 0,operationLevel = 0,prvOperation = 0,quantity = 0;
int operation,seqNo;
try
{
chgDate = getCurrtDate();
System.out.println("Current date ="+chgDate);
sqlInsert = "INSERT INTO WORDER_ROUTE (WORK_ORDER,OPERATION,PROC_CODE,SEQ_NO,ROUTE_CODE,ITEM_CODE,WORK_CTR,MC_CODE,CHG_STAT,"
+ "OPER_STAT,QUANTITY,WAIT_TIME,SET_TIME,RUN_TIME,RESET_TIME,CHG_DATE,CHG_USER,CHG_TERM,DEPT_CODE,"
+ "AUTO_ISSUE,OPERATION_LEVEL,QC_REQD,DESCR,"
+ "WORK_CTR__ALT,MC_CODE__ALT) "
+ "values (?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?)";
pstmtInsert = conn.prepareStatement(sqlInsert);
sql = "SELECT ITEM_CODE,ROUTE_CODE,QUANTITY FROM WORKORDER WHERE WORK_ORDER = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, workOrder);
rs = pstmt.executeQuery();
if (rs.next())
{
itemCode = checkNullAndTrim(rs.getString("ITEM_CODE"));
routeCode = checkNullAndTrim(rs.getString("ROUTE_CODE"));
quantity = rs.getDouble("QUANTITY");
}
rs.close();rs = null;
pstmt.close();pstmt = null;
System.out.println("Item Code["+itemCode+"]Route Code["+routeCode+"]Quantity["+quantity+"]");
if(routeCode != null && routeCode.length() > 0)
{
sql = "SELECT ROUTE_CODE, OPERATION, DESCR, PROC_CODE, "
+ " SEQ_NO, WORK_CTR, MC_CODE, WAIT_TIME, SET_TIME, "
+ " RUN_TIME, RESET_TIME, CHG_DATE, CHG_USER, CHG_TERM, "
+ " PROCESS_SIZE, QC_REQD, OPERATION_LEVEL, DEPT_CODE, AUTO_ISSUE, "
+ " MC_ALLOC_REQ, PARENT_OPERATION, PREV_OPER, WORK_CTR__ALT, MC_CODE__ALT "
+ " FROM PROCROUTE "
+ " WHERE ROUTE_CODE = ? "
+ " ORDER BY OPERATION ASC, OPERATION_LEVEL ASC ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, routeCode);
rs = pstmt.executeQuery();
int count = 0;
while (rs.next())
{
System.out.println("count-------------------->>"+(++count));
routeCode = checkNullAndTrim(rs.getString("ROUTE_CODE"));
operation = rs.getInt("OPERATION");
descr = checkNullAndTrim(rs.getString("DESCR"));
procCode = checkNullAndTrim(rs.getString("PROC_CODE"));
seqNo = rs.getInt("SEQ_NO");
workCtr = checkNullAndTrim(rs.getString("WORK_CTR"));
mcCode = checkNullAndTrim(rs.getString("MC_CODE"));
waitTime = rs.getDouble("WAIT_TIME");
setTime = rs.getDouble("SET_TIME");
runTime = rs.getDouble("RUN_TIME");
resetTime = rs.getDouble("RESET_TIME");
chgUser = checkNullAndTrim(rs.getString("CHG_USER"));
chgTerm = checkNullAndTrim(rs.getString("CHG_TERM"));
procSize = rs.getDouble("PROCESS_SIZE");
qcReqd = checkNullAndTrim(rs.getString("QC_REQD"));
operationLevel = rs.getDouble("OPERATION_LEVEL");
deptCode = checkNullAndTrim(rs.getString("DEPT_CODE"));
autoIssue = checkNullAndTrim(rs.getString("AUTO_ISSUE"));
mcAllocreq = checkNullAndTrim(rs.getString("MC_ALLOC_REQ"));
parntOperation = checkNullAndTrim(rs.getString("PARENT_OPERATION"));
prvOperation = rs.getDouble("PREV_OPER");
wrkCtrlAlt = checkNullAndTrim(rs.getString("WORK_CTR__ALT"));
mcCodeAlt = checkNullAndTrim(rs.getString("MC_CODE__ALT"));
System.out.println("OPERATION ----------->>"+operation);
pstmtInsert.setString(1, workOrder);
pstmtInsert.setDouble(2, operation);
pstmtInsert.setString(3, procCode);
pstmtInsert.setDouble(4, seqNo);
pstmtInsert.setString(5, routeCode);
pstmtInsert.setString(6, itemCode);
pstmtInsert.setString(7, workCtr);
pstmtInsert.setString(8, mcCode);
pstmtInsert.setString(9, " ");
pstmtInsert.setString(10, " ");
//pstmtInsert.setString(11, schDate);
pstmtInsert.setDouble(11, quantity);
pstmtInsert.setDouble(12, waitTime);
pstmtInsert.setDouble(13, setTime);
pstmtInsert.setDouble(14, runTime);
pstmtInsert.setDouble(15, resetTime);
pstmtInsert.setTimestamp(16, chgDate);
pstmtInsert.setString(17, chgUser);
pstmtInsert.setString(18, chgTerm);
//pstmtInsert.setString(20, qcType);
pstmtInsert.setString(19, deptCode);
pstmtInsert.setString(20, autoIssue);
pstmtInsert.setDouble(21, operationLevel);
pstmtInsert.setString(22, qcReqd);
//pstmtInsert.setString(25, isueType);
pstmtInsert.setString(23, descr);
//pstmtInsert.setString(27, startDate);
//pstmtInsert.setString(28, endDate);
//pstmtInsert.setString(29, parentTranId);
//pstmtInsert.setString(30, revTran);
//pstmtInsert.setString(31, usageSet);
pstmtInsert.setString(24, wrkCtrlAlt);
pstmtInsert.setString(25, mcCodeAlt);
//pstmtInsert.setString(34, procInstr);
pstmtInsert.executeQuery();
pstmtInsert.clearParameters();
}
pstmtInsert.executeBatch();
rs.close();rs = null;
pstmt.close();pstmt = null;
}
}
catch(Exception e)
{
System.out.println("Catch CreateWorderRoute");
throw new ITMException(e);
}
finally
{
try
{
if(pstmt != null){pstmt.close();pstmt = null;}
if(pstmtInsert != null){pstmtInsert.close();pstmtInsert = null;}
if(rs != null){rs.close();rs = null;}
}
catch(Exception ex)
{
throw new ITMException(ex);
}
}
return retString;
}
private static String checkNullAndTrim(String input)
{
if (input==null)
{
input="";
}
return input.trim();
}
private java.sql.Timestamp getCurrtDate() throws RemoteException,ITMException
{
java.sql.Timestamp currDate = null;
GenericUtility genericUtility = GenericUtility.getInstance();
try
{
Object date = null;
currDate = new java.sql.Timestamp(System.currentTimeMillis());
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(genericUtility.getDBDateFormat());
date = sdf.parse(currDate.toString());
currDate = java.sql.Timestamp.valueOf(sdf.format(date).toString()+ " 00:00:00.0");
}
catch (Exception e)
{
throw new ITMException(e);
}
return (currDate);
}
}
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