Commit f4448798 authored by manohar's avatar manohar

emp_code__aprv updated along with confirmed and conf_date


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94061 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 37ad7be5
...@@ -174,18 +174,20 @@ public class RcpBackflushConfirm extends ActionHandlerEJB implements RcpBackflus ...@@ -174,18 +174,20 @@ public class RcpBackflushConfirm extends ActionHandlerEJB implements RcpBackflus
System.out.println("------in retrieveBackflush method-----------"); System.out.println("------in retrieveBackflush method-----------");
String sql="",dbName="",lsLotNo="",lsLocCode="",lsQcreqd="",lsProjCode="",lsBackflushType="",lsUnit=""; String sql="",dbName="",lsLotNo="",lsLocCode="",lsQcreqd="",lsProjCode="",lsBackflushType="",lsUnit="";
String retString="",lsSingleUnit="",lsSumQtyDet="",lsNoArt="",lsLotsl="",lsItemCode="",locCode="",lotNo=""; String retString="",lsSingleUnit="",lsSumQtyDet="",lsNoArt="",lsLotsl="",lsItemCode="",locCode="",lotNo="";
String lsSiteCode="",lsGrade="",lsPackCode="",lsIndno=""; String lsSiteCode="",lsGrade="",lsPackCode="",lsIndno="", empCode = "", userId = "";
ResultSet rs=null; ResultSet rs=null;
PreparedStatement pstmt=null; PreparedStatement pstmt=null;
java.sql.Timestamp ldtExpirydate=null,ldtMfgdate=null; java.sql.Timestamp ldtExpirydate=null,ldtMfgdate=null;
double lcQuantityHdr=0,lcTotqtyDet=0,lcQuantityDet=0,lcqtyPerArt=0,lcModqty=0,lcNoart=0,lcCapacity=0; double lcQuantityHdr=0,lcTotqtyDet=0,lcQuantityDet=0,lcqtyPerArt=0,lcModqty=0,lcNoart=0,lcCapacity=0;
double lcIntegralQty=0,lcDetamt=0,lcHdramt=0; double lcIntegralQty=0,lcDetamt=0,lcHdramt=0;
int upcnt=0; int upcnt=0;
GenericUtility genericUtility = null;
try try
{ {
DistCommon distCommon = new DistCommon(); DistCommon distCommon = new DistCommon();
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
dbName = CommonConstants.DB_NAME; dbName = CommonConstants.DB_NAME;
genericUtility = GenericUtility.getInstance();
if( dbName.equalsIgnoreCase("db2") || dbName.equalsIgnoreCase("mssql")) if( dbName.equalsIgnoreCase("db2") || dbName.equalsIgnoreCase("mssql"))
sql="select lot_no, loc_code, qc_reqd, exp_date, proj_code, quantity, backflush_type, unit" + sql="select lot_no, loc_code, qc_reqd, exp_date, proj_code, quantity, backflush_type, unit" +
...@@ -858,11 +860,28 @@ public class RcpBackflushConfirm extends ActionHandlerEJB implements RcpBackflus ...@@ -858,11 +860,28 @@ public class RcpBackflushConfirm extends ActionHandlerEJB implements RcpBackflus
} }
if (retString.trim().length()==0) if (retString.trim().length()==0)
{ {
sql="update receipt_backflush set confirmed = ?,conf_date = ? where tran_id = ?"; // 26/12/13 manoharan MF2ESUN005
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
sql = "SELECT EMP_CODE FROM USERS WHERE CODE = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, userId);
rs = pstmt.executeQuery();
if ( rs.next() )
{
empCode = rs.getString("EMP_CODE");
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
//sql="update receipt_backflush set confirmed = ?,conf_date = ? where tran_id = ?";
sql="update receipt_backflush set confirmed = ?,conf_date = ?, EMP_CODE__APRV = ? where tran_id = ?";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1, "Y"); pstmt.setString(1, "Y");
pstmt.setDate(2, new java.sql.Date(System.currentTimeMillis())); pstmt.setDate(2, new java.sql.Date(System.currentTimeMillis()));
pstmt.setString(3, tranID); pstmt.setString(3, empCode);
pstmt.setString(4, tranID);
upcnt=pstmt.executeUpdate(); upcnt=pstmt.executeUpdate();
System.out.println("No. of rows updated for receipt_backflush table --------->>["+upcnt+"]"); System.out.println("No. of rows updated for receipt_backflush table --------->>["+upcnt+"]");
if(upcnt > 0) if(upcnt > 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