Commit c4c21059 authored by wansari's avatar wansari

W15GSUN010 added source as given by Pragyan sir on mail


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100262 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4f1e4348
/* Following are the major points of Firm plan process
/* Following are the major points of Firm plan process
1. If campgn_no is not empty use the following sql and get all the workorder in the campaign in a list (woList)
select a.work_order
from worder_campaign a,workorder b
......@@ -128,6 +128,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
Map<String,String>doneStockDetailsMap = new HashMap<String,String>();
Map<String,String> transTranMap = new HashMap<String,String>();
Map<String,String> saleDistOrderMap = new HashMap<String,String>();
Map<String,Boolean> worderExpLevSufficient = new HashMap<String,Boolean>();
CommonConstants commonConstantsObj = new CommonConstants();
ArrayList<String> workOrderList = new ArrayList<String>();
String database = commonConstantsObj.DB_NAME;
......@@ -207,7 +209,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
retStr = e.getMessage();
throw new ITMException(e);
}
return retStr;
return retStr;
}
public String processWorkOrder(Document headerDom, Document detailDom, String windowName, String xtraParams) throws Exception
......@@ -255,19 +257,46 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
return errString;
}
//VTWOAPRC
for(String worder : workOrderList)
{
int count = 0;
sql = "select count(*) from workorder_bill where work_order = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, worder);
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(count > 0)
{
errString="VTWOAPRC";
errString = itmDBAccessEJB.getErrorString("",errString,"","",conn);
return errString;
}
}
if(workOrderList.size() > 0)
{
errString = explodBomAndPopulateBean(workOrderList,conn);
}
else
{
//error
{
errString="VTAPLAN";
errString = itmDBAccessEJB.getErrorString("",errString,"","",conn);
return errString;
}
System.out.println("errString After exp bom----->>["+errString+"]");
//Check allocate Stock (Soft allocation)
stockDetailMap = stockAllocation(conn);
System.out.println("After stockAllocation stockDetailMap----->>["+stockDetailMap+"]");
System.out.println("worderExpLevSufficient----->>["+worderExpLevSufficient+"]");
//displayStkBean("After Stock allocation..............");
if(stockDetailMap.size() > 0)
{
......@@ -279,37 +308,49 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
errString = itmDBAccessEJB.getErrorString("",errorCodeRet,"","",conn);
return errString;
}
if(isSufficient)
/*if(isSufficient)
{*/
//stock sufficient
potencyRetStr = checkStockPotencyNew(conn);
System.out.println("After checkStockPotency :["+potencyRetStr+"]");
//displayStkBean(workOrderBeanList, "H");
//displayStkBean(worderStkBeanList, "D");
//potencyRetStr = checkStockPotency(conn);
if(worderExpLevSufficient.containsValue(false))
{
//stock sufficient
potencyRetStr = checkStockPotencyNew(conn);
//displayStkBean(workOrderBeanList, "H");
//displayStkBean(worderStkBeanList, "D");
//potencyRetStr = checkStockPotency(conn);
System.out.println("After checkStockPotency :["+potencyRetStr+"]");
//displayStkBean("After check potency....................");
System.out.println("Stock not sufficient...................");
errString = generateXml(conn);
}
else
{
System.out.println("Stock sufficient...................");
errString = populateWorkOrderBill(conn);
System.out.println("After populateWorkOrderBill :["+errString+"]");
//displayStkBean(workOrderBeanList, "H");
//displayStkBean(worderStkBeanList, "D");
errString = insertInInvAllocate(conn);
errString = createDistSaleOrder(conn);
//CreateDistSorderAllocation
//according to transType create dist. or sale order
errString = generateXml(conn);
/*if(errString !=null && errString.indexOf("Error") > -1)
}
/*if(errString !=null && errString.indexOf("Error") > -1)
{
return errString;
}*/
}
/*}
else
{
errString = generateXml(conn);
}
}*/
}
......@@ -324,8 +365,9 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
throw new Exception(e);
}
finally
{
System.out.println("1 In @@finally processWorkOrder errString : ["+errString+"]");
{
//System.out.println("Transaction rollbaking............@@");
//conn.rollback();
System.out.println("In @@finally processWorkOrder isError : ["+isError+"]");
if(isError)
{
......@@ -336,17 +378,9 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
if(genericUtility != null)
{
genericUtility = null;
}
workOrderBeanList.clear();
worderStkBeanList.clear();
siteItemReqQtyList.clear();
firmplanDetailMap.clear();
transTranMap.clear();
doneStockDetailsMap.clear();
saleDistOrderMap.clear();
commonConstantsObj = null;
System.out.println("2 In @@finally isSufficient ["+isSufficient+"]");
if(isSufficient && errString.indexOf("workorders") > -1)
}
System.out.println("2 In @@finally worderExpLevSufficient ["+worderExpLevSufficient+"]");
if(!(worderExpLevSufficient.containsValue(false)) && errString.indexOf("workorders") > -1)
{
System.out.println("Transaction commiting....................");
conn.commit();
......@@ -356,7 +390,15 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
System.out.println("Transaction rollbaking....................");
conn.rollback();
}
workOrderBeanList.clear();
worderStkBeanList.clear();
siteItemReqQtyList.clear();
firmplanDetailMap.clear();
worderExpLevSufficient.clear();
transTranMap.clear();
doneStockDetailsMap.clear();
saleDistOrderMap.clear();
commonConstantsObj = null;
if(rs != null)
{
......@@ -430,7 +472,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
rs = null;
pstmt.close();
detailMap.put("CONSIDER_PARTIAL_ALT", tempWorderObj.getConsiderPartialAlt());
detailMap.put("USE_INV_STATUS", tempWorderObj.getUseInvStatus());
detailMap.put("SUPP_CODE_MFG", tempWorderObj.getSuppCodeMfg());
......@@ -478,7 +520,24 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
{
stockReturnMap = checkReserveStock(detailMap, conn);
System.out.println("checkReserveStock1 return map : "+stockReturnMap);
if("N".equalsIgnoreCase(detailMap.get("CONSIDER_PARTIAL_ALT")))
{
System.out.println("CONSIDER_PARTIAL_ALT in checkReserveStock.................");
balanceQty = Double.parseDouble(stockReturnMap.get("BALANCE_QTY"));
errorCodeRet = stockReturnMap.get("ERROR_CODE");
isSufficient = Boolean.parseBoolean(stockReturnMap.get("IS_SUFFICIENT"));
if(balanceQty > 0)
{
stockReturnMap.put("BALANCE_QTY", "0");
stockReturnMap.put("ERROR_CODE", "");
stockReturnMap.put("IS_SUFFICIENT", "false");
System.out.println("worderStkBeanList clear.......................");
removeDataConsiderPartialAlt(tempWorderObj.getWorkOrder(),tempWorderObj.getExpLev());
}
}
System.out.println("CONSIDER_PARTIAL_ALT Reserve return map : "+stockReturnMap);
balanceQty = Double.parseDouble(stockReturnMap.get("BALANCE_QTY"));
errorCodeRet = stockReturnMap.get("ERROR_CODE");
isSufficient = Boolean.parseBoolean(stockReturnMap.get("IS_SUFFICIENT"));
......@@ -487,15 +546,16 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
System.out.println("Sufficient in 1 reserve stock.......................");
tempWorderObj.setSufficient("Y");
workOrderBeanList.set(count, tempWorderObj);
worderExpLevSufficient.put(tempWorderObj.getWorkOrder()+":"+tempWorderObj.getExpLev(), isSufficient);
continue;
}
detailMap.put("BALANCE_QTY", String.valueOf(balanceQty) );
stockReturnMap = checkForAlternateItem(detailMap, conn);
System.out.println("checkForAlternateItem Reserve return map : "+stockReturnMap);
//stockReturnMap = checkForAlternateItem(detailMap, conn);
//System.out.println("checkForAlternateItem Reserve return map : "+stockReturnMap);
}
//--------------------Second Check stock in current site---------------------------
System.out.println("Second Check stock in current site : "+stockReturnMap);
if(stockReturnMap.size() > 0)
{
balanceQty = Double.parseDouble(stockReturnMap.get("BALANCE_QTY"));
......@@ -511,16 +571,34 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
{
tempWorderObj.setSufficient("Y");
workOrderBeanList.set(count, tempWorderObj);
worderExpLevSufficient.put(tempWorderObj.getWorkOrder()+":"+tempWorderObj.getExpLev(), isSufficient);
continue;
}
}
else
{
System.out.println("Not check reserve.................");
stockReturnMap = checkCurrentSiteStock(detailMap ,conn);//getSuppStockQty
}
System.out.println("@checkCurrentSiteStock return map@ : "+stockReturnMap);
/*if("N".equalsIgnoreCase(detailMap.get("CONSIDER_PARTIAL_ALT")))
{
System.out.println("CONSIDER_PARTIAL_ALT in CurrentSiteStock.................");
balanceQty = Double.parseDouble(stockReturnMap.get("BALANCE_QTY"));
errorCodeRet = stockReturnMap.get("ERROR_CODE");
isSufficient = Boolean.parseBoolean(stockReturnMap.get("IS_SUFFICIENT"));
if(balanceQty > 0)
{
stockReturnMap.put("BALANCE_QTY", "0");
stockReturnMap.put("ERROR_CODE", "");
stockReturnMap.put("IS_SUFFICIENT", "false");
System.out.println("worderStkBeanList clear.......................");
worderStkBeanList.clear();
conn.rollback();
}
}*/
//@#
balanceQty = Double.parseDouble(stockReturnMap.get("BALANCE_QTY"));
errorCodeRet = stockReturnMap.get("ERROR_CODE");
......@@ -532,6 +610,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
{
tempWorderObj.setSufficient("Y");
workOrderBeanList.set(count, tempWorderObj);
worderExpLevSufficient.put(tempWorderObj.getWorkOrder()+":"+tempWorderObj.getExpLev(), isSufficient);
continue;
}
......@@ -545,7 +624,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
}*/
if(!"O".equalsIgnoreCase(detailMap.get("ALLOCATE_TYPE")) && !isSufficient)
{
{
System.out.println("----------------start alternate item-----------------------------");
detailMap.put("BALANCE_QTY", String.valueOf(balanceQty) );
stockReturnMap = checkForAlternateItem(detailMap, conn);
System.out.println("@@checkForAlternateItem Current site @@ : "+stockReturnMap);
......@@ -615,9 +695,14 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
continue;
}
System.out.println("worderExpLevSufficient@@--------------"+isSufficient);
worderExpLevSufficient.put(tempWorderObj.getWorkOrder()+":"+tempWorderObj.getExpLev(), isSufficient);
System.out.println("123worderExpLevSufficient@@--------------"+worderExpLevSufficient);
//set is Sufficient
} //end for loop
}
}
catch(Exception e)
{
......@@ -625,6 +710,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
e.printStackTrace();
throw new Exception(e);
}
System.out.println("Before return worderExpLevSufficient@@--------------"+worderExpLevSufficient);
return stockReturnMap;
}
......@@ -659,7 +745,26 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
}
else if(workOrder.length() > 0)
{
workOrderList.add(workOrder);
int count = 0;
sql = "select count(*) from workorder where work_order = ? "
+ "and (case when status is null then 'P' else status end) in ('P','M','U')";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, workOrder);
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(count > 0)
{
workOrderList.add(workOrder);
}
}
}
......@@ -691,7 +796,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
WorkOrderDetailBean worderDetailBeanObj = null;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat());
String xmlDataString = "",sql = "",itemCode = "",siteCode = "",bomCode = "",lineType = "B",
String xmlDataString = "",sql = "",itemCode = "",siteCode = "",bomCode = "",lineType = "B",considerPartialAlt = "",
childNodeName = null,itemDescr = "";
double batchQty =0,qtyPer = 0,quantity = 0,minQty = 0,roundTo =0,minPotencyPerc = 0,balanceQty = 0;
boolean isSufficient = false;
......@@ -795,7 +900,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
operationInt = Integer.parseInt(operation.length() == 0 ? "0" : operation);
critItem = checkNull(eElement.getElementsByTagName("crit_Item").item(0).getTextContent());
lineType = checkNull(eElement.getElementsByTagName("line_type").item(0).getTextContent());
considerPartialAlt = checkNull(eElement.getElementsByTagName("consider_partial_alt").item(0).getTextContent());
unit = checkNull(eElement.getElementsByTagName("unit").item(0).getTextContent());
batchQtyStr = checkNull(eElement.getElementsByTagName("batch_qty").item(0).getTextContent());
qtyPerStr = checkNull(eElement.getElementsByTagName("qty_per").item(0).getTextContent());
......@@ -874,6 +980,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
worderDetailBeanObj.setItemCategory(itemCategory);
worderDetailBeanObj.setPotencyAdjQty(0); //later set on potency calculation.
worderDetailBeanObj.setConsiderPartialAlt(considerPartialAlt);
workOrderBeanList.add(worderDetailBeanObj); // All details
......@@ -924,8 +1032,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
System.out.println("iN checkCurrentSiteStock : "+detailMap);
ResultSet rs= null;
PreparedStatement pstmt = null;
String sql = "",useInvStatus = "",mfgRef = "",qcReqd = "",dimension ="",allocRetStr = "",
trackShelfLife = "",locGroup = "",lotNoIssue = "",sqlString = "",itemDescr = "";
String sql = "",useInvStatus = "",mfgRef = "",qcReqd = "",dimension ="",allocRetStr = "",workOrder = "",expLevel = "",
trackShelfLife = "",locGroup = "",lotNoIssue = "",sqlString = "",itemDescr = "",considerPartialAlt = "";
int count = 0;
boolean isMatchPotency = false,isCompareDimension = false,isSufficient = false;
......@@ -950,12 +1058,18 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
{
System.out.println("Checking for other site......................");
}
considerPartialAlt = detailMap.get("CONSIDER_PARTIAL_ALT");
workOrder = detailMap.get("WORK_ORDER");
expLevel = detailMap.get("EXP_LEV");
issCriteria = detailMap.get("ISS_CRITERIA");
controlledYn = detailMap.get("CONTROLLED_YN");
minPotencyPerc = Double.parseDouble(detailMap.get("MIN_POTENCY_PERC"));
matchPotency = detailMap.get("MATCH_POTENCY");
alternateItem = detailMap.get("IS_ALTERNATE");
System.out.println("IS_ALTERNATE : "+alternateItem);
System.out.println("CONSIDER_PARTIAL_ALT : "+considerPartialAlt);
System.out.println("workOrder : "+workOrder);
System.out.println("expLevel : "+expLevel);
sql = "select case when qc_reqd is null then 'N' else qc_reqd end,"
+ "case when track_shelf_life is null then 'N' else track_shelf_life end "
+ "from item where item_code = ? ";
......@@ -1303,7 +1417,23 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
pstmt = null;
}
}
if("N".equalsIgnoreCase(considerPartialAlt))
{
System.out.println("CONSIDER_PARTIAL_ALT in CurrentSiteStock................."+returnMapDetails);
balanceQty = Double.parseDouble(returnMapDetails.get("BALANCE_QTY"));
//errorCodeRet = returnMapDetails.get("ERROR_CODE");
isSufficient = Boolean.parseBoolean(returnMapDetails.get("IS_SUFFICIENT"));
if(balanceQty > 0)
{
returnMapDetails.put("BALANCE_QTY", "0");
returnMapDetails.put("ERROR_CODE", "");
returnMapDetails.put("IS_SUFFICIENT", "false");
System.out.println("worderStkBeanList clear.......................");
removeDataConsiderPartialAlt(workOrder,expLevel);
conn.rollback();
}
}
return returnMapDetails;
}
//Get item standard potency
......@@ -1462,12 +1592,18 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
worderStkBeanObj.setStkQuantityNew(Double.parseDouble(df.format(shortageQty + potencyAdj)));//Stock quantity equvalent to
worderStkBeanObj.setActualAllocQty(shortageQty);
updQty = shortageQty + potencyAdj;
worderStkBeanObj.setAllocQty(Double.parseDouble(df.format(shortageQty + potencyAdj)));
// worderStkBeanObj.setAllocQty(Double.parseDouble(df.format(shortageQty + potencyAdj)));
worderStkBeanObj.setAllocQty(Double.parseDouble(df.format(shortageQty)));
worderStkBeanObj.setUpdQty(reqQtyNew);
System.out.println("uPDqTY------------Y------------->>["+reqQtyNew+"]");
System.out.println("expLevel----->>["+expLevel+"]");
System.out.println("index----->>["+index+"]");
worderStkBeanList.set(index, worderStkBeanObj);
WorderStkBean Obj = worderStkBeanList.get(index);
System.out.println("updQty----Y---->>["+Obj.getUpdQty()+"]");
System.out.println("setActualAllocQty------------Y------------->>["+shortageQty+"]");
System.out.println("shortageQty----Y---->>["+shortageQty+"]");
System.out.println("expLevel----->>["+expLevel+"]");
/*if(potencyAdjMapY.containsKey(adjPotency) )
{
......@@ -1522,7 +1658,9 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
System.out.println("availableStock------------------->>"+availableStock);
isReallocation = true;
worderStkBeanObj.setUpdQty(availableStock);
System.out.println("uPDqTY------------n------------->>["+availableStock+"]");
worderStkBeanList.set(index, worderStkBeanObj);
System.out.println("uPDqTY------------n Last------------->>["+availableStock+"]");
System.out.println("expLevel------------------->>"+expLevel);
//allocate new stock because stock not sufficient
HashMap<String,String> detailMap = new HashMap<String,String>();
detailMap.put("USE_INV_STATUS", worderDetailBeanObj.getUseInvStatus());
......@@ -1586,10 +1724,11 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
worderStkBeanObj.setStkQuantityNew(Double.parseDouble(df.format(availableStock + potencyAdj))); //Stock quantity equvalent to
availableStock = Double.parseDouble(df.format(availableStock));
worderStkBeanObj.setActualAllocQty(availableStock);
worderStkBeanObj.setAllocQty(Double.parseDouble(df.format(availableStock + potencyAdj)));
// worderStkBeanObj.setAllocQty(Double.parseDouble(df.format(availableStock + potencyAdj)));
worderStkBeanObj.setAllocQty(Double.parseDouble(df.format(proQty)));
worderStkBeanObj.setUpdQty(availableStock);
shortageQty = shortageQty - proQty;
worderStkBeanList.set(index, worderStkBeanObj);
shortageQty = Double.parseDouble(df.format(shortageQty));
System.out.println("shortageQty----N---->>["+shortageQty+"]");
System.out.println("expLevel----->>["+expLevel+"]");
......@@ -1637,7 +1776,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
System.out.println("adjPotency----->>["+adjPotency+"]");
worderStkBeanList.set(index, worderStkBeanObj);
// worderStkBeanList.set(index, worderStkBeanObj);//old set
System.out.println("new@@!..........."+worderDetailBeanObj.getQuantity()+ updQty);
// worderDetailBeanObj.setUpdQty(worderDetailBeanObj.getQuantity()+ updQty);
//workOrderBeanList.set(count, worderDetailBeanObj );
......@@ -1673,6 +1812,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
{
System.out.println("in else of adj_potency null1.................."+requiredStock);
//directly set upd qty as bill qty
worderStkBeanObj.setAllocQty(requiredStock);
worderStkBeanObj.setUpdQty(requiredStock);
worderStkBeanList.set(index, worderStkBeanObj);
......@@ -1704,8 +1844,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
System.out.println("AdjustedQty contion1.......");
//worderDetailBeanObj.setAdjustedQty(-1 * potencyAdjMapY.get(adjPotency));
worderDetailBeanObj.setAdjustedQty(Double.parseDouble(df.format(-1 * potencyAdjMapY.get(adjPotency))));
workOrderBeanList.set(count,worderDetailBeanObj);
//worderDetailBeanObj.setAdjustedQty(Double.parseDouble(df.format(-1 * potencyAdjMapY.get(adjPotency))));
//workOrderBeanList.set(count,worderDetailBeanObj);
}
}//end main for
......@@ -2127,7 +2267,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
String sql = "",qcReqd = "",effDate = "",invLocCode = "",invLotNo = "",invLotSl = "",siteCode = "",itemCode = "",
locUsageType = "",considerLotNoIss ="",trackShelfLife = "",worder = "",locGrp = "",packLotNo = "",dimension = "",
expLevel = "",itemRef = "",critItem = "",unit = "",errorCode = "",bomCode= "",itemDescr = "";
String itemSitekey = "",stkKey = "",expLev = "",mfgItemCode = "",alternate = "";
String itemSitekey = "",stkKey = "",expLev = "",mfgItemCode = "",alternate = "",considerPartialAlt = "";
double stkQuantity = 0,requiredQty = 0,allocQty = 0,balanceQty = 0,remainQty = 0,softAllocQty = 0,
stkPotencyPerc = 0,minPotencyPerc = 0 ;
ArrayList<String> altItemCodeList = new ArrayList<String>();
......@@ -2174,9 +2314,12 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
requiredQty = Double.parseDouble( worderDetailMap.get("QUANTITY"));
unit = worderDetailMap.get("UNIT");
critItem = worderDetailMap.get("CRIT_ITEM");
considerLotNoIss = worderDetailMap.get("CONSIDER_LOTNO_ISSUE");
considerLotNoIss = worderDetailMap.get("CONSIDER_LOTNO_ISSUE");
considerPartialAlt = worderDetailMap.get("CONSIDER_PARTIAL_ALT");
System.out.println("ReserveStock considerPartialAlt------>>["+considerPartialAlt+"]");
requiredQty = Double.parseDouble(df.format(requiredQty));
System.out.println("isSufficient------>>["+isSufficient+"]");
if(invAllocateTranIDList.size() > 0)
{
for(String tranID : invAllocateTranIDList)
......@@ -2432,7 +2575,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
returnMapDetails.put("IS_SUFFICIENT",String.valueOf(isSufficient));
}
else
{
{
returnMapDetails.put("ERROR_CODE","");
returnMapDetails.put("BALANCE_QTY",String.valueOf(balanceQty));
returnMapDetails.put("IS_SUFFICIENT",String.valueOf(isSufficient));
......@@ -2505,6 +2648,10 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
altMinPotencyPerc = rs.getDouble("min_potency_perc");
considerPartialAlt = checkNull(rs.getString("consider_partial_alt"));
if("N".equalsIgnoreCase(considerPartialAlt))
{
continue;
}
altItemDetailMap.put("ITEM_CODE_ALT", altItemCode);
//check propotinate for each item
......@@ -3141,17 +3288,19 @@ public String populateWorkOrderBill(Connection conn) throws Exception
{
System.out.println("in populateWorkOrderBill------->>"+workOrderBeanList.size());
displayStkBean("");
ResultSet rs = null;
PreparedStatement pstmt = null,pstmt1 = null;
String sql ="",workOrder = "",expLevel = "";
String sql ="",workOrder = "",expLevel = "",mfgItemCode = "",unitRef = "";
ArrayList<String> worderList = new ArrayList<String>();
HashMap<String,Double> worderExpMap= new HashMap<String,Double>();
try
{
sql = "insert into workorder_bill (work_order,operation,exp_lev,item_code__ref,unit__ref,ref_qty,item_code,quantity,unit,"
+ "alloc_qty,alloc_date,site_code,chg_date,chg_user,chg_term,line_type,crit_item,"
+ "match_potency,min_potency_perc,adj_potency,potency_adj,iss_qty,usage_type,allocate_type,"
{
sql = "insert into workorder_bill (work_order,operation,exp_lev,item_code__ref,unit__ref,ref_qty,item_code,quantity,unit,"//9
+ "alloc_qty,alloc_date,site_code,chg_date,chg_user,chg_term,line_type,crit_item,"//17
+ "match_potency,min_potency_perc,adj_potency,potency_adj,usage_type,allocate_type,"//23
+ "loc_usage_type,consider_lot_no__issue,unit__alt,conv__qty__alt,quantity__alt,lead_time,req_date,"
+ "quantity__std ) values ( ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,"
+ " ?,?,?,?,?,?,?,?,?,?, ?,?)";
+ " ?,?,?,?,?,?,?,?,?,?, ?)";
int count = 0;
if(workOrderBeanList.size() > 0)
{
......@@ -3159,22 +3308,37 @@ public String populateWorkOrderBill(Connection conn) throws Exception
{
//populate work order bill
System.out.println("populateWorkOrderBill----------------->>"+(++count));
System.out.println("WorkOrder----------------->>"+wOrderBillObj.getWorkOrder());
System.out.println("WorkOrder12----------------->>"+wOrderBillObj.getWorkOrder());
workOrder = wOrderBillObj.getWorkOrder();
expLevel = wOrderBillObj.getExpLev();
String sql1 = "select item_code,unit from workorder where work_order = ?";
pstmt = conn.prepareStatement(sql1);
pstmt.setString(1, workOrder);
rs = pstmt.executeQuery();
if(rs.next())
{
mfgItemCode = rs.getString(1);
unitRef = rs.getString(2);
}
rs.close();
rs = null;
pstmt.close();
pstmt=null;
if(! worderList.contains(wOrderBillObj.getWorkOrder()))
{
{
updateWorkorderStatus(workOrder,conn);
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, workOrder);
pstmt.setInt(2, 0);
pstmt.setString(3, "1.");
pstmt.setString(4,wOrderBillObj.getItemRef() );
pstmt.setString(5, wOrderBillObj.getUnit());
pstmt.setString(3, "1.");
pstmt.setString(4,mfgItemCode );
pstmt.setString(5, unitRef);
pstmt.setDouble(6, wOrderBillObj.getBatchQty()); //ref_qty
pstmt.setString(7, wOrderBillObj.getItemCode());
pstmt.setString(7,mfgItemCode);
pstmt.setDouble(8, wOrderBillObj.getBatchQty());//quantity
pstmt.setString(9, wOrderBillObj.getUnit());
pstmt.setString(9, unitRef);
pstmt.setDouble(10, 0); // allocate quantity
pstmt.setTimestamp(11, getCurrtDate()); //alloc_date
pstmt.setString(12, wOrderBillObj.getSiteCode());//site_code
......@@ -3183,25 +3347,25 @@ public String populateWorkOrderBill(Connection conn) throws Exception
pstmt.setString(15, termId);//get from xtraParam termId
pstmt.setString(16, wOrderBillObj.getLineType()); //line_type
pstmt.setString(17, wOrderBillObj.getCritItem()); //crit_item
pstmt.setString(18, wOrderBillObj.getMatchPotency()); //match_potency
pstmt.setDouble(19, wOrderBillObj.getMinPotencyPerc());//min_potency_perc
pstmt.setString(20, wOrderBillObj.getAdjPotency()); //adj_potency
pstmt.setDouble(21, wOrderBillObj.getPotencyAdjQty());//potency_adj
pstmt.setString(17,null); //crit_item
pstmt.setString(18, null); //match_potency
pstmt.setDouble(19, 0);//min_potency_perc
pstmt.setString(20, null); //adj_potency
pstmt.setDouble(21, 0);//potency_adj
//pstmt.setDouble(22, wOrderBillObj.getPotencyAdjQty());//iss_qty
pstmt.setDouble(22, wOrderBillObj.getQuantity()); //iss_qty
pstmt.setString(23, wOrderBillObj.getUsageType());
pstmt.setString(24, wOrderBillObj.getAllocateType());
pstmt.setString(25, wOrderBillObj.getLocUsageType());
pstmt.setString(26, wOrderBillObj.getConsiderLotNoIssue());
pstmt.setString(27, wOrderBillObj.getUnit());//unit__alt
pstmt.setDouble(28, 1);//conv__qty__alt
pstmt.setDouble(29, wOrderBillObj.getQuantity()); //quantity__alt
pstmt.setInt(30, 0);//lead_time
pstmt.setTimestamp(31, getCurrtDate());
pstmt.setDouble(32, wOrderBillObj.getQuantity()); //quantity__std
//pstmt.setDouble(22, wOrderBillObj.getQuantity()); //iss_qty
pstmt.setString(22, null);
pstmt.setString(23, wOrderBillObj.getAllocateType());
pstmt.setString(24, wOrderBillObj.getLocUsageType());
pstmt.setString(25, wOrderBillObj.getConsiderLotNoIssue());
pstmt.setString(26, null);//unit__alt
pstmt.setDouble(27, 0);//conv__qty__alt
pstmt.setDouble(28, 0); //quantity__alt
pstmt.setInt(29, 0);//lead_time
pstmt.setTimestamp(30, getCurrtDate());
pstmt.setDouble(31, 0); //quantity__std
pstmt.executeUpdate();
......@@ -3211,53 +3375,89 @@ public String populateWorkOrderBill(Connection conn) throws Exception
System.out.println("return string from WorkOrderRoute------>>["+str+"]") ;
}
for(WorderStkBean tempObj : worderStkBeanList)
{
{
System.out.println("workOrder------>>["+workOrder+"] workOrderDetail : ["+tempObj.getWorkOrder()+"]") ;
System.out.println("expLevel------>>["+expLevel+"] expLevelDetail : ["+tempObj.getExpLevel()+"]") ;
System.out.println("UpdQty------>>["+tempObj.getUpdQty()+"] AllocQty : ["+tempObj.getAllocQty()+"]") ;
System.out.println("QtyAdj------>>["+tempObj.getQtyAdj()+"] AllocQty : ["+tempObj.getAllocQty()+"]") ;
if(workOrder.equalsIgnoreCase(tempObj.getWorkOrder()) && expLevel.equalsIgnoreCase(tempObj.getExpLevel()))
{
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, workOrder);
pstmt1.setInt(2, wOrderBillObj.getOperation());
pstmt1.setString(3, expLevel);
pstmt1.setString(4,tempObj.getItemRef() );//item_code__ref
pstmt1.setString(5, tempObj.getUnit());//unit
pstmt1.setDouble(6, wOrderBillObj.getBatchQty()); //ref_qty
pstmt1.setString(7, tempObj.getItemCode());
pstmt1.setDouble(8, tempObj.getAllocQty()); //quantity
pstmt1.setString(9, tempObj.getUnit());
pstmt1.setDouble(10, tempObj.getAllocQty()); //alloc_qty
pstmt1.setTimestamp(11, getCurrtDate()); //alloc_date
pstmt1.setString(12, wOrderBillObj.getSiteCode());//site_code
pstmt1.setTimestamp(13, getCurrtDate());//chg_date
pstmt1.setString(14, chgUser);//get from xtraParam chgUser
pstmt1.setString(15, termId);//get from xtraParam termId
pstmt1.setString(16, wOrderBillObj.getLineType()); //line_type
pstmt1.setString(17, wOrderBillObj.getCritItem()); //crit_item
pstmt1.setString(18, wOrderBillObj.getMatchPotency()); //match_potency
pstmt1.setDouble(19, wOrderBillObj.getMinPotencyPerc());//min_potency_perc
pstmt1.setString(20, wOrderBillObj.getAdjPotency()); //adj_potency
pstmt1.setDouble(21, tempObj.getPotencyAdj());//potency_adj
//pstmt.setDouble(22, wOrderBillObj.getPotencyAdjQty());//iss_qty
pstmt1.setDouble(22, 0); //iss_qty
pstmt1.setString(23, wOrderBillObj.getUsageType());
pstmt1.setString(24, wOrderBillObj.getAllocateType());
pstmt1.setString(25, wOrderBillObj.getLocUsageType());
pstmt1.setString(26, wOrderBillObj.getConsiderLotNoIssue());
pstmt1.setString(27, wOrderBillObj.getUnit());//unit__alt
pstmt1.setDouble(28, 1);//conv__qty__alt
pstmt1.setDouble(29, 0); //quantity__alt
pstmt1.setInt(30, 0);//lead_time
pstmt1.setTimestamp(31, getCurrtDate());
pstmt1.setDouble(32, tempObj.getAllocQty()); //quantity__std
System.out.println("worderExpMap------>>["+worderExpMap+"]");
if(worderExpMap.containsKey(workOrder+":"+expLevel))
{
sql = "update workorder_bill set alloc_qty = (case when alloc_qty is null then 0 else alloc_qty end) + ? "
+ "where work_order = ? and operation = ? and exp_lev = ?";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setDouble(1, tempObj.getUpdQty());
pstmt1.setString(2, workOrder);
pstmt1.setInt(3, wOrderBillObj.getOperation());
pstmt1.setString(4, expLevel);
int i = pstmt1.executeUpdate();
System.out.println("pstmt1 is update....................."+i);
pstmt1.close();
pstmt1 = null;
}
else
{
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, workOrder);
pstmt1.setInt(2, wOrderBillObj.getOperation());
pstmt1.setString(3, expLevel);
pstmt1.setString(4,tempObj.getItemRef() );//item_code__ref
pstmt1.setString(5, unitRef);//unit_ref
pstmt1.setDouble(6, wOrderBillObj.getBatchQty()); //ref_qty
pstmt1.setString(7, tempObj.getItemCode());
pstmt1.setDouble(8, wOrderBillObj.getQuantity()); //quantity
pstmt1.setString(9, tempObj.getUnit());
pstmt1.setDouble(10, tempObj.getUpdQty()); //alloc_qty
pstmt1.setTimestamp(11, getCurrtDate()); //alloc_date
pstmt1.setString(12, wOrderBillObj.getSiteCode());//site_code
pstmt1.setTimestamp(13, getCurrtDate());//chg_date
pstmt1.setString(14, chgUser);//get from xtraParam chgUser
pstmt1.setString(15, termId);//get from xtraParam termId
pstmt1.setString(16, wOrderBillObj.getLineType()); //line_type
pstmt1.setString(17, wOrderBillObj.getCritItem()); //crit_item
pstmt1.setString(18, wOrderBillObj.getMatchPotency()); //match_potency
pstmt1.setDouble(19, wOrderBillObj.getMinPotencyPerc());//min_potency_perc
pstmt1.setString(20, wOrderBillObj.getAdjPotency()); //adj_potency
pstmt1.setDouble(21, tempObj.getQtyAdj());//potency_adj
//pstmt.setDouble(22, wOrderBillObj.getPotencyAdjQty());//iss_qty
//pstmt1.setDouble(22, 0); //iss_qty
pstmt1.setString(22, wOrderBillObj.getUsageType());
pstmt1.setString(23, wOrderBillObj.getAllocateType());
pstmt1.setString(24, wOrderBillObj.getLocUsageType());
pstmt1.setString(25, wOrderBillObj.getConsiderLotNoIssue());
pstmt1.setString(26, wOrderBillObj.getUnit());//unit__alt
pstmt1.setDouble(27, 1);//conv__qty__alt
pstmt1.setDouble(28, wOrderBillObj.getQuantity()); //quantity__alt
pstmt1.setInt(29, 0);//lead_time
pstmt1.setTimestamp(30, getCurrtDate());
pstmt1.setDouble(31, wOrderBillObj.getQuantity()); //quantity__std
int i = pstmt1.executeUpdate();
worderExpMap.put(workOrder+":"+expLevel, tempObj.getUpdQty());
System.out.println("pstmt1 is null....................."+i);
pstmt1.close();
pstmt1 = null;
}
pstmt1.addBatch();
}
}
int rows [] = pstmt1.executeBatch();
System.out.println("Rows---->>"+rows.length);
/*if(pstmt1 != null)
{
int rows [] = pstmt1.executeBatch();
System.out.println("Rows---->>"+rows.length);
}
else
{
System.out.println("pstmt1 is null.....................");
}*/
}
/*int rows [] = pstmt.executeBatch();
......@@ -3280,6 +3480,11 @@ public String populateWorkOrderBill(Connection conn) throws Exception
pstmt.close();
pstmt = null;
}
if(pstmt1 !=null)
{
pstmt1.close();
pstmt1 = null;
}
}
return "";
}
......@@ -3297,18 +3502,32 @@ public String populateWorkOrderBill(Connection conn) throws Exception
HashMap<String,String> tranIDWorderMap = new HashMap<String,String> ();
try
{
{
System.out.println("in insertInInvAllocate.....................");
displayStkBean("D");
for(WorderStkBean WorderStkBeanObj : worderStkBeanList)
{
if("Y".equalsIgnoreCase(WorderStkBeanObj.getReserveStk()))
{
//line no set in checkReser..Stk method for unique update.
sql = "update inv_alloc_det set dealloc_qty = ? where tran_id = ? and line_no = ?";
sql = "update inv_alloc_det set dealloc_qty = (case when dealloc_qty is null then 0 else dealloc_qty end) + ? where tran_id = ? and "
//+ "lot_no = ? and lot_sl = ? and site_code = ? and loc_code = ? and item_code = ?";
+ "line_no = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1, WorderStkBeanObj.getAllocQty());
pstmt.setString(2,tranIDInvAlloc);
pstmt.setInt(3,WorderStkBeanObj.getReserveLineNo());
pstmt.executeUpdate();
System.out.println("stock qty : "+WorderStkBeanObj.getStkQuantity());
System.out.println("stock qty new: "+WorderStkBeanObj.getStkQuantityNew());
System.out.println("stock qty : "+WorderStkBeanObj.getUpdQty());
pstmt.setDouble(1, WorderStkBeanObj.getStkQuantity());
pstmt.setString(2,WorderStkBeanObj.getReserveStkTranId());
pstmt.setInt(3,WorderStkBeanObj.getReserveLineNo());
/*pstmt.setString(4,WorderStkBeanObj.getLotSl());
pstmt.setString(5,WorderStkBeanObj.getSiteCode());
pstmt.setString(6,WorderStkBeanObj.getLocCode());
pstmt.setString(7,WorderStkBeanObj.getItemCode());*/
int i = pstmt.executeUpdate();
System.out.println("inv_alloc_det rows updated....................."+i);
pstmt.close();
pstmt = null;
}
......@@ -3343,7 +3562,8 @@ public String populateWorkOrderBill(Connection conn) throws Exception
pstmt.setString(4,WorderStkBeanObj.getLocCode());
pstmt.setString(5,WorderStkBeanObj.getLotNo());
pstmt.setString(6,WorderStkBeanObj.getLotSl());
pstmt.executeUpdate();
int i = pstmt.executeUpdate();
System.out.println("STOCK rows updated....................."+i);
pstmt.close();
pstmt = null;
......@@ -3415,8 +3635,8 @@ public String populateWorkOrderBill(Connection conn) throws Exception
pstmt = null;
sql = "Insert into inv_alloc_det (TRAN_ID,LINE_NO,SITE_CODE,ITEM_CODE,LOT_NO,LOT_SL,QUANTITY,REMARKS,"
+ "LOC_CODE,EXP_LEV,POTENCY_ADJ,ISSUE_QTY,ALLOC_QTY) "
+ "values (?,?,?,?,?, ?,?,?,?,?, ?,?,? )";
+ "LOC_CODE,EXP_LEV,POTENCY_ADJ,ALLOC_QTY) "
+ "values (?,?,?,?,?, ?,?,?,?,?, ?,? )";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranIDWorderMap.get(WorderStkBeanObj.getWorkOrder()));
pstmt.setInt(2, ++lineNo);
......@@ -3428,9 +3648,9 @@ public String populateWorkOrderBill(Connection conn) throws Exception
pstmt.setString(8,"Auto Reserve");//remarks
pstmt.setString(9, WorderStkBeanObj.getLocCode());//loc_code
pstmt.setString(10, WorderStkBeanObj.getExpLevel());//EXP_LEV
pstmt.setDouble(11, WorderStkBeanObj.getPotencyAdj());
pstmt.setDouble(12, WorderStkBeanObj.getAllocQty());//ISSUE_QTY check actual quantity (Pending)
pstmt.setDouble(13, WorderStkBeanObj.getAllocQty());//ALLOC_QTY check actual quantity (Pending)
pstmt.setDouble(11, WorderStkBeanObj.getQtyAdj());
//pstmt.setDouble(12, WorderStkBeanObj.getAllocQty());//ISSUE_QTY check actual quantity (Pending)
pstmt.setDouble(12, WorderStkBeanObj.getAllocQty());//ALLOC_QTY check actual quantity (Pending)
pstmt.executeUpdate();
pstmt.close();
......@@ -5009,7 +5229,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception
String workOrder = "",expLev = "";
firmPlanXMl.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
//firmPlanXMl.append("<workorders><work_order><exp_level>\r\n"); // Sneha
//firmPlanXMl.append("<workorders><work_order><exp_level>\r\n");
firmPlanXMl.append("<workorders><work_order>\r\n"); // Sneha
......@@ -5071,8 +5291,8 @@ public String populateWorkOrderBill(Connection conn) throws Exception
firmPlanXMl.append( "<mfg_ref><![CDATA[" ).append( tempDetailObj.getMfgRef() ).append( "]]></mfg_ref>\r\n" );
firmPlanXMl.append( "<min_req_qty><![CDATA[" ).append( tempDetailObj.getMinReqQty() ).append( "]]></min_req_qty>\r\n" );
firmPlanXMl.append( "<item_category><![CDATA[" ).append( tempDetailObj.getItemCategory() ).append( "]]></item_category>\r\n" );
firmPlanXMl.append( "<upd_qty><![CDATA[" ).append( tempDetailObj.getUpdQty() ).append( "]]></upd_qty>\r\n" );
firmPlanXMl.append( "<adjusted_qty><![CDATA[" ).append( tempDetailObj.getAdjustedQty() ).append( "]]></adjusted_qty>\r\n" );
firmPlanXMl.append( "<upd_qty><![CDATA[" ).append(Double.parseDouble(df.format(tempDetailObj.getUpdQty())) ).append( "]]></upd_qty>\r\n" );
firmPlanXMl.append( "<adjusted_qty><![CDATA[" ).append(Double.parseDouble(df.format(tempDetailObj.getAdjustedQty())) ).append( "]]></adjusted_qty>\r\n" );
firmPlanXMl.append( "<is_sufficient><![CDATA[" ).append( tempDetailObj.getSufficient() ).append( "]]></is_sufficient>\r\n" );
//firmPlanXMl.append( "</exp_level>\r\n");
......@@ -5108,7 +5328,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception
reserveStockXMl.append("<deallocated><![CDATA[" ).append( "" ).append( "]]></deallocated>\r\n" );
reserveStockXMl.append("<is_alternate><![CDATA[" ).append( tempObj.getAlternate() ).append( "]]></is_alternate>\r\n" );
reserveStockXMl.append("<tran_id><![CDATA[" ).append( tempObj.getReserveStkTranId() ).append( "]]></tran_id>\r\n" );
reserveStockXMl.append( "<upd_qty><![CDATA[" ).append( tempObj.getUpdQty() ).append( "]]></upd_qty>\r\n" );
reserveStockXMl.append( "<upd_qty><![CDATA[" ).append(Double.parseDouble(df.format(tempObj.getUpdQty())) ).append( "]]></upd_qty>\r\n" );
reserveStockXMl.append( "<qty_adj><![CDATA[" ).append( tempObj.getQtyAdj() ).append( "]]></qty_adj>\r\n" );
reserveStockXMl.append("<unit><![CDATA[" ).append( tempObj.getUnit() ).append( "]]></unit>\r\n" );
reserveStockXMl.append("</detail>");
......@@ -5143,7 +5363,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception
stockDetailXml.append("<alloc_qty><![CDATA[" ).append( Double.parseDouble(df.format( tempObj.getAllocQty())) ).append( "]]></alloc_qty>\r\n" );
stockDetailXml.append("<deallocated><![CDATA[" ).append( "" ).append( "]]></deallocated>\r\n" );
stockDetailXml.append("<is_alternate><![CDATA[" ).append( tempObj.getAlternate() ).append( "]]></is_alternate>\r\n" );
stockDetailXml.append( "<upd_qty><![CDATA[" ).append( tempObj.getUpdQty() ).append( "]]></upd_qty>\r\n" );
stockDetailXml.append( "<upd_qty><![CDATA[" ).append( Double.parseDouble(df.format(tempObj.getUpdQty())) ).append( "]]></upd_qty>\r\n" );
stockDetailXml.append( "<qty_adj><![CDATA[" ).append( tempObj.getQtyAdj() ).append( "]]></qty_adj>\r\n" );
stockDetailXml.append("<unit><![CDATA[" ).append( tempObj.getUnit() ).append( "]]></unit>\r\n" );
stockDetailXml.append("</detail>");
......@@ -5236,14 +5456,41 @@ public String populateWorkOrderBill(Connection conn) throws Exception
}
}*/
private void updateWorkorderStatus(String worder,Connection conn) throws Exception
{
PreparedStatement pstmt = null;
String sql = "";
sql = "update workorder set status = 'F' where work_order = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, worder);
int i = pstmt.executeUpdate();
System.out.println("updateWorkorderStatus------------>>"+i);
pstmt.close();
pstmt = null;
}
private void removeDataConsiderPartialAlt(String worder,String expLevel) throws Exception
{
System.out.println("In removeDataConsiderPartialAlt-------------------->>"+worder + " : "+expLevel);
ListIterator<WorderStkBean> itr = worderStkBeanList.listIterator();
while(itr.hasNext())
{
WorderStkBean stkObj = itr.next();
String worderTemp = stkObj.getWorkOrder();
if(worder.equals(stkObj.getWorkOrder()) && expLevel.equals(stkObj.getExpLevel()))
{
itr.remove();
}
}
}
private String displayStkBean( String hdr) throws Exception
{
System.out.println("In displayStkBean-------------------->>"+hdr);
System.out.println("In size-------------------->>"+worderStkBeanList.size());
// Iterator itr = worderStkBeanList.iterator();
Iterator itr = worderStkBeanList.iterator();
int count=0,count1 = 0;
/* if("H".equalsIgnoreCase(hdr))
if("H".equalsIgnoreCase(hdr))
{
while(itr.hasNext())
{
......@@ -5273,10 +5520,11 @@ public String populateWorkOrderBill(Connection conn) throws Exception
System.out.println("getLotNo------------>>["+worderStkBeanObj.getLotNo()+"]");
System.out.println("getLotSl------------>>["+worderStkBeanObj.getLotSl()+"]");
System.out.println("getStkQuantity------------>>["+worderStkBeanObj.getStkQuantity()+"]");
System.out.println("getAllocQty------------>>["+worderStkBeanObj.getAllocQty()+"]");
System.out.println("getAllocQty------------>>["+worderStkBeanObj.getAllocQty()+"]");
}
}*/
}
......@@ -5299,7 +5547,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception
System.out.println("getStkQuantity------------>>["+tempObj.getStkQuantity()+"]");
System.out.println("getAllocQty------------>>["+tempObj.getAllocQty()+"]");
}
}*/
}
for(WorkOrderDetailBean worderDetailBeanObj : workOrderBeanList)
{
......@@ -5323,7 +5571,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception
System.out.println("getStkQuantity------------>>["+tempObj.getStkQuantity()+"]");
System.out.println("getAllocQty------------>>["+tempObj.getAllocQty()+"]");
}
}
}*/
return "";
}
......
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