Commit f3cf5d1e authored by pshinde's avatar pshinde

update chg date,chg user,chg terminal on siteitem update process.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97970 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2b24308f
...@@ -11,6 +11,8 @@ import ibase.system.config.*; ...@@ -11,6 +11,8 @@ import ibase.system.config.*;
import java.rmi.RemoteException; import java.rmi.RemoteException;
//import java.util.*; //import java.util.*;
import java.sql.*; import java.sql.*;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import org.w3c.dom.*; import org.w3c.dom.*;
...@@ -73,6 +75,8 @@ public String process(Document headerDom, Document detailDom, String windowName, ...@@ -73,6 +75,8 @@ public String process(Document headerDom, Document detailDom, String windowName,
String siteCodeFr="", siteCodeTo ="", itemCodeFr="",itemCodeTo = "",itemCode = ""; String siteCodeFr="", siteCodeTo ="", itemCodeFr="",itemCodeTo = "",itemCode = "";
String siteCodeSupp = "", suppSour = "" ,itemSer = "",reoQty = "", integralQty = ""; String siteCodeSupp = "", suppSour = "" ,itemSer = "",reoQty = "", integralQty = "";
int updCnt=0; int updCnt=0;
String sysDate ="";
Timestamp sysDate1 = null;
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
String userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"userId"); String userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"userId");
loginSiteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSiteCode"); loginSiteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSiteCode");
...@@ -84,7 +88,15 @@ public String process(Document headerDom, Document detailDom, String windowName, ...@@ -84,7 +88,15 @@ public String process(Document headerDom, Document detailDom, String windowName,
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
connDriver = null; connDriver = null;
conn.setAutoCommit(false); conn.setAutoCommit(false);
java.util.Date today=new java.util.Date();
Calendar c = Calendar.getInstance();
today = c.getTime();
SimpleDateFormat sdf=new SimpleDateFormat(genericUtility.getApplDateFormat());
sysDate=sdf.format(today);
System.out.println("sysDate****=========="+sysDate);
sysDate1= Timestamp.valueOf(genericUtility.getValidDateString(sysDate, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
finEntity = genericUtility.getColumnValue("fin_entity", headerDom); finEntity = genericUtility.getColumnValue("fin_entity", headerDom);
siteCodeFr = genericUtility.getColumnValue("site_code__fr", headerDom); siteCodeFr = genericUtility.getColumnValue("site_code__fr", headerDom);
siteCodeTo = genericUtility.getColumnValue("site_code__to", headerDom); siteCodeTo = genericUtility.getColumnValue("site_code__to", headerDom);
...@@ -105,6 +117,10 @@ public String process(Document headerDom, Document detailDom, String windowName, ...@@ -105,6 +117,10 @@ public String process(Document headerDom, Document detailDom, String windowName,
System.out.println("suppSour["+suppSour+"]"); System.out.println("suppSour["+suppSour+"]");
System.out.println("siteCodeSupp["+siteCodeSupp+"]"); System.out.println("siteCodeSupp["+siteCodeSupp+"]");
System.out.println("Change User================"+chgUser);
System.out.println("Change Term================"+chgTerm);
System.out.println("Change date================"+sysDate);
System.out.println("Change date=TimeStamp==============="+sysDate1);
//added by priyanka on 5/05/15 as per manoj sharma instruction //added by priyanka on 5/05/15 as per manoj sharma instruction
if(integralQty!=null && integralQty.trim().length()>0) if(integralQty!=null && integralQty.trim().length()>0)
...@@ -229,11 +245,17 @@ public String process(Document headerDom, Document detailDom, String windowName, ...@@ -229,11 +245,17 @@ public String process(Document headerDom, Document detailDom, String windowName,
} }
} }
} }
//sql=sql+ ",CHG_DATE= '"+sysDate1+"' ,CHG_USER= '"+chgUser+"', CHG_TERM= '"+chgTerm+"'";
sql=sql+ " , CHG_DATE=?,CHG_USER=?,CHG_TERM=? ";
sql = sql + " where site_code= ? and item_code = ?"; sql = sql + " where site_code= ? and item_code = ?";
System.out.println("final sql>>>>"+sql); System.out.println("final sql>>>>"+sql);
pstmt = conn.prepareStatement( sql ); pstmt = conn.prepareStatement( sql );
pstmt.setString(1,siteCode); pstmt.setTimestamp(1,sysDate1);
pstmt.setString(2,itemCode); pstmt.setString(2,chgUser);
pstmt.setString(3,chgTerm);
pstmt.setString(4,siteCode);
pstmt.setString(5,itemCode);
updCnt = pstmt.executeUpdate(); updCnt = pstmt.executeUpdate();
{ {
System.out.println("update count"+updCnt); System.out.println("update count"+updCnt);
......
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