Commit 4bcb175a authored by ssarkar's avatar ssarkar

update by sumit on 28/02/13 for issue tracker point 99 (STOCK DEALLOCATION) . BUG


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92775 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ea9917a9
...@@ -928,18 +928,25 @@ public class DeallocArtIC extends ValidatorEJB implements DeallocArtICRemote, De ...@@ -928,18 +928,25 @@ public class DeallocArtIC extends ValidatorEJB implements DeallocArtICRemote, De
parentNode = parentNodeList.item(row); parentNode = parentNodeList.item(row);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
System.out.println("************* first For loop *************["+ parentNode.getNodeName() + "]"); String updateFlag = getAttribValue(parentNode,"attribute", "updateFlag"); //(parentNode, "attribute", "status"));
System.out.println(" updateFlag ["+updateFlag+"]");
childNodeList = parentNode.getChildNodes();
//System.out.println("************* first For loop *************["+ parentNode.getNodeName() + "]");
for (int col = 0; col < childNodeList.getLength(); col++) { for (int col = 0; col < childNodeList.getLength(); col++) {
childNode = childNodeList.item(col); childNode = childNodeList.item(col);
if (childNode.getNodeType() == childNode.ELEMENT_NODE) { if (childNode.getNodeType() == childNode.ELEMENT_NODE) {
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
System.out.println("childNodeNamechildNodeName ** ["+childNodeName+"]"); //System.out.println("childNodeNamechildNodeName ** ["+childNodeName+"]");
if ("carton_no".equalsIgnoreCase(childNodeName)) { if( !"D".equalsIgnoreCase(updateFlag))
arryList.add(childNode.getFirstChild().getNodeValue().trim()); {
System.out.println("=====carton_no-->[" + arryList+ "]"); if ("carton_no".equalsIgnoreCase(childNodeName)) {
arryList.add(childNode.getFirstChild().getNodeValue().trim());
} System.out.println("=====carton_no-->[" + arryList+ "]");
}
}
} }
} }
} }
...@@ -1203,4 +1210,43 @@ public class DeallocArtIC extends ValidatorEJB implements DeallocArtICRemote, De ...@@ -1203,4 +1210,43 @@ public class DeallocArtIC extends ValidatorEJB implements DeallocArtICRemote, De
return dataVolumeMap; return dataVolumeMap;
} }
private String getAttribValue(Node detailNode, String nodeName, String attribStr)
{
String attribValue = "";
try
{
String domStr = GenericUtility.getInstance().serializeDom(detailNode);
Document dom = GenericUtility.getInstance().parseString(domStr);
if( dom != null /*&& dom.getAttributes() != null*/)
{
Node attributeNode = dom.getElementsByTagName( nodeName ).item(0);
attribValue = getAttribValue(attributeNode, attribStr);
}
}
catch(Exception e)
{
System.out.println("Exception : getAttribValue :" + e.getMessage());
}
return attribValue;
}
private String getAttribValue(Node detailNode, String attribStr)
{
String attribValue = "";
try
{
if( detailNode != null && detailNode.getAttributes() != null)
{
Node attribNode = detailNode.getAttributes().getNamedItem( attribStr );
if( attribNode != null )
{
attribValue = checkNull( attribNode.getNodeValue() );
}
}
}
catch(Exception e)
{
System.out.println("Exception : getAttribValue :" + e.getMessage());
}
return attribValue;
}
} }
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