Commit 618f8101 authored by cpatil's avatar cpatil

modify code in base office for mps order issue for supreme


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97797 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c2c88ed3
...@@ -3629,6 +3629,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -3629,6 +3629,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
{ {
adpElement.setDemand(demandAdp-supplyAdp+reorderLevel); adpElement.setDemand(demandAdp-supplyAdp+reorderLevel);
}*/ }*/
if(reorderLevel>0)
{
if( supplyAdp == 0 && checkNull(saleOrderAdp).trim().length() > 0 ) if( supplyAdp == 0 && checkNull(saleOrderAdp).trim().length() > 0 )
{ {
//demandAdp = demandAdp + reorderLevel ; //demandAdp = demandAdp + reorderLevel ;
...@@ -3660,6 +3662,51 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -3660,6 +3662,51 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
} }
} }
if( supplyAdp > 0)
{
double netReqd=0,planSupply=0;
netReqd=adpElement.getDemand()-adpElement.getSupply();
planSupply=adpElement.getDemand()-adpElement.getSupply()+reorderLevel;
System.out.println("netReqd["+netReqd+"]");
System.out.println("before deduction planSupply["+planSupply+"]");
if(netReqd>0)
{
planSupply=planSupply-netReqd;
}
System.out.println("after deduction planSupply["+planSupply+"]");
boolean mrpFlag = false;
ArrayList <TimeMRP>timemrpList=adpElement.getTimeMrpList();
ArrayList <TimeMRP>timemrpListN=new ArrayList<TimeMRP>();
if(timemrpList.size()>0)
{
for(int k=0;k<timemrpList.size();k++)
{
TimeMRP tmp=timemrpList.get(k);
System.out.println("3685--tmp.getDemand()["+tmp.getDemand()+"]tmp.getRunningDemand()["+tmp.getRunningDemand()+"]");
if( tmp.getSupply() > 0 && mrpFlag == false )
{
System.out.println("@@@@@010415:::itemCodeAdp["+itemCodeAdp+"] tmp.getDemand()["+tmp.getDemand()+"]-tmp.getSupply()["+tmp.getSupply()+"]+reorderLevel["+reorderLevel+"]");
tmp.setDemand(planSupply ) ;
System.out.println("@@@@@010415:::tmp.getDemand()["+tmp.getDemand()+"]");
//tmp.setRunningDemand(reorderLevel);
tmp.setRunningDemand(adpElement.getDemand()+planSupply );
System.out.println("@@@@@010415:::tmp.getRunningDemand()["+tmp.getRunningDemand()+"]");
System.out.println("3694--tmp.getDemand()["+tmp.getDemand()+"]tmp.getRunningDemand()["+tmp.getRunningDemand()+"]");
System.out.println("3695---adpElement.getDemand()["+adpElement.getDemand()+"]");
adpElement.setDemand(adpElement.getDemand()+planSupply);
mrpFlag = true;
}
timemrpListN.add(tmp);
}
adpElement.SetTimeMRPArr(timemrpListN);
}
//adpElement.setDemand(dueDate,planSupply, adpElement.getSaleOrder(),adpElement.getLineNo());
adpElement.setReordPlanQty(planSupply);
}
}
...@@ -4441,7 +4488,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -4441,7 +4488,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
reorderLevel=adpElement.getReorderLevel(); reorderLevel=adpElement.getReorderLevel();
if(reorderLevel>0) /*if(reorderLevel>0)
{ {
netReqd=adpElement.getDemand()-dataBeanTemp.getSupply(); netReqd=adpElement.getDemand()-dataBeanTemp.getSupply();
...@@ -4456,7 +4503,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -4456,7 +4503,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
////if(planSupply<=re) ////if(planSupply<=re)
adpElement.setDemand(dueDate,planSupply, adpElement.getSaleOrder(),adpElement.getLineNo()); adpElement.setDemand(dueDate,planSupply, adpElement.getSaleOrder(),adpElement.getLineNo());
adpElement.setReordPlanQty(planSupply); adpElement.setReordPlanQty(planSupply);
} }*/
adpElement.setSupply(dueDate, (Double) dataBeanTemp.getSupply()); adpElement.setSupply(dueDate, (Double) dataBeanTemp.getSupply());
//adpElement.setStockQty(dueDate, stockQty); //adpElement.setStockQty(dueDate, stockQty);
...@@ -7673,13 +7720,13 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7673,13 +7720,13 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
{ {
if( soItemListMap.containsKey(tempParentItem)) if( soItemListMap.containsKey(tempParentItem))
{ {
tempSORef = soItemListMap.get(tempParentItem).toString(); tempSORef = checkNull(soItemListMap.get(tempParentItem)+"").toString();
mpsOrder.addnOrder=tempSORef; mpsOrder.addnOrder=tempSORef;
break; break;
}else }else
{ {
String tempValue = tempParentItem; String tempValue = tempParentItem;
tempParentItem = parentItemMap.get(tempParentItem)== null?"":parentItemMap.get(tempParentItem).toString(); tempParentItem = parentItemMap.get(tempParentItem)== null?"":checkNull(parentItemMap.get(tempParentItem)+"").toString();//checknull added by mnaoj dtd 03/04/2015
System.out.println("@@@@@tempParentItem["+tempParentItem+"]tempValue["+tempValue+"]"); System.out.println("@@@@@tempParentItem["+tempParentItem+"]tempValue["+tempValue+"]");
if(tempValue.equalsIgnoreCase(tempParentItem) ) if(tempValue.equalsIgnoreCase(tempParentItem) )
{ {
...@@ -7698,7 +7745,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7698,7 +7745,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
} }
else else
{ {
mpsOrder.addnOrder= soItemListMap.get(itemCode).toString(); mpsOrder.addnOrder= checkNull(soItemListMap.get(itemCode)+"").toString();//checknull added by mnaoj dtd 03/04/2015
} }
System.out.println("@@@@@@@@@itemCode 2 ["+itemCode+"] tempSORef["+tempSORef+"]"); System.out.println("@@@@@@@@@itemCode 2 ["+itemCode+"] tempSORef["+tempSORef+"]");
......
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