Commit fc6fd24a authored by manohar's avatar manohar

additional column values update


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91463 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 67872568
...@@ -24,7 +24,7 @@ public class StockUpdate ...@@ -24,7 +24,7 @@ public class StockUpdate
String termId = null; String termId = null;
double quantity=0,qtyStduom=0,rate = 0,potencyPerc=0,netAmt= 0,grossWeight=0; double quantity=0,qtyStduom=0,rate = 0,potencyPerc=0,netAmt= 0,grossWeight=0;
double tareWeight=0,netWeight=0,rateOh=0,grossRate=0,convQtyStduom=0,noArt=0; double tareWeight=0,netWeight=0,rateOh=0,grossRate=0,convQtyStduom=0,noArt=0;
double actualRate=0; double actualRate=0,batchSize = 0;
String errString ="",itemCode = "",unit="",tranType = "",siteCode="",locationCode=""; String errString ="",itemCode = "",unit="",tranType = "",siteCode="",locationCode="";
String lotNo="",lotSl="",checkExpiry="",tranSer="",tranId="",acctCodeCr="",packRef = ""; String lotNo="",lotSl="",checkExpiry="",tranSer="",tranId="",acctCodeCr="",packRef = "";
String acctCodeDr="",cctrCodeCr = "",cctrCodeDr = "",lineNo="",sorderNo ="",siteCodeMfg=""; String acctCodeDr="",cctrCodeCr = "",cctrCodeDr = "",lineNo="",sorderNo ="",siteCodeMfg="";
...@@ -33,7 +33,9 @@ public class StockUpdate ...@@ -33,7 +33,9 @@ public class StockUpdate
String suppCodeMfg="",grade="",batchNo="",unitAlt="",remarks="",refIdFor="",refSerFor=""; String suppCodeMfg="",grade="",batchNo="",unitAlt="",remarks="",refIdFor="",refSerFor="";
Timestamp creaDateStr=null,date=null,mfgDate=null,expDate = null,currDate=null,retestDateDate=null; Timestamp creaDateStr=null,date=null,mfgDate=null,expDate = null,currDate=null,retestDateDate=null;
Timestamp lastPhycDate=null,tranDate= null,retestDate =null; Timestamp lastPhycDate=null,tranDate= null,retestDate =null;
//
String considerAllocate = "", partialUsed = "";
//
public String updateStock(HashMap updateStockMap,String xtraParams, Connection conn) throws ITMException, Exception public String updateStock(HashMap updateStockMap,String xtraParams, Connection conn) throws ITMException, Exception
{ {
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
...@@ -910,7 +912,8 @@ public class StockUpdate ...@@ -910,7 +912,8 @@ public class StockUpdate
} }
} }
else if(this.tranType.equalsIgnoreCase("R")){ else if(this.tranType.equalsIgnoreCase("R")){
if (count > 0){ if (count > 0)
{
sql ="select (case when acct_code__inv is null then ' ' else acct_code__inv end), (case when cctr_code__inv is null then ' ' else cctr_code__inv end), qty_per_art" sql ="select (case when acct_code__inv is null then ' ' else acct_code__inv end), (case when cctr_code__inv is null then ' ' else cctr_code__inv end), qty_per_art"
+" from stock " +" from stock "
+" where item_code = '"+this.itemCode+"'" +" where item_code = '"+this.itemCode+"'"
...@@ -1137,11 +1140,11 @@ public class StockUpdate ...@@ -1137,11 +1140,11 @@ public class StockUpdate
+" conv__qty_stduom,unit__alt,batch_no," +" conv__qty_stduom,unit__alt,batch_no,"
+" no_art,last_phyc_date,qty_per_art," +" no_art,last_phyc_date,qty_per_art,"
+" gross_wt_per_art,tare_wt_per_art,actual_rate," +" gross_wt_per_art,tare_wt_per_art,actual_rate,"
+" remarks,pack_ref) values " +" remarks,pack_ref,consider_allocate, partial_used, batch_size ) values "
+" (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," +" (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,"
+" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," +" ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,"
+" ?,?,?,?,?,?,?,?,?,?,?)"; +" ?,?,?,?,?,?,?,?,?,?,?,?,?, ?)";
System.out.println("SQL :"+sql); //System.out.println("SQL :"+sql);
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setString(1,this.itemCode); pstmt.setString(1,this.itemCode);
pstmt.setString(2,this.siteCode); pstmt.setString(2,this.siteCode);
...@@ -1205,6 +1208,9 @@ public class StockUpdate ...@@ -1205,6 +1208,9 @@ public class StockUpdate
pstmt.setString(46,this.remarks); pstmt.setString(46,this.remarks);
pstmt.setString(47,this.packRef); pstmt.setString(47,this.packRef);
pstmt.setString(48,this.considerAllocate);
pstmt.setString(49,this.partialUsed);
pstmt.setDouble(50,this.batchSize);
System.out.println("ITEM_CODE :"+this.itemCode); System.out.println("ITEM_CODE :"+this.itemCode);
System.out.println("SITE_CODE :"+this.siteCode); System.out.println("SITE_CODE :"+this.siteCode);
...@@ -1542,10 +1548,6 @@ public class StockUpdate ...@@ -1542,10 +1548,6 @@ public class StockUpdate
{ {
this.packInstr = updateStockMap.get("pack_instr").toString(); this.packInstr = updateStockMap.get("pack_instr").toString();
} }
if(updateStockMap.get("pack_instr")!=null)
{
this.packInstr = updateStockMap.get("pack_instr").toString();
}
if(updateStockMap.get("dimension")!=null) if(updateStockMap.get("dimension")!=null)
{ {
this.dimension = updateStockMap.get("dimension").toString(); this.dimension = updateStockMap.get("dimension").toString();
...@@ -1626,6 +1628,19 @@ public class StockUpdate ...@@ -1626,6 +1628,19 @@ public class StockUpdate
{ {
this.packRef = updateStockMap.get("pack_ref").toString(); this.packRef = updateStockMap.get("pack_ref").toString();
} }
if(updateStockMap.get("consider_allocate")!= null)
{
this.considerAllocate = updateStockMap.get("consider_allocate").toString();
}
if(updateStockMap.get("partial_used")!= null)
{
this.partialUsed = updateStockMap.get("partial_used").toString();
}
if(updateStockMap.get("batch_size")!=null)
{
this.batchSize = Double.parseDouble(updateStockMap.get("batch_size").toString());
}
}catch(Exception e){ }catch(Exception e){
System.out.println("Exception "+e); System.out.println("Exception "+e);
e.printStackTrace(); e.printStackTrace();
......
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