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.*; ...@@ -7,6 +7,7 @@ import java.util.*;
import java.lang.*; import java.lang.*;
import javax.ejb.*; import javax.ejb.*;
import org.w3c.dom.*; import org.w3c.dom.*;
import javax.xml.parsers.*; import javax.xml.parsers.*;
import java.util.HashMap; import java.util.HashMap;
import java.rmi.RemoteException; import java.rmi.RemoteException;
...@@ -156,7 +157,8 @@ public class GenerateReceiptPrc extends ProcessEJB implements GenerateReceiptPrc ...@@ -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() + ":"); System.out.println("Exception :GenerateReceiptPrcEJB :getData(String xmlString, String xmlString2, String windowName, String xtraParams):" + e.getMessage() + ":");
throw new ITMException(e); throw new ITMException(e);
}finally }
/*finally
{ {
try try
{ {
...@@ -166,7 +168,7 @@ public class GenerateReceiptPrc extends ProcessEJB implements GenerateReceiptPrc ...@@ -166,7 +168,7 @@ public class GenerateReceiptPrc extends ProcessEJB implements GenerateReceiptPrc
{ {
e.printStackTrace(); e.printStackTrace();
} }
} }*/
return errString; return errString;
...@@ -206,7 +208,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -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("<description>").append("Group0 description").append("</description>");
xmlBuff.append("<Header0>"); 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+"]"); System.out.println("In GetViewData::["+windowName+"]");
if("generate_receipt_process".equals(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 ...@@ -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("<description>").append("Group0 description").append("</description>");
xmlBuffStr.append("<Header0>"); xmlBuffStr.append("<Header0>");
} }
*/
java.sql.Date currDate = new java.sql.Date(System.currentTimeMillis()); java.sql.Date currDate = new java.sql.Date(System.currentTimeMillis());
String sql = ""; String sql = "";
String errCode = ""; String errCode = "",objName="";
String errString = ""; String errString = "";
String resultString = "", filterChqNo = "", sFilterChqAmt = "", sFilterChqDate = ""; String resultString = "", filterChqNo = "", sFilterChqAmt = "", sFilterChqDate = "";
java.sql.Timestamp dueDateTo = null; java.sql.Timestamp dueDateTo = null;
...@@ -251,6 +253,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -251,6 +253,7 @@ Put a validation chq amount in filter and total of details matches in case heade
try try
{ {
if(conn==null) if(conn==null)
{ {
conn = getConnection(); conn = getConnection();
...@@ -261,6 +264,20 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -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); siteCode = genericUtility.getColumnValue("site_code",headerDom);
System.out.println("siteCode------>"+ siteCode); 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) if(siteCode == null || siteCode.trim().length() == 0)
{ {
errString = itmDBAccessEJB.getErrorString("","VMSITECD1","","",conn); errString = itmDBAccessEJB.getErrorString("","VMSITECD1","","",conn);
...@@ -645,8 +662,8 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -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() + "]"); System.out.println("@@@@@ POSListSize[" + posList.size()+ "]****NEGListSize[" + negList.size() + "]");
//int cnt = 1; //int cnt = 1;
//Pavan R on 30aug2018 to get only selected data for process method on preview flag //Pavan R on 30aug2018 to get only selected data for process method on preview flag
System.out.println("windowName["+windowName+"]"); System.out.println("objName["+objName+"]");
if("generate_receipt_process".equals(windowName)) if("generate_receipt_process".equals(objName))
{ {
for (int i = 0; i < negList.size(); i++) 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 ...@@ -754,7 +771,7 @@ Put a validation chq amount in filter and total of details matches in case heade
throw new ITMException(ex); throw new ITMException(ex);
} }
//if suggested adj is Y then display selected/unselected data else exsting will work //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("</Header0>");
xmlBuffStr.append("</group0>"); xmlBuffStr.append("</group0>");
...@@ -884,7 +901,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -884,7 +901,7 @@ Put a validation chq amount in filter and total of details matches in case heade
HashMap receiptMap = null; HashMap receiptMap = null;
double adjAmt=0,totalAdjAmt =0.0;// added by nandkumar gadkari on 03/04/18 double adjAmt=0,totalAdjAmt =0.0;// added by nandkumar gadkari on 03/04/18
String groupCode=""; String groupCode="";
String xmlString = ""; String xmlString = "",objName="";
try try
{ {
if(conn==null) if(conn==null)
...@@ -1155,8 +1172,12 @@ conn = getConnection(); ...@@ -1155,8 +1172,12 @@ conn = getConnection();
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
}*/ }*/
//Pavan r 30aug18 to get selected data from getviewData //Pavan r 30aug18 to get selected data from getviewData
if("generate_receipt_process".equals(windowName)) 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); xmlString = getViewData(headerDom, detailDom, windowName, xtraParams);
detailDom = genericUtility.parseString(xmlString); detailDom = genericUtility.parseString(xmlString);
...@@ -1258,6 +1279,10 @@ conn = getConnection(); ...@@ -1258,6 +1279,10 @@ conn = getConnection();
}//inner for }//inner for
sql = "SELECT GROUP_CODE FROM CUSTOMER WHERE CUST_CODE = ?"; sql = "SELECT GROUP_CODE FROM CUSTOMER WHERE CUST_CODE = ?";
//Commented by Manoj dtd 03/05/2014writeLog(filePtr,sql,true); //Commented by Manoj dtd 03/05/2014writeLog(filePtr,sql,true);
if(conn == null)
{
conn = getConnection();
}
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,custCode); pstmt.setString(1,custCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -3128,6 +3153,28 @@ conn = getConnection(); ...@@ -3128,6 +3153,28 @@ conn = getConnection();
} }
return xmlBuff; 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 //Pavan R on 24MAY18 End
}//class }//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