Commit 5a08c58f authored by dpawar's avatar dpawar

changes in detail2 and 3


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96226 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 607afb3d
/********************************************************
Title : DistIssWiz EJB
Date : 20 - Aug - 2014
Author: Deepak Sawant.
********************************************************/
package ibase.webitm.ejb.dis;
import ibase.system.config.ConnDriver;
......@@ -670,6 +665,8 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
{
if(currentColumn.trim().equalsIgnoreCase("itm_default"))
{
System.out.println("addUsersList22------>>["+addUsersList+"]");
System.out.println("chgUser11------>>["+chgUser+"]");
if(addUsersList.contains(chgUser))
{
for(int i = 0;i < addUsersList.size(); i++)
......@@ -681,7 +678,8 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
sql="select d.desp_id,d.site_code,d.desp_date,d.curr_code,d.exch_rate,d.trans_mode,d.curr_code__frt,d.curr_code__ins,d.stan_code,"
+ "d.state_code__dlv,d.dlv_city,d.dlv_pin,d.count_code__dlv,d.dlv_add1,d.dlv_add2,d.dlv_add3,"
+ "d.tran_code,d.stan_code__init,d.status,d.status_remarks,d.remarks,d.no_art,d.status_date,d.cust_code,d.cust_code__dlv,s.site_code__ship"
+ "d.tran_code,d.stan_code__init,d.status,d.status_remarks,d.remarks,d.no_art,d.status_date,d.cust_code,d.cust_code__dlv,"
+ "s.site_code__ship,s.CHG_USER,s.CHG_TERM "
+ " from despatch d,sorder s where d.sord_no = ? and d.sord_no = s.sale_order and and d.add_user = ?";
pstmt=conn.prepareStatement(sql);
......@@ -720,14 +718,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
remarksDes=checkNull(rs.getString("remarks"));
noArtDes=checkNull(rs.getString("no_art"));
}
if(rs!=null){
rs.close();
rs=null;
}
if(pstmt!=null){
pstmt.close();
pstmt=null;
}
System.out.println("orderDt----->>["+orderDt+"]");
System.out.println("custCodeDlv----->>["+custCodeDlv+"]");
valueXmlString.append("<Detail2 domID='" + count + "' objContext = '"+currentFormNo+"' selected=\"N\">\r\n");
......@@ -784,7 +775,18 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
valueXmlString.append("<remarks><![CDATA["+ remarksDes +"]]></remarks>");
valueXmlString.append("<no_art><![CDATA["+ noArtDes +"]]></no_art>");
valueXmlString.append("<chg_user><![CDATA["+(rs.getString("CHG_USER")==null?"":rs.getString("CHG_USER").trim())+"]]></chg_user>");
valueXmlString.append("<chg_term><![CDATA["+(rs.getString("CHG_TERM")==null?"":rs.getString("CHG_TERM").trim())+"]]></chg_term>");
valueXmlString.append("</Detail2>");
if(rs!=null){
rs.close();
rs=null;
}
if(pstmt!=null){
pstmt.close();
pstmt=null;
}
}
}
......@@ -1176,13 +1178,104 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
else if(currentColumn.trim().equalsIgnoreCase("lot_sl"))
{
System.out.println("Form 3 lot_sl item change444444444..............");
String lotSlL="",siteCodeL="",dimension="",itemDescr="",holdQtyS="HOLD";
String lineNoAdd="",lnNoSord="",quantity="",rate1="",conQtyStd="",itemDescr="",itemCodeOrd="";
String unitRate="",taxClass="",taxChap="",taxEnv="",netTotAmt="",quntyStduom="",
siteCodeDet="",unitStd="", noArt="", convRtuomStduom="",netAmt="",rateStduom="";
String expLev="1.";
System.out.println("Form 3 itm_default_add called.................");
int lineNo1=0;
double rateClg=0;
System.out.println("Form 3 lot_sl item change1111111222..............");
System.out.println("EDIT fLAG----->>["+editFlag+"]");
String lotSlL="",siteCodeL="",dimension="",holdQtyS="HOLD";
double qtyStk=0,palletWt=0,cAllocQty=0,holdQty=0;
lotSlL=checkNull(genericUtility.getColumnValue("lot_sl", dom2,"3"));
System.out.println("lotSlL--->2222["+lotSlL+"]");
siteCodeL=getColumnDescr(conn, "site_code", "sorder", "sale_order", sorderNo);
//ADDED nEW
sql = "select line_no,item_code,item_code__ord,quantity,rate,unit,conv__qty_stduom,unit__rate,tax_class,tax_chap,tax_env,pack_code,rate__clg,quantity__stduom," +
"net_tot_amt,net_amt,site_code,unit__std,no_art,rate__stduom,conv__rtuom_stduom from sorddet where sale_order = ? order by line_no";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,sorderNo);
rs = pstmt.executeQuery();
if( rs.next() )
{
lnNoSord = rs.getString("line_no");
itemCode = rs.getString("item_code") == null ? " " : rs.getString("item_code");
itemCodeOrd = rs.getString("item_code__ord") == null ? " " : rs.getString("item_code__ord");
quantity = rs.getString("quantity") == null ? "0" : rs.getString("quantity") ;
rate1 = rs.getString("rate")== null ? " " : rs.getString("rate");
unit = rs.getString("unit") == null ? " " : rs.getString("unit");
conQtyStd = rs.getString("conv__qty_stduom") == null ? " " : rs.getString("conv__qty_stduom");
unitRate = rs.getString("unit__rate") == null ? " " : rs.getString("unit__rate");
taxClass = rs.getString("tax_class") == null ? " " : rs.getString("tax_class");
taxChap = rs.getString("tax_chap") == null ? " " : rs.getString("tax_chap");
taxEnv = rs.getString("tax_env") == null ? " " : rs.getString("tax_env");
packCode = rs.getString("pack_code") == null ? " " : rs.getString("pack_code");
rateClg = rs.getDouble("rate__clg");
quntyStduom = rs.getString("quantity__stduom") == null ? "0" : rs.getString("quantity__stduom");
netTotAmt = rs.getString("net_tot_amt") == null ? " " : rs.getString("net_tot_amt");
siteCodeDet = rs.getString("site_code") == null ? " " : rs.getString("site_code");
unitStd = rs.getString("unit__std") == null ? " " : rs.getString("unit__std");
noArt = rs.getString("no_art");
rateStduom = rs.getString("rate__stduom");
convRtuomStduom = rs.getString("conv__rtuom_stduom");
netAmt = rs.getString("net_amt");
}
pstmt.close();
rs.close();
pstmt = null;
rs = null;
itemDescr=checkNull(getColumnDescr(conn, "descr", "item", "item_code", itemCode));
System.out.println("lnNoSord lotSl item change-------->>["+lnNoSord+"]");
valueXmlString.append("<Detail3 domID='" +lineNo1+ "' objContext = '"+currentFormNo+"' selected=\"Y\">\r\n");
valueXmlString.append("<attribute selected=\"Y\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>\r\n");
valueXmlString.append("<desp_id><![CDATA["+ despId +"]]></desp_id>");//expLev
valueXmlString.append("<lot_no><![CDATA[]]></lot_no>");
valueXmlString.append("<lot_sl><![CDATA[]]></lot_sl>");
valueXmlString.append("<loc_code><![CDATA[]]></loc_code>");
valueXmlString.append("<exp_lev><![CDATA["+expLev +"]]></exp_lev>");
//valueXmlString.append("<remarks><![CDATA["+ "generated from sorder "+"]]></remarks>");
valueXmlString.append("<rate><![CDATA["+rate1 +"]]></rate>");
valueXmlString.append("<item_code__ord><![CDATA["+ itemCodeOrd +"]]></item_code__ord>");
//valueXmlString.append("<item_code><![CDATA["+ itemCode +"]]></item_code>");
//valueXmlString.append("<quantity><![CDATA["+ quantity.trim() +"]]></quantity>");
valueXmlString.append("<unit><![CDATA["+ unit+"]]></unit>");
valueXmlString.append("<conv__qty_stduom><![CDATA["+ conQtyStd +"]]></conv__qty_stduom>");
valueXmlString.append("<unit__rate><![CDATA["+ unitRate +"]]></unit__rate>");
valueXmlString.append("<tax_class><![CDATA["+taxClass.trim() +"]]></tax_class>");
valueXmlString.append("<tax_chap><![CDATA["+taxChap +"]]></tax_chap>");
valueXmlString.append("<tax_env><![CDATA["+ taxEnv+"]]></tax_env>");
valueXmlString.append("<rate__clg><![CDATA["+ rateClg +"]]></rate__clg>");
valueXmlString.append("<tot_net_amt><![CDATA["+ netTotAmt.trim()+"]]></tot_net_amt>");
valueXmlString.append("<site_code><![CDATA["+ siteCodeDet.trim()+"]]></site_code>");
valueXmlString.append("<quantity__stduom><![CDATA["+ quntyStduom.trim()+"]]></quantity__stduom>");
valueXmlString.append("<pack_code><![CDATA["+ packCode.trim()+"]]></pack_code>");
valueXmlString.append("<unit__std><![CDATA["+ unitStd+"]]></unit__std>");
//valueXmlString.append("<CHG_USER><![CDATA["+ userId +"]]></CHG_USER>");
//valueXmlString.append("<CHG_TERM><![CDATA["+ termId +"]]></CHG_TERM>");
//valueXmlString.append("<CHG_DATE><![CDATA["+ today +"]]></CHG_DATE>");
valueXmlString.append("<no_art><![CDATA["+ noArt +"]]></no_art>");
valueXmlString.append("<rate__stduom><![CDATA["+ rateStduom +"]]></rate__stduom>");
valueXmlString.append("<conv__rtuom_stduom><![CDATA["+ convRtuomStduom +"]]></conv__rtuom_stduom>");
valueXmlString.append("<tot_net_amt><![CDATA["+ netAmt +"]]></tot_net_amt>");
valueXmlString.append("<quantity__inv><![CDATA["+ quantity +"]]></quantity__inv>");
valueXmlString.append("<quantity__real><![CDATA["+ quantity +"]]></quantity__real>");
//Addd New End
sql = "select loc_code,lot_no,item_code,quantity,gross_weight,net_weight,tare_weight,no_art,hold_qty "
+ "from stock where site_code = ? and lot_sl = ? and quantity > 0";
......@@ -1212,9 +1305,20 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
itemDescr=getColumnDescr(conn, "descr", "item", "item_code", itemCode);
String domID1="1";
//valueXmlString.append("<sord_no><![CDATA["+ itemCode +"]]></sord_no>");
//valueXmlString.append("<line_no__sord><![CDATA["+ itemCode +"]]></line_no__sord>");
valueXmlString.append("<Detail3 domID='" +domID1+ "' objContext = '"+currentFormNo+"' selected=\"Y\">\r\n");
//valueXmlString.append("<sord_no><![CDATA["+ sorderNo +"]]></sord_no>");
//valueXmlString.append("<line_no__sord><![CDATA["+ lnNoSord +"]]></line_no__sord>");
//valueXmlString.append("<Detail3 domID='" +domID1+ "' objContext = '"+currentFormNo+"' selected=\"Y\">\r\n");
valueXmlString.append("<sord_no protect=\"0\">").append("<![CDATA[" + sorderNo + "]]>").append("</sord_no>");
setNodeValue( dom2, "sord_no", getAbsString(""+sorderNo));
valueXmlString.append("<line_no protect=\"0\">").append("<![CDATA[" + lineNo1 + "]]>").append("</line_no>");
setNodeValue( dom2, "line_no", getAbsString(""+lineNo1));
valueXmlString.append("<line_no__sord protect=\"0\">").append("<![CDATA[" + lnNoSord + "]]>").append("</line_no__sord>");
setNodeValue( dom2, "line_no__sord", getAbsString(""+lnNoSord));
valueXmlString.append("<item_code protect=\"0\">").append("<![CDATA[" + itemCode + "]]>").append("</item_code>");
......@@ -1256,6 +1360,9 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
/*valueXmlString.append("<lot_sl protect=\"0\">").append("<![CDATA[" + lotSlL + "]]>").append("</item_code>");
setNodeValue( dom2, "lot_sl", getAbsString(""+lotSlL));*/
valueXmlString.append("</Detail3>");
......@@ -1930,6 +2037,7 @@ public class DespatchWiz extends ValidatorEJB implements DespatchWizLocal, Despa
}
private String insertNewRecord(String sorderId,int currentFormNo,Connection conn)
{
System.out.println("------in insertNewRecord method----------");
StringBuffer valueXmlString = new StringBuffer();
ResultSet rs=null;
PreparedStatement pstmt=null;
......
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