Commit 654da676 authored by manohar's avatar manohar

shelf_life_type taken from stock map for updating in item_lot_info


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94302 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3bb413a0
...@@ -36,6 +36,7 @@ public class StockUpdate ...@@ -36,6 +36,7 @@ public class StockUpdate
Timestamp lastPhycDate=null,tranDate= null,retestDate =null; Timestamp lastPhycDate=null,tranDate= null,retestDate =null;
String suppCode=""; // added by cpatil String suppCode=""; // added by cpatil
String chgTerm="",chgUser=""; // added by cpatil String chgTerm="",chgUser=""; // added by cpatil
String shelfLifeType = ""; // 26/02/14 manoharan
// //
String considerAllocate = "Y", partialUsed = ""; String considerAllocate = "Y", partialUsed = "";
// //
...@@ -1755,6 +1756,11 @@ public class StockUpdate ...@@ -1755,6 +1756,11 @@ public class StockUpdate
{ {
this.lotSlOrg = updateStockMap.get("lot_sl__org").toString(); this.lotSlOrg = updateStockMap.get("lot_sl__org").toString();
} }
if(updateStockMap.get("lot_sl__org")!=null)
{
this.shelfLifeType = updateStockMap.get("shelf_life_type").toString();
}
}catch(Exception e){ }catch(Exception e){
System.out.println("Exception "+e); System.out.println("Exception "+e);
...@@ -2489,7 +2495,8 @@ public class StockUpdate ...@@ -2489,7 +2495,8 @@ public class StockUpdate
String sql="",errCode="",sql2=""; String sql="",errCode="",sql2="";
ResultSet rs=null, rs2=null; ResultSet rs=null, rs2=null;
PreparedStatement pstmt=null, pstmt2=null; PreparedStatement pstmt=null, pstmt2=null;
String shelfLifeType="",lotNo="",itemCode="",grade="",stkOpt=""; //String shelfLifeType=""
String lotNo="",itemCode="",grade="",stkOpt="";
int cnt=0,cnt1=0; int cnt=0,cnt1=0;
Timestamp expDate=null , mfgDate=null, retestDate=null ,retestDate_upd3=null; Timestamp expDate=null , mfgDate=null, retestDate=null ,retestDate_upd3=null;
//Date today=null; //Date today=null;
...@@ -2753,6 +2760,10 @@ public class StockUpdate ...@@ -2753,6 +2760,10 @@ public class StockUpdate
{ {
this.suppCode = updateStockMap.get("supp_code").toString(); this.suppCode = updateStockMap.get("supp_code").toString();
} }
if(updateStockMap.get("shelf_life_type")!=null)
{
this.shelfLifeType = updateStockMap.get("shelf_life_type").toString();
}
stkOpt = checkStkOpt(this.itemCode,this.siteCode,conn); stkOpt = checkStkOpt(this.itemCode,this.siteCode,conn);
...@@ -2761,19 +2772,20 @@ public class StockUpdate ...@@ -2761,19 +2772,20 @@ public class StockUpdate
if( "2".equalsIgnoreCase(stkOpt)) if( "2".equalsIgnoreCase(stkOpt))
{ {
//Change shelf_life_type TO shelf_life__type. CHANGE DONE BY RITESH TIWARI ON 15/11/13 //Change shelf_life_type TO shelf_life__type. CHANGE DONE BY RITESH TIWARI ON 15/11/13
sql = " select shelf_life__type from item where item_code = ? "; /* sql = " select shelf_life__type from item where item_code = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,this.itemCode); pstmt.setString(1,this.itemCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if(rs.next()) if(rs.next())
{ {
shelfLifeType = rs.getString(1); this.shelfLifeType = rs.getString(1);
System.out.println("@@@@ shelfLifeType:"+shelfLifeType); System.out.println("@@@@ shelfLifeType:"+shelfLifeType);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
*/
sql = " select count (*) from item_lot_info where item_code = ? and lot_no = ? "; sql = " select count (*) from item_lot_info where item_code = ? and lot_no = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -2817,7 +2829,7 @@ public class StockUpdate ...@@ -2817,7 +2829,7 @@ public class StockUpdate
batchNo = rs.getString("batch_no"); batchNo = rs.getString("batch_no");
batchSize = rs.getDouble("batch_size"); batchSize = rs.getDouble("batch_size");
suppCodeMfg = rs.getString("supp_code__mfg"); suppCodeMfg = rs.getString("supp_code__mfg");
shelfLifeType = rs.getString("shelf_life_type"); this.shelfLifeType = rs.getString("shelf_life_type");
suppCode = rs.getString("supp_code"); suppCode = rs.getString("supp_code");
} }
...@@ -3141,8 +3153,9 @@ public class StockUpdate ...@@ -3141,8 +3153,9 @@ public class StockUpdate
pstmt.setString(15,updateStockMap.get("batch_no")==null?null:updateStockMap.get("batch_no").toString()); pstmt.setString(15,updateStockMap.get("batch_no")==null?null:updateStockMap.get("batch_no").toString());
pstmt.setString(16,updateStockMap.get("batch_size")==null?null:updateStockMap.get("batch_size").toString()); pstmt.setString(16,updateStockMap.get("batch_size")==null?null:updateStockMap.get("batch_size").toString());
pstmt.setString(17,updateStockMap.get("supp_code_mfg")==null?null:updateStockMap.get("supp_code__mfg").toString()); pstmt.setString(17,updateStockMap.get("supp_code_mfg")==null?null:updateStockMap.get("supp_code__mfg").toString());
pstmt.setString(18,shelfLifeType); pstmt.setString(18,this.shelfLifeType);
pstmt.setString(19,updateStockMap.get("supp_code")==null?null:updateStockMap.get("supp_code").toString()); pstmt.setString(19,updateStockMap.get("supp_code")==null?null:updateStockMap.get("supp_code").toString());
pstmt.setTimestamp(20,today); pstmt.setTimestamp(20,today);
//pstmt.setDate(20,today); //pstmt.setDate(20,today);
pstmt.setString(21,chgTerm); pstmt.setString(21,chgTerm);
......
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