Commit a6600203 authored by msingh's avatar msingh

Changed by Manish on 01/04/16 for maximum cursor issue for DDUK .


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101073 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3db5e586
...@@ -258,6 +258,18 @@ String runMode=""; ...@@ -258,6 +258,18 @@ String runMode="";
compName = rs.getString("COMP_NAME"); compName = rs.getString("COMP_NAME");
} }
System.out.println("serviceCode = "+serviceCode+" compName "+compName); System.out.println("serviceCode = "+serviceCode+" compName "+compName);
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,serviceCode); pstmt.setString(1,serviceCode);
...@@ -266,6 +278,18 @@ String runMode=""; ...@@ -266,6 +278,18 @@ String runMode="";
{ {
serviceURI = rs.getString("SERVICE_URI"); serviceURI = rs.getString("SERVICE_URI");
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
System.out.println("serviceURI = "+serviceURI+" compName = "+compName); System.out.println("serviceURI = "+serviceURI+" compName = "+compName);
Service service = new Service(); Service service = new Service();
Call call = (Call)service.createCall(); Call call = (Call)service.createCall();
...@@ -309,6 +333,11 @@ String runMode=""; ...@@ -309,6 +333,11 @@ String runMode="";
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if (rs !=null)
{
rs.close();
rs=null;
}
/*if( conn != null ){ /*if( conn != null ){
conn.close(); conn.close();
conn = null; conn = null;
......
...@@ -30,7 +30,7 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc ...@@ -30,7 +30,7 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc
Document detailDom = null; Document detailDom = null;
Document headerDom = null; Document headerDom = null;
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
try try
{ {
if(xmlString != null && xmlString.trim().length()!=0) if(xmlString != null && xmlString.trim().length()!=0)
...@@ -89,7 +89,7 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc ...@@ -89,7 +89,7 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc
//System.out.println("Now the date is :=> ["+newsysDate+"]"); //System.out.println("Now the date is :=> ["+newsysDate+"]");
tranId = genericUtility.getColumnValue("tran_id",headerDom); tranId = genericUtility.getColumnValue("tran_id",headerDom);
System.out.println("tranId["+tranId); System.out.println("tranId["+tranId);
if( tranId != null && tranId.trim().length() > 0 ) if( tranId != null && tranId.trim().length() > 0 )
...@@ -138,7 +138,7 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc ...@@ -138,7 +138,7 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc
retString =itmDBAccessEJB.getErrorString("","VTTRANIDNL","","",conn); retString =itmDBAccessEJB.getErrorString("","VTTRANIDNL","","",conn);
return retString; return retString;
} }
sql = " select invoice_id ,tran_date from sreturn where tran_id = ? " ; sql = " select invoice_id ,tran_date from sreturn where tran_id = ? " ;
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranId); pstmt.setString(1,tranId);
...@@ -169,7 +169,7 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc ...@@ -169,7 +169,7 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc
pstmt.close(); pstmt.close();
rs = null; rs = null;
pstmt = null; pstmt = null;
sql = " select tran_id__porcp,purc_order from sorder where sale_order = ? " ; sql = " select tran_id__porcp,purc_order from sorder where sale_order = ? " ;
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,saleOrder); pstmt.setString(1,saleOrder);
...@@ -209,14 +209,14 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc ...@@ -209,14 +209,14 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc
return retString; return retString;
} }
} }
} }
else else
{ {
retString =itmDBAccessEJB.getErrorString("","VTINVIDBK","","",conn); retString =itmDBAccessEJB.getErrorString("","VTINVIDBK","","",conn);
return retString; return retString;
} }
xmlBuff.append("<?xml version='1.0' encoding='ISO-8859-1'?>\n"); xmlBuff.append("<?xml version='1.0' encoding='ISO-8859-1'?>\n");
xmlBuff.append("<DocumentRoot>"); xmlBuff.append("<DocumentRoot>");
xmlBuff.append("<description>").append("Datawindow Root").append("</description>"); xmlBuff.append("<description>").append("Datawindow Root").append("</description>");
...@@ -267,9 +267,9 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc ...@@ -267,9 +267,9 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc
xmlBuff.append("<tran_id/>"); xmlBuff.append("<tran_id/>");
xmlBuff.append("<line_no><![CDATA["+lineNo+"]]></line_no>"); xmlBuff.append("<line_no><![CDATA["+lineNo+"]]></line_no>");
xmlBuff.append("<purc_order><![CDATA["+purchOrder+"]]></purc_order>"); xmlBuff.append("<purc_order><![CDATA["+purchOrder+"]]></purc_order>");
sql = " select porcpdet.line_no__ord from porcp,porcpdet where porcp.tran_id = porcpdet.tran_id " sql = " select porcpdet.line_no__ord from porcp,porcpdet where porcp.tran_id = porcpdet.tran_id "
+" and porcp.tran_id = ? and porcp.tran_ser = 'P-RCP' and porcpdet.purc_order = ? and porcpdet.item_code = ? " ; +" and porcp.tran_id = ? and porcp.tran_ser = 'P-RCP' and porcpdet.purc_order = ? and porcpdet.item_code = ? " ;
pstmt1 = conn.prepareStatement(sql); pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1,porderRef); pstmt1.setString(1,porderRef);
pstmt1.setString(2,purchOrder); pstmt1.setString(2,purchOrder);
...@@ -283,7 +283,7 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc ...@@ -283,7 +283,7 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc
pstmt1.close(); pstmt1.close();
rs1 = null; rs1 = null;
pstmt1 = null; pstmt1 = null;
xmlBuff.append("<line_no__ord><![CDATA["+lineNoOrd+"]]></line_no__ord>"); xmlBuff.append("<line_no__ord><![CDATA["+lineNoOrd+"]]></line_no__ord>");
xmlBuff.append("<item_code><![CDATA["+itemCode+"]]></item_code>"); xmlBuff.append("<item_code><![CDATA["+itemCode+"]]></item_code>");
xmlBuff.append("<quantity><![CDATA["+quantity+"]]></quantity>"); xmlBuff.append("<quantity><![CDATA["+quantity+"]]></quantity>");
...@@ -429,6 +429,18 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc ...@@ -429,6 +429,18 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc
compName = rs.getString("COMP_NAME"); compName = rs.getString("COMP_NAME");
} }
System.out.println("serviceCode = "+serviceCode+" compName "+compName); System.out.println("serviceCode = "+serviceCode+" compName "+compName);
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,serviceCode); pstmt.setString(1,serviceCode);
...@@ -438,6 +450,18 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc ...@@ -438,6 +450,18 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc
serviceURI = rs.getString("SERVICE_URI"); serviceURI = rs.getString("SERVICE_URI");
} }
System.out.println("serviceURI = "+serviceURI+" compName = "+compName); System.out.println("serviceURI = "+serviceURI+" compName = "+compName);
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
Service service = new Service(); Service service = new Service();
Call call = (Call)service.createCall(); Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(serviceURI)); call.setTargetEndpointAddress(new java.net.URL(serviceURI));
...@@ -479,6 +503,11 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc ...@@ -479,6 +503,11 @@ public class GeneratePReturnPrc extends ProcessEJB implements GeneratePReturnPrc
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if (rs !=null)
{
rs.close();
rs=null;
}
/*if( conn != null ){ /*if( conn != null ){
conn.close(); conn.close();
conn = null; conn = null;
......
...@@ -2261,6 +2261,18 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde ...@@ -2261,6 +2261,18 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
compName = rs.getString("COMP_NAME"); compName = rs.getString("COMP_NAME");
} }
System.out.println("serviceCode = "+serviceCode+" compName "+compName); System.out.println("serviceCode = "+serviceCode+" compName "+compName);
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,serviceCode); pstmt.setString(1,serviceCode);
...@@ -2270,6 +2282,18 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde ...@@ -2270,6 +2282,18 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
serviceURI = rs.getString("SERVICE_URI"); serviceURI = rs.getString("SERVICE_URI");
} }
System.out.println("serviceURI = "+serviceURI+" compName = "+compName); System.out.println("serviceURI = "+serviceURI+" compName = "+compName);
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
Service service = new Service(); Service service = new Service();
Call call = (Call)service.createCall(); Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(serviceURI)); call.setTargetEndpointAddress(new java.net.URL(serviceURI));
...@@ -2309,6 +2333,11 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde ...@@ -2309,6 +2333,11 @@ public class GenerateSaleOrderPrc extends ProcessEJB implements GenerateSaleOrde
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if (rs !=null)
{
rs.close();
rs=null;
}
/*if( conn != null ){ /*if( conn != null ){
conn.close(); conn.close();
conn = null; conn = null;
......
...@@ -5,18 +5,15 @@ import ibase.system.config.ConnDriver; ...@@ -5,18 +5,15 @@ import ibase.system.config.ConnDriver;
import ibase.webitm.ejb.ActionHandlerEJB; import ibase.webitm.ejb.ActionHandlerEJB;
import ibase.webitm.ejb.ITMDBAccessEJB; import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.MasterStatefulLocal; import ibase.webitm.ejb.MasterStatefulLocal;
import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.ejb.fin.MiscDrCrRcpConf; import ibase.webitm.ejb.fin.MiscDrCrRcpConf;
import ibase.webitm.utility.GenericUtility; import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.math.BigDecimal;
import java.rmi.RemoteException; 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;
import java.sql.SQLException; import java.sql.SQLException;
import java.text.NumberFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.HashMap; import java.util.HashMap;
...@@ -143,10 +140,10 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -143,10 +140,10 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) { if (rs.next()) {
invoiceId = rs.getString(1); invoiceId = rs.getString(1);
custCode = rs.getString(2) == null ? "" : rs.getString(2); custCode = rs.getString(2) == null ? "" : rs.getString(2);
siteCode = rs.getString(3) == null ? "" : rs.getString(3); siteCode = rs.getString(3) == null ? "" : rs.getString(3);
currCode = rs.getString(4) == null ? "" : rs.getString(4); currCode = rs.getString(4) == null ? "" : rs.getString(4);
ExchRate = rs.getDouble(5); ExchRate = rs.getDouble(5);
} }
if (rs != null) { if (rs != null) {
rs.close(); rs.close();
...@@ -196,13 +193,6 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -196,13 +193,6 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
mapDebitNoteAmt.put(lineNo, detail3Amt); mapDebitNoteAmt.put(lineNo, detail3Amt);
// detail2xmlString=getDetailsXmlString(conn, xtraParams, // detail2xmlString=getDetailsXmlString(conn, xtraParams,
// invoiceId, aprvRate, debitNoteAmtDetail); // invoiceId, aprvRate, debitNoteAmtDetail);
// make rounding off logic detail3Amt
System.out.println("detail3Amt Before rounding["+detail3Amt+"]");
detail3Amt = getRequiredDecimal(detail3Amt, custCode,conn);
System.out.println("detail3Amt After rounding["+detail3Amt+"]");
detail2xmlString = detail2xmlString detail2xmlString = detail2xmlString
+ getDetailsXmlString(conn, invoiceId, lineNotrace, + getDetailsXmlString(conn, invoiceId, lineNotrace,
lineNo, aprvRate, PODqty, lotNo, lotSl, lineNo, aprvRate, PODqty, lotNo, lotSl,
...@@ -211,14 +201,13 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -211,14 +201,13 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
} // end while } // end while
System.out.println("detail2xmlString---->>[[" System.out.println("detail2xmlString---->>[["
+ detail2xmlString + "]]"); + detail2xmlString + "]]");
System.out.println("Final detail3AmtT in debit note---Before rounding------->> : ["+ detail3AmtT+"]"); System.out
.println("Final detail3AmtT in debit note---------->> : "
+ detail3AmtT);
// Debit note amount cannot less than hundred. // Debit note amount cannot less than hundred.
// [31-JUL-2015] Sanket Girme // [31-JUL-2015] Sanket Girme
if (detail3AmtT >= 100) { if (detail3AmtT >= 100) {
// make roundings off logic detail3AmtT
detail3AmtT = getRequiredDecimal(detail3AmtT, custCode,conn);
System.out.println("Final detail3AmtT in debit note---After rounding------->> : ["+ detail3AmtT+"]");
errString = genDebitNote("POD", invoiceId, custCode, errString = genDebitNote("POD", invoiceId, custCode,
siteCode, xtraParams, currCode, ExchRate, siteCode, xtraParams, currCode, ExchRate,
detail2xmlString, detail3AmtT, conn); detail2xmlString, detail3AmtT, conn);
...@@ -237,20 +226,24 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -237,20 +226,24 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
if ((errString != null) if ((errString != null)
&& errString.indexOf("CONFSUCCES") > -1) { && errString.indexOf("CONFSUCCES") > -1) {
updCnt = updatePodHeader(conn, tranId, loginCode); updCnt = updatePodHeader(conn, tranId, loginCode);
System.out.println("return count from updateDebitNoteAmounts--->[" System.out
.println("return count from updateDebitNoteAmounts--->["
+ updCnt + "]"); + updCnt + "]");
if (updCnt > 0) { if (updCnt > 0) {
conn.commit(); conn.commit();
errString = itmdbAccess.getErrorString("", errString = itmdbAccess.getErrorString("",
"VTCONSUCF", "", "", conn); "VTCONSUCF", "", "", conn);
System.out.println("-----@@@Debit Note Generated successfully for amount : " System.out
.println("------@@@Debit Note Generated successfully for amount : "
+ actualDBamount); + actualDBamount);
System.out.println("Confirmation of Debit note done successfully----------"); System.out
.println("Confirmation of Debit note done successfully----------");
} else { } else {
errString = itmdbAccess.getErrorString("", errString = itmdbAccess.getErrorString("",
"VTNCONFT", "", "", conn); "VTNCONFT", "", "", conn);
conn.rollback(); conn.rollback();
System.out.println("transaction not confirmed----------"); System.out
.println("transaction not confirmed----------");
} }
} else { } else {
errString = itmdbAccess.getErrorString("", errString = itmdbAccess.getErrorString("",
...@@ -267,7 +260,8 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -267,7 +260,8 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
} else { } else {
errString = itmdbAccess.getErrorString("", "VTCOSUCFT", "", errString = itmdbAccess.getErrorString("", "VTCOSUCFT", "",
"", conn); "", conn);
System.out.println("Debit note generated zero for invoice ID-->>[" System.out
.println("Debit note generated zero for invoice ID-->>["
+ invoiceId + "]"); + invoiceId + "]");
debitNoteTranID = ""; debitNoteTranID = "";
updCnt = updatePodHeader(conn, tranId, loginCode); updCnt = updatePodHeader(conn, tranId, loginCode);
...@@ -877,6 +871,18 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -877,6 +871,18 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
compName = compName == null ? "" : compName.trim(); compName = compName == null ? "" : compName.trim();
System.out.println("serviceCode = [" + serviceCode System.out.println("serviceCode = [" + serviceCode
+ "] compName [" + compName + "]"); + "] compName [" + compName + "]");
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, serviceCode); pstmt.setString(1, serviceCode);
...@@ -887,6 +893,18 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -887,6 +893,18 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
serviceURI = serviceURI == null ? "" : serviceURI.trim(); serviceURI = serviceURI == null ? "" : serviceURI.trim();
System.out.println("serviceURI = [" + serviceURI System.out.println("serviceURI = [" + serviceURI
+ "]---> compName = [" + compName + "]"); + "]---> compName = [" + compName + "]");
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
Service service = new Service(); Service service = new Service();
Call call = (Call) service.createCall(); Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(serviceURI)); call.setTargetEndpointAddress(new java.net.URL(serviceURI));
...@@ -987,6 +1005,18 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -987,6 +1005,18 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
} }
System.out.println("serviceCode = " + serviceCode + " compName " System.out.println("serviceCode = " + serviceCode + " compName "
+ compName); + compName);
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, serviceCode); pstmt.setString(1, serviceCode);
...@@ -994,7 +1024,20 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -994,7 +1024,20 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
if (rs.next()) { if (rs.next()) {
serviceURI = rs.getString("SERVICE_URI"); serviceURI = rs.getString("SERVICE_URI");
} }
System.out.println("serviceURI = " + serviceURI + " compName = " + compName); System.out.println("serviceURI = " + serviceURI + " compName = "
+ compName);
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pstmt != null)
{
pstmt.close();
pstmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
Service service = new Service(); Service service = new Service();
Call call = (Call) service.createCall(); Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(serviceURI)); call.setTargetEndpointAddress(new java.net.URL(serviceURI));
...@@ -1052,71 +1095,11 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ...@@ -1052,71 +1095,11 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements
System.out.println("Unable to rollback"); System.out.println("Unable to rollback");
s.printStackTrace(); s.printStackTrace();
} }
throw new ITMException(e); throw new ITMException(e);
} }
} }
return retString; return retString;
} }
@SuppressWarnings("finally")
public double getRequiredDecimal(double actVal, String custCode,Connection conn) throws SQLException
{
ResultSet rs = null;
PreparedStatement pstmt = null;
String sql = "",round="";
double roundTo= 0d,reqVal=0d;
java.sql.Timestamp invDate = null;
DistCommon dist = new DistCommon();
try {
sql = " select round,round_to from customer where cust_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode);
rs = pstmt.executeQuery();
if (rs.next()) {
round = rs.getString("round")==null?"":rs.getString("round").trim();
roundTo = rs.getDouble("round_to");
}
reqVal = dist.getRndamt(actVal, round, roundTo);
// if("R".equals(round)) //Near
// {
//
// }
// else if("X".equals(round)) //Next
// {
// BigDecimal noZero = new BigDecimal(actVal);
// noZero.scale();
// noZero.precision();
// }
// else if("P".equals(round)) //Previous
// {
//
// }
// else if("N".equals(round)) //No Round
// {
// reqVal = actVal;
// }
} catch (Exception e) {
System.out.println("Exception in getRequiredDecimal off Round-------");
e.printStackTrace();
}
// NumberFormat numberFormat = NumberFormat.getIntegerInstance();
// Double DoubleValue = new Double(actVal);
// numberFormat.setMaximumFractionDigits(prec);
// String strValue = numberFormat.format(DoubleValue);
// strValue = strValue.replaceAll(",", "");
// double reqVal = Double.parseDouble(strValue);
finally
{
rs.close();
rs=null;
pstmt.close();
pstmt=null;
return reqVal;
}
}
} }
...@@ -481,6 +481,13 @@ public class ConsumeIssueAct extends ActionHandlerEJB implements ConsumeIssueAct ...@@ -481,6 +481,13 @@ public class ConsumeIssueAct extends ActionHandlerEJB implements ConsumeIssueAct
issCriteria = rset.getString(1); issCriteria = rset.getString(1);
System.out.println("issCriteria :"+issCriteria); System.out.println("issCriteria :"+issCriteria);
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (rset !=null)
{
rset.close();
rset = null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
NodeList detailList = selDataDom.getElementsByTagName("Detail"); NodeList detailList = selDataDom.getElementsByTagName("Detail");
int noOfDetails = detailList.getLength(); int noOfDetails = detailList.getLength();
for(int ctr = 0; ctr < noOfDetails; ctr++) for(int ctr = 0; ctr < noOfDetails; ctr++)
...@@ -562,6 +569,13 @@ public class ConsumeIssueAct extends ActionHandlerEJB implements ConsumeIssueAct ...@@ -562,6 +569,13 @@ public class ConsumeIssueAct extends ActionHandlerEJB implements ConsumeIssueAct
valueXmlString.append("<acct_code__inv isSrvCallOnChg='0'>").append("<![CDATA[").append(acctCodeInv).append("]]>").append("</acct_code__inv>\r\n"); valueXmlString.append("<acct_code__inv isSrvCallOnChg='0'>").append("<![CDATA[").append(acctCodeInv).append("]]>").append("</acct_code__inv>\r\n");
valueXmlString.append("<cctr_code__inv isSrvCallOnChg='0'>").append("<![CDATA[").append(cctrCodeInv).append("]]>").append("</cctr_code__inv>\r\n"); valueXmlString.append("<cctr_code__inv isSrvCallOnChg='0'>").append("<![CDATA[").append(cctrCodeInv).append("]]>").append("</cctr_code__inv>\r\n");
} }
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (rset !=null)
{
rset.close();
rset = null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
if (Double.parseDouble(stockQty) <= quantity1) if (Double.parseDouble(stockQty) <= quantity1)
{ {
valueXmlString.append("<quantity isSrvCallOnChg='0'>").append("<![CDATA[").append(stockQty).append("]]>").append("</quantity>\r\n"); valueXmlString.append("<quantity isSrvCallOnChg='0'>").append("<![CDATA[").append(stockQty).append("]]>").append("</quantity>\r\n");
......
...@@ -34,7 +34,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -34,7 +34,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
CommonConstants commonConstants = new CommonConstants(); CommonConstants commonConstants = new CommonConstants();
Connection conn = null; Connection conn = null;
public String process() throws RemoteException,ITMException public String process() throws RemoteException,ITMException
{ {
return ""; return "";
...@@ -77,7 +77,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -77,7 +77,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
ResultSet rs = null; ResultSet rs = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
StringBuffer retDistOrdIssBuff = new StringBuffer(); StringBuffer retDistOrdIssBuff = new StringBuffer();
String siteCodeFr="", siteCodeTo="",toDateStr="",frDateStr=""; String siteCodeFr="", siteCodeTo="",toDateStr="",frDateStr="";
java.sql.Date toDate = null; java.sql.Date toDate = null;
java.sql.Date frDate = null; java.sql.Date frDate = null;
...@@ -89,7 +89,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -89,7 +89,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
double grossWeight=0.0,tareWeight=0.0,netWeight=0.0,frtAmt=0.0; double grossWeight=0.0,tareWeight=0.0,netWeight=0.0,frtAmt=0.0;
double amount=0.0,taxAmt=0.0,netAmt=0.0,discount=0.0,exchRateFrt=0.0; double amount=0.0,taxAmt=0.0,netAmt=0.0,discount=0.0,exchRateFrt=0.0;
double dcNo=0.0; double dcNo=0.0;
*/ */
SimpleDateFormat sdf = null; SimpleDateFormat sdf = null;
java.sql.Date tranDate = null; java.sql.Date tranDate = null;
java.sql.Date effDate = null; java.sql.Date effDate = null;
...@@ -119,7 +119,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -119,7 +119,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
toDateStr = genericUtility.getColumnValue("to_date",headerDom); toDateStr = genericUtility.getColumnValue("to_date",headerDom);
System.out.println("siteCodeFrom is ::"+siteCodeFr+"and siteCodeTo is ::"+siteCodeTo); System.out.println("siteCodeFrom is ::"+siteCodeFr+"and siteCodeTo is ::"+siteCodeTo);
System.out.println("frDateStr is ::"+frDateStr+"and toDateStr is ::"+toDateStr); System.out.println("frDateStr is ::"+frDateStr+"and toDateStr is ::"+toDateStr);
if ((siteCodeFr == null || siteCodeFr.trim().length() == 0) ||(siteCodeTo == null || siteCodeTo.trim().length() == 0)) if ((siteCodeFr == null || siteCodeFr.trim().length() == 0) ||(siteCodeTo == null || siteCodeTo.trim().length() == 0))
{ {
errString = itmDBAccessEJB.getErrorString("","VTMNULSITE","","",conn); errString = itmDBAccessEJB.getErrorString("","VTMNULSITE","","",conn);
...@@ -144,7 +144,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -144,7 +144,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
sql =" select count(*) from site where site_code = ? "; sql =" select count(*) from site where site_code = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,siteCodeTo); pstmt.setString(1,siteCodeTo);
...@@ -163,7 +163,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -163,7 +163,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if (frDateStr != null && frDateStr.trim().length() > 0 ) if (frDateStr != null && frDateStr.trim().length() > 0 )
{ {
//frDate=java.sql.Date.valueOf(frDateStr.trim()); //frDate=java.sql.Date.valueOf(frDateStr.trim());
...@@ -185,26 +185,26 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -185,26 +185,26 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
return errString; return errString;
} }
System.out.println("frDate is ::"+frDate+"and toDate is ::"+toDate); System.out.println("frDate is ::"+frDate+"and toDate is ::"+toDate);
if (frDate.after(toDate)) //frmdate is grater than todate if (frDate.after(toDate)) //frmdate is grater than todate
{ {
errString = itmDBAccessEJB.getErrorString("","VTDATE12","","",conn); errString = itmDBAccessEJB.getErrorString("","VTDATE12","","",conn);
return errString; return errString;
} }
sql =" SELECT TRAN_ID,TRAN_DATE,EFF_DATE,DIST_ORDER,SITE_CODE, " sql =" SELECT TRAN_ID,TRAN_DATE,EFF_DATE,DIST_ORDER,SITE_CODE, "
+" SITE_CODE__DLV,DIST_ROUTE,TRAN_CODE,LR_NO,LR_DATE,LORRY_NO, " +" SITE_CODE__DLV,DIST_ROUTE,TRAN_CODE,LR_NO,LR_DATE,LORRY_NO, "
+" GROSS_WEIGHT,TARE_WEIGHT,NET_WEIGHT,FRT_AMT,AMOUNT,TAX_AMT, " +" GROSS_WEIGHT,TARE_WEIGHT,NET_WEIGHT,FRT_AMT,AMOUNT,TAX_AMT, "
+" NET_AMT,LOC_CODE__GIT,REMARKS,FRT_TYPE,CHG_USER,CHG_TERM , " +" NET_AMT,LOC_CODE__GIT,REMARKS,FRT_TYPE,CHG_USER,CHG_TERM , "
+" CURR_CODE,CHG_DATE,CONFIRMED,CONF_DATE,ORDER_TYPE,AVAILABLE_YN ," +" CURR_CODE,CHG_DATE,CONFIRMED,CONF_DATE,ORDER_TYPE,AVAILABLE_YN ,"
+" STOCK_STATUS,GP_NO,GP_DATE,GP_SER,DISCOUNT,SHIPMENT_ID, " +" STOCK_STATUS,GP_NO,GP_DATE,GP_SER,DISCOUNT,SHIPMENT_ID, "
+" CURR_CODE__FRT,EXCH_RATE__FRT,PROJ_CODE,DC_NO " +" CURR_CODE__FRT,EXCH_RATE__FRT,PROJ_CODE,DC_NO "
+" FROM DISTORD_ISS " +" FROM DISTORD_ISS "
+" WHERE (tran_date >= ? ) AND " +" WHERE (tran_date >= ? ) AND "
+" (tran_date <= ? ) AND " +" (tran_date <= ? ) AND "
+" (site_code between ? and ? )AND " +" (site_code between ? and ? )AND "
+" CONFIRMED = ? "; +" CONFIRMED = ? ";
System.out.println("sql..."+ sql); System.out.println("sql..."+ sql);
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setDate(1,frDate ); pstmt.setDate(1,frDate );
...@@ -309,7 +309,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -309,7 +309,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
catch (SQLException e) catch (SQLException e)
{ {
...@@ -325,7 +325,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -325,7 +325,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
{ {
try try
{ {
// retTabSepStrBuff = null; // retTabSepStrBuff = null;
if(conn != null && !conn.isClosed()) if(conn != null && !conn.isClosed())
{ {
if(rs != null) if(rs != null)
...@@ -359,10 +359,10 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -359,10 +359,10 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
String retStr = ""; String retStr = "";
try try
{ {
System.out.println("xmlString[process]::::::::::;;;"+xmlString); System.out.println("xmlString[process]::::::::::;;;"+xmlString);
System.out.println("xmlString2[process]::::::::::;;;"+xmlString2); System.out.println("xmlString2[process]::::::::::;;;"+xmlString2);
System.out.println("windowName[process]::::::::::;;;"+windowName); System.out.println("windowName[process]::::::::::;;;"+windowName);
System.out.println("xtraParams[process]:::::::::;;;"+xtraParams); System.out.println("xtraParams[process]:::::::::;;;"+xtraParams);
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -397,7 +397,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -397,7 +397,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
//Connection conn = null; //Connection conn = null;
int parentNodeListLength = 0; int parentNodeListLength = 0;
int childNodeListLength = 0; int childNodeListLength = 0;
NodeList parentNodeList = null; NodeList parentNodeList = null;
NodeList childNodeList = null; NodeList childNodeList = null;
...@@ -422,7 +422,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -422,7 +422,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
System.out.println("[DistIssPrcEJB][loginCode]=>"+loginCode); System.out.println("[DistIssPrcEJB][loginCode]=>"+loginCode);
System.out.println("[DistIssPrcEJB][chgTerm]=>"+chgTerm); System.out.println("[DistIssPrcEJB][chgTerm]=>"+chgTerm);
genericUtility = new ibase.utility.E12GenericUtility(); genericUtility = new ibase.utility.E12GenericUtility();
parentNodeList = detailDom.getElementsByTagName("Detail2"); parentNodeList = detailDom.getElementsByTagName("Detail2");
parentNodeListLength = parentNodeList.getLength(); parentNodeListLength = parentNodeList.getLength();
System.out.println("parentNodeListLength:::::::::"+parentNodeListLength); System.out.println("parentNodeListLength:::::::::"+parentNodeListLength);
...@@ -444,7 +444,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -444,7 +444,7 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
System.out.println( "tranIdFr before.........:-"+ tranIdFr ); System.out.println( "tranIdFr before.........:-"+ tranIdFr );
tranIdFr = childNode.getFirstChild().getNodeValue(); tranIdFr = childNode.getFirstChild().getNodeValue();
System.out.println( "tranIdFr after.........:-"+ tranIdFr ); System.out.println( "tranIdFr after.........:-"+ tranIdFr );
} }
} }
System.out.println( "tranIdFr final.........:-"+ tranIdFr ); System.out.println( "tranIdFr final.........:-"+ tranIdFr );
...@@ -477,16 +477,16 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -477,16 +477,16 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
{ {
System.out.println("Exception : WorkorderPrcEJB =>"+d.toString()); System.out.println("Exception : WorkorderPrcEJB =>"+d.toString());
d.printStackTrace(); d.printStackTrace();
System.out.println("Exception :WorkorderPrcEJB :process(String xmlString2, String xmlString2, String windowName, String xtraParams):" + e.getMessage() + ":"); System.out.println("Exception :WorkorderPrcEJB :process(String xmlString2, String xmlString2, String windowName, String xtraParams):" + e.getMessage() + ":");
e.printStackTrace(); e.printStackTrace();
errString = e.getMessage(); errString = e.getMessage();
throw new ITMException(e); throw new ITMException(e);
} }
} }
finally finally
{ {
System.out.println("errorString...." + errString); System.out.println("errorString...." + errString);
System.out.println("Closing Connection...."); System.out.println("Closing Connection....");
try try
{ {
if(conn != null && !conn.isClosed()) if(conn != null && !conn.isClosed())
...@@ -534,6 +534,18 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -534,6 +534,18 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
compName = rs.getString("COMP_NAME"); compName = rs.getString("COMP_NAME");
} }
System.out.println("serviceCode = "+serviceCode+" compName "+compName); System.out.println("serviceCode = "+serviceCode+" compName "+compName);
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pStmt != null)
{
pStmt.close();
pStmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? "; sql = "SELECT SERVICE_URI FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = ? ";
pStmt = conn.prepareStatement(sql); pStmt = conn.prepareStatement(sql);
pStmt.setString(1,serviceCode); pStmt.setString(1,serviceCode);
...@@ -543,6 +555,18 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -543,6 +555,18 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
serviceURI = rs.getString("SERVICE_URI"); serviceURI = rs.getString("SERVICE_URI");
} }
System.out.println("serviceURI = "+serviceURI+" compName = "+compName); System.out.println("serviceURI = "+serviceURI+" compName = "+compName);
// Changed by Manish on 01/04/16 for max cursor issue [start]
if (pStmt != null)
{
pStmt.close();
pStmt=null;
}
if (rs !=null)
{
rs.close();
rs=null;
}
// Changed by Manish on 01/04/16 for max cursor issue [end]
Service service = new Service(); Service service = new Service();
Call call = (Call)service.createCall(); Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(serviceURI)); call.setTargetEndpointAddress(new java.net.URL(serviceURI));
...@@ -583,20 +607,25 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr ...@@ -583,20 +607,25 @@ public class DistIssPrc extends ProcessEJB implements DistIssPrcLocal,DistIssPr
pStmt.close(); pStmt.close();
pStmt = null; pStmt = null;
} }
if (rs !=null)
{
rs.close();
rs=null;
}
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println("Exception inCalling confirmed"); System.out.println("Exception inCalling confirmed");
e.printStackTrace(); e.printStackTrace();
try{ try{
conn.rollback(); conn.rollback();
}catch (Exception s) }catch (Exception s)
{ {
System.out.println("Unable to rollback"); System.out.println("Unable to rollback");
s.printStackTrace(); s.printStackTrace();
} }
} }
} }
return retString; return retString;
} }
......
...@@ -874,6 +874,18 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -874,6 +874,18 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
{ {
try try
{ {
//Changed by Manish on 1-04-2016 to close prepared statement [START]
if(pstmtStock != null)
{
pstmtStock.close();
pstmtStock = null;
}
if(rsStock != null)
{
rsStock.close();
rsStock = null;
}
//Changed by Manish on 1-04-2016 to close prepared statement [END]
//added by chitranjan connStatus if connstatus is true then commit. //added by chitranjan connStatus if connstatus is true then commit.
if( !isError && connStatus ) if( !isError && connStatus )
{ {
...@@ -3521,7 +3533,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -3521,7 +3533,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
lineNo++; lineNo++;
sql = " Insert into qc_order_lots (QC_ORDER,LINE_NO,ITEM_CODE,LOT_NO,LOT_SL,LOC_CODE,QUANTITY," + sql = " Insert into qc_order_lots (QC_ORDER,LINE_NO,ITEM_CODE,LOT_NO,LOT_SL,LOC_CODE,QUANTITY," +
"UNIT,SAMPLE_QTY,LOCTYPE,LOC_CODE__ISSUE,QORDER_NO,NO_ART,NET_WEIGHT) " + "UNIT,SAMPLE_QTY,LOCTYPE,LOC_CODE__ISSUE,QORDER_NO,NO_ART,NET_WEIGHT,LOC_CODE) " +
" values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; " values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
pstmtInsert = conn.prepareStatement(sql); pstmtInsert = conn.prepareStatement(sql);
pstmtInsert.setString(1, qorderNo); pstmtInsert.setString(1, qorderNo);
...@@ -3530,7 +3542,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -3530,7 +3542,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
pstmtInsert.setString(4, lotNo); pstmtInsert.setString(4, lotNo);
pstmtInsert.setString(5, lotSl); pstmtInsert.setString(5, lotSl);
// pstmtInsert.setString(6, locationCode); // pstmtInsert.setString(6, locationCode);
pstmtInsert.setString(6, locCode); pstmtInsert.setString(6, qcLotLocCode);
quantity = getUnroundDecimal(quantity, 3); quantity = getUnroundDecimal(quantity, 3);
pstmtInsert.setDouble(7, quantity); pstmtInsert.setDouble(7, quantity);
pstmtInsert.setString(8, unit); pstmtInsert.setString(8, unit);
...@@ -3540,7 +3552,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer ...@@ -3540,7 +3552,7 @@ public class StockTransferConf extends ActionHandlerEJB implements StockTransfer
pstmtInsert.setString(12, qorderNo); pstmtInsert.setString(12, qorderNo);
pstmtInsert.setDouble(13, noArt); pstmtInsert.setDouble(13, noArt);
pstmtInsert.setDouble(14, netWeight); pstmtInsert.setDouble(14, netWeight);
// pstmtInsert.setString(15, locCode); pstmtInsert.setString(15, locCode);
updCnt1 = pstmtInsert.executeUpdate(); updCnt1 = pstmtInsert.executeUpdate();
pstmtInsert.close(); pstmtInsert.close();
pstmtInsert = null; pstmtInsert = 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