Commit a78db01b authored by tmahadi's avatar tmahadi

Latest src updated in head


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104792 ce508802-f39f-4f6c-b175-0d175dae99d5
parent df38d33d
This diff is collapsed.
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException;
import java.sql.Connection;
import javax.ejb.Local;
@Local
public interface CustStockGWTPostSaveLocal extends ValidatorLocal {
public String postSave(String xmlString,String tranId,String editFlag, String xtraParams,Connection conn) throws RemoteException,ITMException;
}
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
import ibase.webitm.ejb.ValidatorRemote;
import ibase.webitm.utility.ITMException;
import java.sql.Connection;
import javax.ejb.Remote;
@Remote
public interface CustStockGWTPostSaveRemote extends ValidatorRemote {
public String postSave(String xmlString,String tranId,String editFlag, String xtraParams,Connection conn) throws RemoteException,ITMException;
}
...@@ -91,14 +91,12 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC ...@@ -91,14 +91,12 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>"); StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
int currentFormNo =0; int currentFormNo =0;
SimpleDateFormat dateFormat2 = null; SimpleDateFormat dateFormat2 = null;
String dummyProduct="";
ibase.webitm.ejb.dis.DistCommon dist = new ibase.webitm.ejb.dis.DistCommon();
try try
{ dateFormat2 = new SimpleDateFormat(genericUtility.getApplDateFormat()); { dateFormat2 = new SimpleDateFormat(genericUtility.getApplDateFormat());
System.out.println("@@@@@@@@ wfvaldata called"); System.out.println("@@@@@@@@ wfvaldata called");
//Changes and Commented By Bhushan on 09-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 09-06-2016 :END
connDriver = null; connDriver = null;
userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode");
if(objContext != null && objContext.trim().length()>0) if(objContext != null && objContext.trim().length()>0)
...@@ -108,7 +106,9 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC ...@@ -108,7 +106,9 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC
System.out.println("currentFormNo>>>>>"+currentFormNo); System.out.println("currentFormNo>>>>>"+currentFormNo);
switch(currentFormNo) switch(currentFormNo)
{ {
case 3: case 3:
System.out.println("Case 3::::::dom2 >>>>"+genericUtility.serializeDom(dom2));
parentNodeList = dom2.getElementsByTagName("Detail3"); parentNodeList = dom2.getElementsByTagName("Detail3");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
...@@ -118,6 +118,21 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC ...@@ -118,6 +118,21 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC
{ {
childNode = childNodeList.item(ctr); childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
//Added by saurabh[04/01/17]
if(childNodeName.equals("attribute"))
{
String updateFlag = "";
updateFlag = childNode.getAttributes().getNamedItem("updateFlag").getNodeValue();
System.out.println("updateFlag>>>"+updateFlag);
if ("D".equalsIgnoreCase(updateFlag))
{
System.out.println("Break from here as the record is deleted");
break;
}
}
//Added by saurabh[04/01/17]
if (childNodeName.equalsIgnoreCase("item_code")) if (childNodeName.equalsIgnoreCase("item_code"))
{ {
...@@ -130,7 +145,8 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC ...@@ -130,7 +145,8 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC
errCode = "VTEMTITM"; errCode = "VTEMTITM";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} else }
else
{ {
errCode = isExist("item", "item_code", itemCode, conn); errCode = isExist("item", "item_code", itemCode, conn);
if ("FALSE".equalsIgnoreCase(errCode)) if ("FALSE".equalsIgnoreCase(errCode))
...@@ -138,8 +154,31 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC ...@@ -138,8 +154,31 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC
errCode = "VMITMNOTEX"; errCode = "VMITMNOTEX";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
}else }else
{ {
dummyProduct = dist.getDisparams("999999","DUMMY_PRODUCT",conn);
if (("NULLFOUND".equalsIgnoreCase(dummyProduct) || dummyProduct == null || dummyProduct.trim().length() == 0) )
{
System.out.println("Disparm not defined for dummy item!!!!");
if("FALSE".equalsIgnoreCase(isFrequent(itemCode,conn)))
{
errCode = "VMFRITMCHK";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
else
{
if(!dummyProduct.trim().equalsIgnoreCase(itemCode.trim())){
if("FALSE".equalsIgnoreCase(isFrequent(itemCode,conn)))
{
errCode = "VMFRITMCHK";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
if (isDulplicateFrmDom(dom2,itemCode,lineNo)) if (isDulplicateFrmDom(dom2,itemCode,lineNo))
{ {
errCode = "VTDUPITMCD"; errCode = "VTDUPITMCD";
...@@ -333,6 +372,7 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC ...@@ -333,6 +372,7 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC
System.out.println("@@@@ isexist["+value+"]:::["+retStr+"]:::["+cnt+"]"); System.out.println("@@@@ isexist["+value+"]:::["+retStr+"]:::["+cnt+"]");
return retStr; return retStr;
} }
private boolean isDulplicateFrmDom(Document dom,String itemCode, String lineNo) throws ITMException private boolean isDulplicateFrmDom(Document dom,String itemCode, String lineNo) throws ITMException
{ {
NodeList parentList = null; NodeList parentList = null;
...@@ -419,5 +459,35 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC ...@@ -419,5 +459,35 @@ public class CustStockGWTWizIC extends ValidatorEJB implements CustStockGWTWizIC
System.out.println("isDulplicate>>>>>> ["+isDulplicate+"]"); System.out.println("isDulplicate>>>>>> ["+isDulplicate+"]");
return isDulplicate; return isDulplicate;
} }
//Commented by saurabh 040117
private String isFrequent( String itemCode,Connection conn) throws SQLException
{
String sql = "",retStr="";
PreparedStatement pstmt = null;
ResultSet rs = null ;
int cnt=0;
sql = " SELECT COUNT(1) FROM item WHERE item_code = ? and item_usage='F' ";//Added by saurabh[22/12/16]
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if( cnt > 0)
{
retStr = "TRUE";
}
if( cnt == 0 )
{
retStr = "FALSE";
}
System.out.println("@@@@ isexist["+itemCode+"]:::["+retStr+"]:::["+cnt+"]");
return retStr;
}
//Commented by saurabh 040117
} }
This diff is collapsed.
package ibase.webitm.ejb.dis;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import javax.ejb.Local;
import org.w3c.dom.Document;
@Local
public interface Es3HDataICLocal
{
public abstract String wfValData(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5, String paramString6) throws RemoteException;
public String itemChanged(Document currDom, Document hdrDom,Document allDom, String objContext, String currentColumn,String editFlag, String xtraParams) throws RemoteException,ITMException;
}
package ibase.webitm.ejb.dis;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import javax.ejb.Remote;
import org.w3c.dom.Document;
@Remote
public interface Es3HDataICRemote {
public abstract String wfValData(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5, String paramString6) throws RemoteException;
public String itemChanged(Document currDom, Document hdrDom,Document allDom, String objContext, String currentColumn,String editFlag, String xtraParams) throws RemoteException,ITMException;
}
This diff is collapsed.
package ibase.webitm.ejb.dis;
import ibase.webitm.ejb.ProcessLocal;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import javax.ejb.Local;
@Local
public interface Es3HDataUpdPrcLocal extends ProcessLocal{
public abstract String process(String arg0, String arg1, String arg2, String arg3) throws RemoteException, ITMException;
}
package ibase.webitm.ejb.dis;
import ibase.webitm.ejb.ProcessRemote;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import javax.ejb.Remote;
@Remote
public interface Es3HDataUpdPrcRemote extends ProcessRemote{
public abstract String process(String arg0, String arg1, String arg2, String arg3) throws RemoteException, ITMException;
}
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