Commit ced6d0b2 authored by cpatil's avatar cpatil

insert EMP_CODE, LOT_NO__FG, LOT_SL__FG values into workorder_iss


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94350 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 00ae2307
...@@ -192,11 +192,14 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt ...@@ -192,11 +192,14 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt
double availQty=0; double availQty=0;
String lotNoFg = "",lotSlFg="", loginEmpCode=""; //added by cpatil on 11/03/14 as per bharat suggestion
try try
{ {
conn.setAutoCommit(false); conn.setAutoCommit(false);
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"chgUser"); chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"chgUser");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"chgTerm"); chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"chgTerm");
loginEmpCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode"); //added by cpatil on 11/03/14 as per bharat suggestion
//chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"chg_date"); //chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"chg_date");
java.util.Date currentDate = new java.util.Date(); java.util.Date currentDate = new java.util.Date();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getDBDateFormat());
...@@ -218,7 +221,7 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt ...@@ -218,7 +221,7 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt
} }
deptCode = genericUtility.getColumnValue("dept_code",headerDom); deptCode = genericUtility.getColumnValue("dept_code",headerDom);
System.out.println("@@@@@ data---->workOrder["+workOrder+"]::operation["+operation+"]::dept_code["+deptCode+"]"); System.out.println("@@@@@ data---->workOrder["+workOrder+"]::operation["+operation+"]::dept_code["+deptCode+"]loginEmpCode["+loginEmpCode+"]");
diffReplaceQty = new HashMap(); diffReplaceQty = new HashMap();
double qtyPerArt=0; double qtyPerArt=0;
int totalPacket=0; int totalPacket=0;
...@@ -398,9 +401,36 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt ...@@ -398,9 +401,36 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt
} }
rs.close(); rs.close();
pstmt.close(); pstmt.close();
issueQtyWOI = getRequiredDecimal(issueQtyWOI,3); issueQtyWOI = getRequiredDecimal(issueQtyWOI,3);
System.out.println("@@@@@@ workorder_iss---> issueQtyWOI["+issueQtyWOI+"]"); System.out.println("@@@@@@ workorder_iss---> issueQtyWOI["+issueQtyWOI+"]");
//added by cpatil on 11/03/14 as per bharat suggestion
sql =" select a.lot_no__fg,a.lot_sl__fg "
+" from workorder_iss a, workorder_issdet b "
+" where a.tran_id = b.tran_id "
+" and a.work_order= ? "
+" and b.exp_lev = ? "
+" and a.operation = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,workOrder);
pstmt.setString(2,expLev);
pstmt.setInt(3,operation);
rs = pstmt.executeQuery();
if(rs.next())
{
lotNoFg =rs.getString("lot_no__fg");
lotSlFg =rs.getString("lot_sl__fg");
}
rs.close();
pstmt.close();
System.out.println("@@@@@ workOrder["+workOrder+"]::lotNoFg["+lotNoFg+"]::lotSlFg["+lotSlFg+"]");
//added by cpatil on 11/03/14 as per bharat suggestion
if( issueQtyBill > issueQtyWOI) if( issueQtyBill > issueQtyWOI)
{ {
diff = issueQtyBill - issueQtyWOI ; diff = issueQtyBill - issueQtyWOI ;
...@@ -484,8 +514,9 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt ...@@ -484,8 +514,9 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt
//////1 insert into workorder_iss //////1 insert into workorder_iss
insertQuery =" insert into workorder_iss (TRAN_ID,TRAN_DATE,EFF_DATE,WORK_ORDER,OPERATION,SITE_CODE, " insertQuery =" insert into workorder_iss (TRAN_ID,TRAN_DATE,EFF_DATE,WORK_ORDER,OPERATION,SITE_CODE, "
+" REMARKS,CHG_DATE,CHG_USER,CHG_TERM,DEPT_CODE,TRAN_TYPE, " +" REMARKS,CHG_DATE,CHG_USER,CHG_TERM,DEPT_CODE,TRAN_TYPE, "
+" LOC_GROUP,ITEM_CODE,WOIR_TYPE,STATUS,CONFIRMED ) " +" LOC_GROUP,ITEM_CODE,WOIR_TYPE,STATUS,CONFIRMED, "
+" values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) "; +" EMP_CODE, LOT_NO__FG, LOT_SL__FG ) "
+" values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ";
pstmt = conn.prepareStatement(insertQuery); pstmt = conn.prepareStatement(insertQuery);
pstmt.setString(1,tranId); pstmt.setString(1,tranId);
pstmt.setTimestamp(2,currDate1); pstmt.setTimestamp(2,currDate1);
...@@ -504,6 +535,9 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt ...@@ -504,6 +535,9 @@ public class WOIssueReplacementPrc extends ProcessEJB implements GenerateReceipt
pstmt.setString(15,woirType); pstmt.setString(15,woirType);
pstmt.setString(16,"O"); pstmt.setString(16,"O");
pstmt.setString(17,"N"); pstmt.setString(17,"N");
pstmt.setString(18,loginEmpCode); //added by cpatil on 11/03/14 as per bharat suggestion
pstmt.setString(19,lotNoFg); //added by cpatil on 11/03/14 as per bharat suggestion
pstmt.setString(20,lotSlFg); //added by cpatil on 11/03/14 as per bharat suggestion
upd = pstmt.executeUpdate(); upd = pstmt.executeUpdate();
System.out.println("@@@@@@@@listExpLev.size()["+listExpLev.size()+"]"); System.out.println("@@@@@@@@listExpLev.size()["+listExpLev.size()+"]");
......
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