Commit e36aebbe authored by asikarwar's avatar asikarwar

set pack_code in details


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92836 ce508802-f39f-4f6c-b175-0d175dae99d5
parent bbc85b27
...@@ -855,6 +855,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -855,6 +855,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
valueXmlString.append("<Detail1>"); valueXmlString.append("<Detail1>");
childNodeListLength = childNodeList.getLength(); childNodeListLength = childNodeList.getLength();
do do
{ {
...@@ -868,6 +869,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -868,6 +869,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
ctr++; ctr++;
} }
while ((ctr < childNodeListLength) && (!childNodeName.equals(currentColumn))); while ((ctr < childNodeListLength) && (!childNodeName.equals(currentColumn)));
System.out.println("CURRENT COLUMN ["+currentColumn+"]"); System.out.println("CURRENT COLUMN ["+currentColumn+"]");
if (currentColumn.trim().equalsIgnoreCase("itm_defaultedit")) if (currentColumn.trim().equalsIgnoreCase("itm_defaultedit"))
...@@ -1021,7 +1023,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -1021,7 +1023,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
valueXmlString.append("<site_descr>").append("<![CDATA["+descr+"]]>").append("</site_descr>"); valueXmlString.append("<site_descr>").append("<![CDATA["+descr+"]]>").append("</site_descr>");
} }
else if (childNodeName.trim().equalsIgnoreCase("unit__rate")) else if (currentColumn.trim().equalsIgnoreCase("unit__rate"))
{ {
unitRate=checkNull(this.genericUtility.getColumnValue("unit__rate", dom)); unitRate=checkNull(this.genericUtility.getColumnValue("unit__rate", dom));
quantity=checkDoubleNull(this.genericUtility.getColumnValue("quantity", dom)); quantity=checkDoubleNull(this.genericUtility.getColumnValue("quantity", dom));
...@@ -1170,7 +1172,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -1170,7 +1172,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
valueXmlString.append("<supplier_sh_name>").append("<![CDATA["+shName+"]]>").append("</supplier_sh_name>"); valueXmlString.append("<supplier_sh_name>").append("<![CDATA["+shName+"]]>").append("</supplier_sh_name>");
} }
else if (childNodeName.equalsIgnoreCase("proj_code")) else if (currentColumn.equalsIgnoreCase("proj_code"))
{ {
projCode=checkNull(this.genericUtility.getColumnValue("proj_code", dom)); projCode=checkNull(this.genericUtility.getColumnValue("proj_code", dom));
sql = "select descr from project where proj_code = ?"; sql = "select descr from project where proj_code = ?";
...@@ -1214,18 +1216,20 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -1214,18 +1216,20 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
valueXmlString.append("<Detail2>"); valueXmlString.append("<Detail2>");
childNodeListLength = childNodeList.getLength(); childNodeListLength = childNodeList.getLength();
for (ctr = 0; ctr < childNodeListLength; ctr++) System.out.println("childNodeList"+childNodeList.getLength());
/*for (ctr = 0; ctr < childNodeListLength; ctr++)
{ {
childNode = childNodeList.item(ctr); childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();*/
if (childNodeName.trim().equalsIgnoreCase("itm_default"))
if (currentColumn.trim().equalsIgnoreCase("itm_default"))
{ {
} }
else if (currentColumn.trim().equalsIgnoreCase("item_code")) else if (currentColumn.trim().equalsIgnoreCase("item_code"))
{ {
itemCode=checkNull(this.genericUtility.getColumnValue("item_code", dom)); itemCode=checkNull(this.genericUtility.getColumnValue("item_code", dom));
sql = "select descr ,item_ser ,unit ,unit__pur,unit__rate from item where item_code = ?"; sql = "select descr ,item_ser ,unit ,unit__pur,unit__rate ,pack_code from item where item_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode); pstmt.setString(1, itemCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -1236,6 +1240,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -1236,6 +1240,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
unit = checkNull(rs.getString(3)); unit = checkNull(rs.getString(3));
unitPur = rs.getString(4)== null?"":rs.getString(3); unitPur = rs.getString(4)== null?"":rs.getString(3);
unitRate = rs.getString(5)== null?"":rs.getString(3); unitRate = rs.getString(5)== null?"":rs.getString(3);
packCode = rs.getString("pack_code")== null?"":rs.getString("pack_code");
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -1247,9 +1252,25 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -1247,9 +1252,25 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
valueXmlString.append("<unit>").append("<![CDATA["+unit+"]]>").append("</unit>"); valueXmlString.append("<unit>").append("<![CDATA["+unit+"]]>").append("</unit>");
valueXmlString.append("<unit__std >").append("<![CDATA["+unit+"]]>").append("</unit__std>"); valueXmlString.append("<unit__std >").append("<![CDATA["+unit+"]]>").append("</unit__std>");
valueXmlString.append("<unit__rate>").append("<![CDATA["+unitRate+"]]>").append("</unit__rate>"); valueXmlString.append("<unit__rate>").append("<![CDATA["+unitRate+"]]>").append("</unit__rate>");
valueXmlString.append("<pack_code>").append("<![CDATA["+packCode+"]]>").append("</pack_code>");
sql = "select descr from packing where pack_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, packCode);
rs = pstmt.executeQuery();
if(rs.next())
{
descrPackCode = checkNull(rs.getString(1));
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append("<packing_descr >").append("<![CDATA["+descrPackCode+"]]>").append("</packing_descr>");
} }
else if (childNodeName.trim().equalsIgnoreCase("unit__rate")) else if (currentColumn.trim().equalsIgnoreCase("unit__rate"))
{ {
System.out.println("unit__rate ITEM CHANGE ="); System.out.println("unit__rate ITEM CHANGE =");
unitRate=checkNull(this.genericUtility.getColumnValue("unit__rate", dom)); unitRate=checkNull(this.genericUtility.getColumnValue("unit__rate", dom));
...@@ -1365,7 +1386,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote ...@@ -1365,7 +1386,7 @@ implements BillofQuantityICLocal, BillofQuantityICRemote
valueXmlString.append("<packing_descr >").append("<![CDATA["+descrPackCode+"]]>").append("</packing_descr>"); valueXmlString.append("<packing_descr >").append("<![CDATA["+descrPackCode+"]]>").append("</packing_descr>");
} }
} //}
valueXmlString.append("</Detail2>"); valueXmlString.append("</Detail2>");
......
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