Commit 127c6bc1 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@97978 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 91ba8a61
......@@ -72,16 +72,23 @@ public String process(Document headerDom, Document detailDom, String windowName,
String sql1="";
String siteCode = "";
String finEntity = "";
String chgTermm1="";
String siteCodeFr="", siteCodeTo ="", itemCodeFr="",itemCodeTo = "",itemCode = "";
String siteCodeSupp = "", suppSour = "" ,itemSer = "",reoQty = "", integralQty = "";
int updCnt=0;
String sysDate ="";
Timestamp sysDate1 = null;
java.sql.Timestamp todays = null;
java.sql.Timestamp todays1 = null;
Timestamp sysDate1 = null,sysDate2=null;
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
String userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"userId");
loginSiteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSiteCode");
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId");
//chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"termId");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"CHG_TERM");
try
{
ConnDriver connDriver = new ConnDriver();
......@@ -91,12 +98,17 @@ public String process(Document headerDom, Document detailDom, String windowName,
java.util.Date today=new java.util.Date();
Calendar c = Calendar.getInstance();
today = c.getTime();
SimpleDateFormat sdf=new SimpleDateFormat(genericUtility.getApplDateFormat());
SimpleDateFormat sdf=new SimpleDateFormat(genericUtility.getApplDateTimeFormat());
sysDate=sdf.format(today);
System.out.println("sysDate****=========="+sysDate);
sysDate1= Timestamp.valueOf(genericUtility.getValidDateString(sysDate, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
java.util.Date date= new java.util.Date();
Timestamp ts_now = new Timestamp(date.getTime());
System.out.println("ts_now*********"+ts_now);
System.out.println("chgTermm1================"+chgTermm1);
finEntity = genericUtility.getColumnValue("fin_entity", headerDom);
siteCodeFr = genericUtility.getColumnValue("site_code__fr", headerDom);
siteCodeTo = genericUtility.getColumnValue("site_code__to", headerDom);
......@@ -120,8 +132,11 @@ public String process(Document headerDom, Document detailDom, String windowName,
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);
//System.out.println("Change date=TimeStamp==============="+sysDate1);
//added by priyanka on 5/05/15 as per manoj sharma instruction
if(integralQty!=null && integralQty.trim().length()>0)
{
......@@ -251,7 +266,7 @@ public String process(Document headerDom, Document detailDom, String windowName,
sql = sql + " where site_code= ? and item_code = ?";
System.out.println("final sql>>>>"+sql);
pstmt = conn.prepareStatement( sql );
pstmt.setTimestamp(1,sysDate1);
pstmt.setTimestamp(1,ts_now);
pstmt.setString(2,chgUser);
pstmt.setString(3,chgTerm);
pstmt.setString(4,siteCode);
......@@ -327,6 +342,8 @@ private String checkNull(String input)
return input;
}
}
\ No newline at end of file
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