Commit 30dabdc1 authored by dpawar's avatar dpawar

update allocQty


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96445 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 161f9ea0
package ibase.webitm.ejb.dis; package ibase.webitm.ejb.dis;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.sql.*; import java.sql.*;
...@@ -613,17 +614,22 @@ public class DespatchPos extends ValidatorEJB implements DespatchPosLocal, Despa ...@@ -613,17 +614,22 @@ public class DespatchPos extends ValidatorEJB implements DespatchPosLocal, Despa
{ {
System.out.println("----------postSaveWiz method ......................."+tranId); System.out.println("----------postSaveWiz method ......................."+tranId);
System.out.println("editFlag------>>["+editFlag+"]"); System.out.println("editFlag------>>["+editFlag+"]");
System.out.println("xtraParams------>>["+xtraParams+"]");
System.out.println("xmlString------>>["+xmlString+"]"); System.out.println("xmlString------>>["+xmlString+"]");
String sql = "",saleOrder = ""; String sql = "",saleOrder = "",retString="",currAppdate="",lineNoS="",siteCode="",itemCode="",
int lineNo = 0; locCode="",lotNo="",lotSl="",quantityS="",chgUser="",chgTerm="";
int lineNo = 0,cnt=0;
Document dom = null; Document dom = null;
double grossWeight = 0,tareWeight = 0,netWeight = 0,noAart = 0,offinvAmt = 0,billbackAmt = 0 ; double grossWeight = 0,tareWeight = 0,netWeight = 0,noAart = 0,offinvAmt = 0,billbackAmt = 0,quantity=0 ;
double quantityStduom = 0 ,rateStduom = 0,offinvAmtDet = 0,taxAmtDet = 0 ,discount = 0,totAmt = 0,amount = 0; double quantityStduom = 0 ,rateStduom = 0,offinvAmtDet = 0,taxAmtDet = 0 ,discount = 0,totAmt = 0,amount = 0;
//GenericUtility genericUtility = GenericUtility.getInstance(); //GenericUtility genericUtility = GenericUtility.getInstance();
PreparedStatement pstmt = null,pstmt1 = null; PreparedStatement pstmt = null,pstmt1 = null;
ResultSet rs = null,rs1 = null; ResultSet rs = null,rs1 = null;
boolean isError=false; boolean isError=false;
java.sql.Timestamp currDate = null;
SimpleDateFormat sdf = null;
HashMap allocQtyMap=new HashMap();
InvAllocTraceBean allocTraceBean=new InvAllocTraceBean();
GenericUtility genericUtility = GenericUtility.getInstance();
//System.out.println("tranId="+tranId+" xtraParams="+xtraParams); //System.out.println("tranId="+tranId+" xtraParams="+xtraParams);
try try
{ {
...@@ -632,11 +638,32 @@ public class DespatchPos extends ValidatorEJB implements DespatchPosLocal, Despa ...@@ -632,11 +638,32 @@ public class DespatchPos extends ValidatorEJB implements DespatchPosLocal, Despa
{ {
dom = parseString(xmlString); dom = parseString(xmlString);
} }
if(dom!=null ){ if(dom!=null && tranId.length() == 0){
System.out.println("dom not null........."); System.out.println("dom not null.........");
tranId = GenericUtility.getInstance().getColumnValue("desp_id",dom); tranId = GenericUtility.getInstance().getColumnValue("desp_id",dom);
lineNoS =genericUtility.getColumnValue("line_no",dom);
siteCode= genericUtility.getColumnValue("site_code",dom);
itemCode= genericUtility.getColumnValue("item_code",dom);
locCode= genericUtility.getColumnValue("loc_code",dom);
lotNo= genericUtility.getColumnValue("lot_no",dom);
lotSl= genericUtility.getColumnValue("lot_sl",dom);
quantityS= genericUtility.getColumnValue("quantity",dom);
chgUser= genericUtility.getColumnValue("chg_user",dom);
chgTerm= genericUtility.getColumnValue("chg_term",dom);
} }
System.out.println("tranId----->>["+tranId+"]"); System.out.println("tranId----->>["+tranId+"]");
System.out.println("lineNoS----->>["+lineNoS+"]");
System.out.println("siteCode----->>["+siteCode+"]");
System.out.println("itemCode----->>["+itemCode+"]");
System.out.println("locCode----->>["+locCode+"]");
System.out.println("lotSl----->>["+lotSl+"]");
System.out.println("quantity----->>["+quantity+"]");
System.out.println("chgUser----->>["+chgUser+"]");
System.out.println("chgTerm----->>["+chgTerm+"]");
conn=null; conn=null;
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
...@@ -716,6 +743,24 @@ public class DespatchPos extends ValidatorEJB implements DespatchPosLocal, Despa ...@@ -716,6 +743,24 @@ public class DespatchPos extends ValidatorEJB implements DespatchPosLocal, Despa
pstmt.executeUpdate(); pstmt.executeUpdate();
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
//Allocating stock
allocQtyMap.put("tran_date", currAppdate);
allocQtyMap.put("ref_ser", "S-WDSP");
allocQtyMap.put("ref_id", tranId);
allocQtyMap.put("ref_line",lineNoS);
allocQtyMap.put("site_code",siteCode);
allocQtyMap.put("item_code",itemCode);
//hashMap.put("loc_code",locCode[iRow]);
allocQtyMap.put("loc_code",locCode);
allocQtyMap.put("lot_no",lotNo);
allocQtyMap.put("lot_sl",lotSl);
allocQtyMap.put("alloc_qty",Double.parseDouble(quantityS));
allocQtyMap.put("chg_user",chgUser);
allocQtyMap.put("chg_term",chgTerm);
allocQtyMap.put("chg_win","W_DESPATCHWIZ");
retString=allocTraceBean.updateInvallocTrace(allocQtyMap, conn);
} }
catch(Exception 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