Commit 10de8712 authored by cpatil's avatar cpatil

merging from branch


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101324 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a9d9f0c3
[Dolphin] [Dolphin]
SortOrder=1 SortOrder=1
SortRole=date
Sorting=2 Sorting=2
Timestamp=2012,11,28,16,10,37 Timestamp=2016,4,20,11,51,8
Version=3
ViewMode=1 ViewMode=1
package ibase.webitm.ejb.dis; package ibase.webitm.ejb.dis;
...@@ -114,9 +115,7 @@ public class EmpPoLimitIC extends ValidatorEJB implements EmpPoLimitICLocal,EmpP ...@@ -114,9 +115,7 @@ public class EmpPoLimitIC extends ValidatorEJB implements EmpPoLimitICLocal,EmpP
itemSeries = genericUtility.getColumnValue("item_ser", dom); itemSeries = genericUtility.getColumnValue("item_ser", dom);
eff_from=checkNull(genericUtility.getColumnValue("eff_from", dom)); eff_from=checkNull(genericUtility.getColumnValue("eff_from", dom));
valid_upto=checkNull(genericUtility.getColumnValue("valid_upto", dom)); valid_upto=checkNull(genericUtility.getColumnValue("valid_upto", dom));
// reasCode=genericUtility.getColumnValue("reas_code", dom);
if(eff_from !=null && eff_from.trim().length()>0 ) if(eff_from !=null && eff_from.trim().length()>0 )
{ {
effDate = Timestamp.valueOf(genericUtility.getValidDateString(eff_from, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0"); effDate = Timestamp.valueOf(genericUtility.getValidDateString(eff_from, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
...@@ -136,6 +135,7 @@ public class EmpPoLimitIC extends ValidatorEJB implements EmpPoLimitICLocal,EmpP ...@@ -136,6 +135,7 @@ public class EmpPoLimitIC extends ValidatorEJB implements EmpPoLimitICLocal,EmpP
pstmt.setTimestamp(3,effDate); pstmt.setTimestamp(3,effDate);
pstmt.setTimestamp(4,validDate); pstmt.setTimestamp(4,validDate);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
System.out.println("eff_date@@@@for testing"+effDate);
System.out.println("Sql@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" + Sql); System.out.println("Sql@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" + Sql);
if (rs.next()) if (rs.next())
{ {
...@@ -268,8 +268,35 @@ public class EmpPoLimitIC extends ValidatorEJB implements EmpPoLimitICLocal,EmpP ...@@ -268,8 +268,35 @@ public class EmpPoLimitIC extends ValidatorEJB implements EmpPoLimitICLocal,EmpP
break ; break ;
} }
} }
} }
if (!editFlag.equalsIgnoreCase("E")) {
System.out.println("Comming to !editFlag condition");
sql=null;
sql=" select COUNT(1) from emp_po_limit where emp_code=? and item_ser=? and ( ( ? BETWEEN eff_from AND valid_upto ) OR (? BETWEEN eff_from AND valid_upto ))";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,empCode);
pstmt.setString(2,itemSeries);
pstmt.setTimestamp(3,effDate);
pstmt.setTimestamp(4,validDate);
rs = pstmt.executeQuery();
if (rs.next()) {
cnt = rs.getInt(1);
}
System.out.println("CHECKING DUPLICATE PERIOD"+cnt);
pstmt.close();
rs.close();
pstmt = null;
rs = null;
if(cnt > 0) {
errString = itmDBAccessEJB.getErrorString("","VMRECD ",userId);
break ;
}
}
System.out.println("Value of itemcode is:*************************"+empCode); System.out.println("Value of itemcode is:*************************"+empCode);
System.out.println("Value ofcust code is:*********************"+itemSeries); System.out.println("Value ofcust code is:*********************"+itemSeries);
...@@ -474,11 +501,6 @@ public class EmpPoLimitIC extends ValidatorEJB implements EmpPoLimitICLocal,EmpP ...@@ -474,11 +501,6 @@ public class EmpPoLimitIC extends ValidatorEJB implements EmpPoLimitICLocal,EmpP
} }
return input; return input;
} }
} }
...@@ -649,10 +649,10 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd ...@@ -649,10 +649,10 @@ insert into obj_itemchange(obj_name,form_no,field_name)values('porderamd
pstmt2 = null; pstmt2 = null;
sql3 = "select sum(a.tot_amt * b.exch_rate) from porddet a,porder b " + sql3 = "select sum(a.tot_amt * b.exch_rate) from porddet a,porder b " +
"where (a.purc_order = b.purc_order) and" + "where (a.purc_order = b.purc_order) and" +
" b.confirmed = 'Y' and a.proj_code = ? and b.purc_order = ? and " + " b.confirmed = 'Y' and a.proj_code = ? and b.purc_order = ? and a.status ! = 'C' and b.status ! = 'X' and" +
" a.line_no NOT IN (select line_no__ord from poamd_det where amd_no = ? " + " a.line_no NOT IN (select line_no__ord from poamd_det where amd_no = ? " +
"and proj_code = ? and line_no__ord is not null) "; "and proj_code = ? and line_no__ord is not null) ";
pstmt3 = conn.prepareStatement(sql3); pstmt3 = conn.prepareStatement(sql3);
pstmt3.setString(1,projCode); pstmt3.setString(1,projCode);
pstmt3.setString(2,purcOrder); pstmt3.setString(2,purcOrder);
......
...@@ -1826,7 +1826,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1826,7 +1826,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
*/ */
System.out.println("Discount in dom: " + discount); System.out.println("Discount in dom: " + discount);
dis = Double.parseDouble(discount); dis = Double.parseDouble(discount);
boolean falgporate=false; boolean falgporate=true;
String pordTyperate=""; String pordTyperate="";
if (indNo != null && indNo.length() > 0) if (indNo != null && indNo.length() > 0)
{ {
...@@ -1860,7 +1860,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1860,7 +1860,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
else else
{ {
falgporate = true; falgporate = true;
System.out.println("In Flag False "+ true); System.out.println("In Flag False "+ falgporate);
} }
} }
...@@ -1868,7 +1868,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1868,7 +1868,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
System.out.println("falgporate" + falgporate); System.out.println("falgporate" + falgporate);
if(falgporate) if(falgporate)
{ {
System.out.println("Enter If COndition"); System.out.println("Enter If Flag COndition");
if (dis > 0) if (dis > 0)
{ {
Disrate = (rate * dis) / 100; Disrate = (rate * dis) / 100;
......
This diff is collapsed.
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
import org.w3c.dom.Document;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import javax.ejb.Local;
@Local
public interface ProfileResourceICLocal extends ValidatorLocal
{
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException;
public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException;
}
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
import org.w3c.dom.Document;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import javax.ejb.Remote;
@Remote
public interface ProfileResourceICRemote extends ValidatorRemote
{
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException;
public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException;
}
/********************************************************
Title ResourceIC[D16ASUN003]
Date : 12/04/16
Developer: Abhijit Gaikwad
********************************************************/
package ibase.webitm.ejb.dis;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException;
import java.util.*;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import javax.ejb.Stateless;
@Stateless
public class ResourceIC extends ValidatorEJB implements TaxChapterICLocal, TaxChapterICRemote
{
E12GenericUtility genericUtility= new E12GenericUtility();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{
String errString = "";
Document dom = null;
Document dom1 = null;
Document dom2 = null;
try
{
if (xmlString != null && xmlString.trim().length() > 0 )
{
dom = parseString(xmlString);
}
if (xmlString1 != null && xmlString1.trim().length() > 0 )
{
dom1 = parseString(xmlString1);
}
if (xmlString2 != null && xmlString2.trim().length() > 0 )
{
dom2 = parseString(xmlString2);
}
errString = wfValData(dom, dom1, dom2, objContext, editFlag, xtraParams);
}
catch(Exception e)
{
System.out.println("Exception : [ResourceIC][wfValData( String, String )] :==>\n" + e.getMessage());
throw new ITMException(e);
}
return(errString);
}
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{
String lineNo = "";
String ResId="";
String childNodeName = null;
String profileId="";
String sql="";
String errString = "";
String errCode = "";
String userId = "";
String errorType = "";
int ct=0;
int count = 0;
int ctr=0;
int currentFormNo = 0;
int childNodeListLength;
NodeList parentNodeList = null;
NodeList childNodeList = null;
Node parentNode = null;
Node childNode = null;
ArrayList<String> errList = new ArrayList<String>();
ArrayList<String> errFields = new ArrayList<String>();
Connection conn = null;
PreparedStatement pstmt = null ;
ResultSet rs = null;
ConnDriver connDriver = new ConnDriver();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
System.out.println("editFlag="+editFlag);
try
{
conn = connDriver.getConnectDB("DriverITM");
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if(objContext != null && objContext.trim().length() > 0)
{
currentFormNo = Integer.parseInt(objContext);
System.out.println("currentFormNo>>>>>>>>>>>>>>>>>:"+currentFormNo);
}
switch(currentFormNo)
{
case 1 :
System.out.println( "Detail 1 Validation called " );
parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
childNodeListLength = childNodeList.getLength();
for( ctr = 0; ctr < childNodeListLength;ctr++)
{
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
if (childNodeName.equalsIgnoreCase("res_id"))
{
ResId = checkNull(this.genericUtility.getColumnValue("res_id", dom));
if(ResId == null || ResId.trim().length() == 0 )
{
errString = itmDBAccessEJB.getErrorString("","VMNURESID ",userId);
break ;
}
else
{
sql = "select count ( *) from resources where res_id= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, ResId);
rs = pstmt.executeQuery();
if(rs.next())
{
ct = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("ct######"+ct);
System.out.println("editFlag######"+editFlag);
if (!editFlag.equalsIgnoreCase("E"))
{
System.out.println("Flag is "+ editFlag);
if (ct > 0)
{
errString = getErrorString(" ", "VMTRANIDEX", userId);
break;
}
}
}
}
}
break;
}
}
catch(Exception e)
{
System.out.println("Exception ::"+e);
e.printStackTrace();
errString=e.getMessage();
throw new ITMException(e);
}
finally
{
try
{
if(conn!=null)
{
if(rs != null )rs.close();
rs = null;
if(pstmt != null )pstmt.close();
pstmt =null;
conn.close();
}
conn = null;
}
catch(Exception d)
{
d.printStackTrace();
}
}
System.out.println("ErrString ::"+errString);
return errString;
}
private String checkNull(String input)
{
if(input == null)
{
input = "";
}
return input.trim();
}
}
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
import org.w3c.dom.Document;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import javax.ejb.Local;
@Local
public interface ResourceICLocal extends ValidatorLocal
{
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
}
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
import org.w3c.dom.Document;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import javax.ejb.Remote;
@Remote
public interface ResourceICRemote extends ValidatorRemote
{
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
}
...@@ -1528,7 +1528,7 @@ public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderF ...@@ -1528,7 +1528,7 @@ public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderF
} }
} }
} }
else /* else
{ {
sql = " select integral_qty, restrict_upto " sql = " select integral_qty, restrict_upto "
+ " from customeritem" + " from customeritem"
...@@ -1620,13 +1620,108 @@ public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderF ...@@ -1620,13 +1620,108 @@ public class SOrderForm extends ValidatorEJB implements SOrderFormLocal, SOrderF
break; break;
} }
} }
} }*/
} }
rs2.close(); rs2.close();
rs2 = null; rs2 = null;
pstmt1.close(); pstmt1.close();
pstmt1 = null;//-------------------------Ended By Abhijit Gaiwkad on 16-OCT-2015 pstmt1 = null;//-------------------------Ended By Abhijit Gaiwkad on 16-OCT-2015
System.out.println("Scheme COde in After While :" + schemeCode);
if( schemeCode == null || schemeCode.trim().length() == 0 ) //-------------------------Added By Abhijit Gaiwkad on 16-OCT-2015
{
System.out.println("Not Scheme Apply for item COde");
sql = " select integral_qty, restrict_upto "
+ " from customeritem"
+ " where cust_code = ?"
+ " and item_code = ?";
//System.out.println("select integral_qty var_value.." + sql);
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,custCode);
pstmt.setString(2,itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
integralQty = rs.getDouble(1) ;
restrictUpto = rs.getTimestamp(2) ;
}
rs.close();
pstmt.close();
pstmt = null;
if( integralQty == 0.0)
{
sql = " select integral_qty "
+ " from siteitem"
+ " where site_code = ?"
+ " and item_code = ?";
//System.out.println("select integral_qty var_value.." + sql);
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,siteCode);
pstmt.setString(2,itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
integralQty = rs.getDouble(1) ;
}
rs.close();
pstmt.close();
pstmt = null;
}
if( integralQty == 0.0)
{
sql = " select integral_qty"
+ " from item"
+ " where item_code = ?";
//System.out.println("select integral_qty var_value.." + sql);
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
integralQty = rs.getDouble(1) ;
}
rs.close();
pstmt.close();
pstmt = null;
}
if( restrictUpto != null )
{
if( OrderDate.compareTo( restrictUpto ) <= 0 )
{
errCode = "VTRESDT";
errString = getErrorString("qty_1",errCode,userId);
break;
}
}
if( integralQty > 0 )
{
flag = false;
for(int i = 1; i < 12; i++)
{
strSch="";
strSch = "qty_"+i;
//System.out.println("strSch value...." + strSch);
qtyStr[i] = genericUtility.getColumnValue(strSch,dom);
//qtyStr[i] = qty_[i];
if(qtyStr[i] != null && qtyStr[i].trim().length() > 0)
{
qty[i] = Double.parseDouble( qtyStr[i] );
}
if( ( qty[i] % integralQty ) > 0 )
{
flag = true;
break;
}
}//end for
if( flag )
{
errCode = "VTINTQTY";
errString = getErrorString("qty_1",errCode,userId);
break;
}
}
}
//validation as given by jasmina on 130310-DI89SUN240 //validation as given by jasmina on 130310-DI89SUN240
String natureVal = genericUtility.getColumnValue( "nature", dom ); String natureVal = genericUtility.getColumnValue( "nature", dom );
......
[Dolphin] [Dolphin]
Timestamp=2015,5,26,11,50,50 SortOrder=1
SortRole=date
Timestamp=2016,4,20,12,3,30
Version=3 Version=3
ViewMode=1 ViewMode=1
...@@ -41,11 +41,11 @@ public class DistOpenPrc extends ActionHandlerEJB ...@@ -41,11 +41,11 @@ public class DistOpenPrc extends ActionHandlerEJB
public String opendistOrder(String distOrder, String xtraParams, String forcedFlag) throws RemoteException, ITMException public String opendistOrder(String distOrder, String xtraParams, String forcedFlag) throws RemoteException, ITMException
{ {
System.out.println("openSaleOrder called........"); System.out.println("openSaleOrder called........");
String sql = ""; String sql = "",sql1="";
String errString = ""; String errString = "";
Connection conn = null; Connection conn = null;
ConnDriver connDriver = null; ConnDriver connDriver = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null,pstmt1=null;
ResultSet rs = null; ResultSet rs = null;
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
E12GenericUtility genericUtility = null; E12GenericUtility genericUtility = null;
...@@ -53,7 +53,7 @@ public class DistOpenPrc extends ActionHandlerEJB ...@@ -53,7 +53,7 @@ public class DistOpenPrc extends ActionHandlerEJB
String chgTerm = ""; String chgUser = ""; String chgTerm = ""; String chgUser = "";
int upCount = 0; int upCount = 0;
String status = ""; String status1 = ""; String confirm = ""; String dorder = ""; String status = ""; String status1 = ""; String confirm = ""; String dorder = "";
String disConfirm = ""; String disOrder = ""; String disConfirm = ""; String disOrder = "",qtyOrder="",qtyShipped="",disStatus="",dOrder="";
double qty = 0.0D; double qtydesp = 0.0D; double qty = 0.0D; double qtydesp = 0.0D;
boolean flag = false; boolean flag = false;
try try
...@@ -69,7 +69,7 @@ public class DistOpenPrc extends ActionHandlerEJB ...@@ -69,7 +69,7 @@ public class DistOpenPrc extends ActionHandlerEJB
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "CHG_TERM"); chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "CHG_TERM");
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "CHG_USER"); chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "CHG_USER");
System.out.println("distOrder @@@@@@@@@@@ORDER===========" + distOrder); System.out.println("distOrder @@@@@@@@@@@ORDER===========" + distOrder);
sql = "select confirmed,dist_order from distorder where dist_order= ?"; sql = "select confirmed,dist_order,status from distorder where dist_order= ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, distOrder); pstmt.setString(1, distOrder);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -78,6 +78,7 @@ public class DistOpenPrc extends ActionHandlerEJB ...@@ -78,6 +78,7 @@ public class DistOpenPrc extends ActionHandlerEJB
confirm = rs.getString("confirmed"); confirm = rs.getString("confirmed");
dorder = rs.getString("dist_order"); dorder = rs.getString("dist_order");
status = rs.getString("status");
} }
System.out.println("Confirmed is : " + confirm); System.out.println("Confirmed is : " + confirm);
...@@ -88,65 +89,88 @@ public class DistOpenPrc extends ActionHandlerEJB ...@@ -88,65 +89,88 @@ public class DistOpenPrc extends ActionHandlerEJB
str1 = errString; str1 = errString;
return str1; return str1;
} }
if (status.equals("P"))
{
System.out.println("already pending......@@@@@@@@@@@@@@@");
System.out.println("Confirmed is : " + dorder); errString = itmDBAccessLocal.getErrorString("", "VTDOPEN", "");
str1 = errString;
return str1;
}
System.out.println("Status is : " + status);
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
sql = "select dist_order,status,confirmed from distorder where dist_order=?";
sql = "select qty_order,qty_shipped,distorder.status,distorder.dist_order from distorder_det ,distorder where distorder.dist_order=distorder_det.dist_order and distorder.dist_order=? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, dorder); pstmt.setString(1, dorder);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
System.out.println("sql@@" + sql + "resultset@@@" + rs); while(rs.next())
if (rs.next())
{ {
status = rs.getString("status"); qtyOrder = rs.getString(1);
disOrder = rs.getString("dist_order"); qtyShipped = rs.getString(2);
disConfirm = rs.getString("confirmed"); status = rs.getString(3);
System.out.println("status=========" + status); dOrder = rs.getString(4);
System.out.println("qty=====" + disOrder);
System.out.println("qtydesp=======" + disConfirm); if(qtyOrder.equals(qtyShipped) || qtyOrder==qtyShipped)
{
if (status.equals("P"))
{
System.out.println("Not closed yet......@@@@@@@@@@@@@@@"); System.out.println("---------------------->FULL ISSUED, CAN NOT BE OPEN");
} errString = itmDBAccessLocal.getErrorString("", "VTDOFC", "");
str1 = errString;
return str1;
}
else
{
if (status.equals("X"))
{
sql1 = " update distorder set status='P' where dist_order=?";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, dOrder);
upCount = pstmt1.executeUpdate();
pstmt1.close();
pstmt1 = null;
System.out.println("Update Count====" + upCount);
if (upCount > 0)
{
errString = itmDBAccessLocal.getErrorString("", "VTDORDOP", "");
str1 = errString;
return str1;
}
}
else
{
errString = itmDBAccessLocal.getErrorString("", "VTDONO", "");
str1 = errString;
return str1;
}
}
} }
System.out.println("qtyOrder=========" + qtyOrder);
System.out.println("qtyShipped=====" + qtyShipped);
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if (status.equals("X"))
{
sql = " update distorder set status='P' where dist_order=?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, disOrder);
upCount = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("Update Count====" + upCount);
System.out.println("Flag is distorder true@@@@");
}
else
{
errString = itmDBAccessLocal.getErrorString("", "VTDONO", "");
str1 = errString;
return str1;
}
if (upCount > 0)
{
errString = itmDBAccessLocal.getErrorString("", "VTDORDOP", "");
str1 = errString;
return str1;
}
} }
catch (Exception e) catch (Exception e)
......
...@@ -9,4 +9,6 @@ public abstract interface DistOpenPrcLocal ...@@ -9,4 +9,6 @@ public abstract interface DistOpenPrcLocal
{ {
public abstract String actionHandler(String paramString1, String paramString2, String paramString3) public abstract String actionHandler(String paramString1, String paramString2, String paramString3)
throws RemoteException, ITMException; throws RemoteException, ITMException;
public String opendistOrder(String distOrder, String xtraParams, String forcedFlag) throws RemoteException, ITMException;
} }
\ No newline at end of file
...@@ -11,4 +11,5 @@ public abstract interface DistOpenPrcRemote ...@@ -11,4 +11,5 @@ public abstract interface DistOpenPrcRemote
{ {
public abstract String actionHandler(String paramString1, String paramString2, String paramString3) public abstract String actionHandler(String paramString1, String paramString2, String paramString3)
throws RemoteException, ITMException; throws RemoteException, ITMException;
public String opendistOrder(String distOrder, String xtraParams, String forcedFlag) throws RemoteException, ITMException;
} }
\ No newline at end of file
This diff is collapsed.
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