Commit 59fbd61f authored by cpatil's avatar cpatil

adding std_days from inv_lock in sch_rel_date


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91837 ce508802-f39f-4f6c-b175-0d175dae99d5
parent eeb96a0f
...@@ -2,11 +2,11 @@ package ibase.webitm.ejb.dis; ...@@ -2,11 +2,11 @@ package ibase.webitm.ejb.dis;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.text.*; import java.text.*;
import java.util.Calendar;
import java.sql.*; import java.sql.*;
import org.w3c.dom.*; import org.w3c.dom.*;
import ibase.webitm.utility.ITMException;
import ibase.webitm.utility.*; import ibase.webitm.utility.*;
import ibase.system.config.*; import ibase.system.config.*;
import ibase.webitm.ejb.*; import ibase.webitm.ejb.*;
...@@ -670,7 +670,7 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI ...@@ -670,7 +670,7 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
String sql = null; String sql = null;
int currentFormNo = 0; int currentFormNo = 0;
StringBuffer valueXmlString = new StringBuffer(); StringBuffer valueXmlString = new StringBuffer();
String columnValue = null; String columnValue = null,lockCode=null;
NodeList parentNodeList = null; NodeList parentNodeList = null;
Node parentNode = null; Node parentNode = null;
...@@ -679,6 +679,9 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI ...@@ -679,6 +679,9 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
String childNodeName = null; String childNodeName = null;
int childNodeListLength = 0; int childNodeListLength = 0;
int ctr = 0; int ctr = 0;
int stdDays=0;
java.util.Date date = null;
java.sql.Timestamp currDate = null,currDate2 = null;
try try
{ {
...@@ -861,10 +864,37 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI ...@@ -861,10 +864,37 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
System.out.println("[" + currentColumn + "] ==> '" + columnValue + "'"); System.out.println("[" + currentColumn + "] ==> '" + columnValue + "'");
if (currentColumn.equals( "itm_default" )) if (currentColumn.equals( "itm_default" ))
{ {
valueXmlString.append("<sch_rel_date>").append("<![CDATA[" + getCurrdateAppFormat() + "]]>").append("</sch_rel_date>"); // added by cpatil on 30-AUG-12 as per suggestion //add by cpatil start on 28-07-12 as per manoharan sir
lockCode = genericUtility.getColumnValue( "lock_code", dom1 );
sql="select std_days from inv_lock where lock_code = ?";
pStmt = conn.prepareStatement(sql);
pStmt.setString(1,lockCode.trim());
rs = pStmt.executeQuery();
if(rs.next())
{
stdDays = rs.getInt("std_days");
}
rs.close();
rs= null;
pStmt.close();
pStmt=null;
currDate = new java.sql.Timestamp(System.currentTimeMillis());
Calendar c = Calendar.getInstance();
c.setTime(currDate);
System.out.println("@@@@@ currDate:["+currDate+"]::::stdDays:["+stdDays+"]");
c.add(Calendar.DATE, stdDays);
currDate2 = new Timestamp(c.getTimeInMillis());
SimpleDateFormat simpledateformat = new SimpleDateFormat(genericUtility.getDBDateFormat());
date = simpledateformat.parse(currDate2.toString());
currDate2 = Timestamp.valueOf(simpledateformat.format(date).toString() + " 00:00:00.0");
String currDate2Str = (new SimpleDateFormat(genericUtility.getApplDateFormat())).format(currDate2).toString();
System.out.println("@@@@@ currDate2Str :["+currDate2Str+"]");
valueXmlString.append("<sch_rel_date>").append("<![CDATA[" + currDate2Str + "]]>").append("</sch_rel_date>");
//valueXmlString.append("<sch_rel_date>").append("<![CDATA[" + getCurrdateAppFormat() + "]]>").append("</sch_rel_date>"); // added by cpatil on 30-AUG-12 as per suggestion
//add by cpatil on 28-07-12 end
valueXmlString.append("<hold_status>").append("<![CDATA[" + "H" + "]]>").append("</hold_status>"); valueXmlString.append("<hold_status>").append("<![CDATA[" + "H" + "]]>").append("</hold_status>");
valueXmlString.append("<status_date>").append("<![CDATA[" + getCurrdateAppFormat() + "]]>").append("</status_date>"); valueXmlString.append("<status_date>").append("<![CDATA[" + getCurrdateAppFormat() + "]]>").append("</status_date>");
} }
if (currentColumn.equals( "item_code" )) if (currentColumn.equals( "item_code" ))
{ {
......
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