Commit 2939fbae authored by manohar's avatar manohar

code optimization for speed issue


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104125 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 16ff13ff
......@@ -1698,14 +1698,14 @@ public class PostOrdDespatchGen
System.out.println("Despatch Detail Count===="+insertCntDet);*/
}
sql = "UPDATE DESPATCH SET TOT_VALUE= ? WHERE DESP_ID= ?";
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1, sumNetAmt);
pstmt.setString(2, tranId);
pstmt.executeUpdate();
pstmt.close();
pstmt = null;
}
sql = "UPDATE DESPATCH SET TOT_VALUE= ? WHERE DESP_ID= ?";
pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1, sumNetAmt);
pstmt.setString(2, tranId);
pstmt.executeUpdate();
pstmt.close();
pstmt = null;
/*if(isDetailExist)
{
pstmtdDet.executeBatch();
......
......@@ -766,8 +766,18 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
}
lc_disc_amt = Double.parseDouble(discAmtStr);
xmlBuff.append("<rate__stk><![CDATA[]]></rate__stk>");
xmlBuff.append("<rate__std><![CDATA["+invDespMap.get("rate__std")+"]]></rate__std>");
xmlBuff.append("<cost_rate><![CDATA["+invDespMap.get("cost_rate")+"]]></cost_rate>");
discAmtStr = invTraceDetMap.get("rate__std");
if (discAmtStr == null || "null".equals(discAmtStr) || discAmtStr.trim().length() == 0)
{
discAmtStr = "0";
}
xmlBuff.append("<rate__std><![CDATA["+discAmtStr+"]]></rate__std>");
discAmtStr = invTraceDetMap.get("cost_rate");
if (discAmtStr == null || "null".equals(discAmtStr) || discAmtStr.trim().length() == 0)
{
discAmtStr = "0";
}
xmlBuff.append("<cost_rate><![CDATA["+discAmtStr+"]]></cost_rate>");
/**
......@@ -1618,7 +1628,7 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
String rate="",quantity_real="",quantity_inv="",invoice_id="",no_art="",rate__clg="",desp_rate__stduom="",disc_amt="",cust_item__ref="";
String disc_schem_billback_amt="",disc_schem_offinv_amt="",retString="";
double totalCommSp1=0.0,totalCommSp2=0.0,totalCommSp3=0.0,totalCommAmt=0.0;
double lc_desp_std_rate=0.0,totAmount = 0;
double lc_desp_std_rate=0.0,totAmount = 0,costRate=0,rateStd = 0;
PreparedStatement pstmt=null, pstmt1 = null;
ResultSet rs=null, rs1 = null;
String beanMapKey="",lsLineType="", sql= "";
......@@ -1717,9 +1727,10 @@ public class PostOrdInvoiceGen extends ActionHandlerEJB
lsLineType=checknull(rs.getString("nature"));
ld_mfg_date=rs.getString("mfg_date");
ld_exp_date=rs.getString("exp_date");
invTraceMap.put("rate__std", rs.getString("rate__std"));
invTraceMap.put("cost_rate", rs.getString("cost_rate"));
costRate=rs.getDouble("cost_rate");
rateStd = rs.getDouble("rate__std");
invTraceMap.put("rate__std", "" + rateStd);
invTraceMap.put("cost_rate", "" + costRate);
invTraceMap.put("disc_amt", rs.getString("disc_amt"));
invTraceMap.put("item_descr", rs.getString("item_descr"));
......
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