Commit 7307dc6f authored by agaikwad's avatar agaikwad

Request_id-S15FSUN005


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99098 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3ac598b0
...@@ -67,12 +67,14 @@ public class TaxChapReBeatIC extends ValidatorEJB implements ...@@ -67,12 +67,14 @@ public class TaxChapReBeatIC extends ValidatorEJB implements
int cnt = 0; int cnt = 0;
int ctr = 0; int ctr = 0;
String itemCode = ""; String itemCode = "";
String countcode ="";
int currentFormNo = 0; int currentFormNo = 0;
int childNodeListLength; int childNodeListLength;
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
String sql = null; String sql = null;
String taxChap = "";
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
try { try {
System.out.println("wfValData called"); System.out.println("wfValData called");
...@@ -117,15 +119,11 @@ public class TaxChapReBeatIC extends ValidatorEJB implements ...@@ -117,15 +119,11 @@ public class TaxChapReBeatIC extends ValidatorEJB implements
break; break;
} }
} }
if (childNodeName.equalsIgnoreCase("item_code")) { if (childNodeName.equalsIgnoreCase("item_code"))
itemCode = genericUtility.getColumnValue("item_code", {
dom); itemCode = genericUtility.getColumnValue("item_code",dom);
if (itemCode == null || itemCode.trim().length() == 0) { if(itemCode != null && itemCode.trim().length() > 0)
errCode = "STKVALITCO"; {
errString = getErrorString("item_code", errCode,
userId);
break;
} else {
sql = "select count(1) from item where item_code = ?"; sql = "select count(1) from item where item_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -145,15 +143,12 @@ public class TaxChapReBeatIC extends ValidatorEJB implements ...@@ -145,15 +143,12 @@ public class TaxChapReBeatIC extends ValidatorEJB implements
break; break;
} }
} }
} else if (childNodeName.equalsIgnoreCase("count_code")) { } else if (childNodeName.equalsIgnoreCase("count_code"))
String countcode = genericUtility.getColumnValue("count_code", dom); {
if (countcode == null || countcode.trim().length() == 0) {
errCode = "STKVALCRCO"; countcode = genericUtility.getColumnValue("count_code", dom);
errString = getErrorString("count_code", errCode, if(countcode != null && countcode.trim().length() > 0)
userId); {
break;
}
else{
sql = "select count(1) from country where count_code = ? "; sql = "select count(1) from country where count_code = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, countcode); pstmt.setString(1, countcode);
...@@ -174,16 +169,12 @@ public class TaxChapReBeatIC extends ValidatorEJB implements ...@@ -174,16 +169,12 @@ public class TaxChapReBeatIC extends ValidatorEJB implements
} }
} }
if (childNodeName.equalsIgnoreCase("tax_chap")) { if (childNodeName.equalsIgnoreCase("tax_chap"))
String taxChap = null; {
taxChap = genericUtility.getColumnValue("tax_chap", dom); taxChap = genericUtility.getColumnValue("tax_chap", dom);
if (taxChap == null || taxChap.trim().length() == 0) { System.out.println("Tax chapter"+taxChap);
errCode = "STKVALTXCP"; if(taxChap != null && taxChap.trim().length() > 0)
errString = getErrorString("tax_chap", errCode, {
userId);
break;
}
else{
sql = " SELECT COUNT(*) FROM taxchap WHERE tax_chap = ? "; sql = " SELECT COUNT(*) FROM taxchap WHERE tax_chap = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, taxChap.trim()); pstmt.setString(1, taxChap.trim());
...@@ -194,8 +185,7 @@ public class TaxChapReBeatIC extends ValidatorEJB implements ...@@ -194,8 +185,7 @@ public class TaxChapReBeatIC extends ValidatorEJB implements
} }
if (cnt == 0) { if (cnt == 0) {
errCode = "INTAXCHAP"; errCode = "INTAXCHAP";
errString = getErrorString("tax_chap", errCode, errString = getErrorString("tax_chap", errCode,userId);
userId);
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -204,6 +194,30 @@ public class TaxChapReBeatIC extends ValidatorEJB implements ...@@ -204,6 +194,30 @@ public class TaxChapReBeatIC extends ValidatorEJB implements
pstmt = null; pstmt = null;
} }
} }
System.out.println("Value of itemcode is:"+col);
System.out.println("Value of Country code is:"+col1);
System.out.println("Value of tax chapter is:"+col2);
if (col == null)
{
errString = getErrorString(" ", "STKVALITCO", userId);
break;
}
if (col1 == null)
{
errString = getErrorString(" ", "STKVALCRCO", userId);
break;
}
if (col2 == null)
{
errString = getErrorString(" ", "STKVALTXCP", userId);
break;
}
if(col.trim().length() == 0 && col1.trim().length()==0 && col2.trim().length() == 0 )
{
System.out.println("column is space");
errString = getErrorString(" ", "VMDUPREC2", userId);
break;
}
} }
break; break;
} }
......
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