Commit f9e0097b authored by agaikwad's avatar agaikwad

if nature is F and item_flg is B then set unit and unit_pur


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101734 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 25d417fc
...@@ -6824,12 +6824,13 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D ...@@ -6824,12 +6824,13 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D
//new column value //new column value
else if(currentColumn.equalsIgnoreCase("exp_lev")) else if(currentColumn.equalsIgnoreCase("exp_lev"))
{ {
String mitemflg="";
mVal1 = genericUtility.getColumnValue("exp_lev",dom); mVal1 = genericUtility.getColumnValue("exp_lev",dom);
mcode = genericUtility.getColumnValue("line_no__sord",dom);///genericUtility. mcode = genericUtility.getColumnValue("line_no__sord",dom);///genericUtility.
mVal = genericUtility.getColumnValue("sord_no",dom); mVal = genericUtility.getColumnValue("sord_no",dom);
System.out.println("exp_lev CASE....:"+mVal1+"..."+mcode+"..."+mVal); System.out.println("exp_lev CASE....:"+mVal1+"..."+mcode+"..."+mVal);
sql = "Select site_code, unit__std, conv__qty_stduom, unit from sorddet " sql = "Select site_code, unit__std, conv__qty_stduom, unit,item_flg from sorddet "
+"where sale_order = ? and line_no = ? "; +"where sale_order = ? and line_no = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,mVal); pstmt.setString(1,mVal);
...@@ -6842,13 +6843,15 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D ...@@ -6842,13 +6843,15 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D
mstunit = rs.getString("unit__std"); mstunit = rs.getString("unit__std");
mNum2 = rs.getDouble("conv__qty_stduom"); mNum2 = rs.getDouble("conv__qty_stduom");
mUnit = rs.getString("unit"); mUnit = rs.getString("unit");
mitemflg = rs.getString("item_flg");
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
//Added by Abhijit
sql = "Select item_code__ord, quantity, item_code, qty_alloc from sorditem " sql = "Select item_code__ord, quantity, item_code, qty_alloc, nature from sorditem "
+" where sale_order = ? and line_no = ? and " +" where sale_order = ? and line_no = ? and "
+" exp_lev = ? "; +" exp_lev = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -6864,11 +6867,14 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D ...@@ -6864,11 +6867,14 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D
mNum = rs.getDouble("quantity"); mNum = rs.getDouble("quantity");
mdescr1 = rs.getString("item_code"); mdescr1 = rs.getString("item_code");
mNum1 = rs.getDouble("qty_alloc"); mNum1 = rs.getDouble("qty_alloc");
nature=rs.getString("nature");
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println(".:nature" +nature);
System.out.println(".:item_code" +mdescr1); System.out.println(".:item_code" +mdescr1);
sql = "Select descr from item where item_code = ? "; sql = "Select descr from item where item_code = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -6902,7 +6908,27 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D ...@@ -6902,7 +6908,27 @@ public class DespatchAct extends ActionHandlerEJB implements DespatchActLocal, D
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("::item_flg" +mitemflg);
System.out.println("::nature" +nature);
if( "B".equals(mitemflg) && "F".equals(nature) )
{
sql="select unit, unit__pur from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,mdescr1);
rs = pstmt.executeQuery();
if(rs.next())
{
mUnit = rs.getString("unit");
mstunit = rs.getString("unit__pur");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("::mUnit" +mUnit);
System.out.println("::mstunit" +mstunit);
}
valueXmlString.append("<item_code__ord isSrvCallOnChg='0'>").append("<![CDATA[").append(itemCode).append("]]>").append("</item_code__ord>\r\n"); valueXmlString.append("<item_code__ord isSrvCallOnChg='0'>").append("<![CDATA[").append(itemCode).append("]]>").append("</item_code__ord>\r\n");
setNodeValue( dom, "item_code__ord", (itemCode == null) ? "" : itemCode ); setNodeValue( dom, "item_code__ord", (itemCode == null) ? "" : itemCode );
valueXmlString.append("<quantity__ord isSrvCallOnChg='0'>").append("<![CDATA[").append(mNum).append("]]>").append("</quantity__ord>\r\n"); valueXmlString.append("<quantity__ord isSrvCallOnChg='0'>").append("<![CDATA[").append(mNum).append("]]>").append("</quantity__ord>\r\n");
......
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