Commit 04146bdb authored by kshinde's avatar kshinde

Bug Fix


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105501 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7c2096af
package ibase.webitm.ejb.dis; package ibase.webitm.ejb.dis;
import ibase.utility.EMail;
import ibase.utility.CommonConstants; import ibase.utility.CommonConstants;
import ibase.webitm.utility.*;
import ibase.webitm.ejb.*; import ibase.webitm.ejb.*;
import ibase.webitm.ejb.mfg.ExplodeBom;
import ibase.webitm.ejb.mfg.adv.RcpBackflushConfirm;
import ibase.webitm.ejb.sys.*;
import ibase.system.config.*; import ibase.system.config.*;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.text.*;
import ibase.webitm.ejb.dis.DistCommon; import ibase.webitm.ejb.dis.DistCommon;
import ibase.webitm.ejb.fin.*;
import ibase.webitm.utility.TransIDGenerator;
import ibase.webitm.ejb.ITMDBAccessEJB; import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.dis.*;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.sql.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.InitialContext;
import javax.ejb.Stateless; import javax.ejb.Stateless;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
//import org.drools.runtime.pipeline.SmooksTransformerProvider;
import org.w3c.dom.*;
import javax.xml.rpc.ParameterMode;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.parsers.*;
import java.text.SimpleDateFormat;
import ibase.utility.CommonConstants;
//import ibase.utility.GenericUtility;
import ibase.webitm.ejb.E12CreateBatchLoadEjb;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB; import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.fin.FinCommon; import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.ejb.sys.CreateRCPXML;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
...@@ -17,6 +57,11 @@ import java.sql.Timestamp; ...@@ -17,6 +57,11 @@ import java.sql.Timestamp;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import javax.ejb.Stateless;
import org.w3c.dom.Document;
import com.ibm.db2.jcc.b.SQLException;
@Stateless @Stateless
public class PriceListConf extends ActionHandlerEJB implements PriceListConfLocal, PriceListConfRemote public class PriceListConf extends ActionHandlerEJB implements PriceListConfLocal, PriceListConfRemote
{ {
...@@ -71,10 +116,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -71,10 +116,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
{ {
ConnDriver connDriver = null; ConnDriver connDriver = null;
connDriver = new ConnDriver(); connDriver = new ConnDriver();
//Changes and Commented By Bhushan on 09-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 09-06-2016 :END
conn.setAutoCommit(false); conn.setAutoCommit(false);
connDriver = null; connDriver = null;
connStatus = true; connStatus = true;
...@@ -180,10 +222,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -180,10 +222,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
{ {
ConnDriver connDriver = null; ConnDriver connDriver = null;
connDriver = new ConnDriver(); connDriver = new ConnDriver();
//Changes and Commented By Bhushan on 09-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 09-06-2016 :END
conn.setAutoCommit(false); conn.setAutoCommit(false);
connDriver = null; connDriver = null;
connStatus = true; connStatus = true;
...@@ -363,6 +402,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -363,6 +402,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
String refNoold1=""; String refNoold1="";
String chgref1=""; String chgref1="";
double maxrate1=0.0; double maxrate1=0.0;
char left=0;
String PriceListParent1="",orderType1=""; String PriceListParent1="",orderType1="";
int Ctr=0,countup=0,Len=0,Len1=0; int Ctr=0,countup=0,Len=0,Len1=0;
java.sql.Timestamp ChgDate=null,efffromdt=null,validupto=null; java.sql.Timestamp ChgDate=null,efffromdt=null,validupto=null;
...@@ -377,7 +417,6 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -377,7 +417,6 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
//String LotNoFroma[] = null, LotNoToa[]=null; //String LotNoFroma[] = null, LotNoToa[]=null;
ArrayList<String> LotNoFroma=new ArrayList<String>(); ArrayList<String> LotNoToa=new ArrayList<String>(); ArrayList<String> LotNoFroma=new ArrayList<String>(); ArrayList<String> LotNoToa=new ArrayList<String>();
char left1=0,left2=0,left3 = 0,left4=0; char left1=0,left2=0,left3 = 0,left4=0;
char left=0;
int updCnt = 0; int updCnt = 0;
String mid1="",mid2="",mid3="",mid4=""; String mid1="",mid2="",mid3="",mid4="";
java.text.SimpleDateFormat sdf = null; java.text.SimpleDateFormat sdf = null;
...@@ -535,7 +574,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -535,7 +574,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
pstmtSql.setString(3,unit); pstmtSql.setString(3,unit);
pstmtSql.setString(4,listtype); pstmtSql.setString(4,listtype);
pstmtSql.setString(5,lotnofrom); pstmtSql.setString(5,lotnofrom);
pstmtSql.setString(6,lotnoto1); pstmtSql.setString(6,lotnofrom);//lotnoto1
pstmtSql.setDouble(7,minqty); pstmtSql.setDouble(7,minqty);
pstmtSql.setDouble(8,maxqty); pstmtSql.setDouble(8,maxqty);
rs=pstmtSql.executeQuery(); rs=pstmtSql.executeQuery();
...@@ -658,6 +697,9 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -658,6 +697,9 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
//char right= s2.charAt(s2.length()-1); //char right= s2.charAt(s2.length()-1);
if(isNumber(s2.charAt(s2.length()-1)))
{
System.out.println("right s22222222222222"+right); System.out.println("right s22222222222222"+right);
for ( int i = length - 1 ; i >= 0 ; i-- ) for ( int i = length - 1 ; i >= 0 ; i-- )
{ {
...@@ -734,6 +776,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -734,6 +776,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
} }
} }
} }
}
//to expire the pricelist in case of revise circular of old circular. //to expire the pricelist in case of revise circular of old circular.
//change the valid upto date of price before the eff from date and batch no less then the //change the valid upto date of price before the eff from date and batch no less then the
//plist1 = (String)PList.get("price_list"); //plist1 = (String)PList.get("price_list");
...@@ -798,20 +841,24 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -798,20 +841,24 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
{ {
sql="select slab_no,eff_from ,lot_no__from from pricelist where price_list = ? and item_code = ? and unit = ? and lot_no__from >= ? and list_type = ? and min_qty >= ? and max_qty <= ? and ref_no = ?"; sql="select slab_no,eff_from ,lot_no__from from pricelist where price_list = ? and item_code = ? and unit = ? and lot_no__from >= ? and list_type = ? and min_qty >= ? and max_qty <= ? and ref_no = ?";
pstmtSql=conn.prepareStatement(sql); pstmtSql=conn.prepareStatement(sql);
pstmtSql.setDouble(1, slabno); //pstmtSql.setDouble(1, slabno);
pstmtSql.setTimestamp(2, efffromdt); //pstmtSql.setTimestamp(2, efffromdt);
pstmtSql.setString(3, LotNoFrom); //pstmtSql.setString(3, LotNoFrom);
pstmtSql.setString(1, plist);
pstmtSql.setString(2, itemcode);
pstmtSql.setString(3, unit);
pstmtSql.setString(4, lotnofrom);
pstmtSql.setString(5, listtype);
pstmtSql.setDouble(6, minqty);
pstmtSql.setDouble(7, maxqty);
pstmtSql.setString(8, refNoold);
rs = pstmtSql.executeQuery(); rs = pstmtSql.executeQuery();
if (rs.next()) if (rs.next())
{ {
plist=rs.getString(1); SlabNo=rs.getDouble(1);
itemcode=rs.getString(2); efffromdt=rs.getTimestamp(2);
unit=rs.getString(3); LotNoFrom=rs.getString(3);
lotnofrom=rs.getString(4);
listtype=rs.getString(5);
minqty=rs.getDouble(6);
maxqty=rs.getDouble(7);
refNoold=rs.getString(8);
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -822,20 +869,24 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -822,20 +869,24 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
{ {
sql="select slab_no,eff_from ,lot_no__from from pricelist where price_list = ? and item_code = ? and unit = ? and lot_no__from >= ? and list_type = ? and min_qty >= ? and max_qty <= ? and ref_no is null"; sql="select slab_no,eff_from ,lot_no__from from pricelist where price_list = ? and item_code = ? and unit = ? and lot_no__from >= ? and list_type = ? and min_qty >= ? and max_qty <= ? and ref_no is null";
pstmtSql=conn.prepareStatement(sql); pstmtSql=conn.prepareStatement(sql);
pstmtSql.setDouble(1, slabno); //pstmtSql.setDouble(1, slabno);
pstmtSql.setTimestamp(2, efffromdt); //pstmtSql.setTimestamp(2, efffromdt);
pstmtSql.setString(3, lotnofrom); //pstmtSql.setString(3, lotnofrom);
pstmtSql.setString(1, plist);
pstmtSql.setString(2, itemcode);
pstmtSql.setString(3, unit);
pstmtSql.setString(4, lotnofrom);
pstmtSql.setString(5, listtype);
pstmtSql.setDouble(6, minqty);
pstmtSql.setDouble(7, maxqty);
pstmtSql.setString(8, refNoold);
rs = pstmtSql.executeQuery(); rs = pstmtSql.executeQuery();
if (rs.next()) if (rs.next())
{ {
plist=rs.getString(1); SlabNo=rs.getDouble(1);
itemcode=rs.getString(2); efffromdt=rs.getTimestamp(2);
unit=rs.getString(3); System.out.println("efffromdt++++"+efffromdt);
LotFrBrow=rs.getString(4); LotNoFrom=rs.getString(3);
listtype=rs.getString(5);
minqty=rs.getDouble(6);
maxqty=rs.getDouble(7);
refNoold=rs.getString(8);
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -927,6 +978,10 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -927,6 +978,10 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
//char right= s2.charAt(s2.length()-1); //char right= s2.charAt(s2.length()-1);
System.out.println("right s22222222222222"+right); System.out.println("right s22222222222222"+right);
if(isNumber(s2.charAt(s2.length()-1)))
{
for ( int i = length - 1 ; i >= 0 ; i-- ) for ( int i = length - 1 ; i >= 0 ; i-- )
{ {
Character character = LotNoFrom.trim().charAt(i); Character character = LotNoFrom.trim().charAt(i);
...@@ -983,7 +1038,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -983,7 +1038,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
validupto=(ValidUpTo); validupto=(ValidUpTo);
if(refNoold !=null && refNoold.trim().length() > 0) if(refNoold !=null && refNoold.trim().length() > 0)
{ {
sql="update pricelist set valid_upto = ? lot_no__to = ? where price_list = ? and item_code = ? and unit =? and list_type = ? and min_qty >= ? and max_qty <= ? and slab_no = ? and ref_no =?"; sql="update pricelist set valid_upto = ?,lot_no__to = ? where price_list = ? and item_code = ? and unit =? and list_type = ? and min_qty >= ? and max_qty <= ? and slab_no = ? and ref_no =?";
pstmtSql=conn.prepareStatement(sql); pstmtSql=conn.prepareStatement(sql);
pstmtSql.setTimestamp(1, validupto); pstmtSql.setTimestamp(1, validupto);
pstmtSql.setString(2, LotNoFrom); pstmtSql.setString(2, LotNoFrom);
...@@ -1005,7 +1060,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1005,7 +1060,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
} }
else else
{ {
sql="update pricelist set valid_upto = ? lot_no__to = ? where price_list = ? and item_code = ? and unit =? and list_type = ? and min_qty >= ? and max_qty <= ? and slab_no = ? and ref_no is null "; sql="update pricelist set valid_upto = ?,lot_no__to = ? where price_list = ? and item_code = ? and unit =? and list_type = ? and min_qty >= ? and max_qty <= ? and slab_no = ? and ref_no is null ";
pstmtSql=conn.prepareStatement(sql); pstmtSql=conn.prepareStatement(sql);
pstmtSql.setTimestamp(1, ValidUpTo); pstmtSql.setTimestamp(1, ValidUpTo);
pstmtSql.setString(2, LotNoFrom); pstmtSql.setString(2, LotNoFrom);
...@@ -1030,7 +1085,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1030,7 +1085,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
{ {
if(refNoold !=null && refNoold.trim().length() > 0) if(refNoold !=null && refNoold.trim().length() > 0)
{ {
sql="update pricelist set valid_upto = ? lot_no__to = ? where price_list = ? and item_code = ? and unit =? and list_type = ? and min_qty >= ? and max_qty <= ? and slab_no = ? and ref_no =?"; sql="update pricelist set valid_upto = ?,lot_no__to = ? where price_list = ? and item_code = ? and unit =? and list_type = ? and min_qty >= ? and max_qty <= ? and slab_no = ? and ref_no =?";
pstmtSql=conn.prepareStatement(sql); pstmtSql=conn.prepareStatement(sql);
pstmtSql.setTimestamp(1,ValidUpTo); pstmtSql.setTimestamp(1,ValidUpTo);
pstmtSql.setString(2, LotNoFrom); pstmtSql.setString(2, LotNoFrom);
...@@ -1073,6 +1128,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1073,6 +1128,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
} }
} }
} }
}
} }
//split the batch if the entered batch no is already existing in the master pricelist //split the batch if the entered batch no is already existing in the master pricelist
...@@ -1150,7 +1206,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1150,7 +1206,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
String y=currentlotnofr.trim(); String y=currentlotnofr.trim();
System.out.println("@@@@@x"+y); System.out.println("@@@@@x"+y);
String s2=y; String s2=y;
if(x.length()<y.length()) if(x.compareTo(y)<0)
{ {
/*char right3= y.charAt(y.length()-1); /*char right3= y.charAt(y.length()-1);
if(Character.isDigit(right3) ) if(Character.isDigit(right3) )
...@@ -1207,6 +1263,9 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1207,6 +1263,9 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
//char right= s2.charAt(s2.length()-1); //char right= s2.charAt(s2.length()-1);
//System.out.println("right s22222222222222"+right); //System.out.println("right s22222222222222"+right);
if(isNumber(s2.charAt(s2.length()-1)))
{
for ( int i = length - 1 ; i >= 0 ; i-- ) for ( int i = length - 1 ; i >= 0 ; i-- )
{ {
Character character = currentlotnofr.trim().charAt(i); Character character = currentlotnofr.trim().charAt(i);
...@@ -1259,6 +1318,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1259,6 +1318,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
lotnoto = testSub1.trim()+NewStr.trim()+a2 ; lotnoto = testSub1.trim()+NewStr.trim()+a2 ;
lotnofr = nextlotnofr; lotnofr = nextlotnofr;
System.out.println("LotNoFrom1@@@@LotNoFrom@@@@:"+lotnoto); System.out.println("LotNoFrom1@@@@LotNoFrom@@@@:"+lotnoto);
}
...@@ -1275,7 +1335,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1275,7 +1335,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
s2=currentlotnoto.trim(); s2=currentlotnoto.trim();
int length = currentlotnoto.trim().length(); int length = currentlotnoto.trim().length();
System.out.println("s22222222222222"+s2); System.out.println("s22222222222222"+s2);
if(p.length()<q.length()) if(p.compareTo(q)<0)
{ {
/*char right4= y.charAt(y.length()-1); /*char right4= y.charAt(y.length()-1);
if(Character.isDigit(right4) ) if(Character.isDigit(right4) )
...@@ -1324,6 +1384,9 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1324,6 +1384,9 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
String a2=Integer.toString(New); String a2=Integer.toString(New);
lotnofr = Set + NewStr.trim() +a2.trim(); lotnofr = Set + NewStr.trim() +a2.trim();
lotnofr = nextlotnofr;*/ lotnofr = nextlotnofr;*/
if(isNumber(s2.charAt(s2.length()-1)))
{
for ( int i = length - 1 ; i >= 0 ; i-- ) for ( int i = length - 1 ; i >= 0 ; i-- )
{ {
Character character = currentlotnoto.trim().charAt(i); Character character = currentlotnoto.trim().charAt(i);
...@@ -1377,7 +1440,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1377,7 +1440,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
lotnofr = nextlotnofr; lotnofr = nextlotnofr;
System.out.println("LotNoFrom1@@@@LotNoFrom@@@@:"+lotnofr); System.out.println("LotNoFrom1@@@@LotNoFrom@@@@:"+lotnofr);
}
} }
int temp=0; int temp=0;
...@@ -1472,8 +1535,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1472,8 +1535,7 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
pstmtSql.close(); pstmtSql.close();
pstmtSql = null; pstmtSql = null;
} }
System.out System.out.println("Record found@@@@@@@@@@@@@"+recordfound);
.println("Record found@@@@@@@@@@@@@"+recordfound);
today=new Timestamp(System.currentTimeMillis()); today=new Timestamp(System.currentTimeMillis());
ChgDate = today; ChgDate = today;
if(recordfound == false) if(recordfound == false)
...@@ -1487,8 +1549,8 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1487,8 +1549,8 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
pstmtInsert.setString(3, unit); pstmtInsert.setString(3, unit);
pstmtInsert.setString(4, listtype); pstmtInsert.setString(4, listtype);
pstmtInsert.setDouble(5, LineNo); pstmtInsert.setDouble(5, LineNo);
pstmtInsert.setTimestamp(6, EffDate); pstmtInsert.setTimestamp(6, (Timestamp)PList.get("eff_from"));
pstmtInsert.setTimestamp(7, ValidUpTo); pstmtInsert.setTimestamp(7, (Timestamp)PList.get("valid_upto"));
pstmtInsert.setString(8,lotnofrom);//lotnofr) pstmtInsert.setString(8,lotnofrom);//lotnofr)
pstmtInsert.setString(9, lotnoto1);//lotnoto) pstmtInsert.setString(9, lotnoto1);//lotnoto)
pstmtInsert.setDouble(10, minqty); pstmtInsert.setDouble(10, minqty);
...@@ -1633,11 +1695,9 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1633,11 +1695,9 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
sql="select d.item_code,d.lot_no__from,d.lot_no__to,d.rate,d.rate_type,d.min_rate,d.max_rate,d.chg_ref_no,d.eff_from,d.valid_upto,m.price_list,m.list_type ,m.price_list__parent,m.order_type,m.manage_type,d.min_qty ,d.max_qty,d.unit,d.line_no,h.ref_no,ref_no_old,h.calc_basis from pricelist_hdr h, pricelist_det d, pricelist_mst m where h.tran_id = d.tran_id and h.price_list = m.price_list and h.tran_id = ?"; sql="select d.item_code,d.lot_no__from,d.lot_no__to,d.rate,d.rate_type,d.min_rate,d.max_rate,d.chg_ref_no,d.eff_from,d.valid_upto,m.price_list,m.list_type ,m.price_list__parent,m.order_type,m.manage_type,d.min_qty ,d.max_qty,d.unit,d.line_no,h.ref_no,ref_no_old,h.calc_basis from pricelist_hdr h, pricelist_det d, pricelist_mst m where h.tran_id = d.tran_id and h.price_list = m.price_list and h.tran_id = ?";
pstmtSql = conn.prepareStatement(sql); pstmtSql = conn.prepareStatement(sql);
pstmtSql.setString(1, tranId); pstmtSql.setString(1, tranId);
System.out.println("Tran_id"+tranId);
rs = pstmtSql.executeQuery(); rs = pstmtSql.executeQuery();
while (rs.next()) while ( rs.next() )
{ {
System.out.print("Inside loop");
PList = new HashMap(); PList = new HashMap();
PList.put("item_code",itemCode=rs.getString("item_code")); PList.put("item_code",itemCode=rs.getString("item_code"));
PList.put("lot_no__from",lotNoForm=rs.getString("lot_no__from")); PList.put("lot_no__from",lotNoForm=rs.getString("lot_no__from"));
...@@ -1690,25 +1750,23 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca ...@@ -1690,25 +1750,23 @@ public class PriceListConf extends ActionHandlerEJB implements PriceListConfLoca
{ {
return retString; return retString;
} }
/*sql="select calc_method, price_list__tar , price_list__parent from pricelist_mst_det where price_list = ? order by line_no "; //sql="select calc_method, price_list__tar , price_list__parent from pricelist_mst_det where price_list = ? order by line_no ";
pstmtSql = conn.prepareStatement(sql); //pstmtSql = conn.prepareStatement(sql);
pstmtSql.setString(1, PriceList); //pstmtSql.setString(1, PriceList);
rs = pstmtSql.executeQuery(); //rs = pstmtSql.executeQuery();
/*while ( rs.next() ) /*while ( rs.next() )
{ {
calcmeth=rs.getString(1); calcmeth=rs.getString(1);
plisttar=rs.getString(2); plisttar=rs.getString(2);
PriceListParent=rs.getString(3); PriceListParent=rs.getString(3);
rs.close(); rs.close();
rs = null; rs = null;
pstmtSql.close(); pstmtSql.close();
pstmtSql = null; pstmtSql = null;
PList.put(plisttar,"price_list__tar");
PList.put(PriceListParent,"price_list__parentfrom");
PList.put("price_list__tar",plisttar);
PList.put("price_list__parentfrom",PriceListParent);
// PList.put(PriceListParent,"rate"); // PList.put(PriceListParent,"rate");
......
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