Commit be8be183 authored by skhan's avatar skhan

check by using tran_date for tran_Date


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91095 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 73735c8b
......@@ -152,7 +152,7 @@ public class AssociatePrc extends ProcessEJB implements AssociatePrcLocal , Asso
String xmlValues = "",tranIdG = "",sqlmax="",remarks = "";
int maxLineNo =1,cnt = 1;
String returnErrorString = "";
Timestamp tranDateTimestmp = null;
Timestamp tranDateTimestmp = null,tranDateTimestmpApp = null ;
try
{
ConnDriver connDriver = new ConnDriver();
......@@ -163,26 +163,32 @@ public class AssociatePrc extends ProcessEJB implements AssociatePrcLocal , Asso
connCP = connDriver.getConnectDB("DriverCP");
connCP.setAutoCommit(false);
connDriver = null;
tranDate = genericUtility.getColumnValue("tran_date",dom1);
System.out.println("tranDate......"+tranDate);
tranDateTimestmp = java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(tranDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()));
System.out.println("tranDateTimestmp......"+tranDateTimestmp);
//tranDateTimestmpApp = java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(tranDate,genericUtility.getDBDateFormat(),genericUtility.getApplDateFormat()));
//System.out.println("tranDateTimestmpApp......"+tranDateTimestmpApp);
xmlValues ="<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
xmlValues = xmlValues + "<Header></Header>";
xmlValues = xmlValues + "<Detail1>";
xmlValues = xmlValues + "<tran_id></tran_id>";
xmlValues = xmlValues + "<tran_id></tran_id>";
xmlValues = xmlValues + "<site_code>"+siteCodeCurr.trim()+"</site_code>" ;
xmlValues = xmlValues + "<tran_date>"+tranDate.trim()+"</tran_date>" ;
xmlValues = xmlValues + "</Detail1></Root>";
tranIdG = generateTranId("w_associate",xmlValues,conn);//function to generate NEW transaction id
if(tranIdG == null || tranIdG.trim().length() ==0)
{
errCode = "VTTRANID";
//System.out.println("errcode......"+errCode);
System.out.println("errcode......"+errCode);
errString = itmDBAccess.getErrorString("","VTTRANID",userId);
return errString;
}
tranDate = genericUtility.getColumnValue("tan_date",dom1); // added on 4/13/2009
//tranDate = genericUtility.getColumnValue("tan_date",dom1); // added on 4/13/2009
//tranId = genericUtility.getColumnValue("tran_id",dom1);
dateFlag = genericUtility.getColumnValue( "date_flag", dom1 ); // added by pankaj on 18.01.09
custCode = genericUtility.getColumnValue("cust_code",dom1);
custCode = custCode == null ?"":custCode.trim();
tranDate = genericUtility.getColumnValue("tran_date",dom1);
tranDateTimestmp = java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(tranDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()));
fromDate = genericUtility.getColumnValue("from_date",dom1);
toDate = genericUtility.getColumnValue("to_date",dom1);
remarks = genericUtility.getColumnValue("remarks",dom1);
......@@ -331,6 +337,7 @@ public class AssociatePrc extends ProcessEJB implements AssociatePrcLocal , Asso
+" ?,?,?) " ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,dateFlag);
pstmt.setTimestamp(2,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(tranDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat())));
pstmt.setTimestamp(3,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(tranDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()))); // chg_date
if(orderType.equalsIgnoreCase("%")||orderType.length()==0 )
......
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