Commit b35f3790 authored by bmarathe's avatar bmarathe

UPDATE BY SUMIT ON 07/01/13 SCM ISSUE TARCKER POINT NO 71


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92488 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ec01696b
......@@ -54,7 +54,7 @@ public class SordAllocDef extends ActionHandlerEJB implements SordAllocDefLocal,
}
catch(Exception e)
{
System.out.println("Exception :Sorder :actionHandler(String xmlString):" + e.getMessage() + ":");
System.out.println("Exception :SordAllocDef :actionHandler(String xmlString):" + e.getMessage() + ":");
e.printStackTrace();
throw new ITMException(e);
}
......@@ -70,7 +70,7 @@ public class SordAllocDef extends ActionHandlerEJB implements SordAllocDefLocal,
String sql = "";
String resrvLoc = "",casePickLoc = "", activePickLoc = "", deepStoreLoc = "", partialResrvLoc = "";
boolean isActives = false;
String orderByStkStr = "";
String orderByStkStr = "",updateFlag = "";
Connection conn = null;
PreparedStatement pstmt = null;
......@@ -78,6 +78,7 @@ public class SordAllocDef extends ActionHandlerEJB implements SordAllocDefLocal,
String detCnt = "0";
int minSelfLife = 0;
NodeList parentNodeList = null;
Node parentNode = null;
int parentNodeListLength = 0;
double quantity = 0.0, pendingQty = 0.0, qtyAvail = 0.0,quantityP = 0.0,quantityPnd = 0.0;
......@@ -88,6 +89,7 @@ public class SordAllocDef extends ActionHandlerEJB implements SordAllocDefLocal,
try
{
DistCommon discommon = new DistCommon();
System.out.println(" sys sys xtraParams ["+xtraParams+"]");
detCnt = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"detCnt"); //Will be Uncommented later - Jiten
System.out.println(" sumit detCnt ["+detCnt+"]");
conn = connDriver.getConnectDB("DriverITM");
......@@ -103,6 +105,13 @@ public class SordAllocDef extends ActionHandlerEJB implements SordAllocDefLocal,
System.out.println("parentNodeListLength*********sumit******************************"+parentNodeListLength);
for(int row = 0; row < parentNodeListLength; row++)
{
parentNode = parentNodeList.item(row);
updateFlag = getAttribValue(parentNode,"attribute", "updateFlag"); //(parentNode, "attribute", "status"));
//System.out.println(" updateFlag ---- > "+updateFlag);
if( !"D".equalsIgnoreCase(updateFlag) && !"N".equalsIgnoreCase(updateFlag) && !"E".equalsIgnoreCase(updateFlag))
{
linenosord = GenericUtility.getInstance().getColumnValueFromNode("line_no__sord", dom.getElementsByTagName("Detail2").item(row));
siteCode = GenericUtility.getInstance().getColumnValueFromNode("site_code", dom.getElementsByTagName("Detail2").item(row));
//siteDescr = GenericUtility.getInstance().getColumnValueFromNode("site_descr", dom.getElementsByTagName("Detail2").item(row));
......@@ -284,6 +293,7 @@ public class SordAllocDef extends ActionHandlerEJB implements SordAllocDefLocal,
//valueXmlString.append("</Root>\r\n");
}
}
valueXmlString.append("</Root>\r\n");
System.out.println("valueXmlString["+valueXmlString.toString()+"]");
}
......@@ -299,12 +309,12 @@ public class SordAllocDef extends ActionHandlerEJB implements SordAllocDefLocal,
}
catch(SQLException e)
{
System.out.println("Exception : Sorder : actionVoucher " +e.getMessage());
System.out.println("Exception : SordAllocDef : actionVoucher " +e.getMessage());
throw new ITMException(e);
}
catch(Exception e)
{
System.out.println("Exception : Sorder : actionHandler " +e.getMessage());
System.out.println("Exception : SordAllocDef : actionHandler " +e.getMessage());
throw new ITMException(e);
}
finally
......@@ -413,4 +423,53 @@ public class SordAllocDef extends ActionHandlerEJB implements SordAllocDefLocal,
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;
}
private String checkNull(String str)
{
if( str == null)
{
str = "";
}
return str;
}
}
\ No newline at end of file
......@@ -94,7 +94,7 @@ public class StockAllocPrc extends ActionHandlerEJB implements StockAllocPrcLoca
pstmt1.clearParameters();
System.out.println("["+rs.getDouble(3)+"] SUM(QUANTITY) in sord_alloc_det and avilqty ["+availQty+"]");
if( rs.getDouble(3) < availQty )
if( rs.getDouble(3) <= availQty )
{
errString = this.sorderAllocate(tranId,xtraParams,conn);
}
......
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