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);
} }
......
...@@ -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