Commit 1e48f383 authored by manohar's avatar manohar

Few changes in xml generation and adjustment


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102261 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 40b367cb
...@@ -857,6 +857,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -857,6 +857,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
System.out.println("Checking for item_code="+detailMap.get("ITEM_CODE")+"in site="+suppSiteCode+"for quantity"+detailMap.get("QUANTITY")); System.out.println("Checking for item_code="+detailMap.get("ITEM_CODE")+"in site="+suppSiteCode+"for quantity"+detailMap.get("QUANTITY"));
System.out.println("worderExpLevSufficient before checkCurrentSiteStock ["+worderExpLevSufficient+"]"); System.out.println("worderExpLevSufficient before checkCurrentSiteStock ["+worderExpLevSufficient+"]");
System.out.println("@@checkForother before Current site detailMap@@ : "+detailMap); System.out.println("@@checkForother before Current site detailMap@@ : "+detailMap);
detailMap.put("IS_ALTERNATE", "N");
stockReturnMap = checkCurrentSiteStock(detailMap, conn);//Check for Other site stockReturnMap = checkCurrentSiteStock(detailMap, conn);//Check for Other site
System.out.println("@@checkForother after Current site stockReturnMap@@ : "+stockReturnMap); System.out.println("@@checkForother after Current site stockReturnMap@@ : "+stockReturnMap);
System.out.println("worderExpLevSufficient after checkCurrentSiteStock ["+worderExpLevSufficient+"]"); System.out.println("worderExpLevSufficient after checkCurrentSiteStock ["+worderExpLevSufficient+"]");
...@@ -1044,11 +1045,11 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1044,11 +1045,11 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
private String explodBomAndPopulateBean(ArrayList<String> workOrderList,Connection conn) throws ITMException,Exception private String explodBomAndPopulateBean(ArrayList<String> workOrderList,Connection conn) throws ITMException,Exception
{ {
System.out.println("iNSIDE EXPLODE bomMMMMMM"); System.out.println("iNSIDE EXPLODE bomMMMMMM");
ExplodeBom explodeBomObj = new ExplodeBom(); ExplodeBom explodeBomObj = null;
WorkOrderDetailBean worderDetailBeanObj = null; WorkOrderDetailBean worderDetailBeanObj = null;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat());
String xmlDataString = "",sql = "",itemCode = "",siteCode = "",bomCode = "",lineType = "B",considerPartialAlt = "", String xmlDataString = "",sql = "",itemCode = "",siteCode = "",bomCode = "",lineType = "B",considerPartialAlt = "",lineTypeBomDet = "",
childNodeName = null,itemDescr = ""; childNodeName = null,itemDescr = "";
double batchQty =0,qtyPer = 0,quantity = 0,minQty = 0,roundTo =0,minPotencyPerc = 0,balanceQty = 0; double batchQty =0,qtyPer = 0,quantity = 0,minQty = 0,roundTo =0,minPotencyPerc = 0,balanceQty = 0;
boolean isSufficient = false; boolean isSufficient = false;
...@@ -1070,6 +1071,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1070,6 +1071,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
int childNodeListLength = 0; int childNodeListLength = 0;
Document dom = null; Document dom = null;
Map<String,String>stockDetailMap = new HashMap<String,String>(); Map<String,String>stockDetailMap = new HashMap<String,String>();
StringBuffer xmlString = null;
//String retXMLStr = null;
try try
{ {
...@@ -1079,6 +1082,13 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1079,6 +1082,13 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
{ {
for(String tempWorkorder : workOrderList) for(String tempWorkorder : workOrderList)
{ {
itemCode = "";
siteCode = "";
quantity = 0;
dueDate =null;
bomCode = "";
worderType = "";
sql = "select item_code,site_code,quantity,bom_code,due_date,order_type from workorder where work_order = ?"; sql = "select item_code,site_code,quantity,bom_code,due_date,order_type from workorder where work_order = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tempWorkorder); pstmt.setString(1,tempWorkorder);
...@@ -1091,190 +1101,193 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1091,190 +1101,193 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
dueDate =rs.getTimestamp("due_date"); dueDate =rs.getTimestamp("due_date");
bomCode = checkNull(rs.getString("bom_code")); bomCode = checkNull(rs.getString("bom_code"));
worderType = checkNull(rs.getString("order_type"));//Changed by wasim on 29-03-2016 to get the order type worderType = checkNull(rs.getString("order_type"));//Changed by wasim on 29-03-2016 to get the order type
} simpleDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat());
rs.close(); dueDateStr = simpleDateFormat.format(dueDate);
rs = null; System.out.println("dueDateStr---->>["+dueDateStr+"]");
pstmt.close(); xmlString = null;
pstmt = null; xmlString = new StringBuffer("<Root>");
simpleDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat()); //retXMLStr = null;
dueDateStr = simpleDateFormat.format(dueDate); xmlDataString = "";
System.out.println("dueDateStr---->>["+dueDateStr+"]"); xmlString.append("<Detail>");
StringBuffer xmlString = new StringBuffer("<Root>"); xmlString.append("<work_order>").append("<![CDATA[").append(tempWorkorder).append("]]>").append("</work_order>");
String retXMLStr = null; xmlString.append("<site_code>").append("<![CDATA[").append(siteCode).append("]]>").append("</site_code>");
xmlString.append("<Detail>"); xmlString.append("<item_code>").append("<![CDATA[").append(itemCode).append("]]>").append("</item_code>");
xmlString.append("<work_order>").append("<![CDATA[").append(tempWorkorder).append("]]>").append("</work_order>"); xmlString.append("<line_type>").append("<![CDATA[").append(lineType).append("]]>").append("</line_type>");
xmlString.append("<site_code>").append("<![CDATA[").append(siteCode).append("]]>").append("</site_code>"); xmlString.append("<quantity>").append("<![CDATA[").append(quantity).append("]]>").append("</quantity>");
xmlString.append("<item_code>").append("<![CDATA[").append(itemCode).append("]]>").append("</item_code>"); xmlString.append("<bom_code>").append("<![CDATA[").append(bomCode).append("]]>").append("</bom_code>");
xmlString.append("<line_type>").append("<![CDATA[").append(lineType).append("]]>").append("</line_type>"); xmlString.append("<due_date>").append("<![CDATA[").append(dueDateStr).append("]]>").append("</due_date>");
xmlString.append("<quantity>").append("<![CDATA[").append(quantity).append("]]>").append("</quantity>"); xmlString.append("<mfg_lead_time>").append("<![CDATA[").append(mfgLeadTime).append("]]>").append("</mfg_lead_time>");
xmlString.append("<bom_code>").append("<![CDATA[").append(bomCode).append("]]>").append("</bom_code>"); xmlString.append("<qc_lead_time>").append("<![CDATA[").append(qcLeadTime).append("]]>").append("</qc_lead_time>");
xmlString.append("<due_date>").append("<![CDATA[").append(dueDateStr).append("]]>").append("</due_date>"); xmlString.append("</Detail>");
xmlString.append("<mfg_lead_time>").append("<![CDATA[").append(mfgLeadTime).append("]]>").append("</mfg_lead_time>"); xmlString.append("</Root>");
xmlString.append("<qc_lead_time>").append("<![CDATA[").append(qcLeadTime).append("]]>").append("</qc_lead_time>"); //make xml from workorder.
xmlString.append("</Detail>"); //Explod BOM. Use existing component
xmlString.append("</Root>"); System.out.println("Before explodebom xmlString [" + xmlString.toString()+"]");
//make xml from workorder. explodeBomObj = new ExplodeBom();
//Explod BOM. Use existing component xmlDataString = checkNull(explodeBomObj.explodeBom(xmlString.toString()).toString());
xmlDataString = checkNull(explodeBomObj.explodeBom(xmlString.toString()).toString()); explodeBomObj = null;
System.out.println("xmlDataString in getExplodBomDetails----->>["+xmlDataString+"]");
System.out.println("xmlDataString in getExplodBomDetails----->>["+xmlDataString+"]"); if(xmlDataString.length() > 0)
if(xmlDataString.length() > 0)
{
//read xmlDataString and set WorkorderBillBean bean variables.
dom = genericUtility.parseString(xmlDataString);
if(dom != null)
{ {
parentNodeList = dom.getElementsByTagName("Detail"); //read xmlDataString and set WorkorderBillBean bean variables.
childNodeListLength = parentNodeList.getLength(); dom = genericUtility.parseString(xmlDataString);
if(dom != null)
for (int ctr = 0; ctr < childNodeListLength; ctr++)
{ {
worderDetailBeanObj = new WorkOrderDetailBean(); parentNodeList = dom.getElementsByTagName("Detail");
childNodeListLength = parentNodeList.getLength();
childNode = parentNodeList.item(ctr); for (int ctr = 0; ctr < childNodeListLength; ctr++)
childNodeName = childNode.getNodeName();
if (childNode.getNodeType() == Node.ELEMENT_NODE)
{ {
Element eElement = (Element) childNode; worderDetailBeanObj = new WorkOrderDetailBean();
siteCode = checkNull(eElement.getElementsByTagName("site_code").item(0).getTextContent());
bomCode = checkNull(eElement.getElementsByTagName("bom_code").item(0).getTextContent()); childNode = parentNodeList.item(ctr);
itemCode = checkNull(eElement.getElementsByTagName("item_code").item(0).getTextContent()); childNodeName = childNode.getNodeName();
itemDescr = getColumnDescr(conn, "descr", "item", "item_code", itemCode); if (childNode.getNodeType() == Node.ELEMENT_NODE)
active = itemDescr = getColumnDescr(conn, "active", "item", "item_code", itemCode);
dueDateStr = checkNull(eElement.getElementsByTagName("due_date").item(0).getTextContent());
itemRef = checkNull(eElement.getElementsByTagName("item_Ref").item(0).getTextContent());
quantityRef = checkNull(eElement.getElementsByTagName("quantity_Ref").item(0).getTextContent());
quantityStr = checkNull(eElement.getElementsByTagName("quantity").item(0).getTextContent());
expLev = checkNull(eElement.getElementsByTagName("exp_lev").item(0).getTextContent());
operation = checkNull(eElement.getElementsByTagName("operation").item(0).getTextContent());
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());
reqType = checkNull(eElement.getElementsByTagName("req_type").item(0).getTextContent());
matchPotency = checkNull(eElement.getElementsByTagName("match_potency").item(0).getTextContent());
minPotencyPercStr = checkNull(eElement.getElementsByTagName("min_potency_perc").item(0).getTextContent());
adjPotency = checkNull(eElement.getElementsByTagName("adj_potency").item(0).getTextContent());
usageType = checkNull(eElement.getElementsByTagName("usage_type").item(0).getTextContent());
allocateType = checkNull(eElement.getElementsByTagName("allocate_type").item(0).getTextContent());
locUsageType = checkNull(eElement.getElementsByTagName("loc_usage_type").item(0).getTextContent());
considerLotNoIssue = checkNull(eElement.getElementsByTagName("consider_lot_no__issue").item(0).getTextContent());
itemActive = checkNull(eElement.getElementsByTagName("active").item(0).getTextContent());
minQtyStr = checkNull(eElement.getElementsByTagName("min_qty").item(0).getTextContent());
round = checkNull(eElement.getElementsByTagName("round").item(0).getTextContent());
roundToStr = checkNull(eElement.getElementsByTagName("round_to").item(0).getTextContent());
suppCodeMfg = checkNull(eElement.getElementsByTagName("supp_code__mfg").item(0).getTextContent());
useInvStatus = checkNull(eElement.getElementsByTagName("use_invstatus").item(0).getTextContent());
dimension = checkNull(eElement.getElementsByTagName("dimension").item(0).getTextContent());
mfgRef = checkNull(eElement.getElementsByTagName("mfg_ref").item(0).getTextContent());
minReqQtyStr = checkNull(eElement.getElementsByTagName("min_req_qty").item(0).getTextContent());
itemCategory = checkNull(eElement.getElementsByTagName("item_category").item(0).getTextContent());
/*int index = indexOfWorkorderBeanList(tempWorkorder,expLev);
System.out.println("index : "+index);
if(index > -1)
{
worderDetailBeanObj = workOrderBeanList.get(index);
worderDetailBeanObj.setQuantity(worderDetailBeanObj.getQuantity() + Double.valueOf(quantityStr.length() == 0 ? "0" : quantityStr));
workOrderBeanList.set(index, worderDetailBeanObj);
}
else
{*/
worderDetailBeanObj.setWorkOrder(tempWorkorder);
worderDetailBeanObj.setSiteCode(siteCode);
worderDetailBeanObj.setBomCode(bomCode);
worderDetailBeanObj.setItemCode(itemCode);
//worderDetailBeanObj.setItemDescr(itemDescr);
worderDetailBeanObj.setActive(active);
worderDetailBeanObj.setDueDate(dueDateStr);
worderDetailBeanObj.setItemRef(itemRef);
System.out.println("quantityStr----->>["+quantityStr+"]");
worderDetailBeanObj.setQuantityRef(quantityRef);
worderDetailBeanObj.setQuantity(Double.valueOf(quantityStr.length() == 0 ? "0" : quantityStr));
worderDetailBeanObj.setExpLev(expLev);
worderDetailBeanObj.setOperation(operationInt);
worderDetailBeanObj.setCritItem(critItem);
// 06-jun-16 manoharan add sufficient flag in list
if ("Y".equals(critItem))
{
isSufficient = false;
}
else
{ {
isSufficient = true; Element eElement = (Element) childNode;
} siteCode = checkNull(eElement.getElementsByTagName("site_code").item(0).getTextContent());
worderExpLevSufficient.put(worderDetailBeanObj.getWorkOrder()+":"+worderDetailBeanObj.getExpLev(), isSufficient); bomCode = checkNull(eElement.getElementsByTagName("bom_code").item(0).getTextContent());
// end 06-jun-16 manoharan add sufficient flag in list itemCode = checkNull(eElement.getElementsByTagName("item_code").item(0).getTextContent());
itemDescr = getColumnDescr(conn, "descr", "item", "item_code", itemCode);
active = itemDescr = getColumnDescr(conn, "active", "item", "item_code", itemCode);
dueDateStr = checkNull(eElement.getElementsByTagName("due_date").item(0).getTextContent());
itemRef = checkNull(eElement.getElementsByTagName("item_Ref").item(0).getTextContent());
quantityRef = checkNull(eElement.getElementsByTagName("quantity_Ref").item(0).getTextContent());
quantityStr = checkNull(eElement.getElementsByTagName("quantity").item(0).getTextContent());
expLev = checkNull(eElement.getElementsByTagName("exp_lev").item(0).getTextContent());
operation = checkNull(eElement.getElementsByTagName("operation").item(0).getTextContent());
operationInt = Integer.parseInt(operation.length() == 0 ? "0" : operation);
critItem = checkNull(eElement.getElementsByTagName("crit_Item").item(0).getTextContent());
lineTypeBomDet = 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());
reqType = checkNull(eElement.getElementsByTagName("req_type").item(0).getTextContent());
matchPotency = checkNull(eElement.getElementsByTagName("match_potency").item(0).getTextContent());
minPotencyPercStr = checkNull(eElement.getElementsByTagName("min_potency_perc").item(0).getTextContent());
adjPotency = checkNull(eElement.getElementsByTagName("adj_potency").item(0).getTextContent());
usageType = checkNull(eElement.getElementsByTagName("usage_type").item(0).getTextContent());
allocateType = checkNull(eElement.getElementsByTagName("allocate_type").item(0).getTextContent());
locUsageType = checkNull(eElement.getElementsByTagName("loc_usage_type").item(0).getTextContent());
considerLotNoIssue = checkNull(eElement.getElementsByTagName("consider_lot_no__issue").item(0).getTextContent());
itemActive = checkNull(eElement.getElementsByTagName("active").item(0).getTextContent());
minQtyStr = checkNull(eElement.getElementsByTagName("min_qty").item(0).getTextContent());
round = checkNull(eElement.getElementsByTagName("round").item(0).getTextContent());
roundToStr = checkNull(eElement.getElementsByTagName("round_to").item(0).getTextContent());
suppCodeMfg = checkNull(eElement.getElementsByTagName("supp_code__mfg").item(0).getTextContent());
useInvStatus = checkNull(eElement.getElementsByTagName("use_invstatus").item(0).getTextContent());
dimension = checkNull(eElement.getElementsByTagName("dimension").item(0).getTextContent());
mfgRef = checkNull(eElement.getElementsByTagName("mfg_ref").item(0).getTextContent());
minReqQtyStr = checkNull(eElement.getElementsByTagName("min_req_qty").item(0).getTextContent());
itemCategory = checkNull(eElement.getElementsByTagName("item_category").item(0).getTextContent());
/*int index = indexOfWorkorderBeanList(tempWorkorder,expLev);
System.out.println("index : "+index);
if(index > -1)
{
worderDetailBeanObj = workOrderBeanList.get(index);
worderDetailBeanObj.setQuantity(worderDetailBeanObj.getQuantity() + Double.valueOf(quantityStr.length() == 0 ? "0" : quantityStr));
workOrderBeanList.set(index, worderDetailBeanObj);
}
else
{*/
worderDetailBeanObj.setWorkOrder(tempWorkorder);
worderDetailBeanObj.setSiteCode(siteCode);
worderDetailBeanObj.setBomCode(bomCode);
worderDetailBeanObj.setItemCode(itemCode);
//worderDetailBeanObj.setItemDescr(itemDescr);
worderDetailBeanObj.setActive(active);
worderDetailBeanObj.setDueDate(dueDateStr);
worderDetailBeanObj.setItemRef(itemRef);
System.out.println("quantityStr----->>["+quantityStr+"]");
worderDetailBeanObj.setQuantityRef(quantityRef);
worderDetailBeanObj.setQuantity(Double.valueOf(quantityStr.length() == 0 ? "0" : quantityStr));
worderDetailBeanObj.setExpLev(expLev);
worderDetailBeanObj.setOperation(operationInt);
worderDetailBeanObj.setCritItem(critItem);
// 06-jun-16 manoharan add sufficient flag in list
if ("Y".equals(critItem))
{
isSufficient = false;
}
else
{
isSufficient = true;
}
worderExpLevSufficient.put(worderDetailBeanObj.getWorkOrder()+":"+worderDetailBeanObj.getExpLev(), isSufficient);
// end 06-jun-16 manoharan add sufficient flag in list
worderDetailBeanObj.setSuppCodeMfg(suppCodeMfg); worderDetailBeanObj.setSuppCodeMfg(suppCodeMfg);
worderDetailBeanObj.setUseInvStatus(useInvStatus); worderDetailBeanObj.setUseInvStatus(useInvStatus);
worderDetailBeanObj.setDimension(dimension); worderDetailBeanObj.setDimension(dimension);
worderDetailBeanObj.setMfgRef(mfgRef); worderDetailBeanObj.setMfgRef(mfgRef);
worderDetailBeanObj.setMinReqQty(Double.valueOf(minReqQtyStr.length() == 0 ? "0" : minReqQtyStr)); worderDetailBeanObj.setMinReqQty(Double.valueOf(minReqQtyStr.length() == 0 ? "0" : minReqQtyStr));
worderDetailBeanObj.setLineType(lineType); worderDetailBeanObj.setLineType(lineTypeBomDet);
worderDetailBeanObj.setUnit(unit); worderDetailBeanObj.setUnit(unit);
//Changed by wasim to set batch quantity as work order quantity //Changed by wasim to set batch quantity as work order quantity
System.out.println("Batch Quantity="+quantity); System.out.println("Batch Quantity="+quantity);
//worderDetailBeanObj.setBatchQty(Double.valueOf(batchQtyStr.length() == 0 ? "0" : batchQtyStr)); //worderDetailBeanObj.setBatchQty(Double.valueOf(batchQtyStr.length() == 0 ? "0" : batchQtyStr));
worderDetailBeanObj.setBatchQty(Double.valueOf(quantity)); worderDetailBeanObj.setBatchQty(Double.valueOf(quantity));
worderDetailBeanObj.setQtyPer(Double.valueOf(qtyPerStr.length() == 0 ? "0" : qtyPerStr)); worderDetailBeanObj.setQtyPer(Double.valueOf(qtyPerStr.length() == 0 ? "0" : qtyPerStr));
worderDetailBeanObj.setReqType(reqType); worderDetailBeanObj.setReqType(reqType);
worderDetailBeanObj.setMatchPotency(matchPotency); worderDetailBeanObj.setMatchPotency(matchPotency);
worderDetailBeanObj.setMinPotencyPerc(Double.valueOf(minPotencyPercStr.length() == 0 ? "0" : minPotencyPercStr)); worderDetailBeanObj.setMinPotencyPerc(Double.valueOf(minPotencyPercStr.length() == 0 ? "0" : minPotencyPercStr));
worderDetailBeanObj.setAdjPotency(adjPotency); worderDetailBeanObj.setAdjPotency(adjPotency);
worderDetailBeanObj.setUsageType(usageType); worderDetailBeanObj.setUsageType(usageType);
worderDetailBeanObj.setAllocateType(allocateType); worderDetailBeanObj.setAllocateType(allocateType);
worderDetailBeanObj.setLocUsageType(locUsageType); worderDetailBeanObj.setLocUsageType(locUsageType);
worderDetailBeanObj.setConsiderLotNoIssue(considerLotNoIssue); worderDetailBeanObj.setConsiderLotNoIssue(considerLotNoIssue);
worderDetailBeanObj.setItemActive(itemActive); worderDetailBeanObj.setItemActive(itemActive);
worderDetailBeanObj.setMinQty(Double.valueOf(minQtyStr.length() == 0 ? "0" : minQtyStr)); worderDetailBeanObj.setMinQty(Double.valueOf(minQtyStr.length() == 0 ? "0" : minQtyStr));
worderDetailBeanObj.setRound(round); worderDetailBeanObj.setRound(round);
worderDetailBeanObj.setRoundTo(Double.valueOf(roundToStr.length() == 0 ? "0" : roundToStr)); worderDetailBeanObj.setRoundTo(Double.valueOf(roundToStr.length() == 0 ? "0" : roundToStr));
worderDetailBeanObj.setItemCategory(itemCategory); worderDetailBeanObj.setItemCategory(itemCategory);
worderDetailBeanObj.setPotencyAdjQty(0); //later set on potency calculation. worderDetailBeanObj.setPotencyAdjQty(0); //later set on potency calculation.
worderDetailBeanObj.setConsiderPartialAlt(considerPartialAlt); worderDetailBeanObj.setConsiderPartialAlt(considerPartialAlt);
worderDetailBeanObj.setWorderType(worderType);//Changed by wasim to set workOrderType on 29-03-2016 worderDetailBeanObj.setWorderType(worderType);//Changed by wasim to set workOrderType on 29-03-2016
workOrderBeanList.add(worderDetailBeanObj); // All details workOrderBeanList.add(worderDetailBeanObj); // All details
} }
} //End dom for loop } //End dom for loop
}
else
{
System.out.println("dom is null please check................");
}
} }
else else
{ {
System.out.println("dom is null please check................"); //return error messages.
} }
}
else
{
//return error messages.
} }
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}//end workOrderList for }//end workOrderList for
...@@ -1320,7 +1333,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1320,7 +1333,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
int count1 = 0, cnt = 0, stkindex = -1; int count1 = 0, cnt = 0, stkindex = -1;
double finalAllocatedQty = 0, ItemStdPotency = 100, qtyPerArt = 0,finalAllocQty = 0,updQtyOriginal = 0; double finalAllocatedQty = 0, ItemStdPotency = 100, qtyPerArt = 0,finalAllocQty = 0,updQtyOriginal = 0;
Timestamp expDateWorkOrder = null; Timestamp expDateWorkOrder = null;
String trackShelfLifeFG = "",controlledYnFG = "",queryString = ""; String trackShelfLifeFG = "",controlledYnFG = "",queryString = "", balQtyStr = "0";
String sqlUpd = ""; String sqlUpd = "";
PreparedStatement pstmtUpd = null; PreparedStatement pstmtUpd = null;
ResultSet rsExpDate = null; ResultSet rsExpDate = null;
...@@ -1420,8 +1433,13 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1420,8 +1433,13 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
pstmt = null; pstmt = null;
System.out.println("in checkCurrentSiteStock detailMap["+detailMap +"]"); System.out.println("in checkCurrentSiteStock detailMap["+detailMap +"]");
balQtyStr = detailMap.get("BALANCE_QTY");
shortageQty = Double.parseDouble(detailMap.get("BALANCE_QTY")); if(balQtyStr == null || "null".equals(balQtyStr) || balQtyStr.trim().length() == 0)
{
balQtyStr = "0";
}
shortageQty = Double.parseDouble(balQtyStr);
System.out.println("shortageQty......................"+shortageQty); System.out.println("shortageQty......................"+shortageQty);
if(shortageQty> 0) if(shortageQty> 0)
{ {
...@@ -2283,159 +2301,180 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -2283,159 +2301,180 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
currentLotQty = worderStkBeanObj.getAllocQty();//allocated currentLotQty = worderStkBeanObj.getAllocQty();//allocated
System.out.println("***WorkOrder["+worderStkBeanObj.getWorkOrder()+"] and ExpLev["+worderStkBeanObj.getExpLevel()+"]"); System.out.println("***WorkOrder["+worderStkBeanObj.getWorkOrder()+"] and ExpLev["+worderStkBeanObj.getExpLevel()+"]");
System.out.println("***Main bomdet Quantity["+requiredStock+"] Available ["+availableStock+"] Current Lot Qty ["+currentLotQty+"] Balance ["+balance+"] Site code ["+worderStkBeanObj.getSiteCode()+"]"); System.out.println("***Main bomdet Quantity["+requiredStock+"] Available before ["+availableStock+"] Current Lot Qty ["+currentLotQty+"] Balance ["+balance+"] Site code ["+worderStkBeanObj.getSiteCode()+"]");
/*sql = "SELECT quantity - ALLOC_QTY FROM STOCK where item_code = ? and site_code = ? and loc_code = ? "
+" and lot_no = ? and lot_sl = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, worderStkBeanObj.getItemCode());
pstmt.setString(2, worderStkBeanObj.getSiteCode());
pstmt.setString(3, worderStkBeanObj.getLocCode());
pstmt.setString(4, worderStkBeanObj.getLotNo());
pstmt.setString(5, worderStkBeanObj.getLotSl());
rs = pstmt.executeQuery();
if(rs.next())
{
availableStock = rs.getDouble(1);
}
rs.close();
rs = null;
pstmt.close();
System.out.println("***Main bomdet Quantity["+requiredStock+"] Available after ["+availableStock+"]");
*/
if("Y".equalsIgnoreCase(matchPotency)) if("Y".equalsIgnoreCase(matchPotency))
{ {
ItemStdPotency = getItemStandardPotency(itemCode, conn); ItemStdPotency = getItemStandardPotency(itemCode, conn);
System.out.println("@@ItemCode["+itemCode+"] and @@ItemStdPotency="+ItemStdPotency); System.out.println("@@ItemCode["+itemCode+"] and @@ItemStdPotency="+ItemStdPotency);
//if(currentLotQty < balance) // if stock not sufficient //if(currentLotQty < balance) // if stock not sufficient
if(availableStock <= balance)//Changed by wasim on 18-04-2016 as discussion with manohar sir //if (availableStock > 0)
{ //{
if(availableStock <= balance)//Changed by wasim on 18-04-2016 as discussion with manohar sir
System.out.println("@@Not Sufficient-->currentLotQty ["+currentLotQty+"] stkPotencyPerc ["+stkPotencyPerc+"] ItemStdPotency ["+ItemStdPotency+"]");
potencyAdj = currentLotQty - (currentLotQty * stkPotencyPerc / ItemStdPotency);
potencyAdj = Double.parseDouble(df.format(potencyAdj));//0.200
System.out.println("After calculating potencyAdj NOT SUFFICIENT----->>["+potencyAdj+"]");
currntEqualQty = Double.parseDouble(df.format(currentLotQty - potencyAdj)) ; //4-0.2 = 3.8
balance = Double.parseDouble(df.format(balance - currntEqualQty)); //6-3.8 = 2.2
worderStkBeanObj.setPotencyAdj(Double.parseDouble(df.format(potencyAdj)));
///////////////////////////////worderStkBeanObj.setQuantity(currntEqualQty);
worderStkBeanObj.setQtyAdj(Double.parseDouble(df.format(potencyAdj)));
balance = Double.parseDouble(df.format(balance));
//worderStkBeanObj.setAllocQty(Double.parseDouble(df.format(balance)));//Changed by wasim on 18-04-2014
//updQty = worderStkBeanObj.getAllocQty() + potencyAdj;
//worderStkBeanObj.setAllocQty(updQty);
System.out.println("manohar before .setQuantity 3["+worderStkBeanObj.getQuantity()+"]");
worderStkBeanObj.setQuantity(currntEqualQty);
System.out.println("manohar after .setQuantity 3["+worderStkBeanObj.getQuantity()+"]");
worderStkBeanObj.setAllocQty(currentLotQty); // 09-mar-16 manoharan added if stock not sufficient full stock of the lot is allocated
worderStkBeanObj.setUpdQty(currentLotQty);
if(potencyAdjMapY.containsKey(adjPotency) )
{
potencyAdjMapY.put(adjPotency, (potencyAdjMapY.get(adjPotency) + potencyAdj ));
}
else
{
potencyAdjMapY.put(adjPotency, potencyAdj );
}
worderStkBeanList.set(innerCtr, worderStkBeanObj);
System.out.println("Final Balance="+balance);
if(balance > 0)
{
System.out.print("Balance > 0 [" + balance + "] worderStkBeanList.size() [" + worderStkBeanList.size() + "] innerCtr [" + innerCtr +"]" );
if (worderStkBeanList.size() > innerCtr +1)
{
WorderStkBean worderStkBeanObjNext = (WorderStkBean) worderStkBeanList.get(innerCtr+1);
if(
(worderStkBeanObj.getWorkOrder().equals(worderStkBeanObjNext.getWorkOrder())) &&
(worderStkBeanObj.getExpLevel().equals(worderStkBeanObjNext.getExpLevel()))
)
{
System.out.print("Workorder and explev more stock bean exist in list continue with next for further calculation");
continue;
}
}
}
}
else // if stock sufficient
{
System.out.println("@@Sufficient--> balance["+balance+"] stkPotencyPerc ["+stkPotencyPerc+"] ItemStdPotency ["+ItemStdPotency+"]");
potencyAdj = ( balance /stkPotencyPerc * ItemStdPotency) - balance;
potencyAdj = Double.parseDouble(df.format(potencyAdj));
System.out.println("After calculating potencyAdj SUFFICIENT before ----->>["+potencyAdj+"]");
worderStkBeanObj.setQtyAdj(Double.parseDouble(df.format(potencyAdj)));
System.out.println("After calculating potencyAdj SUFFICIENT after ----->>["+potencyAdj+"]");
//updQty = worderStkBeanObj.getAllocQty() + potencyAdj; // 03-jun-16 manoharan commented
updQty = balance + potencyAdj; // 03-jun-16 manoharan added
updQty = Double.parseDouble(df.format(updQty));
System.out.println("manohar before potencyAdj [" + potencyAdj + "] updQty [" + updQty + "] .setQuantity 4["+worderStkBeanObj.getQuantity()+"] .getAllocQty [" + worderStkBeanObj.getAllocQty()+ "].setPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .setQtyAdj[" + worderStkBeanObj.getQtyAdj() + "]" );
worderStkBeanObj.setQuantity(balance);
worderStkBeanObj.setQtyAdj(potencyAdj);
worderStkBeanObj.setPotencyAdj(potencyAdj);
if (availableStock >= updQty) // 03-jun-16 manoharan stock available in same lot
{
System.out.println("updQty - getAllocQty [" + Double.parseDouble(df.format((updQty - worderStkBeanObj.getAllocQty()))) + "]");
//stockAllocMap.put("ALLOC_QTY",""+potencyAdj); // 03-jun-16 manoharan commented
stockAllocMap.put("ALLOC_QTY",""+ Double.parseDouble(df.format((updQty - worderStkBeanObj.getAllocQty())))); // 03-jun-16 manoharan added
stockAllocMap.put("LOC_CODE", worderStkBeanObj.getLocCode());
stockAllocMap.put("ITEM_CODE",worderStkBeanObj.getItemCode());
stockAllocMap.put("SITE_CODE",worderStkBeanObj.getSiteCode());
stockAllocMap.put("LOT_NO",worderStkBeanObj.getLotNo());
stockAllocMap.put("LOT_SL",worderStkBeanObj.getLotSl());
allocRetStr = updateStockAllocQty(stockAllocMap,conn);
System.out.println("allocRetStr :"+allocRetStr);
worderStkBeanObj.setAllocQty(updQty); // 2 + 0.244 = 2.244
worderStkBeanObj.setUpdQty(updQty);
worderStkBeanObj.setStockSufficient("Y");
worderExpLevSufficient.put(worderStkBeanObj.getWorkOrder()+":"+worderStkBeanObj.getExpLevel(), true);
updateWoBeanSufficient(worderStkBeanObj.getWorkOrder(), worderStkBeanObj.getExpLevel(), "Y");
System.out.println("manohar after potencyAdj [" + potencyAdj + "] updQty [" + updQty + "] .setQuantity 4["+worderStkBeanObj.getQuantity()+"] .getAllocQty [" + worderStkBeanObj.getAllocQty()+ "].setPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .setQtyAdj[" + worderStkBeanObj.getQtyAdj() + "]" );
worderStkBeanList.set(innerCtr, worderStkBeanObj);
if(potencyAdjMapY.containsKey(adjPotency) )
{
potencyAdjMapY.put(adjPotency, Double.parseDouble(df.format((potencyAdjMapY.get(adjPotency) + potencyAdj ))) );
}
else
{
potencyAdjMapY.put(adjPotency, potencyAdj );
}
balance = 0;
worderExpLevSufficient.put(worderStkBeanObj.getWorkOrder()+":"+worderStkBeanObj.getExpLevel(), true);
updateWoBeanSufficient(worderStkBeanObj.getWorkOrder(), worderStkBeanObj.getExpLevel(), "Y");
}
else
{ {
potencyAdj = Double.parseDouble(df.format((potencyAdj - (updQty - availableStock)))) ;
stockAllocMap.put("ALLOC_QTY",""+potencyAdj);
stockAllocMap.put("LOC_CODE", worderStkBeanObj.getLocCode());
stockAllocMap.put("ITEM_CODE",worderStkBeanObj.getItemCode());
stockAllocMap.put("SITE_CODE",worderStkBeanObj.getSiteCode());
stockAllocMap.put("LOT_NO",worderStkBeanObj.getLotNo());
stockAllocMap.put("LOT_SL",worderStkBeanObj.getLotSl());
allocRetStr = updateStockAllocQty(stockAllocMap,conn);
System.out.println("allocRetStr :"+allocRetStr); System.out.println("@@Not Sufficient-->currentLotQty ["+currentLotQty+"] stkPotencyPerc ["+stkPotencyPerc+"] ItemStdPotency ["+ItemStdPotency+"]");
updQty = worderStkBeanObj.getAllocQty() + potencyAdj;
updQty = Double.parseDouble(df.format(updQty)); potencyAdj = currentLotQty - (currentLotQty * stkPotencyPerc / ItemStdPotency);
worderStkBeanObj.setAllocQty(updQty); potencyAdj = Double.parseDouble(df.format(potencyAdj));//0.200
worderStkBeanObj.setUpdQty(updQty); System.out.println("After calculating potencyAdj NOT SUFFICIENT----->>["+potencyAdj+"]");
worderStkBeanObj.setStockSufficient("N");
worderExpLevSufficient.put(worderStkBeanObj.getWorkOrder()+":"+worderStkBeanObj.getExpLevel(), false);
updateWoBeanSufficient(worderStkBeanObj.getWorkOrder(), worderStkBeanObj.getExpLevel(), "N");
worderStkBeanObj.setQtyAdj(potencyAdj);//wasim on 13-04-2016
worderStkBeanObj.setPotencyAdj(potencyAdj);//wasim on 13-04-2016
System.out.println("manohar after .setQuantity 4["+worderStkBeanObj.getQuantity()+"] .setPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .setQtyAdj[" + worderStkBeanObj.getQtyAdj() + "]" );
worderStkBeanList.set(innerCtr, worderStkBeanObj);
if(potencyAdjMapY.containsKey(adjPotency) ) currntEqualQty = Double.parseDouble(df.format(currentLotQty - potencyAdj)) ; //4-0.2 = 3.8
{
potencyAdjMapY.put(adjPotency, Double.parseDouble(df.format((potencyAdjMapY.get(adjPotency) + potencyAdj ))) ); balance = Double.parseDouble(df.format(balance - currntEqualQty)); //6-3.8 = 2.2
}
else worderStkBeanObj.setPotencyAdj(Double.parseDouble(df.format(potencyAdj)));
{ ///////////////////////////////worderStkBeanObj.setQuantity(currntEqualQty);
potencyAdjMapY.put(adjPotency, potencyAdj ); worderStkBeanObj.setQtyAdj(Double.parseDouble(df.format(potencyAdj)));
} balance = Double.parseDouble(df.format(balance));
//worderStkBeanObj.setAllocQty(Double.parseDouble(df.format(balance)));//Changed by wasim on 18-04-2014
//updQty = worderStkBeanObj.getAllocQty() + potencyAdj;
balance = Double.parseDouble(df.format(updQty - availableStock)) ; //worderStkBeanObj.setAllocQty(updQty);
System.out.println("manohar before .setQuantity 3["+worderStkBeanObj.getQuantity()+"]");
worderStkBeanObj.setQuantity(currntEqualQty);
System.out.println("manohar after .setQuantity 3["+worderStkBeanObj.getQuantity()+"]");
worderStkBeanObj.setAllocQty(currentLotQty); // 09-mar-16 manoharan added if stock not sufficient full stock of the lot is allocated
worderStkBeanObj.setUpdQty(currentLotQty);
if(potencyAdjMapY.containsKey(adjPotency) )
{
potencyAdjMapY.put(adjPotency, (potencyAdjMapY.get(adjPotency) + potencyAdj ));
}
else
{
potencyAdjMapY.put(adjPotency, potencyAdj );
}
worderStkBeanList.set(innerCtr, worderStkBeanObj);
System.out.println("Final Balance="+balance);
if(balance > 0)
{
System.out.print("Balance > 0 [" + balance + "] worderStkBeanList.size() [" + worderStkBeanList.size() + "] innerCtr [" + innerCtr +"]" );
if (worderStkBeanList.size() > innerCtr +1)
{
WorderStkBean worderStkBeanObjNext = (WorderStkBean) worderStkBeanList.get(innerCtr+1);
if(
(worderStkBeanObj.getWorkOrder().equals(worderStkBeanObjNext.getWorkOrder())) &&
(worderStkBeanObj.getExpLevel().equals(worderStkBeanObjNext.getExpLevel()))
)
{
System.out.print("Workorder and explev more stock bean exist in list continue with next for further calculation");
continue;
}
}
}
} }
else // if stock sufficient
{
System.out.println("@@Sufficient--> balance["+balance+"] stkPotencyPerc ["+stkPotencyPerc+"] ItemStdPotency ["+ItemStdPotency+"]");
potencyAdj = ( balance /stkPotencyPerc * ItemStdPotency) - balance;
potencyAdj = Double.parseDouble(df.format(potencyAdj));
System.out.println("After calculating potencyAdj SUFFICIENT before ----->>["+potencyAdj+"]");
worderStkBeanObj.setQtyAdj(Double.parseDouble(df.format(potencyAdj)));
System.out.println("After calculating potencyAdj SUFFICIENT after ----->>["+potencyAdj+"]");
//updQty = worderStkBeanObj.getAllocQty() + potencyAdj; // 03-jun-16 manoharan commented
updQty = balance + potencyAdj; // 03-jun-16 manoharan added
updQty = Double.parseDouble(df.format(updQty));
System.out.println("manohar before potencyAdj [" + potencyAdj + "] updQty [" + updQty + "] .setQuantity 4["+worderStkBeanObj.getQuantity()+"] .getAllocQty [" + worderStkBeanObj.getAllocQty()+ "].setPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .setQtyAdj[" + worderStkBeanObj.getQtyAdj() + "]" );
worderStkBeanObj.setQuantity(balance);
worderStkBeanObj.setQtyAdj(potencyAdj);
worderStkBeanObj.setPotencyAdj(potencyAdj);
if (availableStock >= updQty) // 03-jun-16 manoharan stock available in same lot
{
System.out.println("updQty - getAllocQty [" + Double.parseDouble(df.format((updQty - worderStkBeanObj.getAllocQty()))) + "]");
//stockAllocMap.put("ALLOC_QTY",""+potencyAdj); // 03-jun-16 manoharan commented
stockAllocMap.put("ALLOC_QTY",""+ Double.parseDouble(df.format((updQty - worderStkBeanObj.getAllocQty())))); // 03-jun-16 manoharan added
stockAllocMap.put("LOC_CODE", worderStkBeanObj.getLocCode());
stockAllocMap.put("ITEM_CODE",worderStkBeanObj.getItemCode());
stockAllocMap.put("SITE_CODE",worderStkBeanObj.getSiteCode());
stockAllocMap.put("LOT_NO",worderStkBeanObj.getLotNo());
stockAllocMap.put("LOT_SL",worderStkBeanObj.getLotSl());
allocRetStr = updateStockAllocQty(stockAllocMap,conn);
System.out.println("allocRetStr :"+allocRetStr);
worderStkBeanObj.setAllocQty(updQty); // 2 + 0.244 = 2.244
worderStkBeanObj.setUpdQty(updQty);
worderStkBeanObj.setStockSufficient("Y");
worderExpLevSufficient.put(worderStkBeanObj.getWorkOrder()+":"+worderStkBeanObj.getExpLevel(), true);
updateWoBeanSufficient(worderStkBeanObj.getWorkOrder(), worderStkBeanObj.getExpLevel(), "Y");
System.out.println("manohar after potencyAdj [" + potencyAdj + "] updQty [" + updQty + "] .setQuantity 4["+worderStkBeanObj.getQuantity()+"] .getAllocQty [" + worderStkBeanObj.getAllocQty()+ "].setPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .setQtyAdj[" + worderStkBeanObj.getQtyAdj() + "]" );
worderStkBeanList.set(innerCtr, worderStkBeanObj);
if(potencyAdjMapY.containsKey(adjPotency) )
{
potencyAdjMapY.put(adjPotency, Double.parseDouble(df.format((potencyAdjMapY.get(adjPotency) + potencyAdj ))) );
}
else
{
potencyAdjMapY.put(adjPotency, potencyAdj );
}
balance = 0;
worderExpLevSufficient.put(worderStkBeanObj.getWorkOrder()+":"+worderStkBeanObj.getExpLevel(), true);
updateWoBeanSufficient(worderStkBeanObj.getWorkOrder(), worderStkBeanObj.getExpLevel(), "Y");
}//End }
else
{
potencyAdj = Double.parseDouble(df.format((potencyAdj - (updQty - availableStock)))) ;
stockAllocMap.put("ALLOC_QTY",""+potencyAdj);
stockAllocMap.put("LOC_CODE", worderStkBeanObj.getLocCode());
stockAllocMap.put("ITEM_CODE",worderStkBeanObj.getItemCode());
stockAllocMap.put("SITE_CODE",worderStkBeanObj.getSiteCode());
stockAllocMap.put("LOT_NO",worderStkBeanObj.getLotNo());
stockAllocMap.put("LOT_SL",worderStkBeanObj.getLotSl());
allocRetStr = updateStockAllocQty(stockAllocMap,conn);
System.out.println("allocRetStr :"+allocRetStr);
updQty = worderStkBeanObj.getAllocQty() + potencyAdj;
updQty = Double.parseDouble(df.format(updQty));
worderStkBeanObj.setAllocQty(updQty);
worderStkBeanObj.setUpdQty(updQty);
worderStkBeanObj.setStockSufficient("N");
worderExpLevSufficient.put(worderStkBeanObj.getWorkOrder()+":"+worderStkBeanObj.getExpLevel(), false);
updateWoBeanSufficient(worderStkBeanObj.getWorkOrder(), worderStkBeanObj.getExpLevel(), "N");
worderStkBeanObj.setQtyAdj(potencyAdj);//wasim on 13-04-2016
worderStkBeanObj.setPotencyAdj(potencyAdj);//wasim on 13-04-2016
System.out.println("manohar after .setQuantity 4["+worderStkBeanObj.getQuantity()+"] .setPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .setQtyAdj[" + worderStkBeanObj.getQtyAdj() + "]" );
worderStkBeanList.set(innerCtr, worderStkBeanObj);
if(potencyAdjMapY.containsKey(adjPotency) )
{
potencyAdjMapY.put(adjPotency, Double.parseDouble(df.format((potencyAdjMapY.get(adjPotency) + potencyAdj ))) );
}
else
{
potencyAdjMapY.put(adjPotency, potencyAdj );
}
balance = Double.parseDouble(df.format(updQty - availableStock)) ;
}
}//End
//}
System.out.println("manohar after potency calculation balance 44["+balance+"]" ); System.out.println("manohar after potency calculation balance 44["+balance+"]" );
if(balance > 0) if(balance > 0)
{ {
...@@ -2784,13 +2823,13 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -2784,13 +2823,13 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
} }
} }
} }
else //else
{ //{
System.out.println("allocated stock is sufficient after potency adjustment [" + workOrderPotency+ "] expLevelNew [" + expLevelNew+"]"); // System.out.println("allocated stock is sufficient after potency adjustment [" + workOrderPotency+ "] expLevelNew [" + expLevelNew+"]");
worderExpLevSufficient.put(workOrderPotency+":"+expLevelNew, true); // worderExpLevSufficient.put(workOrderPotency+":"+expLevelNew, true);
updateWoBeanSufficient(workOrderPotency, expLevelNew, "Y"); // updateWoBeanSufficient(workOrderPotency, expLevelNew, "Y");
//
} //}
} }
else else
{ {
...@@ -2836,7 +2875,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -2836,7 +2875,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
detailMap.put("STOCK_DETAIL", "Y"); detailMap.put("STOCK_DETAIL", "Y");
detailMap.put("MIN_QTY_REQ", String.valueOf(worderDetailBeanObj.getMinReqQty())); detailMap.put("MIN_QTY_REQ", String.valueOf(worderDetailBeanObj.getMinReqQty()));
//detailMap.put("BALANCE_QTY",potencyAdjExpLev+""); detailMap.put("BALANCE_QTY","0");
isReallocation = true; // 09-mar-16 manoharan reallocation templist to be populated isReallocation = true; // 09-mar-16 manoharan reallocation templist to be populated
//checkCurrentSiteStock(detailMap,conn); // 09-mar-16 manoharan commented return value to be captured and checked //checkCurrentSiteStock(detailMap,conn); // 09-mar-16 manoharan commented return value to be captured and checked
detailMap.put("PACK_LOT_NO", lotNoIssue); detailMap.put("PACK_LOT_NO", lotNoIssue);
......
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