Commit 204062e4 authored by kmandhre's avatar kmandhre

change for sysdate


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95639 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f8f6a8b8
...@@ -86,10 +86,11 @@ public class WorderTrackSchedule implements Schedule ...@@ -86,10 +86,11 @@ public class WorderTrackSchedule implements Schedule
connDriver = null; connDriver = null;
conn.setAutoCommit(false); conn.setAutoCommit(false);
currDate = new java.sql.Timestamp(System.currentTimeMillis()); currDate = new java.sql.Timestamp(System.currentTimeMillis());
//SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getDBDateFormat());
//Date date = sdf.parse(currDate.toString()); //Date date = sdf.parse(currDate.toString());
SimpleDateFormat sdfAppl = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdfAppl = new SimpleDateFormat(genericUtility.getApplDateFormat());
String currDateStr = sdfAppl.format(currDate); String currDateStr = sdfAppl.format(currDate);
java.sql.Timestamp sysdate =java.sql.Timestamp.valueOf(sdf.format(new Date()).toString() + " 00:00:00.0");
tranId = generateTranId( "w_tran_trk_status", siteCode, currDateStr, conn ); tranId = generateTranId( "w_tran_trk_status", siteCode, currDateStr, conn );
System.out.println("tranId =="+tranId); System.out.println("tranId =="+tranId);
String trackBasis1 = "" ,trackBasis2 = "",trackBasis3 = "",trackBasis4 = "" ,trackBasis5 = "" , trackBasis6 = ""; String trackBasis1 = "" ,trackBasis2 = "",trackBasis3 = "",trackBasis4 = "" ,trackBasis5 = "" , trackBasis6 = "";
...@@ -162,12 +163,13 @@ public class WorderTrackSchedule implements Schedule ...@@ -162,12 +163,13 @@ public class WorderTrackSchedule implements Schedule
+", reqd.track_basis_value as basis ,reqd.track_set as track_set , tsetd.act_code as act_code1 , tsetd.seq_no as seq_no, act.track_level as track_level1,act.role_code as role_code1 " +", reqd.track_basis_value as basis ,reqd.track_set as track_set , tsetd.act_code as act_code1 , tsetd.seq_no as seq_no, act.track_level as track_level1,act.role_code as role_code1 "
+" from obj_track_req req,obj_track_req_det reqd , tran_track_set tset ,tran_track_set_det tsetd ,tran_track_acts act where req.ref_ser = reqd.ref_ser and req.track_req = reqd.track_req " +" from obj_track_req req,obj_track_req_det reqd , tran_track_set tset ,tran_track_set_det tsetd ,tran_track_acts act where req.ref_ser = reqd.ref_ser and req.track_req = reqd.track_req "
+" and reqd.track_set = tset.track_set and tset.track_set = tsetd.track_set and tsetd.act_code = act.act_code and req.ref_ser= 'W-ORD' ) " +" and reqd.track_set = tset.track_set and tset.track_set = tsetd.track_set and tsetd.act_code = act.act_code and req.ref_ser= 'W-ORD' ) "
+", workorder wo where wo.ord_date >= sysdate " +", workorder wo where wo.ord_date >= ? "
+" and trim(basis) = "+trackSql +" and trim(basis) = "+trackSql
+" group by wo.work_order,wo.item_code,wo.site_code,basis,wo.order_type,wo.route_code ,ref_ser , track_req ,track_set ,act_code1 ,seq_no, track_level1,role_code1 , " +" group by wo.work_order,wo.item_code,wo.site_code,basis,wo.order_type,wo.route_code ,ref_ser , track_req ,track_set ,act_code1 ,seq_no, track_level1,role_code1 , "
+" context_col_1,context_col_2,context_col_3,context_col_4 ,context_col_5 order by wo.work_order "; +" context_col_1,context_col_2,context_col_3,context_col_4 ,context_col_5 order by wo.work_order ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, sysdate);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
sqlInsert = " insert into wo_track_status (tran_id,line_no,ref_ser,ref_id,ref_line_no,track_req,context_value,track_set,context_1,context_2,context_3,context_4, " sqlInsert = " insert into wo_track_status (tran_id,line_no,ref_ser,ref_id,ref_line_no,track_req,context_value,track_set,context_1,context_2,context_3,context_4, "
......
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