Commit beeb109e authored by asikarwar's avatar asikarwar

changeCondition as par pb code in getItemSer


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93584 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c3579b13
......@@ -3254,12 +3254,12 @@ public class DistCommon
//locCode = getTokenList(aLotNo,"~t"); // commented by cpatil
//lotNo = getTokenList(aLotNo,"~t"); // commented by cpatil
//lotSl = getTokenList(aLotNo,"~t"); // commented by cpatil
///System.out.println("siteCode..**..*>"+siteCode);
//System.out.println("locCode..**..*>"+locCode);
//System.out.println("lotNo..**..*>"+lotNo);
//System.out.println("lotSl..**..*>"+lotSl);
// modify by cpatil start
String MulStr[] = aLotNo.split("~t");
siteCode = MulStr[0];
......@@ -3374,9 +3374,9 @@ public class DistCommon
rs2 = null;
rate = pickRate(priceListParent,tempDate,itemCode,aLotNo,listType, quantity,conn);
return rate;
//return -1; //change done by kunal on 29/11/12 as per Manoj Sharma instruction
}
}//try 3
catch(Exception e)
......@@ -5792,19 +5792,23 @@ public class DistCommon
pstmt = null;
rs.close();
rs = null;
sql = "SELECT item_ser FROM item "
+ "WHERE ITEM_CODE = '" + itemCode + "'";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
if( itemSer == null || itemSer.trim().length() == 0)
//Condition added by Asikarwar on 06/Sep/2013 as par pb code
{
itemSer = rs.getString(1);
System.out.println("itemSer........"+itemSer);
sql = "SELECT item_ser FROM item "
+ "WHERE ITEM_CODE = '" + itemCode + "'";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
itemSer = rs.getString(1);
System.out.println("itemSer........"+itemSer);
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
}
}
}
......@@ -7909,7 +7913,7 @@ public class DistCommon
public double pickRate(String priceList,String trDate,String itemCode,String aLotNo,Connection conn)throws ITMException,SQLException
{
System.out.println("@@@@@--------------[pickRate]--[(String priceList,String trDate,String itemCode,String aLotNo,Connection conn)]-called------------------------------");
PreparedStatement pstmt = null;
ResultSet rs = null;
ResultSet rs2 = null;
......@@ -7941,7 +7945,7 @@ public class DistCommon
trDate = genericUtility.getValidDateString(trDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
tranDate = java.sql.Timestamp.valueOf(trDate + " 00:00:00");
if(listType.equalsIgnoreCase("I")) // replace listType instead of list by cpatil on 10-oct-12
{
if (aLotNo.indexOf("~t") > 0)
......@@ -8052,12 +8056,12 @@ public class DistCommon
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
}
}
if (rs != null ) //&& !rs.isClosed())
......@@ -8116,7 +8120,7 @@ public class DistCommon
pstmt.setTimestamp(2,tranDate);
pstmt.setTimestamp(3,tranDate);
rs = pstmt.executeQuery();
if(rs.next())
{
rate = rs.getDouble(1);
......@@ -8137,7 +8141,7 @@ public class DistCommon
pstmt = null;
sql = "SELECT (CASE WHEN PRICE_LIST__PARENT IS NULL THEN '' ELSE PRICE_LIST__PARENT END) "
+ "FROM pricelist_mst WHERE PRICE_LIST = '"+priceList+"' ";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if (rs.next())
......@@ -8397,7 +8401,7 @@ public class DistCommon
throw new ITMException(e);
}
}
}
catch(Exception e)
{
......@@ -8405,7 +8409,7 @@ public class DistCommon
throw new ITMException(e);
}
}
}
catch(Exception e)
{
......@@ -8541,7 +8545,7 @@ public class DistCommon
}
}
}
}
catch(Exception e)
{
......@@ -8549,7 +8553,7 @@ public class DistCommon
throw new ITMException(e);
}
}
}
catch(Exception e)
{
......@@ -8672,7 +8676,7 @@ public class DistCommon
throw new ITMException(e);
}
}
}
catch(Exception e)
{
......@@ -8744,14 +8748,14 @@ public class DistCommon
}
}
}
return(rate);
}
public double pickRate(String priceList,String trDate,String itemCode,Connection conn)throws ITMException,SQLException
{
System.out.println("@@@@@--------------[pickRate]--[(String priceList,String trDate,String itemCode,Connection conn)]-called------------------------------");
PreparedStatement pstmt = null;
ResultSet rs = null;
ResultSet rs2 = null;
......@@ -8783,7 +8787,7 @@ public class DistCommon
trDate = genericUtility.getValidDateString(trDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
tranDate = java.sql.Timestamp.valueOf(trDate + " 00:00:00");
}
catch(Exception e)
{
......@@ -8881,7 +8885,7 @@ public class DistCommon
throw new ITMException(e);
}
}
}
if (rs != null && !rs.isClosed())
......@@ -8915,7 +8919,7 @@ public class DistCommon
pstmt = null;
}
}
catch(Exception e)
{
......@@ -9147,7 +9151,7 @@ public class DistCommon
}
else
{
try
{
rs2.close();
......@@ -9218,7 +9222,7 @@ public class DistCommon
throw new ITMException(e);
}
}
}
catch(Exception e)
{
......@@ -9226,7 +9230,7 @@ public class DistCommon
throw new ITMException(e);
}
}
}
catch(Exception e)
{
......@@ -9361,7 +9365,7 @@ public class DistCommon
}
}
}
}
catch(Exception e)
{
......@@ -9369,11 +9373,11 @@ public class DistCommon
throw new ITMException(e);
}
}
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
......@@ -9494,7 +9498,7 @@ public class DistCommon
throw new ITMException(e);
}
}
}
catch(Exception e)
{
......
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