Commit 207c420e authored by prane's avatar prane

to check duplicate item in adpelement

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@184317 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7941b165
...@@ -340,13 +340,10 @@ class ADPElement implements Cloneable ...@@ -340,13 +340,10 @@ class ADPElement implements Cloneable
public void setDemand(java.sql.Timestamp dueDate, double demand, String saleOrder, String itemCode) throws ITMException, Exception public void setDemand(java.sql.Timestamp dueDate, double demand, String saleOrder, String itemCode) throws ITMException, Exception
//public void setDemand(java.sql.Timestamp dueDate, double demand) //public void setDemand(java.sql.Timestamp dueDate, double demand)
{ {
System.out.println("Calling setDemand() for saleOrder["+saleOrder+"]itemCode["+itemCode+"]this.refId["+this.refId+"]"); System.out.println("--1--calling setDemand() itemCode["+this.getItemCode()+"]dueDate["+dueDate+"]siteCode["+this.getSiteCode()+"]planSupply["+this.planSupply+"]");
this.demand += demand; this.demand += demand;
//this.saleOrder = saleOrder;//Uncommented by manoj dtd 25/12/2014 //this.saleOrder = saleOrder;//Uncommented by manoj dtd 25/12/2014
//this.lineNo = lineNo;//Uncommented by manoj dtd 25/12/2014 //this.lineNo = lineNo;//Uncommented by manoj dtd 25/12/2014
System.out.println("this.refId---"+this.refId);
System.out.println("saleOrder---"+saleOrder);
System.out.println("demand---["+demand+"]");
//Commented by manoj dtd 25/12/2014 //Commented by manoj dtd 25/12/2014
String dueDateStr=""; String dueDateStr="";
//genericUtility = GenericUtility.getInstance(); //genericUtility = GenericUtility.getInstance();
...@@ -355,7 +352,6 @@ class ADPElement implements Cloneable ...@@ -355,7 +352,6 @@ class ADPElement implements Cloneable
if( dueDate != null) if( dueDate != null)
{ {
dueDateStr = sdf.format(dueDate); dueDateStr = sdf.format(dueDate);
System.out.println("@@@@@ dueDateStr["+dueDateStr+"]");
} }
if(saleOrder!=null && saleOrder.trim().length()>0) if(saleOrder!=null && saleOrder.trim().length()>0)
...@@ -375,7 +371,7 @@ class ADPElement implements Cloneable ...@@ -375,7 +371,7 @@ class ADPElement implements Cloneable
public void setDemand(java.sql.Timestamp dueDate, double demand, String saleOrder, String lineNo,boolean isDetailReq) public void setDemand(java.sql.Timestamp dueDate, double demand, String saleOrder, String lineNo,boolean isDetailReq)
//public void setDemand(java.sql.Timestamp dueDate, double demand) //public void setDemand(java.sql.Timestamp dueDate, double demand)
{ {
System.out.println("Calling setDemand() for saleOrder["+saleOrder+"]lineNo["+lineNo+"]this.refId["+this.refId+"]"); System.out.println("--2--calling setDemand() itemCode["+this.getItemCode()+"]dueDate["+dueDate+"]siteCode["+this.getSiteCode()+"]planSupply["+this.planSupply+"]");
if(isDetailReq) if(isDetailReq)
{ {
this.demand+= demand; this.demand+= demand;
...@@ -384,9 +380,6 @@ class ADPElement implements Cloneable ...@@ -384,9 +380,6 @@ class ADPElement implements Cloneable
//this.saleOrder = saleOrder; //this.saleOrder = saleOrder;
//this.lineNo = lineNo; //this.lineNo = lineNo;
System.out.println("this.refId---"+this.refId);
System.out.println("saleOrder---"+saleOrder);
System.out.println("demand---["+demand+"]");
if(saleOrder!=null && saleOrder.trim().length()>0) if(saleOrder!=null && saleOrder.trim().length()>0)
{ {
if(this.refId==null ||this.refId.trim().length()==0) if(this.refId==null ||this.refId.trim().length()==0)
...@@ -895,6 +888,7 @@ class ADPElement implements Cloneable ...@@ -895,6 +888,7 @@ class ADPElement implements Cloneable
//timeMRP.setDemand(demand,saleOrder,lineNo); //timeMRP.setDemand(demand,saleOrder,lineNo);
System.out.println("before setDemand() [" + demand + "] supply [" + supply + "]timeMRP.getDemand()["+timeMRP.getDemand()+"]" ); System.out.println("before setDemand() [" + demand + "] supply [" + supply + "]timeMRP.getDemand()["+timeMRP.getDemand()+"]" );
//Commented by Pavan R on 05/DEC/17 Start //Commented by Pavan R on 05/DEC/17 Start
// if(! (demand > 0 && timeMRP.getDemand() > 0 )) // if(! (demand > 0 && timeMRP.getDemand() > 0 ))
// { // {
System.out.println("before set demand..."+demand); System.out.println("before set demand..."+demand);
...@@ -1039,8 +1033,9 @@ class ADPElement implements Cloneable ...@@ -1039,8 +1033,9 @@ class ADPElement implements Cloneable
//Added By Pavan Rane on 28MAR18[To Sort the TimeMRPList][Start] //Added By Pavan Rane on 28MAR18[To Sort the TimeMRPList][Start]
System.out.println("Collections.sorting...."+dueDate); System.out.println("Collections.sorting...."+dueDate);
Collections.sort(timeMRPArr, TimeMRP.timeMRPComparator); Collections.sort(timeMRPArr, TimeMRP.timeMRPComparator);
//Added By Pavan Rane on 28MAR18[To Sort the TimeMRPList][End] //Added By Pavan Rane on 28MAR18[End]
for (int ctr = 0; ctr < timeMRPArr.size(); ctr++) //commented by Pavan R on 27-apr-18 for to check duplicate item in adpelement
/*for (int ctr = 0; ctr < timeMRPArr.size(); ctr++)
{ {
timeMRP = (TimeMRP)timeMRPArr.get(ctr); timeMRP = (TimeMRP)timeMRPArr.get(ctr);
if (timeMRP.getDueDate().equals(dueDate)) if (timeMRP.getDueDate().equals(dueDate))
...@@ -1055,6 +1050,8 @@ class ADPElement implements Cloneable ...@@ -1055,6 +1050,8 @@ class ADPElement implements Cloneable
// end 10-04-2006 manoharan // end 10-04-2006 manoharan
} }
System.out.println("@@@@@@@1044 index["+index+"]timeMRPArr.size()["+timeMRPArr.size()+"]"); System.out.println("@@@@@@@1044 index["+index+"]timeMRPArr.size()["+timeMRPArr.size()+"]");
*/
//commented by Pavan R on 27-apr-18 end
for (int ctr = index; ctr < timeMRPArr.size(); ctr++) for (int ctr = index; ctr < timeMRPArr.size(); ctr++)
{ {
timeMRP = (TimeMRP)timeMRPArr.get(ctr); timeMRP = (TimeMRP)timeMRPArr.get(ctr);
...@@ -1065,10 +1062,9 @@ class ADPElement implements Cloneable ...@@ -1065,10 +1062,9 @@ class ADPElement implements Cloneable
timeMRP.setRunningSupply(runningSupply); timeMRP.setRunningSupply(runningSupply);
// 10-04-2006 manoharan // 10-04-2006 manoharan
planSupply = timeMRP.getPlanSupply(); planSupply = timeMRP.getPlanSupply();
System.out.println("@@@@@@1055 planSupply["+planSupply+"]");
runningPlanSupply = runningPlanSupply + planSupply; runningPlanSupply = runningPlanSupply + planSupply;
timeMRP.setRunningPlanSupply(runningPlanSupply); timeMRP.setRunningPlanSupply(runningPlanSupply);
System.out.println("1069 runningPlanSupply ["+runningPlanSupply+"]"); System.out.println("updateRunningDemandSupply::itemCode["+this.getItemCode()+"]dueDate["+dueDate+"]siteCode["+this.getSiteCode()+"]runningDemand["+runningDemand+"] runningSupply["+runningSupply+"] planSupply["+planSupply+"] runningPlanSupply["+runningPlanSupply+"]");
// end 10-04-2006 manoharan // end 10-04-2006 manoharan
timeMRPArr.set(ctr, timeMRP); timeMRPArr.set(ctr, timeMRP);
} }
......
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