Commit 21442c0e authored by cpatil's avatar cpatil

modify for bom alt item


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95022 ce508802-f39f-4f6c-b175-0d175dae99d5
parent cf8cc0b3
...@@ -88,6 +88,8 @@ class ADPElement ...@@ -88,6 +88,8 @@ class ADPElement
private ArrayList<HashMap<String, ADPElement>> detList=new ArrayList<HashMap<String, ADPElement>>(); private ArrayList<HashMap<String, ADPElement>> detList=new ArrayList<HashMap<String, ADPElement>>();
private String empCodePlan;//Manoj dtd 11/03/2014 private String empCodePlan;//Manoj dtd 11/03/2014
private String originalOrAltitem;//Manoj dtd 30/04/2014 to check whether Original/Alternate item private String originalOrAltitem;//Manoj dtd 30/04/2014 to check whether Original/Alternate item
private String itemCodeParent;//added by cpatil on 03/05/14
public ADPElement() public ADPElement()
{ {
...@@ -626,6 +628,17 @@ class ADPElement ...@@ -626,6 +628,17 @@ class ADPElement
return this.originalOrAltitem; return this.originalOrAltitem;
} }
//added by cpatil on 03/05/14 start
public void setItemCodeParent(String itemCodeParent)
{
this.itemCodeParent = itemCodeParent;
}
public String getItemCodeParent()
{
return this.itemCodeParent;
}
//added by cpatil on 03/05/14 end
//private void updateTimeMrp(java.sql.Timestamp dueDate, double demand, double supply, double stockQty, double othSupply, String saleOrder, String lineNo) //private void updateTimeMrp(java.sql.Timestamp dueDate, double demand, double supply, double stockQty, double othSupply, String saleOrder, String lineNo)
private void updateTimeMrp(java.sql.Timestamp dueDate, double demand, double supply, double stockQty, double othSupply) private void updateTimeMrp(java.sql.Timestamp dueDate, double demand, double supply, double stockQty, double othSupply)
{ {
......
...@@ -2047,6 +2047,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -2047,6 +2047,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
itemCode = (String) itemMapEntry.getKey(); itemCode = (String) itemMapEntry.getKey();
//Manoj dtd 30/04/2014 to set Original/Alternate item flag //Manoj dtd 30/04/2014 to set Original/Alternate item flag
adpElement.setOriginalOrAltitem("O"); adpElement.setOriginalOrAltitem("O");
adpElement.setItemCodeParent(itemCode); //added by cpatil on 03/05/14
// 01/04/11 in case of made to order only made to order item // 01/04/11 in case of made to order only made to order item
// will be planned // will be planned
/* /*
...@@ -2114,6 +2115,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -2114,6 +2115,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
System.out.println("altItemlist.get(i)----"+altItemlist.get(i)); System.out.println("altItemlist.get(i)----"+altItemlist.get(i));
adpElement = new ADPElement(); adpElement = new ADPElement();
adpElement.setOriginalOrAltitem("A"); adpElement.setOriginalOrAltitem("A");
adpElement.setItemCodeParent(keyAlttem); //added by cpatil on 03/05/14
adpElement.setSiteCode((String) siteMapEntry.getKey()); adpElement.setSiteCode((String) siteMapEntry.getKey());
adpElement.setItemCode(altItemlist.get(i)); adpElement.setItemCode(altItemlist.get(i));
adpElement = setAdpeValues(adpElement); adpElement = setAdpeValues(adpElement);
...@@ -6857,6 +6859,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -6857,6 +6859,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
ResultSet rs1 = null; ResultSet rs1 = null;
HashMap sourceSupplyMap = new HashMap(); HashMap sourceSupplyMap = new HashMap();
String tranSer2=""; String tranSer2="";
String itemCodeParent="" , originalOrAltitem=""; // added by cpatil on 03/05/14
try try
{ {
valueXmlString = new StringBuffer("<?xml version = \"1.0\"?><Root>\r\n"); valueXmlString = new StringBuffer("<?xml version = \"1.0\"?><Root>\r\n");
...@@ -7024,7 +7028,10 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7024,7 +7028,10 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
mfgLeadTime = adpElement.getMfgLeadTime(); mfgLeadTime = adpElement.getMfgLeadTime();
desc = adpElement.getItemDescr(); desc = adpElement.getItemDescr();
saleOrder = adpElement.getSaleOrder(); saleOrder = adpElement.getSaleOrder();
itemCodeParent = adpElement.getItemCodeParent(); //added by cpatil on 03/05/14
originalOrAltitem = adpElement.getOriginalOrAltitem(); //added by cpatil on 03/05/14
System.out.println("@@@@@@@@itemCodeParent["+itemCodeParent+"]originalOrAltitem["+originalOrAltitem+"]");
ArrayList timeMRParr = adpElement.getTimeMrpList(); ArrayList timeMRParr = adpElement.getTimeMrpList();
System.out.println("Printing timeMRParr.size()---" + timeMRParr.size()); System.out.println("Printing timeMRParr.size()---" + timeMRParr.size());
//detailMap=adpElement.getDetMap();//Added by Manoj dtd 02/11/2013 //detailMap=adpElement.getDetMap();//Added by Manoj dtd 02/11/2013
...@@ -7151,6 +7158,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7151,6 +7158,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
//valueXmlString.append("<tran_ser_flag protect = '1'>").append("<![CDATA[" + tranSerFlag(siteCode+itemCode,IPD_DIST_List,IPD_INDENT_List,IPD_INDEPENDENT_List,IPD_MPS_ORDER_List) + "]]>").append("</tran_ser_flag>\r\n"); //valueXmlString.append("<tran_ser_flag protect = '1'>").append("<![CDATA[" + tranSerFlag(siteCode+itemCode,IPD_DIST_List,IPD_INDENT_List,IPD_INDEPENDENT_List,IPD_MPS_ORDER_List) + "]]>").append("</tran_ser_flag>\r\n");
Boolean tranSerflag = tranSerFlag(siteCode+itemCode,IPD_DIST_List,IPD_INDENT_List,IPD_INDEPENDENT_List,IPD_MPS_ORDER_List); Boolean tranSerflag = tranSerFlag(siteCode+itemCode,IPD_DIST_List,IPD_INDENT_List,IPD_INDEPENDENT_List,IPD_MPS_ORDER_List);
valueXmlString.append("<originalOrAltitem protect = '1'>").append("<![CDATA[" + originalOrAltitem + "]]>").append("</originalOrAltitem>\r\n"); // added by cpatil on 03/05/14
//valueXmlString.append("<Deatail4 protect = '1'>"); //valueXmlString.append("<Deatail4 protect = '1'>");
{ {
flag = false; flag = false;
...@@ -7363,6 +7371,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7363,6 +7371,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
} }
System.out.println("Printing valueXmlString----" + valueXmlString); System.out.println("Printing valueXmlString----" + valueXmlString);
// ended by akhilesh // ended by akhilesh
...@@ -7600,7 +7610,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7600,7 +7610,8 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
valueXmlString.append("<loc_code protect = '1'>").append("<![CDATA[" + stkKey[4] + "]]>").append("</loc_code>\r\n"); valueXmlString.append("<loc_code protect = '1'>").append("<![CDATA[" + stkKey[4] + "]]>").append("</loc_code>\r\n");
valueXmlString.append("<unit protect = '1'>").append("<![CDATA[" + setDescription("unit", "item", "item_code", stkKey[1], conn) + "]]>").append("</unit>\r\n"); valueXmlString.append("<unit protect = '1'>").append("<![CDATA[" + setDescription("unit", "item", "item_code", stkKey[1], conn) + "]]>").append("</unit>\r\n");
valueXmlString.append("<parent_item protect = '1'>").append("<![CDATA[" + itemCode + "]]>").append("</parent_item>\r\n"); valueXmlString.append("<parent_item protect = '1'>").append("<![CDATA[" + itemCode + "]]>").append("</parent_item>\r\n");
} }
} }
else else
...@@ -7611,6 +7622,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7611,6 +7622,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
valueXmlString.append("<tran_id protect = '1'>").append("<![CDATA[" + stkKey[0] + "]]>").append("</tran_id>\r\n"); valueXmlString.append("<tran_id protect = '1'>").append("<![CDATA[" + stkKey[0] + "]]>").append("</tran_id>\r\n");
valueXmlString.append("<line_no protect = '1'>").append("<![CDATA[" + stkKey[1] + "]]>").append("</line_no>\r\n"); valueXmlString.append("<line_no protect = '1'>").append("<![CDATA[" + stkKey[1] + "]]>").append("</line_no>\r\n");
valueXmlString.append("<unit protect = '1'>").append("<![CDATA[" + setDescription("unit", "item", "item_code", itemCode, conn) + "]]>").append("</unit>\r\n"); valueXmlString.append("<unit protect = '1'>").append("<![CDATA[" + setDescription("unit", "item", "item_code", itemCode, conn) + "]]>").append("</unit>\r\n");
} }
valueXmlString.append("<tran_ser protect = '1'>").append("<![CDATA[" + tranSer + "]]>").append("</tran_ser>\r\n"); valueXmlString.append("<tran_ser protect = '1'>").append("<![CDATA[" + tranSer + "]]>").append("</tran_ser>\r\n");
...@@ -7629,6 +7641,11 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -7629,6 +7641,11 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
valueXmlString.append("<pending_do protect = '1'>").append("<![CDATA[" + getRequiredDecimal(pendDOQty, 3) + "]]>").append("</pending_do>\r\n"); valueXmlString.append("<pending_do protect = '1'>").append("<![CDATA[" + getRequiredDecimal(pendDOQty, 3) + "]]>").append("</pending_do>\r\n");
valueXmlString.append("<pending_indent protect = '1'>").append("<![CDATA[" + getRequiredDecimal(pendIndQty, 3) + "]]>").append("</pending_indent>\r\n"); valueXmlString.append("<pending_indent protect = '1'>").append("<![CDATA[" + getRequiredDecimal(pendIndQty, 3) + "]]>").append("</pending_indent>\r\n");
valueXmlString.append("<pending_dr protect = '1'>").append("<![CDATA[" + getRequiredDecimal(pendDRQty, 3) + "]]>").append("</pending_dr>\r\n"); valueXmlString.append("<pending_dr protect = '1'>").append("<![CDATA[" + getRequiredDecimal(pendDRQty, 3) + "]]>").append("</pending_dr>\r\n");
valueXmlString.append("<item_code_parent protect = '1'>").append("<![CDATA["+itemCodeParent.trim()+"]]>").append("</item_code_parent>\r\n"); // added by cpatil on 03/05/14
valueXmlString.append("<originalOrAltitem protect = '1'>").append("<![CDATA[" + originalOrAltitem + "]]>").append("</originalOrAltitem>\r\n"); // added by cpatil on 03/05/14
valueXmlString.append("</Detail4>"); valueXmlString.append("</Detail4>");
} }
......
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