Commit bcde8497 authored by caluka's avatar caluka

For MRC hold quantity filed added for ADP element and retrive from jboss sql


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98444 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a75d5636
...@@ -58,7 +58,8 @@ class ADPElement implements Cloneable ...@@ -58,7 +58,8 @@ class ADPElement implements Cloneable
private double batchQty = 0; private double batchQty = 0;
private double purcRate = 0; private double purcRate = 0;
private double qtStk = 0;//Added by chandrashekar 0n 11-08-14 private double qtStk = 0;//Added by chandrashekar 0n 11-08-14
private double ordDemand = 0; private double holdQuantity = 0;//Added by chandrashekar 0n 07-08-1
private double ordDemand = 0;
...@@ -329,6 +330,10 @@ class ADPElement implements Cloneable ...@@ -329,6 +330,10 @@ class ADPElement implements Cloneable
public void setQtStk(double qtStk) { public void setQtStk(double qtStk) {
this.qtStk = qtStk; this.qtStk = qtStk;
} }
public void setHoldQuantity(double holdQuantity)
{
this.holdQuantity = holdQuantity;
}
//changed method arguments by sabyasachi 29-03-2011 //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, 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)
...@@ -652,6 +657,10 @@ class ADPElement implements Cloneable ...@@ -652,6 +657,10 @@ class ADPElement implements Cloneable
{ {
return this.batchQty; return this.batchQty;
} }
public double getHoldQuantity()
{
return this.holdQuantity;
}
public String toString() public String toString()
{ {
return siteCode+":"+itemCode; return siteCode+":"+itemCode;
......
...@@ -53,7 +53,9 @@ public class ReqViewMrpBean { ...@@ -53,7 +53,9 @@ public class ReqViewMrpBean {
String saleOrder="",lineNo="", siteCode="", lotNo="", locCode="", lotSl="", tranSer="", runningSupplyStr="", qtyReqdStr="",allocQtyStr=""; String saleOrder="",lineNo="", siteCode="", lotNo="", locCode="", lotSl="", tranSer="", runningSupplyStr="", qtyReqdStr="",allocQtyStr="";
double runningSupply=0,qtyReqd=0; double runningSupply=0,qtyReqd=0;
String tranId="",refId="",refLineNo="",unit="",errString=""; String tranId="",refId="",refLineNo="",unit="",errString="";
String holdQtyStr = "";
double quantity=0,qtyAllocated=0,totAllocQty=0,allocQty=0; double quantity=0,qtyAllocated=0,totAllocQty=0,allocQty=0;
double holdQty = 0;
int cnt=0; int cnt=0;
Connection conn = null; Connection conn = null;
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
...@@ -111,22 +113,22 @@ public class ReqViewMrpBean { ...@@ -111,22 +113,22 @@ public class ReqViewMrpBean {
{ {
supply = detail3List.item(cntr).getFirstChild().getNodeValue(); supply = detail3List.item(cntr).getFirstChild().getNodeValue();
} }
if("plan_supply".equalsIgnoreCase( detail3Node.getNodeName())) /*if("plan_supply".equalsIgnoreCase( detail3Node.getNodeName()))
{ {
planSupply = detail3List.item(cntr).getFirstChild().getNodeValue(); planSupply = detail3List.item(cntr).getFirstChild().getNodeValue();
} }*/
if("running_demand".equalsIgnoreCase( detail3Node.getNodeName())) /*if("running_demand".equalsIgnoreCase( detail3Node.getNodeName()))
{ {
runningDemand = detail3List.item(cntr).getFirstChild().getNodeValue(); runningDemand = detail3List.item(cntr).getFirstChild().getNodeValue();
} }*/
if("running_supply".equalsIgnoreCase( detail3Node.getNodeName())) if("running_supply".equalsIgnoreCase( detail3Node.getNodeName()))
{ {
runningSupplyStr = detail3List.item(cntr).getFirstChild().getNodeValue(); runningSupplyStr = detail3List.item(cntr).getFirstChild().getNodeValue();
} }
if("running_plan_supply".equalsIgnoreCase( detail3Node.getNodeName())) /*if("running_plan_supply".equalsIgnoreCase( detail3Node.getNodeName()))
{ {
runningPlanSupply = detail3List.item(cntr).getFirstChild().getNodeValue(); runningPlanSupply = detail3List.item(cntr).getFirstChild().getNodeValue();
} }*/
if("unit".equalsIgnoreCase( detail3Node.getNodeName())) if("unit".equalsIgnoreCase( detail3Node.getNodeName()))
{ {
unit = detail3List.item(cntr).getFirstChild().getNodeValue(); unit = detail3List.item(cntr).getFirstChild().getNodeValue();
...@@ -171,6 +173,10 @@ public class ReqViewMrpBean { ...@@ -171,6 +173,10 @@ public class ReqViewMrpBean {
{ {
quarntineStk = detail3List.item(cntr).getFirstChild().getNodeValue(); quarntineStk = detail3List.item(cntr).getFirstChild().getNodeValue();
} }
if("hold_qty".equalsIgnoreCase( detail3Node.getNodeName()))
{
holdQtyStr = detail3List.item(cntr).getFirstChild().getNodeValue();
}
} }
...@@ -187,9 +193,10 @@ public class ReqViewMrpBean { ...@@ -187,9 +193,10 @@ public class ReqViewMrpBean {
rowlist.add(demand); rowlist.add(demand);
rowlist.add(supply); rowlist.add(supply);
rowlist.add(quarntineStk); rowlist.add(quarntineStk);
rowlist.add(planSupply); rowlist.add(holdQtyStr);
rowlist.add(runningPlanSupply); //rowlist.add(planSupply);
rowlist.add(runningDemand); //rowlist.add(runningPlanSupply);
//rowlist.add(runningDemand);
rowlist.add(runningSupplyStr); rowlist.add(runningSupplyStr);
rowlist.add(pendingIndent); rowlist.add(pendingIndent);
rowlist.add(pendingPo); rowlist.add(pendingPo);
......
...@@ -3917,7 +3917,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -3917,7 +3917,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
double availStk = 0; double availStk = 0;
double quarntineStk = 0; double quarntineStk = 0;
double holdQuantity = 0;
// End Variable Declared by Sachin on 24/6/2013 // End Variable Declared by Sachin on 24/6/2013
Statement stmt = null; Statement stmt = null;
...@@ -4101,6 +4101,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -4101,6 +4101,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
if(isRequirement) if(isRequirement)
{ {
qtStk = rs.getDouble(12); qtStk = rs.getDouble(12);
holdQuantity = rs.getDouble(13);
int len =arrStr.length; int len =arrStr.length;
for(int i =0;i<len;i++) for(int i =0;i<len;i++)
...@@ -4188,6 +4189,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -4188,6 +4189,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
if(isRequirement) if(isRequirement)
{ {
adpElement.setQtStk(qtStk); adpElement.setQtStk(qtStk);
adpElement.setHoldQuantity(holdQuantity);
} }
if(isDetailReq) if(isDetailReq)
{ {
...@@ -9858,6 +9861,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -9858,6 +9861,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
double pendIndQty = 0; double pendIndQty = 0;
double pendDRQty = 0; double pendDRQty = 0;
double qtStk = 0; double qtStk = 0;
double holdQuantity= 0 ;
// End changes by gulzar on 4/18/2012 // End changes by gulzar on 4/18/2012
int count1=0,count2=0; int count1=0,count2=0;
ADPElement adpElement = null; ADPElement adpElement = null;
...@@ -10183,6 +10187,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -10183,6 +10187,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
itemCodeParent = adpElement.getItemCodeParent(); //added by cpatil on 03/05/14 itemCodeParent = adpElement.getItemCodeParent(); //added by cpatil on 03/05/14
originalOrAltitem = adpElement.getOriginalOrAltitem(); //added by cpatil on 03/05/14 originalOrAltitem = adpElement.getOriginalOrAltitem(); //added by cpatil on 03/05/14
qtStk = adpElement.getQtStk(); //added by chandrashekar 0n 12-08-14 qtStk = adpElement.getQtStk(); //added by chandrashekar 0n 12-08-14
holdQuantity = adpElement.getHoldQuantity(); //added by chandrashekar 0n 07-08-15
System.out.println("itemCode["+itemCode+"]"); System.out.println("itemCode["+itemCode+"]");
itemCDDetailMap = adpElement.getbomSet(); itemCDDetailMap = adpElement.getbomSet();
...@@ -10257,7 +10262,6 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -10257,7 +10262,6 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
System.out.println("demandSum["+demandSum+"]"); System.out.println("demandSum["+demandSum+"]");
supply = timeMrp.getSupply(); supply = timeMrp.getSupply();
supplySum = supplySum+supply; supplySum = supplySum+supply;
System.out.println("supplySum>>>["+supplySum+"]");
planSupply = timeMrp.getPlanSupply(); planSupply = timeMrp.getPlanSupply();
planSupplySum = planSupplySum+planSupply; planSupplySum = planSupplySum+planSupply;
runningDemand = timeMrp.getRunningDemand(); runningDemand = timeMrp.getRunningDemand();
...@@ -11037,7 +11041,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -11037,7 +11041,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
} }
if(isRequirement)//Added by Chandrashekar on 11-08-14 if(isRequirement)//Added by Chandrashekar on 11-08-14
{ {
valueXmlString = new StringBuffer(); valueXmlString = new StringBuffer();
//cpatil-25/08/14-System.out.println("context["+context+"]"); //cpatil-25/08/14-System.out.println("context["+context+"]");
//reqValueXmlString = new StringBuffer("<?xml version = \"1.0\"?><Root>\r\n"); //reqValueXmlString = new StringBuffer("<?xml version = \"1.0\"?><Root>\r\n");
...@@ -11084,6 +11088,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -11084,6 +11088,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
reqValueXmlString.append("<pending_indent protect = '1'>").append("<![CDATA[" + getRequiredDecimal(pendIndQtySum, 3) + "]]>").append("</pending_indent>\r\n"); reqValueXmlString.append("<pending_indent protect = '1'>").append("<![CDATA[" + getRequiredDecimal(pendIndQtySum, 3) + "]]>").append("</pending_indent>\r\n");
reqValueXmlString.append("<pending_dr protect = '1'>").append("<![CDATA[" + getRequiredDecimal(pendDRQty, 3) + "]]>").append("</pending_dr>\r\n"); reqValueXmlString.append("<pending_dr protect = '1'>").append("<![CDATA[" + getRequiredDecimal(pendDRQty, 3) + "]]>").append("</pending_dr>\r\n");
reqValueXmlString.append("<quarntine_stk protect = '1'>").append("<![CDATA[" + getRequiredDecimal(qtStk, 3) + "]]>").append("</quarntine_stk>\r\n"); reqValueXmlString.append("<quarntine_stk protect = '1'>").append("<![CDATA[" + getRequiredDecimal(qtStk, 3) + "]]>").append("</quarntine_stk>\r\n");
reqValueXmlString.append("<hold_qty protect = '1'>").append("<![CDATA[" + getRequiredDecimal(holdQuantity, 3) + "]]>").append("</hold_qty>\r\n");
reqValueXmlString.append("</Detail" + context + ">"); reqValueXmlString.append("</Detail" + context + ">");
} }
......
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