Commit e8868355 authored by prane's avatar prane

changes done for new menu of Auto Ar Settlement Process added column entry_batch_no

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@190195 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3ca0306d
......@@ -7,6 +7,7 @@ import java.util.*;
import java.lang.*;
import javax.ejb.*;
import org.w3c.dom.*;
import javax.xml.parsers.*;
import java.util.HashMap;
import java.rmi.RemoteException;
......@@ -156,7 +157,8 @@ public class GenerateReceiptPrc extends ProcessEJB implements GenerateReceiptPrc
{
System.out.println("Exception :GenerateReceiptPrcEJB :getData(String xmlString, String xmlString2, String windowName, String xtraParams):" + e.getMessage() + ":");
throw new ITMException(e);
}finally
}
/*finally
{
try
{
......@@ -166,7 +168,7 @@ public class GenerateReceiptPrc extends ProcessEJB implements GenerateReceiptPrc
{
e.printStackTrace();
}
}
}*/
return errString;
......@@ -206,7 +208,7 @@ Put a validation chq amount in filter and total of details matches in case heade
xmlBuff.append("<description>").append("Group0 description").append("</description>");
xmlBuff.append("<Header0>");
StringBuffer xmlBuffStr = new StringBuffer("<?xml version = \"1.0\"?>");
/*StringBuffer xmlBuffStr = new StringBuffer("<?xml version = \"1.0\"?>");
System.out.println("In GetViewData::["+windowName+"]");
if("generate_receipt_process".equals(windowName))
{
......@@ -216,10 +218,10 @@ Put a validation chq amount in filter and total of details matches in case heade
xmlBuffStr.append("<description>").append("Group0 description").append("</description>");
xmlBuffStr.append("<Header0>");
}
*/
java.sql.Date currDate = new java.sql.Date(System.currentTimeMillis());
String sql = "";
String errCode = "";
String errCode = "",objName="";
String errString = "";
String resultString = "", filterChqNo = "", sFilterChqAmt = "", sFilterChqDate = "";
java.sql.Timestamp dueDateTo = null;
......@@ -251,6 +253,7 @@ Put a validation chq amount in filter and total of details matches in case heade
try
{
if(conn==null)
{
conn = getConnection();
......@@ -261,6 +264,20 @@ Put a validation chq amount in filter and total of details matches in case heade
siteCode = genericUtility.getColumnValue("site_code",headerDom);
System.out.println("siteCode------>"+ siteCode);
System.out.println("Serialize Dom["+genericUtility.serializeDom(headerDom));
StringBuffer xmlBuffStr = new StringBuffer("<?xml version = \"1.0\"?>");
NodeList parentNodeList = headerDom.getElementsByTagName("Detail1");
Node parentNode = parentNodeList.item(0);
objName = getObjName(parentNode);
if("generate_receipt_process".equals(objName))
{
xmlBuffStr.append("<DocumentRoot>");
xmlBuffStr.append("<description>").append("Datawindow Root").append("</description>");
xmlBuffStr.append("<group0>");
xmlBuffStr.append("<description>").append("Group0 description").append("</description>");
xmlBuffStr.append("<Header0>");
}
if(siteCode == null || siteCode.trim().length() == 0)
{
errString = itmDBAccessEJB.getErrorString("","VMSITECD1","","",conn);
......@@ -645,8 +662,8 @@ Put a validation chq amount in filter and total of details matches in case heade
System.out.println("@@@@@ POSListSize[" + posList.size()+ "]****NEGListSize[" + negList.size() + "]");
//int cnt = 1;
//Pavan R on 30aug2018 to get only selected data for process method on preview flag
System.out.println("windowName["+windowName+"]");
if("generate_receipt_process".equals(windowName))
System.out.println("objName["+objName+"]");
if("generate_receipt_process".equals(objName))
{
for (int i = 0; i < negList.size(); i++)
{
......@@ -754,7 +771,7 @@ Put a validation chq amount in filter and total of details matches in case heade
throw new ITMException(ex);
}
//if suggested adj is Y then display selected/unselected data else exsting will work
if("generate_receipt_process".equals(windowName) && "Y".equalsIgnoreCase(suggestAdj))
if("generate_receipt_process".equals(objName) && "Y".equalsIgnoreCase(suggestAdj))
{
xmlBuffStr.append("</Header0>");
xmlBuffStr.append("</group0>");
......@@ -884,7 +901,7 @@ Put a validation chq amount in filter and total of details matches in case heade
HashMap receiptMap = null;
double adjAmt=0,totalAdjAmt =0.0;// added by nandkumar gadkari on 03/04/18
String groupCode="";
String xmlString = "";
String xmlString = "",objName="";
try
{
if(conn==null)
......@@ -1155,8 +1172,12 @@ conn = getConnection();
e.printStackTrace();
throw new ITMException(e);
}*/
//Pavan r 30aug18 to get selected data from getviewData
if("generate_receipt_process".equals(windowName))
//Pavan r 30aug18 to get selected data from getviewData
parentNodeList = headerDom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
objName = getObjName(parentNode);
System.out.println("objName....::- "+objName);
if("generate_receipt_process".equals(objName))
{
xmlString = getViewData(headerDom, detailDom, windowName, xtraParams);
detailDom = genericUtility.parseString(xmlString);
......@@ -1258,6 +1279,10 @@ conn = getConnection();
}//inner for
sql = "SELECT GROUP_CODE FROM CUSTOMER WHERE CUST_CODE = ?";
//Commented by Manoj dtd 03/05/2014writeLog(filePtr,sql,true);
if(conn == null)
{
conn = getConnection();
}
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,custCode);
rs = pstmt.executeQuery();
......@@ -3128,6 +3153,28 @@ conn = getConnection();
}
return xmlBuff;
}
private String getObjName(Node node) throws Exception
{
String objName = null;
NodeList nodeList = null;
Node detaulNode = null;
Node detailNode = null;
nodeList = node.getChildNodes();
NamedNodeMap attrMap = node.getAttributes();
objName = attrMap.getNamedItem( "objName" ).getNodeValue();
/*
for(int ctr = 0; ctr < nodeList.getLength(); ctr++ )
{
detailNode = nodeList.item(ctr);
if(detailNode.getNodeName().equalsIgnoreCase("attribute") )
{
objName = detailNode.getAttributes().getNamedItem("objName").getNodeValue();
}
}
*/
return objName;
}
//Pavan R on 24MAY18 End
}//class
......
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