Commit acb70c75 authored by manohar's avatar manohar

Changes related to other site, rounding and min required stock


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101962 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0991f4a4
...@@ -21,6 +21,7 @@ import java.sql.SQLException; ...@@ -21,6 +21,7 @@ import java.sql.SQLException;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import ibase.webitm.ejb.mfg.MfgCommon;
import javax.ejb.Stateless; import javax.ejb.Stateless;
...@@ -262,7 +263,7 @@ public class WoFirmplanIC extends ValidatorEJB implements WoFirmplanICLocal, WoF ...@@ -262,7 +263,7 @@ public class WoFirmplanIC extends ValidatorEJB implements WoFirmplanICLocal, WoF
// method for item change // method for item change
public String itemChanged(Document dom, Document dom1, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException public String itemChanged(Document dom, Document dom1, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException
{ {
String childNodeName = null; String childNodeName = null,leastExpdtActivRm = "N";
StringBuffer valueXmlString = new StringBuffer(); StringBuffer valueXmlString = new StringBuffer();
int ctr = 0; int ctr = 0;
NodeList parentNodeList = null; NodeList parentNodeList = null;
...@@ -284,6 +285,7 @@ public class WoFirmplanIC extends ValidatorEJB implements WoFirmplanICLocal, WoF ...@@ -284,6 +285,7 @@ public class WoFirmplanIC extends ValidatorEJB implements WoFirmplanICLocal, WoF
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
String sysDate = sdf.format(currentDate.getTime()); String sysDate = sdf.format(currentDate.getTime());
System.out.println("Now the date is :=> " + sysDate); System.out.println("Now the date is :=> " + sysDate);
MfgCommon mfgCommon = new MfgCommon();
//Changed by Poonam Gole for changing connection object :Start //Changed by Poonam Gole for changing connection object :Start
//conn = connDriver.getConnectDB("DriverITM"); //conn = connDriver.getConnectDB("DriverITM");
...@@ -329,9 +331,16 @@ public class WoFirmplanIC extends ValidatorEJB implements WoFirmplanICLocal, WoF ...@@ -329,9 +331,16 @@ public class WoFirmplanIC extends ValidatorEJB implements WoFirmplanICLocal, WoF
{ {
campgnNo = checkNull(genericUtility.getColumnValue("campgn_no", dom)); campgnNo = checkNull(genericUtility.getColumnValue("campgn_no", dom));
workOrder = checkNull(genericUtility.getColumnValue("work_order", dom)); workOrder = checkNull(genericUtility.getColumnValue("work_order", dom));
leastExpdtActivRm = mfgCommon.getEnvMfg("999999", "LEAST_EXPDT_ACTIVE_R", conn);
if ("NULLFOUND".equals(leastExpdtActivRm))
{
leastExpdtActivRm = "N";
}
System.out.println(" Itemchanged called for [" + currentColumn + "] ==> [" + columnValue + "] campgnNo [" + campgnNo + "] workOrder [" + workOrder + "]"); System.out.println(" Itemchanged called for [" + currentColumn + "] ==> [" + columnValue + "] campgnNo [" + campgnNo + "] workOrder [" + workOrder + "]");
valueXmlString.append("<campgn_no protect = \"0\">").append("<![CDATA[" + campgnNo + "]]>").append("</campgn_no>"); valueXmlString.append("<campgn_no protect = \"0\">").append("<![CDATA[" + campgnNo + "]]>").append("</campgn_no>");
valueXmlString.append("<work_order protect = \"0\">").append("<![CDATA[" + workOrder + "]]>").append("</work_order>"); valueXmlString.append("<work_order protect = \"0\">").append("<![CDATA[" + workOrder + "]]>").append("</work_order>");
valueXmlString.append("<least_expdt_active_rm protect = \"1\">").append("<![CDATA[" + leastExpdtActivRm + "]]>").append("</least_expdt_active_rm>");
/*if ( campgnNo != null && !"null".equals(campgnNo) && campgnNo.trim().length() > 0 ) /*if ( campgnNo != null && !"null".equals(campgnNo) && campgnNo.trim().length() > 0 )
{ {
valueXmlString.append("<work_order protect = \"1\">").append("<![CDATA[ ]]>").append("</work_order>"); valueXmlString.append("<work_order protect = \"1\">").append("<![CDATA[ ]]>").append("</work_order>");
......
...@@ -150,7 +150,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -150,7 +150,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
Map<String,Double>potencyAdjMapY = null; Map<String,Double>potencyAdjMapY = null;
Map<String,Double>potencyAdjMapN = null; Map<String,Double>potencyAdjMapN = null;
Map<String,Double> AdjPotencyExplevQtyMap = null; Map<String,Double> AdjPotencyExplevQtyMap = null;
String leastExpdtActivRm = "";
public String process() throws RemoteException,ITMException public String process() throws RemoteException,ITMException
{ {
return ""; return "";
...@@ -232,7 +232,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -232,7 +232,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
//GenericUtility genericUtility =GenericUtility.getInstance(); //GenericUtility genericUtility =GenericUtility.getInstance();
E12GenericUtility genericUtility= new E12GenericUtility(); E12GenericUtility genericUtility= new E12GenericUtility();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
String sql ="", workOrder = "",campgnNo = "",leastExpdtActivRm = "",errString = "", potencyRetStr="", String sql ="", workOrder = "",campgnNo = "",errString = "", potencyRetStr="",
errorCodeRet = ""; errorCodeRet = "";
double balanceQty = 0; double balanceQty = 0;
boolean isSufficient = false; boolean isSufficient = false;
...@@ -262,9 +262,16 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -262,9 +262,16 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
connDriver = null; connDriver = null;
workOrder = checkNull(genericUtility.getColumnValue("work_order",headerDom)); workOrder = checkNull(genericUtility.getColumnValue("work_order",headerDom));
campgnNo = checkNull(genericUtility.getColumnValue("campgn_no",headerDom)); campgnNo = checkNull(genericUtility.getColumnValue("campgn_no",headerDom));
//leastExpdtActivRm = checkNull(genericUtility.getColumnValue("least_expdt_active_rm",headerDom)); MfgCommon mfgCommon = new MfgCommon();
this.leastExpdtActivRm = mfgCommon.getEnvMfg("999999", "LEAST_EXPDT_ACTIVE_R", conn);
if ("NULLFOUND".equals(leastExpdtActivRm))
{
leastExpdtActivRm = "N";
}
//this.leastExpdtActivRm = checkNull(genericUtility.getColumnValue("least_expdt_active_rm",headerDom));
System.out.println("workOrder----->>["+workOrder+"] campgnNo---->>["+campgnNo+"]"); System.out.println("workOrder----->>["+workOrder+"] campgnNo---->>["+campgnNo+"]");
//System.out.println("leastExpdtActivRm----->>["+leastExpdtActivRm+"]"); System.out.println("leastExpdtActivRm----->>["+this.leastExpdtActivRm+"]");
if(workOrder.length() > 0 || campgnNo.length() > 0) if(workOrder.length() > 0 || campgnNo.length() > 0)
{ {
...@@ -524,20 +531,20 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -524,20 +531,20 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
count++; count++;
System.out.println("["+tempWorderObj.getItemCode()+"] item main workorder xml -------------->>"+count + " Exp lev..."+tempWorderObj.getExpLev()); System.out.println("["+tempWorderObj.getItemCode()+"] item main workorder xml -------------->>"+count + " Exp lev..."+tempWorderObj.getExpLev());
sql = "select iss_criteria,controlled_yn from item where item_code = ? "; sql = "select iss_criteria from item where item_code = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tempWorderObj.getItemCode()); pstmt.setString(1, tempWorderObj.getItemCode());
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if(rs.next()) if(rs.next())
{ {
issCriteria = checkNull(rs.getString("iss_criteria")); issCriteria = checkNull(rs.getString("iss_criteria"));
controlledYn = checkNull(rs.getString("controlled_yn"));
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
sql = "select loc_group, lot_no__issue from workorder where work_order = ?"; sql = "select w.loc_group, w.lot_no__issue, i.controlled_yn from workorder w, item i where w.item_code = i.item_code and w.work_order = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tempWorderObj.getWorkOrder()); pstmt.setString(1, tempWorderObj.getWorkOrder());
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -545,6 +552,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -545,6 +552,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
{ {
locGroup = checkNull(rs.getString(1)); locGroup = checkNull(rs.getString(1));
lotNoIssue = checkNull(rs.getString(2)); lotNoIssue = checkNull(rs.getString(2));
controlledYn = checkNull(rs.getString("controlled_yn"));
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -614,14 +622,14 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -614,14 +622,14 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
System.out.println("CONSIDER_PARTIAL_ALT in checkReserveStock................."); System.out.println("CONSIDER_PARTIAL_ALT in checkReserveStock.................");
balanceQty = Double.parseDouble(stockReturnMap.get("BALANCE_QTY")); balanceQty = Double.parseDouble(stockReturnMap.get("BALANCE_QTY"));
errorCodeRet = stockReturnMap.get("ERROR_CODE"); errorCodeRet = stockReturnMap.get("ERROR_CODE");
if ("Y".equalsIgnoreCase(tempWorderObj.getCritItem())) //if ("Y".equalsIgnoreCase(tempWorderObj.getCritItem()))
{ //{
isSufficient = Boolean.parseBoolean(stockReturnMap.get("IS_SUFFICIENT")); isSufficient = Boolean.parseBoolean(stockReturnMap.get("IS_SUFFICIENT"));
} //}
else //else
{ //{
isSufficient = true; // isSufficient = true;
} //}
System.out.println("6@@@IS_SUFFICIENT"+isSufficient); System.out.println("6@@@IS_SUFFICIENT"+isSufficient);
if(balanceQty > 0) if(balanceQty > 0)
{ {
...@@ -757,7 +765,9 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -757,7 +765,9 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
if(!"O".equalsIgnoreCase(detailMap.get("ALLOCATE_TYPE")) && !isSufficient) if(!"O".equalsIgnoreCase(detailMap.get("ALLOCATE_TYPE")) && !isSufficient)
{ {
System.out.println("----------------start alternate item-----------------------------for"+detailMap.get("ITEM_CODE")); System.out.println("----------------start alternate item-----------------------------for"+detailMap.get("ITEM_CODE"));
System.out.println("@@checkForAlternateItem before Current site @@ : "+stockReturnMap);
detailMap.put("BALANCE_QTY", String.valueOf(balanceQty) ); detailMap.put("BALANCE_QTY", String.valueOf(balanceQty) );
System.out.println("@@checkForAlternateItem after Current site @@ : "+detailMap);
System.out.println("worderExpLevSufficient before checkForAlternateItem ["+worderExpLevSufficient+"]"); System.out.println("worderExpLevSufficient before checkForAlternateItem ["+worderExpLevSufficient+"]");
stockReturnMap = checkForAlternateItem(detailMap, conn); stockReturnMap = checkForAlternateItem(detailMap, conn);
...@@ -845,7 +855,9 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -845,7 +855,9 @@ 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);
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("worderExpLevSufficient after checkCurrentSiteStock ["+worderExpLevSufficient+"]"); System.out.println("worderExpLevSufficient after checkCurrentSiteStock ["+worderExpLevSufficient+"]");
System.out.println("Current Stock return map : "+stockReturnMap); System.out.println("Current Stock return map : "+stockReturnMap);
...@@ -864,11 +876,11 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -864,11 +876,11 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
{ {
return stockReturnMap; return stockReturnMap;
} }
//if(isSufficient) if(isSufficient)
//{ {
// tempWorderObj.setSufficient("Y");//Changed by wasim on 07-03-2016 tempWorderObj.setSufficient("Y");//Changed by wasim on 07-03-2016
// break; break;
//} }
//Changed by wasim on 07-03-2016 to check alternate item in other site if main item not found [START] //Changed by wasim on 07-03-2016 to check alternate item in other site if main item not found [START]
//else //else
//{ //{
...@@ -883,14 +895,14 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -883,14 +895,14 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
balanceQty = Double.parseDouble(stockReturnMap.get("BALANCE_QTY")); balanceQty = Double.parseDouble(stockReturnMap.get("BALANCE_QTY"));
errorCodeRet = stockReturnMap.get("ERROR_CODE"); errorCodeRet = stockReturnMap.get("ERROR_CODE");
if ("Y".equalsIgnoreCase(tempWorderObj.getCritItem())) //if ("Y".equalsIgnoreCase(tempWorderObj.getCritItem()))
{ //{
isSufficient = Boolean.parseBoolean(stockReturnMap.get("IS_SUFFICIENT")); isSufficient = Boolean.parseBoolean(stockReturnMap.get("IS_SUFFICIENT"));
} //}
else //else
{ //{
isSufficient = true; // isSufficient = true;
} //}
if(errorCodeRet.length() > 0) if(errorCodeRet.length() > 0)
{ {
return stockReturnMap; return stockReturnMap;
...@@ -918,9 +930,16 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -918,9 +930,16 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
} }
System.out.println("worderExpLevSufficient@@--------------"+isSufficient); System.out.println("worderExpLevSufficient@@--------------"+isSufficient);
if ( (!"Y".equalsIgnoreCase(tempWorderObj.getCritItem())) || (!"R".equalsIgnoreCase(tempWorderObj.getUsageType()) ))
{
isSufficient = true;
}
worderExpLevSufficient.put(tempWorderObj.getWorkOrder()+":"+tempWorderObj.getExpLev(), isSufficient); worderExpLevSufficient.put(tempWorderObj.getWorkOrder()+":"+tempWorderObj.getExpLev(), isSufficient);
System.out.println("123worderExpLevSufficient@@--------------"+worderExpLevSufficient); System.out.println("123worderExpLevSufficient@@--------------"+worderExpLevSufficient);
//set is Sufficient //set is Sufficient
} //end for loop } //end for loop
} }
...@@ -1288,9 +1307,14 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1288,9 +1307,14 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
Map<String,String> stockAllocMap = new HashMap<String,String>(); Map<String,String> stockAllocMap = new HashMap<String,String>();
SiteItemSummaryBean siteItemSumBeanObj = null; SiteItemSummaryBean siteItemSumBeanObj = null;
WorderStkBean worderStkBeanObj = null; WorderStkBean worderStkBeanObj = null;
int count1 = 0; int count1 = 0, cnt = 0, stkindex = -1;
int stkindex = -1; double finalAllocatedQty = 0, ItemStdPotency = 100, qtyPerArt = 0,finalAllocQty = 0,updQtyOriginal = 0;
double finalAllocatedQty = 0, ItemStdPotency = 100, qtyPerArt = 0,finalAllocQty = 0;; Timestamp expDateWorkOrder = null;
String trackShelfLifeFG = "",controlledYnFG = "",queryString = "";
String sqlUpd = "";
PreparedStatement pstmtUpd = null;
ResultSet rsExpDate = null;
try try
{ {
Calendar currentDate = Calendar.getInstance(); Calendar currentDate = Calendar.getInstance();
...@@ -1316,6 +1340,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1316,6 +1340,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
minPotencyPerc = Double.parseDouble(detailMap.get("MIN_POTENCY_PERC")); minPotencyPerc = Double.parseDouble(detailMap.get("MIN_POTENCY_PERC"));
matchPotency = detailMap.get("MATCH_POTENCY"); matchPotency = detailMap.get("MATCH_POTENCY");
adjPotency = detailMap.get("ADJ_POTENCY"); adjPotency = detailMap.get("ADJ_POTENCY");
locGroup = detailMap.get("LOC_GROUP"); // 15-jun-16 manoharan
alternateItem = detailMap.get("IS_ALTERNATE"); alternateItem = detailMap.get("IS_ALTERNATE");
System.out.println("IS_ALTERNATE : "+alternateItem); System.out.println("IS_ALTERNATE : "+alternateItem);
...@@ -1348,8 +1373,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1348,8 +1373,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
if("P".equalsIgnoreCase(detailMap.get("LOC_USAGE_TYPE")) || "A".equalsIgnoreCase(detailMap.get("LOC_USAGE_TYPE"))) if("P".equalsIgnoreCase(detailMap.get("LOC_USAGE_TYPE")) || "A".equalsIgnoreCase(detailMap.get("LOC_USAGE_TYPE")))
{ {
detailMap.put("LOC_GROUP", locGroup); //detailMap.put("LOC_GROUP", locGroup); // 15-jun-16 manoharan commented
locGroup = detailMap.get("LOC_GROUP"); //locGroup = detailMap.get("LOC_GROUP"); // 15-jun-16 manoharan commented
if(locGroup.length() == 0) if(locGroup.length() == 0)
{ {
errorCode = "WOGRPLOC"; errorCode = "WOGRPLOC";
...@@ -1430,7 +1455,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1430,7 +1455,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
if(stkQuantity < minQtyReq) if(stkQuantity < minQtyReq)
{ {
System.out.println("in checkCurrentSiteStock Stock quantity is less than min quantity required so continue loop"); System.out.println("in checkCurrentSiteStock Stock quantity is less than min quantity required so continue loop");
//continue; continue;
} }
//Changed by wasim on 29-01-2016 to continue if min_req_qty greater than stock qty [END] //Changed by wasim on 29-01-2016 to continue if min_req_qty greater than stock qty [END]
...@@ -1442,75 +1467,60 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1442,75 +1467,60 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
} }
//Changed by wasim to check expDate of FG and RM for controlled item functionality [START] //Changed by wasim to check expDate of FG and RM for controlled item functionality [START]
/*Date expDateWorkOrder = new Date(); //////////////////////////////////////////////////////////////////////////////////////////////
Date stkDate = new Date(); expDateWorkOrder = null;
String trackShelfLifeFG = "",controlledYnFG = ""; trackShelfLifeFG = "";
controlledYnFG = "";
String queryString = "SELECT TRACK_SHELF_LIFE,CONTROLLED_YN FROM ITEM WHERE ITEM_CODE IN (SELECT ITEM_CODE FROM " queryString = "SELECT i.TRACK_SHELF_LIFE,i.CONTROLLED_YN,w.EXP_DATE "
+ "WORKORDER WHERE WORK_ORDER = ?)"; + " FROM ITEM i, WORKORDER w WHERE i.item_code = w.item_code and w.WORK_ORDER = ?";
PreparedStatement pstmtExpDate = conn.prepareStatement(queryString); PreparedStatement pstmtExpDate = conn.prepareStatement(queryString);
pstmtExpDate.setString(1,workOrder); pstmtExpDate.setString(1,workOrder);
ResultSet rsExpDate = pstmtExpDate.executeQuery(); rsExpDate = pstmtExpDate.executeQuery();
if(rsExpDate.next()) if(rsExpDate.next())
{ {
trackShelfLifeFG = checkNull(rsExpDate.getString("TRACK_SHELF_LIFE")); trackShelfLifeFG = checkNull(rsExpDate.getString("TRACK_SHELF_LIFE"));
controlledYnFG = checkNull(rsExpDate.getString("CONTROLLED_YN")); controlledYnFG = checkNull(rsExpDate.getString("CONTROLLED_YN"));
expDateWorkOrder = rsExpDate.getTimestamp("EXP_DATE");
} }
if(pstmtExpDate != null) pstmtExpDate.close();
{ pstmtExpDate = null;
pstmtExpDate.close();pstmtExpDate = null; rsExpDate.close();
} rsExpDate = null;
if(rsExpDate != null)
{
rsExpDate.close();rsExpDate = null;
}
System.out.println("Controlled YN for FG item ["+detailMap.get("ITEM_CODE")+"] is["+controlledYnFG+"] AND itemCategory ["+itemCategory+"]"); System.out.println("Controlled YN for FG item ["+detailMap.get("ITEM_CODE")+"] is["+controlledYnFG+"] AND itemCategory ["+itemCategory+"]");
System.out.println("Track Shelf Life FG["+trackShelfLife+"] Track Shelf Life RM ["+trackShelfLifeFG+"]"); System.out.println("Track Shelf Life FG["+trackShelfLife+"] Track Shelf Life RM ["+trackShelfLifeFG+"] RM expiry data [" + expDateT + "] workorder expiry date [" + expDateWorkOrder + "]");
queryString = "SELECT EXP_DATE FROM WORKORDER WHERE WORK_ORDER = ?"; if("Y".equalsIgnoreCase(controlledYnFG) && "A".equalsIgnoreCase(itemCategory) && "Y".equalsIgnoreCase(trackShelfLife) && "Y".equalsIgnoreCase(trackShelfLifeFG) )
pstmtExpDate = conn.prepareStatement(queryString);
pstmtExpDate.setString(1,workOrder);
rsExpDate = pstmtExpDate.executeQuery();
if(rsExpDate.next())
{ {
expDateWorkOrder = rsExpDate.getDate("EXP_DATE"); if(expDateWorkOrder.before(expDateT))
stkDate=new java.util.Date(expDateT.getTime());
System.out.println("ExpDate Stock="+stkDate);
System.out.println("ExpDate Work Order="+expDateWorkOrder);
if(stkDate.before(expDateWorkOrder) && "Y".equalsIgnoreCase(controlledYnFG) && "A".equalsIgnoreCase(itemCategory) &&
"Y".equalsIgnoreCase(trackShelfLife) && "Y".equalsIgnoreCase(trackShelfLifeFG) )
//&& "Y".equalsIgnoreCase(leastExpdtActivRm))
{ {
System.out.println("Work order exp date is greater than Raw material Date"); System.out.println("Controlled Work order exp date is less than Raw material DateRM expiry data [" + expDateT + "] workorder expiry date [" + expDateWorkOrder + "]");
//continue;
String sqlUpd = "UPDATE WORKORDER SET EXP_DATE = ? WHERE WORK_ORDER = ?"; }
PreparedStatement pstmtUpd = conn.prepareStatement(sqlUpd); else
pstmtUpd.setDate(1,(java.sql.Date) stkDate); {
System.out.println("Controlled Raw material is less than Work order exp DateRM expiry data [" + expDateT + "] workorder expiry date [" + expDateWorkOrder + "]");
if ( "Y".equalsIgnoreCase(this.leastExpdtActivRm))
{
sqlUpd = "UPDATE WORKORDER SET EXP_DATE = ? WHERE WORK_ORDER = ?";
pstmtUpd = conn.prepareStatement(sqlUpd);
pstmtUpd.setTimestamp(1,expDateT);
pstmtUpd.setString(2,workOrder); pstmtUpd.setString(2,workOrder);
int cnt = pstmtUpd.executeUpdate(); cnt = pstmtUpd.executeUpdate();
System.out.println("Exp date is updated="+cnt); System.out.println("Controlled Raw material is less than Work order exp Date [" + cnt + "]");
if(pstmtExpDate != null){pstmtExpDate.close();pstmtExpDate = null;}
if(rsExpDate != null){rsExpDate.close();rsExpDate = null;}
continue; pstmtUpd.close();
pstmtUpd = null;
} }
else else
{ {
System.out.println("Work order exp date is less than Raw material Date"); System.out.println("Controlled Skiping the RM stock as expiry date is less than workorder expiry date");
continue;
} }
} }
if(pstmtExpDate != null)
{
pstmtExpDate.close();pstmtExpDate = null;
} }
if(rsExpDate != null) //////////////////////////////////////////////////////////////////////////////////////////////
{
rsExpDate.close();rsExpDate = null;
}*/
//Changed by wasim to check expDate of FG and RM for controlled item functionality [END] //Changed by wasim to check expDate of FG and RM for controlled item functionality [END]
unit = checkNull(rs.getString("UNIT")); unit = checkNull(rs.getString("UNIT"));
...@@ -1757,29 +1767,11 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1757,29 +1767,11 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
worderExpLevSufficient.put(worderStkBeanObj.getWorkOrder()+":"+worderStkBeanObj.getExpLevel(), isSufficient); worderExpLevSufficient.put(worderStkBeanObj.getWorkOrder()+":"+worderStkBeanObj.getExpLevel(), isSufficient);
updateWoBeanSufficient(worderStkBeanObj.getWorkOrder(), worderStkBeanObj.getExpLevel(), "Y"); updateWoBeanSufficient(worderStkBeanObj.getWorkOrder(), worderStkBeanObj.getExpLevel(), "Y");
}
if(stkindex != -1)
{
System.out.println("manohar before .setQuantity 112["+worderStkBeanObj.getQuantity()+"] .getPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .getAllocQty[" + worderStkBeanObj.getAllocQty() + "] .getUpdQty[" + worderStkBeanObj.getUpdQty() +"]");
worderStkBeanObj.setAllocQty(worderStkBeanObj.getAllocQty() + updQty);
worderStkBeanObj.setQuantity(worderStkBeanObj.getQuantity() + updQty);
worderStkBeanObj.setUpdQty(worderStkBeanObj.getAllocQty());
System.out.println("manohar after .setQuantity 112["+worderStkBeanObj.getQuantity()+"] .getPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .getAllocQty[" + worderStkBeanObj.getAllocQty() + "] .getUpdQty[" + worderStkBeanObj.getUpdQty() +"]");
}
else
{
System.out.println("manohar before .setQuantity 113["+worderStkBeanObj.getQuantity()+"] .getPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .getAllocQty[" + worderStkBeanObj.getAllocQty() + "] .getUpdQty[" + worderStkBeanObj.getUpdQty() +"]");
worderStkBeanObj.setAllocQty(updQty);
worderStkBeanObj.setQuantity(updQty);
worderStkBeanObj.setUpdQty(updQty);
System.out.println("manohar after .setQuantity 113["+worderStkBeanObj.getQuantity()+"] .getPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .getAllocQty[" + worderStkBeanObj.getAllocQty() + "] .getUpdQty[" + worderStkBeanObj.getUpdQty() +"]");
}
} }
// 06-jun-16 manoharan do round off as per iss_criteria of item // 06-jun-16 manoharan do round off as per iss_criteria of item
if (!"Y".equals(matchPotency) && (adjPotency == null || adjPotency.trim().length() == 0 )) if (!"Y".equals(matchPotency) || (adjPotency == null || adjPotency.trim().length() == 0 ))
{ {
updQtyOriginal = updQty; // 15-jun-16 manoharan store the original before rounding so that same can beset into the array list
if("F".equalsIgnoreCase(issCriteria)) if("F".equalsIgnoreCase(issCriteria))
{ {
qtyPerArt = getQtyPerArt(stkKey,conn); qtyPerArt = getQtyPerArt(stkKey,conn);
...@@ -1810,6 +1802,24 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -1810,6 +1802,24 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
{ {
updQty = stkQuantity; updQty = stkQuantity;
} }
}
if(stkindex != -1)
{
System.out.println("manohar before .setQuantity 112["+worderStkBeanObj.getQuantity()+"] .getPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .getAllocQty[" + worderStkBeanObj.getAllocQty() + "] .getUpdQty[" + worderStkBeanObj.getUpdQty() +"]");
worderStkBeanObj.setAllocQty(worderStkBeanObj.getAllocQty() + updQty);
worderStkBeanObj.setQuantity(worderStkBeanObj.getQuantity() + updQty);
worderStkBeanObj.setUpdQty(worderStkBeanObj.getAllocQty());
System.out.println("manohar after .setQuantity 112["+worderStkBeanObj.getQuantity()+"] .getPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .getAllocQty[" + worderStkBeanObj.getAllocQty() + "] .getUpdQty[" + worderStkBeanObj.getUpdQty() +"]");
}
else
{
System.out.println("manohar before .setQuantity 113["+worderStkBeanObj.getQuantity()+"] .getPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .getAllocQty[" + worderStkBeanObj.getAllocQty() + "] .getUpdQty[" + worderStkBeanObj.getUpdQty() +"]");
worderStkBeanObj.setAllocQty(updQty);
worderStkBeanObj.setQuantity(updQty);
worderStkBeanObj.setUpdQty(updQty);
System.out.println("manohar after .setQuantity 113["+worderStkBeanObj.getQuantity()+"] .getPotencyAdj[" + worderStkBeanObj.getPotencyAdj() + "] .getAllocQty[" + worderStkBeanObj.getAllocQty() + "] .getUpdQty[" + worderStkBeanObj.getUpdQty() +"]");
}
} }
...@@ -2010,24 +2020,26 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -2010,24 +2020,26 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("manohar in checkCurrentSiteStock after allocation balanceQty ["+balanceQty+"] isSufficient[" + isSufficient + "]"); System.out.println("manohar in checkCurrentSiteStock after allocation balanceQty ["+balanceQty+"] isSufficient[" + isSufficient + "]");
if(isSufficient)
{
returnMapDetails.put("ERROR_CODE",""); returnMapDetails.put("ERROR_CODE","");
returnMapDetails.put("BALANCE_QTY",String.valueOf(balanceQty)); returnMapDetails.put("BALANCE_QTY",String.valueOf(balanceQty));
returnMapDetails.put("BALANCE_QTY",String.valueOf(balanceQty));
if(isSufficient)
{
returnMapDetails.put("IS_SUFFICIENT","true"); returnMapDetails.put("IS_SUFFICIENT","true");
} }
else if(!isSufficient && count == 0) else if(!isSufficient && count == 0)
{ {
returnMapDetails.put("ERROR_CODE",""); //returnMapDetails.put("ERROR_CODE","");
returnMapDetails.put("BALANCE_QTY",String.valueOf(requiredQty)); //returnMapDetails.put("BALANCE_QTY",String.valueOf(requiredQty));
returnMapDetails.put("IS_SUFFICIENT","false"); returnMapDetails.put("IS_SUFFICIENT","false");
} }
else else
{ {
//stock not sufficient check for alternate item. //stock not sufficient check for alternate item.
//checkForAlternateItem(detailMap, conn); //checkForAlternateItem(detailMap, conn);
returnMapDetails.put("ERROR_CODE",""); //returnMapDetails.put("ERROR_CODE","");
returnMapDetails.put("BALANCE_QTY",String.valueOf(balanceQty)); //returnMapDetails.put("BALANCE_QTY",String.valueOf(balanceQty));
returnMapDetails.put("IS_SUFFICIENT","false"); returnMapDetails.put("IS_SUFFICIENT","false");
} }
System.out.println("manohar in checkCurrentSiteStock after allocation balanceQty ["+balanceQty+"] isSufficient[" + isSufficient + "] returnMapDetails [" + returnMapDetails + "]"); System.out.println("manohar in checkCurrentSiteStock after allocation balanceQty ["+balanceQty+"] isSufficient[" + isSufficient + "] returnMapDetails [" + returnMapDetails + "]");
...@@ -2132,8 +2144,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -2132,8 +2144,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
private String checkStockPotencyNew(Connection conn) throws Exception private String checkStockPotencyNew(Connection conn) throws Exception
{ {
System.out.println("@@in checkStockPotency.........."); System.out.println("@@in checkStockPotency..........");
String workOrder = "",expLevel = "",matchPotency = "",adjPotency = "",itemCode = "",unitPotency = ""; String workOrder = "",expLevel = "",matchPotency = "",adjPotency = "",itemCode = "",unitPotency = "",lotNoIssue = "";
String errorCodeRet = "",adjPotencyChkY = "",expLevelNew = "",allocRetStr = "" , adjPotencyChkN = ""; String errorCodeRet = "",adjPotencyChkY = "",expLevelNew = "",allocRetStr = "" , adjPotencyChkN = "",locGroup = "";
//String splitKey []; //String splitKey [];
//int index = -1; // 09-mar-16 manoharan //int index = -1; // 09-mar-16 manoharan
double proQty=0, qtyPotencyUnit = 0,ItemStdPotency = 0,potencyAdjNew = 0, potencyAdjExpLev = 0,quantityReqExpLev = 0; double proQty=0, qtyPotencyUnit = 0,ItemStdPotency = 0,potencyAdjNew = 0, potencyAdjExpLev = 0,quantityReqExpLev = 0;
...@@ -2159,12 +2171,30 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -2159,12 +2171,30 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
double deallocQty = 0,allocatedQty = 0, extraQty = 0, potencyAdjLot = 0, quantityReqLot = 0; double deallocQty = 0,allocatedQty = 0, extraQty = 0, potencyAdjLot = 0, quantityReqLot = 0;
Map<String,String> stockAllocMap = new HashMap<String,String>(); Map<String,String> stockAllocMap = new HashMap<String,String>();
boolean removeElement = false; boolean removeElement = false;
ResultSet rs = null;
PreparedStatement pstmt = null;
String sql ="";
try try
{ {
for(String workOrderPotency : workOrderList) for(String workOrderPotency : workOrderList)
{ {
sql = "select loc_group, lot_no__issue from workorder where work_order = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, workOrderPotency);
rs = pstmt.executeQuery();
if(rs.next())
{
locGroup = checkNull(rs.getString(1));
lotNoIssue = checkNull(rs.getString(2));
}
rs.close();
rs = null;
pstmt.close();
potencyAdjMapY = null; potencyAdjMapY = null;
potencyAdjMapN = null; potencyAdjMapN = null;
AdjPotencyExplevQtyMap = null; AdjPotencyExplevQtyMap = null;
...@@ -2431,6 +2461,9 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -2431,6 +2461,9 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
detailMap.put("BALANCE_QTY",balance+""); detailMap.put("BALANCE_QTY",balance+"");
System.out.println("manohar after potency calculation balance 444["+balance+"] fresh allocation to be done" ); System.out.println("manohar after potency calculation balance 444["+balance+"] fresh allocation to be done" );
detailMap.put("PACK_LOT_NO", lotNoIssue);
detailMap.put("LOC_GROUP", locGroup);
Map<String,String>detailStkMap = checkCurrentSiteStock(detailMap, conn); Map<String,String>detailStkMap = checkCurrentSiteStock(detailMap, conn);
System.out.println("detailStkMap C.Potency-------->>["+detailStkMap+"]"); System.out.println("detailStkMap C.Potency-------->>["+detailStkMap+"]");
...@@ -2748,6 +2781,9 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -2748,6 +2781,9 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
//detailMap.put("BALANCE_QTY",potencyAdjExpLev+""); //detailMap.put("BALANCE_QTY",potencyAdjExpLev+"");
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("LOC_GROUP", locGroup);
Map<String,String>detailStkMap = checkCurrentSiteStock(detailMap,conn); // 09-mar-16 manoharan return value to be captured and checked Map<String,String>detailStkMap = checkCurrentSiteStock(detailMap,conn); // 09-mar-16 manoharan return value to be captured and checked
balanceQty = Double.parseDouble(detailStkMap.get("BALANCE_QTY")); balanceQty = Double.parseDouble(detailStkMap.get("BALANCE_QTY"));
...@@ -3291,7 +3327,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -3291,7 +3327,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
ResultSet rs= null,rs1= null; ResultSet rs= null,rs1= null;
PreparedStatement pstmt = null,pstmt1 = null; PreparedStatement pstmt = null,pstmt1 = null;
String sql = "",altItemCode = "",considerPartialAlt = "",bomCode = "",itemCode = "",itemRef = "",siteCode = "", String sql = "",altItemCode = "",considerPartialAlt = "",bomCode = "",itemCode = "",itemRef = "",siteCode = "",
workOrder = "",operation = "",errorCodeRet = ""; workOrder = "",operation = "",errorCodeRet = "", locGroup = "",lotNoIssue = "" ;
boolean isSufficient = false; boolean isSufficient = false;
int count = 0; int count = 0;
double altQuantity = 0,altMinPotencyPerc = 0,balanceQty = 0,propotinateMQty = 0,qtyPerBom = 0,altBalanceQty = 0, double altQuantity = 0,altMinPotencyPerc = 0,balanceQty = 0,propotinateMQty = 0,qtyPerBom = 0,altBalanceQty = 0,
...@@ -3310,6 +3346,18 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -3310,6 +3346,18 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
requiredQty = Double.parseDouble(altItemDetailMap.get("QUANTITY")); requiredQty = Double.parseDouble(altItemDetailMap.get("QUANTITY"));
balanceQty = Double.parseDouble(altItemDetailMap.get("BALANCE_QTY")); balanceQty = Double.parseDouble(altItemDetailMap.get("BALANCE_QTY"));
operation = altItemDetailMap.get("OPERATION"); operation = altItemDetailMap.get("OPERATION");
sql = "select loc_group, lot_no__issue from workorder where work_order = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, workOrder);
rs = pstmt.executeQuery();
if(rs.next())
{
locGroup = checkNull(rs.getString(1));
lotNoIssue = checkNull(rs.getString(2));
}
rs.close();
rs = null;
pstmt.close();
sql = "Select item_code__alt,quantity,case when min_potency_perc in null then 0 else min_potency_perc end as min_potency_perc ,consider_partial_alt " sql = "Select item_code__alt,quantity,case when min_potency_perc in null then 0 else min_potency_perc end as min_potency_perc ,consider_partial_alt "
+ "from bom_alt where bom_code = ? and item_code = ? and item_ref = ? " + "from bom_alt where bom_code = ? and item_code = ? and item_ref = ? "
...@@ -3363,18 +3411,21 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -3363,18 +3411,21 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
altItemDetailMap.put("ITEM_CODE", altItemCode); altItemDetailMap.put("ITEM_CODE", altItemCode);
altItemDetailMap.put("QUANTITY", String.valueOf(propotinateAltQty)); altItemDetailMap.put("QUANTITY", String.valueOf(propotinateAltQty));
altItemDetailMap.put("IS_ALTERNATE", "Y"); altItemDetailMap.put("IS_ALTERNATE", "Y");
altItemDetailMap.put("PACK_LOT_NO", lotNoIssue);
altItemDetailMap.put("LOC_GROUP", locGroup);
checkStkReturnMap = checkCurrentSiteStock(altItemDetailMap, conn); checkStkReturnMap = checkCurrentSiteStock(altItemDetailMap, conn);
//balanceQty = balanceQty - //balanceQty = balanceQty -
System.out.println("checkStkReturnMap A2M : "+checkStkReturnMap); System.out.println("checkStkReturnMap A2M : "+checkStkReturnMap);
altBalanceQty = Double.parseDouble(checkStkReturnMap.get("BALANCE_QTY")); altBalanceQty = Double.parseDouble(checkStkReturnMap.get("BALANCE_QTY"));
errorCodeRet = checkStkReturnMap.get("ERROR_CODE"); errorCodeRet = checkStkReturnMap.get("ERROR_CODE");
isSufficient = Boolean.parseBoolean(checkStkReturnMap.get("IS_SUFFICIENT")); isSufficient = Boolean.parseBoolean(checkStkReturnMap.get("IS_SUFFICIENT"));
// 13-jun-16 manoharan following uncommented as balance to convered back to main unit
propotinateMQty = (balanceQty * qtyPerBom)/altQuantity; //(4 * 10)/15 = 2.667 //Commented by wasim
balanceQty = balanceQty - propotinateMQty; // 4 - 2.667 = 1.333 //Commented by wasim
System.out.println("balanceQty A2M : "+balanceQty); //Commented by wasim
//propotinateMQty = (balanceQty * qtyPerBom)/altQuantity; //(4 * 10)/15 = 2.667 //Commented by wasim //balanceQty = altBalanceQty;
//balanceQty = balanceQty - propotinateMQty; // 4 - 2.667 = 1.333 //Commented by wasim
//System.out.println("balanceQty A2M : "+balanceQty); //Commented by wasim
balanceQty = altBalanceQty;
System.out.println("balanceQty A2M : "+balanceQty); System.out.println("balanceQty A2M : "+balanceQty);
...@@ -3416,6 +3467,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -3416,6 +3467,8 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
checkStkReturnMap.put("ERROR_CODE", ""); checkStkReturnMap.put("ERROR_CODE", "");
checkStkReturnMap.put("IS_SUFFICIENT", ""+isSufficient); checkStkReturnMap.put("IS_SUFFICIENT", ""+isSufficient);
} }
System.out.println("after alternate checkStkReturnMap ["+checkStkReturnMap + "]");
} }
catch(Exception e) catch(Exception e)
...@@ -3858,7 +3911,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -3858,7 +3911,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
String sql = "",detailSum = "",matchPotency = "",suppCodeMfg = "",siteCode = "",itemCode = "",locUsageType = "",locGroup = "", String sql = "",detailSum = "",matchPotency = "",suppCodeMfg = "",siteCode = "",itemCode = "",locUsageType = "",locGroup = "",
qcReqd = "",trackShelfLife = "",considerLotIssue = "",packLotNo = "",dimension = "",effDate = "",autoQcReqd ="", qcReqd = "",trackShelfLife = "",considerLotIssue = "",packLotNo = "",dimension = "",effDate = "",autoQcReqd ="",
useInvStatus = "",qtyPerStr = "",minQtyPerLotStr = "",trimWidthStr = "",compareDimensionStr = "",locType = "", useInvStatus = "",qtyPerStr = "",minQtyPerLotStr = "",trimWidthStr = "",compareDimensionStr = "",locType = "",
tranDate = "",orderType = ""; tranDate = "",orderType = "", otherSite = "N";
boolean isCompareDimension = false; boolean isCompareDimension = false;
StringBuffer stockSqlBuf = new StringBuffer(); StringBuffer stockSqlBuf = new StringBuffer();
...@@ -3870,7 +3923,13 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -3870,7 +3923,13 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
tranDate = simpleDateFormatObj.format(currentDate.getTime()); tranDate = simpleDateFormatObj.format(currentDate.getTime());
System.out.println("In getBuildedWoIssueSql : "+stockDetailMap); System.out.println("In getBuildedWoIssueSql : "+stockDetailMap);
// 13-jun-16 manoharan in case of other site quantity available should be atleast 1 article i.e. availabe should be >= qty_per_art
otherSite = checkNull(stockDetailMap.get("OTHER_SITE"));
if (otherSite == null || otherSite.trim().length() == 0)
{
otherSite = "N";
}
// end 13-jun-16 manoharan in case of other site quantity available should be atleast 1 article i.e. availabe should be >= qty_per_art
siteCode = checkNull(stockDetailMap.get("SITE_CODE")); siteCode = checkNull(stockDetailMap.get("SITE_CODE"));
itemCode = checkNull(stockDetailMap.get("ITEM_CODE")); itemCode = checkNull(stockDetailMap.get("ITEM_CODE"));
qcReqd = checkNull(stockDetailMap.get("QC_REQD")); qcReqd = checkNull(stockDetailMap.get("QC_REQD"));
...@@ -3984,8 +4043,12 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -3984,8 +4043,12 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
{ {
stockSqlBuf.append("and nvl(stock.quantity,0) - nvl(stock.alloc_qty,0) >= "+minQtyPerLot); stockSqlBuf.append("and nvl(stock.quantity,0) - nvl(stock.alloc_qty,0) >= "+minQtyPerLot);
} }
// 13-jun-16 manoharan in case of other site quantity available should be atleast 1 article i.e. availabe should be >= qty_per_art
if("Y".equalsIgnoreCase(otherSite))
{
stockSqlBuf.append("and nvl(stock.quantity,0) - nvl(stock.alloc_qty,0) >= stock.qty_per_art ");
}
// end 13-jun-16 manoharan in case of other site quantity available should be atleast 1 article i.e. availabe should be >= qty_per_art
if(suppCodeMfg.length() > 0 && ! "null".equalsIgnoreCase(suppCodeMfg)) if(suppCodeMfg.length() > 0 && ! "null".equalsIgnoreCase(suppCodeMfg))
{ {
stockSqlBuf.append(" and stock.supp_code__mfg in ("+getSqlInString(suppCodeMfg)+") "); stockSqlBuf.append(" and stock.supp_code__mfg in ("+getSqlInString(suppCodeMfg)+") ");
...@@ -4051,7 +4114,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi ...@@ -4051,7 +4114,7 @@ public class WoFirmplanPrc extends ProcessEJB implements WoFirmplanPrcLocal,WoFi
} }
} }
System.out.println("Final return build SQL----->>["+stockSqlBuf.toString()+"]"); System.out.println("Final return build SQL["+stockSqlBuf.toString()+"]");
return stockSqlBuf.toString(); return stockSqlBuf.toString();
} }
private String checkNull(String str) private String checkNull(String str)
...@@ -4364,7 +4427,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception ...@@ -4364,7 +4427,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception
public String insertInInvAllocate(Connection conn) throws Exception, ITMException public String insertInInvAllocate(Connection conn) throws Exception, ITMException
{ {
ResultSet rs = null; ResultSet rs = null;
PreparedStatement pstmt = null,pstmtSel = null; PreparedStatement pstmt = null,pstmtSel = null, pstmtInsert = null ;
String sql = "",tranIDInvAlloc = "",errorString = ""; String sql = "",tranIDInvAlloc = "",errorString = "";
int lineNo = 0; int lineNo = 0;
double deAllocQty = 0; double deAllocQty = 0;
...@@ -4563,10 +4626,11 @@ public String populateWorkOrderBill(Connection conn) throws Exception ...@@ -4563,10 +4626,11 @@ public String populateWorkOrderBill(Connection conn) throws Exception
{ {
pstmt.close();pstmt = null; pstmt.close();pstmt = null;
} }
sql = "Insert into inv_alloc_det (TRAN_ID,LINE_NO,SITE_CODE,ITEM_CODE,LOT_NO,LOT_SL,QUANTITY,REMARKS," 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,ALLOC_QTY) " + "LOC_CODE,EXP_LEV,POTENCY_ADJ,ALLOC_QTY) "
+ "values (?,?,?,?,?, ?,?,?,?,?, ?,? )"; + "values (?,?,?,?,?, ?,?,?,?,?, ?,? )";
if (!"Y".equals(WorderStkBeanObj.getOtherSiteYN()))
{
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranIDWorderMap.get(WorderStkBeanObj.getWorkOrder())); pstmt.setString(1,tranIDWorderMap.get(WorderStkBeanObj.getWorkOrder()));
pstmt.setInt(2, ++lineNo); pstmt.setInt(2, ++lineNo);
...@@ -4587,6 +4651,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception ...@@ -4587,6 +4651,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception
{ {
pstmt.close();pstmt = null; pstmt.close();pstmt = null;
} }
}
// invAlloc trace start // invAlloc trace start
...@@ -4715,7 +4780,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception ...@@ -4715,7 +4780,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception
pstmt.setString(8, WorderStkBeanObj.getLotNo()); pstmt.setString(8, WorderStkBeanObj.getLotNo());
pstmt.setString(9, WorderStkBeanObj.getLotSl()); pstmt.setString(9, WorderStkBeanObj.getLotSl());
pstmt.setDouble(10,allocQty ); pstmt.setDouble(10,allocQty );
pstmt.setDouble(11,allocQty ); pstmt.setDouble(11,WorderStkBeanObj.getAllocQty() );
pstmt.setDouble(12,WorderStkBeanObj.getQtyAdj() ); pstmt.setDouble(12,WorderStkBeanObj.getQtyAdj() );
pstmt.executeUpdate(); pstmt.executeUpdate();
pstmt.close();pstmt = null; pstmt.close();pstmt = null;
...@@ -4787,6 +4852,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception ...@@ -4787,6 +4852,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception
taxDate = (String)sorderDetailMap.get("TAX_DATE"); taxDate = (String)sorderDetailMap.get("TAX_DATE");
plDate = (String)sorderDetailMap.get("PL_DATE"); plDate = (String)sorderDetailMap.get("PL_DATE");
priceList = (String)sorderDetailMap.get("PRICE_LIST"); priceList = (String)sorderDetailMap.get("PRICE_LIST");
priceList = priceList==null?"":priceList.trim();
crTerm = (String)sorderDetailMap.get("CR_TERM"); crTerm = (String)sorderDetailMap.get("CR_TERM");
siteCode = (String)sorderDetailMap.get("SITE_CODE"); siteCode = (String)sorderDetailMap.get("SITE_CODE");
confirmed = (String)sorderDetailMap.get("CONFIRMED"); confirmed = (String)sorderDetailMap.get("CONFIRMED");
...@@ -5046,7 +5112,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception ...@@ -5046,7 +5112,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception
HashMap DOXml = new HashMap(); HashMap DOXml = new HashMap();
String preSiteCode = ""; String preSiteCode = "";
HashMap siteXMLLineNo = new HashMap(); HashMap siteXMLLineNo = new HashMap();
String tabValue = "", priceListType = "", priceListClg = "",dlvTerm = "",gpSer = "";
try try
{ {
...@@ -5056,16 +5122,27 @@ public String populateWorkOrderBill(Connection conn) throws Exception ...@@ -5056,16 +5122,27 @@ public String populateWorkOrderBill(Connection conn) throws Exception
HeaderXmlString = new StringBuffer(); HeaderXmlString = new StringBuffer();
orderType = disCommon.getDisparams("999999", "AWMS_DO_ORDER_TYPE", conn); orderType = disCommon.getDisparams("999999", "AWMS_DO_ORDER_TYPE", conn);
sql = "select loc_code__git,loc_code__gitbf,avaliable_yn ,auto_receipt from distorder_type where tran_type = ? "; sql = "select loc_code__git,loc_code__gitbf,avaliable_yn ,auto_receipt, "
+ " LOC_CODE__CONS, LOC_GROUP__CONS, TAX_CLASS, TAX_ENV, PRICE_LIST, PRICE_LIST__CLG, DLV_TERM, GP_SER "
+ " from distorder_type where tran_type = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, orderType); pstmt.setString(1, orderType);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if(rs.next()) if(rs.next())
{ {
locCodeGit = rs.getString("loc_code__git")==null?"":rs.getString("loc_code__git").trim(); locCodeGit = rs.getString("loc_code__git")==null?"":rs.getString("loc_code__git").trim();
locCodeGitbf = rs.getString("loc_code__gitbf")==null?"":rs.getString("loc_code__gitbf").trim(); locCodeGitbf = rs.getString("loc_code__gitbf")==null?"":rs.getString("loc_code__gitbf").trim();
avaliableYN = rs.getString("AVALIABLE_YN")==null?"N":rs.getString("AVALIABLE_YN").trim(); avaliableYN = rs.getString("AVALIABLE_YN")==null?"N":rs.getString("AVALIABLE_YN").trim();
autoReceipt = rs.getString("AUTO_RECEIPT")==null?"N":rs.getString("AUTO_RECEIPT").trim(); autoReceipt = rs.getString("AUTO_RECEIPT")==null?"N":rs.getString("AUTO_RECEIPT").trim();
priceList = rs.getString("PRICE_LIST")==null?"":rs.getString("PRICE_LIST").trim();
taxClass = rs.getString("TAX_CLASS")==null?"":rs.getString("TAX_CLASS").trim();
taxEnv = rs.getString("TAX_ENV")==null?"":rs.getString("TAX_ENV").trim();
priceListClg = rs.getString("PRICE_LIST__CLG")==null?"":rs.getString("PRICE_LIST__CLG").trim();
dlvTerm = rs.getString("DLV_TERM")==null?"":rs.getString("DLV_TERM").trim();
gpSer = rs.getString("GP_SER")==null?"":rs.getString("GP_SER").trim();
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -5144,8 +5221,22 @@ public String populateWorkOrderBill(Connection conn) throws Exception ...@@ -5144,8 +5221,22 @@ public String populateWorkOrderBill(Connection conn) throws Exception
HeaderXmlString.append("<taxInFocus><![CDATA[").append(false).append("]]></taxInFocus>"); HeaderXmlString.append("<taxInFocus><![CDATA[").append(false).append("]]></taxInFocus>");
HeaderXmlString.append("<description>").append("Header0 members").append("</description>"); HeaderXmlString.append("<description>").append("Header0 members").append("</description>");
//price_list from distorder_type where tran_type //price_list from distorder_type where tran_type
priceList = getColumnDescr(conn, "price_list", "distorder_type", "tran_type", orderType); //priceList = getColumnDescr(conn, "price_list", "distorder_type", "tran_type", orderType);
rate = disCommon.pickRate(priceList, getCurrdateAppFormat(), tempObj.getItemCode(), "", "I",conn); //lotSL not set priceListType = disCommon.getPriceListType(priceList,conn);
//System.out.println("count :" + count);
if (!"I".equalsIgnoreCase(priceListType))
{
rate = disCommon.pickRate(priceList, getCurrdateAppFormat(), tempObj.getItemCode(), "", priceListType,conn); //lotSL not set
}
else
{
//tabValue = tempObj.getSiteCodeShip() + "~t" + tempObj.getLocCode() + "~t" + tempObj.getLotNo() + "~t" + tempObj.getLotSl() ;
//System.out.println("tabValue :" + tabValue);
// rate can be picked in issue only as stock details are not available during order
rate = 0;//disCommon.pickRate(priceList, getCurrdateAppFormat(), tempObj.getItemCode(), tabValue, "I",conn);
//System.out.println("rate2 :" + rate2);
}
HeaderXmlString.append("<Detail1 dbID=\"\" domID=\"1\" objName=\"dist_order\" objContext=\"1\">"); HeaderXmlString.append("<Detail1 dbID=\"\" domID=\"1\" objName=\"dist_order\" objContext=\"1\">");
HeaderXmlString.append("<attribute selected=\"N\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>"); HeaderXmlString.append("<attribute selected=\"N\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>");
HeaderXmlString.append("<dist_order/>"); HeaderXmlString.append("<dist_order/>");
...@@ -5220,7 +5311,8 @@ public String populateWorkOrderBill(Connection conn) throws Exception ...@@ -5220,7 +5311,8 @@ public String populateWorkOrderBill(Connection conn) throws Exception
HeaderXmlString.append("<tax_amt><![CDATA[0]]></tax_amt>"); HeaderXmlString.append("<tax_amt><![CDATA[0]]></tax_amt>");
HeaderXmlString.append("<net_amt><![CDATA[0]]></net_amt>"); HeaderXmlString.append("<net_amt><![CDATA[0]]></net_amt>");
HeaderXmlString.append("<tran_ser><![CDATA[]]></tran_ser>"); HeaderXmlString.append("<tran_ser><![CDATA[]]></tran_ser>");
HeaderXmlString.append("<price_list__clg><![CDATA[]]></price_list__clg>"); HeaderXmlString.append("<price_list__clg><![CDATA["+ priceListClg + "]]></price_list__clg>");
HeaderXmlString.append("<dlv_term><![CDATA["+ dlvTerm + "]]></dlv_term>");
HeaderXmlString.append("<loc><![CDATA[ ]]></loc>"); HeaderXmlString.append("<loc><![CDATA[ ]]></loc>");
HeaderXmlString.append("<sundry_name><![CDATA[]]></sundry_name>"); HeaderXmlString.append("<sundry_name><![CDATA[]]></sundry_name>");
HeaderXmlString.append("<proj_code><![CDATA[]]></proj_code>"); HeaderXmlString.append("<proj_code><![CDATA[]]></proj_code>");
...@@ -5249,23 +5341,22 @@ public String populateWorkOrderBill(Connection conn) throws Exception ...@@ -5249,23 +5341,22 @@ public String populateWorkOrderBill(Connection conn) throws Exception
valueXmlString.append("<qty_received><![CDATA["+0+"]]></qty_received>"); valueXmlString.append("<qty_received><![CDATA["+0+"]]></qty_received>");
valueXmlString.append("<qty_shipped><![CDATA["+0+"]]></qty_shipped>"); valueXmlString.append("<qty_shipped><![CDATA["+0+"]]></qty_shipped>");
valueXmlString.append("<due_date><![CDATA["+getCurrdateAppFormat()+"]]></due_date>"); valueXmlString.append("<due_date><![CDATA["+getCurrdateAppFormat()+"]]></due_date>");
// valueXmlString.append("<tax_class><![CDATA[").append((distDetailMap.containsKey("tax_class")?tagChkMapForDetail1.get("tax_class"):taxClass)).append("]]></tax_class>"); valueXmlString.append("<tax_class><![CDATA[" + taxClass + "]]></tax_class>");
//valueXmlString.append("<tax_chap><![CDATA[").append((distDetailMap.containsKey("tax_chap")?tagChkMapForDetail1.get("tax_chap"):taxChap)).append("]]></tax_chap>"); //valueXmlString.append("<tax_chap><![CDATA[").append((distDetailMap.containsKey("tax_chap")?tagChkMapForDetail1.get("tax_chap"):taxChap)).append("]]></tax_chap>");
//valueXmlString.append("<tax_env><![CDATA[").append((distDetailMap.containsKey("tax_env")?tagChkMapForDetail1.get("tax_env"):taxEnv)).append("]]></tax_env>"); valueXmlString.append("<tax_env><![CDATA[" +taxEnv +"]]></tax_env>");
valueXmlString.append("<unit><![CDATA["+unit+"]]></unit>"); valueXmlString.append("<unit><![CDATA["+unit+"]]></unit>");
valueXmlString.append("<item_descr><![CDATA["+itemDescr+"]]></item_descr>"); valueXmlString.append("<item_descr><![CDATA["+itemDescr+"]]></item_descr>");
//valueXmlString.append("<sale_order><![CDATA[").append((distDetailMap.containsKey("sale_order")?tagChkMapForDetail1.get("sale_order"):saleOrder)).append("]]></sale_order>"); //valueXmlString.append("<sale_order><![CDATA[").append((distDetailMap.containsKey("sale_order")?tagChkMapForDetail1.get("sale_order"):saleOrder)).append("]]></sale_order>");
valueXmlString.append("<line_no__sord/>"); valueXmlString.append("<line_no__sord/>");
valueXmlString.append("<rate><![CDATA["+rate+"]]></rate>"); valueXmlString.append("<rate><![CDATA["+rate+"]]></rate>");
valueXmlString.append("<qty_return><![CDATA[0]]></qty_return>"); valueXmlString.append("<qty_return><![CDATA[0]]></qty_return>");
valueXmlString.append("<rate__clg><![CDATA[0]]></rate__clg>");
valueXmlString.append("<discount><![CDATA[0]]></discount>"); valueXmlString.append("<discount><![CDATA[0]]></discount>");
valueXmlString.append("<remarks><![CDATA[]]></remarks>"); valueXmlString.append("<remarks><![CDATA[]]></remarks>");
valueXmlString.append("<tot_amt><![CDATA[0]]></tot_amt>"); valueXmlString.append("<tot_amt><![CDATA[0]]></tot_amt>");
valueXmlString.append("<tax_amt><![CDATA[0]]></tax_amt>"); valueXmlString.append("<tax_amt><![CDATA[0]]></tax_amt>");
valueXmlString.append("<net_amt><![CDATA[0]]></net_amt>"); valueXmlString.append("<net_amt><![CDATA[0]]></net_amt>");
valueXmlString.append("<rate__clg><![CDATA[0]]></rate__clg>"); rate = disCommon.pickRate(priceListClg, getCurrdateAppFormat(), tempObj.getItemCode(), "", "B",conn);
valueXmlString.append("<rate__clg><![CDATA[" + rate + "]]></rate__clg>");
valueXmlString.append("<qty_alloc><![CDATA[0]]></qty_alloc>"); valueXmlString.append("<qty_alloc><![CDATA[0]]></qty_alloc>");
valueXmlString.append("<over_ship_perc><![CDATA[0]]></over_ship_perc>"); valueXmlString.append("<over_ship_perc><![CDATA[0]]></over_ship_perc>");
//valueXmlString.append("<qty_details><![CDATA[]]></qty_details>"); //valueXmlString.append("<qty_details><![CDATA[]]></qty_details>");
...@@ -5613,7 +5704,8 @@ public String populateWorkOrderBill(Connection conn) throws Exception ...@@ -5613,7 +5704,8 @@ public String populateWorkOrderBill(Connection conn) throws Exception
int endIndex = arrayForTranId[1].indexOf("</TranID>"); int endIndex = arrayForTranId[1].indexOf("</TranID>");
orderNo = arrayForTranId[1].substring(0,endIndex); orderNo = arrayForTranId[1].substring(0,endIndex);
System.out.println("distOrderNo/Sale Order No------>>>["+orderNo+"]"); System.out.println("distOrderNo/Sale Order No------>>>["+orderNo+"]");
// 13-jun-16 manoharan sord/dist order reference required
//InsertCrossDockAlloc(siteCodeSave[0],siteCodeSave[1],siteCodeSave[2],conn, orderNo);
//Changed by wasim on 29-02-2016 to commit the transaction as NVO call for confirmation [START] //Changed by wasim on 29-02-2016 to commit the transaction as NVO call for confirmation [START]
System.out.println("Connection need to be committed for NVO call for DO/SO"); System.out.println("Connection need to be committed for NVO call for DO/SO");
conn.commit(); conn.commit();
...@@ -6438,6 +6530,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception ...@@ -6438,6 +6530,7 @@ public String populateWorkOrderBill(Connection conn) throws Exception
for(WorderStkBean tempObj : worderStkBeanList) for(WorderStkBean tempObj : worderStkBeanList)
{ {
isReserve = false;isStkDetail = false; // 07-jun-16 manoharan initialise for each stock item isReserve = false;isStkDetail = false; // 07-jun-16 manoharan initialise for each stock item
stockAllocated = false;
if(workOrder.equalsIgnoreCase(tempObj.getWorkOrder()) && expLev.equalsIgnoreCase(tempObj.getExpLevel()) ) if(workOrder.equalsIgnoreCase(tempObj.getWorkOrder()) && expLev.equalsIgnoreCase(tempObj.getExpLevel()) )
{ {
stockAllocated = true; stockAllocated = true;
......
...@@ -8,7 +8,7 @@ import java.text.SimpleDateFormat; ...@@ -8,7 +8,7 @@ import java.text.SimpleDateFormat;
public class WorderStkBean public class WorderStkBean
{ {
private double potencyAdj = 0,stkQuantityNew = 0,updQty = 0,qtyAdj = 0,reserveStkQty = 0; private double potencyAdj = 0,stkQuantityNew = 0,updQty = 0,qtyAdj = 0,reserveStkQty = 0;
private double allocQty = 0,stkQuantity = 0,stkPotencyPerc = 0,actualAllocQty = 0; private double allocQty = 0,stkQuantity = 0,stkPotencyPerc = 0,actualAllocQty = 0,requiredQty = 0;
java.sql.Timestamp expDate = null,mfgDate = null; java.sql.Timestamp expDate = null,mfgDate = null;
private String locCode = "",lotNo = "",lotSl = "",siteCode = "",itemCode = "",itemRef = "",alternate = "",itemDescr = "", private String locCode = "",lotNo = "",lotSl = "",siteCode = "",itemCode = "",itemRef = "",alternate = "",itemDescr = "",
workOrder = "",expLevel = "",critItem = "",unit = "",dimension = "",reserveStk = "",reserveStkTranId = "", workOrder = "",expLevel = "",critItem = "",unit = "",dimension = "",reserveStk = "",reserveStkTranId = "",
...@@ -204,8 +204,14 @@ public class WorderStkBean ...@@ -204,8 +204,14 @@ public class WorderStkBean
public void setStkQuantity(double stkQuantity) { public void setStkQuantity(double stkQuantity) {
this.stkQuantity = stkQuantity; this.stkQuantity = stkQuantity;
} }
/*
public double getRequiredQuantity() {
return requiredQty;
}
public void setRequiredQuantity(double requiredQty) {
this.requiredQty = requiredQty;
}
*/
public String getCritItem() { public String getCritItem() {
return critItem; return critItem;
} }
......
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