Commit 50508a1c authored by prane's avatar prane

Changes merged to head

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@182739 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2742a752
package ibase.webitm.ejb.mfg; package ibase.webitm.ejb.mfg;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
...@@ -450,9 +451,11 @@ class ADPElement implements Cloneable ...@@ -450,9 +451,11 @@ class ADPElement implements Cloneable
public void setPlanSupply(java.sql.Timestamp dueDate, double supply) public void setPlanSupply(java.sql.Timestamp dueDate, double supply)
{ {
System.out.println("Before SetPlanSupply itemCode["+itemCode+"] dueDate:["+dueDate+"] supply["+supply+"] planSupply["+planSupply+"]");
this.planSupply += supply; this.planSupply += supply;
//updateTimeMrp(dueDate, 0, supply, 0, 0," "," "); //updateTimeMrp(dueDate, 0, supply, 0, 0," "," ");
updateTimeMrp(dueDate, 0, supply, 0, 0); updateTimeMrp(dueDate, 0, supply, 0, 0);
System.out.println("After SetPlanSupply itemCode["+itemCode+"] dueDate:["+dueDate+"] supply["+supply+"] planSupply["+planSupply+"]");
} }
public double getPlanSupply() public double getPlanSupply()
{ {
...@@ -1033,6 +1036,10 @@ class ADPElement implements Cloneable ...@@ -1033,6 +1036,10 @@ class ADPElement implements Cloneable
TimeMRP timeMRP = null; TimeMRP timeMRP = null;
try try
{ {
//Added By Pavan Rane on 28MAR18[To Sort the TimeMRPList][Start]
System.out.println("Collections.sorting...."+dueDate);
Collections.sort(timeMRPArr, TimeMRP.timeMRPComparator);
//Added By Pavan Rane on 28MAR18[To Sort the TimeMRPList][End]
for (int ctr = 0; ctr < timeMRPArr.size(); ctr++) for (int ctr = 0; ctr < timeMRPArr.size(); ctr++)
{ {
timeMRP = (TimeMRP)timeMRPArr.get(ctr); timeMRP = (TimeMRP)timeMRPArr.get(ctr);
...@@ -1061,6 +1068,7 @@ class ADPElement implements Cloneable ...@@ -1061,6 +1068,7 @@ class ADPElement implements Cloneable
System.out.println("@@@@@@1055 planSupply["+planSupply+"]"); System.out.println("@@@@@@1055 planSupply["+planSupply+"]");
runningPlanSupply = runningPlanSupply + planSupply; runningPlanSupply = runningPlanSupply + planSupply;
timeMRP.setRunningPlanSupply(runningPlanSupply); timeMRP.setRunningPlanSupply(runningPlanSupply);
System.out.println("1069 runningPlanSupply ["+runningPlanSupply+"]");
// end 10-04-2006 manoharan // end 10-04-2006 manoharan
timeMRPArr.set(ctr, timeMRP); timeMRPArr.set(ctr, timeMRP);
} }
......
...@@ -61,7 +61,7 @@ import java.text.NumberFormat; ...@@ -61,7 +61,7 @@ import java.text.NumberFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Collections; //import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
...@@ -693,7 +693,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -693,7 +693,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
} }
else else
{ {
//System.out.println("BASEElse 12/06/14 itemCodeTo [" + itemCodeTo + "] itemCodeMap [" + itemCodeMap +"]"); System.out.println("BASEElse 12/06/14 itemCodeTo [" + itemCodeTo + "] itemCodeMap [" + itemCodeMap +"]");
itemCodeMap.put(itemCodeTo, new Integer(itemCodeMap.size() + 1)); itemCodeMap.put(itemCodeTo, new Integer(itemCodeMap.size() + 1));
} }
endTime = System.currentTimeMillis(); endTime = System.currentTimeMillis();
...@@ -6559,6 +6559,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -6559,6 +6559,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
adpElement = mrpOptimize(adpElement); adpElement = mrpOptimize(adpElement);
adpeList.set(adpeCtr, adpElement); adpeList.set(adpeCtr, adpElement);
System.out.println("~~~~adpeList~~~~["+adpeList+"]");
/*if(!isDetailReq) /*if(!isDetailReq)
{ {
...@@ -6660,17 +6661,34 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -6660,17 +6661,34 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
if ((( supply - demand ) < reorderLevel && reorderLevel>0) || ((demand - supply)>0 && reorderLevel==0) ) if ((( supply - demand ) < reorderLevel && reorderLevel>0) || ((demand - supply)>0 && reorderLevel==0) )
{ {
ArrayList timeMRParr = adpElement.getTimeMrpList(); ArrayList timeMRParr = adpElement.getTimeMrpList();
System.out.println(" 3323----timeMRParr.size()---"+timeMRParr.size()); System.out.println(" 6665----timeMRParr.size()---"+timeMRParr.size());
//Added By Pavan R on 29/DEC/17 Start for sorting the timeMRParr by dueDate for madeToOrder item System.out.println(" 6666----timeMRParr---"+timeMRParr);
Collections.sort(timeMRParr, TimeMRP.timeMRPComparator); //Added By Pavan R on 27/DEC/17 End
//Added By Pavan R on 29/DEC/17 End //Added By Pavan R on 27/DEC/17 Start for sorting the timeMRParr by dueDate for madeToOrder item
//if(madeToOrder.equalsIgnoreCase("0") && (mfgType1.trim().equalsIgnoreCase("O") || mfgType1.trim().equalsIgnoreCase("D")))
//{
/*Commented By Pavan R on 28MAR18
* commented as and addded in updateRunningDemandSupply in AdpElement per manoharan sir
*
*/
//Collections.sort(timeMRParr, TimeMRP.timeMRPComparator);
//}
System.out.println("~~~~~~~~~~~~~~~before Sort~~~~~~~~~~~~~~~");
for (Object obj : timeMRParr)
{
TimeMRP timemrp =(TimeMRP)obj;
System.out.println("**** itemCode:["+itemCode+"] Demand:["+timemrp.getDemand()+"] Supply:["+timemrp.getSupply()+"] DueDate:["+timemrp.getDueDate()+"] PlanSupply["+timemrp.getPlanSupply()+"] RunningDemand:["+timemrp.getRunningDemand()+"] RunningSupply:["+timemrp.getRunningSupply()+"] RunningPlanSupply:["+timemrp.getRunningPlanSupply()+"]");
}
//Added By Pavan R on 27/DEC/17 End
for (int timeCtr = 0; timeCtr < timeMRParr.size(); timeCtr++) for (int timeCtr = 0; timeCtr < timeMRParr.size(); timeCtr++)
{ {
TimeMRP timeMrp = (TimeMRP) timeMRParr.get(timeCtr); TimeMRP timeMrp = (TimeMRP) timeMRParr.get(timeCtr);
runningDemand = timeMrp.getRunningDemand(); runningDemand = timeMrp.getRunningDemand();
runningSupply = timeMrp.getRunningSupply(); runningSupply = timeMrp.getRunningSupply();
runningPlanSupply = timeMrp.getRunningPlanSupply(); runningPlanSupply = timeMrp.getRunningPlanSupply();
System.out.println("3337---runningDemand---"+runningDemand+"---runningSupply---"+runningSupply+"---runningPlanSupply---"+runningPlanSupply); System.out.println("3337---itemCode--"+itemCode+"runningDemand---"+runningDemand+"---runningSupply---"+runningSupply+"---runningPlanSupply---"+runningPlanSupply);
if ((suppSour.equals("M")) || (suppSour.equals("C"))) // && if ((suppSour.equals("M")) || (suppSour.equals("C"))) // &&
// orderOpt.equals("B") // orderOpt.equals("B")
// ) // )
...@@ -6781,7 +6799,9 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -6781,7 +6799,9 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
// System.out.println("Actual " + // System.out.println("Actual " +
// decFormat(runningDemand - runningSupply - // decFormat(runningDemand - runningSupply -
// runningPlanSupply) + " cal "+ decFormat(quantity) ); // runningPlanSupply) + " cal "+ decFormat(quantity) );
System.out.println("Before setPlanSupply --[1]-- DueDate:["+timeMrp.getDueDate()+"] itemCode:["+itemCode+"] Demand:["+timeMrp.getDemand()+"] Supply:["+timeMrp.getSupply()+"] PlanSupply["+timeMrp.getPlanSupply()+"] RunningDemand:["+timeMrp.getRunningDemand()+"] RunningSupply:["+timeMrp.getRunningSupply()+"] RunningPlanSupply:["+timeMrp.getRunningPlanSupply()+"]");
timeMrp.setPlanSupply(quantity); timeMrp.setPlanSupply(quantity);
System.out.println("After setPlanSupply --[1]-- DueDate:["+timeMrp.getDueDate()+"] itemCode:["+itemCode+"] Demand:["+timeMrp.getDemand()+"] Supply:["+timeMrp.getSupply()+"] PlanSupply["+timeMrp.getPlanSupply()+"] RunningDemand:["+timeMrp.getRunningDemand()+"] RunningSupply:["+timeMrp.getRunningSupply()+"] RunningPlanSupply:["+timeMrp.getRunningPlanSupply()+"]");
adpElement.setSupply(dueDate, 0); // for the sake of adpElement.setSupply(dueDate, 0); // for the sake of
// updating running // updating running
// demand, supplu & // demand, supplu &
...@@ -6937,7 +6957,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -6937,7 +6957,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
} }
return adpElement;// errString; return adpElement;// errString;
} }
private ADPElement mrpOptimize(ADPElement adpElement,int cycle) throws RemoteException, ITMException //commented By Pavan on 28MAR2018 as per manoharan Sir[Start]
/* private ADPElement mrpOptimize(ADPElement adpElement,int cycle) throws RemoteException, ITMException
{ {
String errString = ""; String errString = "";
java.sql.Timestamp dueDate = null; java.sql.Timestamp dueDate = null;
...@@ -7042,32 +7063,34 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7042,32 +7063,34 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
System.out.println("5963----quantity----["+quantity+"]"); System.out.println("5963----quantity----["+quantity+"]");
} }
/*
* else { System.out.println("Optimize site " + siteCode + * else { System.out.println("Optimize site " + siteCode +
* " Item " + itemCode + " runDem " + * " Item " + itemCode + " runDem " +
* decFormat(runningDemand) + " runSup " + * decFormat(runningDemand) + " runSup " +
* decFormat(runningSupply) + " runPlanSup " + * decFormat(runningSupply) + " runPlanSup " +
* decFormat(runningPlanSupply) + " cal "+ * decFormat(runningPlanSupply) + " cal "+
* decFormat(quantity) ); } * decFormat(quantity) ); }
*/
if (quantity > 0) if (quantity > 0)
{ {
/********************* *//*********************
* if((suppSour.equals("M")) || (suppSour.equals("C"))) * if((suppSour.equals("M")) || (suppSour.equals("C")))
* //&& orderOpt.equals("B") ) { quantity = * //&& orderOpt.equals("B") ) { quantity =
* Math.round((quantity * 100) / yieldPerc); } // * Math.round((quantity * 100) / yieldPerc); } //
* 10-04-2006 manoharan * 10-04-2006 manoharan
**********/ **********//*
/*if (itemCode.trim().equalsIgnoreCase("BD0783")) if (itemCode.trim().equalsIgnoreCase("BD0783"))
{ {
System.out.println("Mrpoptimize site " + siteCode + " Item " + itemCode + " runDem " + decFormat(runningDemand) + " runSup " + decFormat(runningSupply) + " runPlanSup " + decFormat(runningPlanSupply) + " cal " + decFormat(quantity) + " Actual " + decFormat(runningDemand - runningSupply - runningPlanSupply)); System.out.println("Mrpoptimize site " + siteCode + " Item " + itemCode + " runDem " + decFormat(runningDemand) + " runSup " + decFormat(runningSupply) + " runPlanSup " + decFormat(runningPlanSupply) + " cal " + decFormat(quantity) + " Actual " + decFormat(runningDemand - runningSupply - runningPlanSupply));
}*/ }
// System.out.println("Actual " + // System.out.println("Actual " +
// decFormat(runningDemand - runningSupply - // decFormat(runningDemand - runningSupply -
// runningPlanSupply) + " cal "+ decFormat(quantity) ); // runningPlanSupply) + " cal "+ decFormat(quantity) );
System.out.println("Before setPlanSupply --[2]-- itemCode:["+itemCode+"] Demand:["+timeMrp.getDemand()+"] Supply:["+timeMrp.getSupply()+"] DueDate:["+timeMrp.getDueDate()+"] PlanSupply["+timeMrp.getPlanSupply()+"] RunningDemand:["+timeMrp.getRunningDemand()+"] RunningSupply:["+timeMrp.getRunningSupply()+"] RunningPlanSupply:["+timeMrp.getRunningPlanSupply()+"]");
timeMrp.setPlanSupply(quantity); timeMrp.setPlanSupply(quantity);
System.out.println("After setPlanSupply --[2]-- itemCode:["+itemCode+"] Demand:["+timeMrp.getDemand()+"] Supply:["+timeMrp.getSupply()+"] DueDate:["+timeMrp.getDueDate()+"] PlanSupply["+timeMrp.getPlanSupply()+"] RunningDemand:["+timeMrp.getRunningDemand()+"] RunningSupply:["+timeMrp.getRunningSupply()+"] RunningPlanSupply:["+timeMrp.getRunningPlanSupply()+"]");
adpElement.setSupply(dueDate, 0); // for the sake of adpElement.setSupply(dueDate, 0); // for the sake of
// updating running // updating running
// demand, supplu & // demand, supplu &
...@@ -7149,10 +7172,10 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7149,10 +7172,10 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
// conn).toString();//Commented by Jiiten as per // conn).toString();//Commented by Jiiten as per
// Kandarp Sir 13/11/06 - // Kandarp Sir 13/11/06 -
//System.out.println("xmlString--------"+xmlString);//commented By Pavan R on 26/OCT/17 //System.out.println("xmlString--------"+xmlString);//commented By Pavan R on 26/OCT/17
/*if (isBomReplace) if (isBomReplace)
{ {
System.out.println("12/06/14 manohar xmlString [" + xmlString + "]"); System.out.println("12/06/14 manohar xmlString [" + xmlString + "]");
}*/ }
retXMLStr = explodeBomObj.explodeBom(xmlString.toString()).toString(); // Added retXMLStr = explodeBomObj.explodeBom(xmlString.toString()).toString(); // Added
// by // by
...@@ -7161,7 +7184,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7161,7 +7184,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
// - // -
//Added by Manoj dtd 30/04/2014 to set Alternate items in xml //Added by Manoj dtd 30/04/2014 to set Alternate items in xml
/*String tmpAltitemlist=""; String tmpAltitemlist="";
for(int ctr=0;ctr<adpeList.size();ctr++) for(int ctr=0;ctr<adpeList.size();ctr++)
{ {
ADPElement tmpADPElement=(ADPElement) adpeList.get(ctr); ADPElement tmpADPElement=(ADPElement) adpeList.get(ctr);
...@@ -7171,15 +7194,15 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7171,15 +7194,15 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
} }
} }
retXMLStr=retXMLStr.substring(0, retXMLStr.length()-7); retXMLStr=retXMLStr.substring(0, retXMLStr.length()-7);
retXMLStr=retXMLStr+tmpAltitemlist+"</Root>";*/ retXMLStr=retXMLStr+tmpAltitemlist+"</Root>";
//"<Detail><site_code>PL001</site_code><bom_code>M070400G.1</bom_code><item_code>US15012UVG</item_code><item_Ref>US15012UVG </item_Ref><quantity_Ref>825.0</quantity_Ref><quantity>528.0</quantity><due_date>2014-01-05</due_date><exp_lev>1.10.</exp_lev><operation>1</operation><crit_Item>Y</crit_Item><line_type>I</line_type></Detail>"; //"<Detail><site_code>PL001</site_code><bom_code>M070400G.1</bom_code><item_code>US15012UVG</item_code><item_Ref>US15012UVG </item_Ref><quantity_Ref>825.0</quantity_Ref><quantity>528.0</quantity><due_date>2014-01-05</due_date><exp_lev>1.10.</exp_lev><operation>1</operation><crit_Item>Y</crit_Item><line_type>I</line_type></Detail>";
/*if (itemCode.trim().equals("BF21135")) if (itemCode.trim().equals("BF21135"))
{ {
System.out.println("14012009 itemCode [" + itemCode + "] explodeBomObj retXMLStr [" + retXMLStr + "]"); System.out.println("14012009 itemCode [" + itemCode + "] explodeBomObj retXMLStr [" + retXMLStr + "]");
}*/ }
if (xmlString == null || xmlString.toString().trim().length() == 0) if (xmlString == null || xmlString.toString().trim().length() == 0)
{ {
...@@ -7192,7 +7215,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7192,7 +7215,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
//System.out.println("BASE3474---adpElement.getMfgType()----"+adpElement.getMfgType()); //System.out.println("BASE3474---adpElement.getMfgType()----"+adpElement.getMfgType());
if(isDetailReq) if(isDetailReq)
{ {
/*ArrayList<String> orderList=new ArrayList<String>(); ArrayList<String> orderList=new ArrayList<String>();
orderList=adpElement.getOrderList(); orderList=adpElement.getOrderList();
if(orderList.size()>0) if(orderList.size()>0)
{ {
...@@ -7209,7 +7232,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7209,7 +7232,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
System.out.println("adpElement.getSaleOrder() ["+adpElement.getSaleOrder()+"]"); System.out.println("adpElement.getSaleOrder() ["+adpElement.getSaleOrder()+"]");
System.out.println("adpElement.getLineNo() ["+adpElement.getLineNo()+"]"); System.out.println("adpElement.getLineNo() ["+adpElement.getLineNo()+"]");
updateDemand(retXMLStr, adpElement.getSaleOrder(), adpElement.getLineNo()); updateDemand(retXMLStr, adpElement.getSaleOrder(), adpElement.getLineNo());
}*/ }
updateDemand(retXMLStr, adpElement.getSaleOrder(), adpElement.getLineNo()); updateDemand(retXMLStr, adpElement.getSaleOrder(), adpElement.getLineNo());
} }
else else
...@@ -7236,7 +7259,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7236,7 +7259,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
throw new ITMException(e); throw new ITMException(e);
} }
return adpElement;// errString; return adpElement;// errString;
} }*/
//Pavan R Commented [END]
private void updateSupplySite(String siteCode, String itemCode, double quantity, java.sql.Timestamp dueDate) throws ITMException, Exception private void updateSupplySite(String siteCode, String itemCode, double quantity, java.sql.Timestamp dueDate) throws ITMException, Exception
{ {
ADPElement adpElement; ADPElement adpElement;
...@@ -7800,6 +7824,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7800,6 +7824,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
{ {
dueDate = java.sql.Timestamp.valueOf(nodeValue + " 00:00:00"); dueDate = java.sql.Timestamp.valueOf(nodeValue + " 00:00:00");
sdate = nodeValue; sdate = nodeValue;
} }
} }
valueNode = valueNode.getNextSibling(); valueNode = valueNode.getNextSibling();
...@@ -7846,7 +7871,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7846,7 +7871,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
{ {
index = indexOfADPElement(siteCode, itemCode, " ", " "); index = indexOfADPElement(siteCode, itemCode, " ", " ");
} }
System.out.println("oct-oct-17----index---after ["+index +"]"); System.out.println("oct-17----index---after ["+index +"]");
//Added by Pavan R on 2K18-Feb-08 [Start] demand is not set for some item //Added by Pavan R on 2K18-Feb-08 [Start] demand is not set for some item
if (index == -1) if (index == -1)
{ {
...@@ -12803,19 +12828,19 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -12803,19 +12828,19 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
cell.setCellValue(HSSFDateUtil.getExcelDate(dueDate)); cell.setCellValue(HSSFDateUtil.getExcelDate(dueDate));
cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy")); cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy"));
cell.setCellStyle(cellStyle);*/ cell.setCellStyle(cellStyle);*/
if(demand != 0 && dueDate.before(dateFrom)) /*if(demand != 0 && dueDate.before(dateFrom))
{ {
cell = row.getCell(13); cell = row.getCell(13);
cell.setCellValue(HSSFDateUtil.getExcelDate(dueDate)); cell.setCellValue(HSSFDateUtil.getExcelDate(dueDate));
styleDateClr.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy")); styleDateClr.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy"));
cell.setCellStyle(styleDateClr); cell.setCellStyle(styleDateClr);
}else }else
{ {*/
cell = row.getCell(13); cell = row.getCell(13);
cell.setCellValue(HSSFDateUtil.getExcelDate(dueDate)); cell.setCellValue(HSSFDateUtil.getExcelDate(dueDate));
cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy")); cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy"));
cell.setCellStyle(cellStyle); cell.setCellStyle(cellStyle);
} //}
//Changed by Pavan R on 19/JAN/2K18[End] //Changed by Pavan R on 19/JAN/2K18[End]
row.getCell(14).setCellValue(planSupply); row.getCell(14).setCellValue(planSupply);
...@@ -13831,14 +13856,13 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -13831,14 +13856,13 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
pendPOQty = rs.getDouble(7); pendPOQty = rs.getDouble(7);
tranId=rs.getString("tran_id"); tranId=rs.getString("tran_id");
tranSer=rs.getString("tran_ser"); tranSer=rs.getString("tran_ser");
//Commented by Pavan R on 19/JAN/2K18[Start]do not changes the dueDate from dateFrom //Commented by Pavan R on 19/JAN/2K18[Start]do not changes the dueDate from dateFrom
/*if (dueDate.compareTo(dateFrom) < 0) /*if (dueDate.compareTo(dateFrom) < 0)
{ {
dueDate = dateFrom; dueDate = dateFrom;
}*/ }*/
//[End]Pavan R on 19/JAN/2K18 //commented by Pavan R on 19/JAN/2018[End]
ADPElement detADPElement=new ADPElement(); ADPElement detADPElement=new ADPElement();
detADPElement.setSupply(dueDate, supply); detADPElement.setSupply(dueDate, supply);
...@@ -14211,6 +14235,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -14211,6 +14235,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
rsItemCode = rs.getString(1); rsItemCode = rs.getString(1);
rsSiteCode = rs.getString(13); rsSiteCode = rs.getString(13);
dueDate=rs.getTimestamp(2); dueDate=rs.getTimestamp(2);
//Commented by Pavan R on 19/JAN/2K18[Start]do not changes the dueDate from dateFrom //Commented by Pavan R on 19/JAN/2K18[Start]do not changes the dueDate from dateFrom
/*if(dueDate.compareTo(today)<0) /*if(dueDate.compareTo(today)<0)
{ {
......
...@@ -4,9 +4,10 @@ import ibase.webitm.ejb.mfg.TimeMRP; ...@@ -4,9 +4,10 @@ import ibase.webitm.ejb.mfg.TimeMRP;
//import java.util.ArrayList; //import java.util.ArrayList;
//import java.sql.Timestamp; //import java.sql.Timestamp;
import ibase.webitm.utility.ITMException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Comparator; import java.util.Comparator;
public class TimeMRP public class TimeMRP
{ {
private java.sql.Timestamp dueDate; private java.sql.Timestamp dueDate;
...@@ -124,9 +125,17 @@ public class TimeMRP ...@@ -124,9 +125,17 @@ public class TimeMRP
{ {
return this.runningSupply; return this.runningSupply;
} }
public void setPlanSupply(double supply) public void setPlanSupply(double supply) throws ITMException
{ {
this.planSupply += supply; this.planSupply += supply;
//Pavan R on Marcch2018 added below chnages
System.out.println("runningDemand:["+this.runningDemand+"]planSupply["+this.planSupply+"]");
if(this.runningDemand <= 0 ) //this.planSupply)
{
throw new ITMException(new Exception("runningDemand is less than planSupply"));
}
//end
} }
public double getPlanSupply() public double getPlanSupply()
{ {
......
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