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
......@@ -339,14 +339,11 @@ class ADPElement implements Cloneable
//changed method arguments by sabyasachi 29-03-2011
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)
{
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.saleOrder = saleOrder;//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
String dueDateStr="";
//genericUtility = GenericUtility.getInstance();
......@@ -354,8 +351,7 @@ class ADPElement implements Cloneable
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
if( dueDate != null)
{
dueDateStr = sdf.format(dueDate);
System.out.println("@@@@@ dueDateStr["+dueDateStr+"]");
dueDateStr = sdf.format(dueDate);
}
if(saleOrder!=null && saleOrder.trim().length()>0)
......@@ -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)
{
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)
{
this.demand+= demand;
......@@ -383,10 +379,7 @@ class ADPElement implements Cloneable
}
//this.saleOrder = saleOrder;
//this.lineNo = lineNo;
System.out.println("this.refId---"+this.refId);
System.out.println("saleOrder---"+saleOrder);
System.out.println("demand---["+demand+"]");
//this.lineNo = lineNo;
if(saleOrder!=null && saleOrder.trim().length()>0)
{
if(this.refId==null ||this.refId.trim().length()==0)
......@@ -895,11 +888,12 @@ class ADPElement implements Cloneable
//timeMRP.setDemand(demand,saleOrder,lineNo);
System.out.println("before setDemand() [" + demand + "] supply [" + supply + "]timeMRP.getDemand()["+timeMRP.getDemand()+"]" );
//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);
timeMRP.setDemand(demand);
// }
// }
//Commented by Pavan R on 05/DEC/17 End
//end added by sabyasachi 29.03.2011
timeMRP.setSupply(supply);
......@@ -1039,8 +1033,9 @@ class ADPElement implements Cloneable
//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++)
//Added By Pavan Rane on 28MAR18[End]
//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);
if (timeMRP.getDueDate().equals(dueDate))
......@@ -1055,6 +1050,8 @@ class ADPElement implements Cloneable
// end 10-04-2006 manoharan
}
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++)
{
timeMRP = (TimeMRP)timeMRPArr.get(ctr);
......@@ -1064,11 +1061,10 @@ class ADPElement implements Cloneable
timeMRP.setRunningDemand(runningDemand);
timeMRP.setRunningSupply(runningSupply);
// 10-04-2006 manoharan
planSupply = timeMRP.getPlanSupply();
System.out.println("@@@@@@1055 planSupply["+planSupply+"]");
planSupply = timeMRP.getPlanSupply();
runningPlanSupply = runningPlanSupply + planSupply;
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
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