Replace RetainerContractIC.java

parent 8755be41
...@@ -788,7 +788,62 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract ...@@ -788,7 +788,62 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract
} }
//Pavan R 17sept19 end[to validate tax environment] //Pavan R 17sept19 end[to validate tax environment]
}// for loop end }// for loop end
break; break;
//Added new case by amol on 19-March for the validation on assetcode pophelp --start
case 3:
System.out.println("----------Detail3 test validation Test 20-03::------------------------");
System.out.println("dom@@@@------->>" + genericUtility.serializeDom(dom));
System.out.println("dom@@@@111------->>" + genericUtility.serializeDom(dom1));
System.out.println("dom@@@@222------->>" + genericUtility.serializeDom(dom2));
int count = 0;
String errorString="";
parentNodeList = dom.getElementsByTagName("Detail3");
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("asset_code")) {
BaseLogger.log("3", null, null, " Inside the else block-->");
System.out.println("DOM in case 3 :::---->>["+genericUtility.serializeDom(dom).toString()+"]");
String assetCode = checkNull(genericUtility.getColumnValue("asset_code", dom));
BaseLogger.log("3", null, null, "Asset Code ---> "+assetCode );
try {
sql = "SELECT COUNT (ASSET_CODE) FROM ASSET_REGISTER WHERE ASSET_CODE = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, assetCode);
rs = pstmt.executeQuery();
if (rs.next()) {
//count = rs.getInt("COUNT");
count = rs.getInt(1);
}
if (count <= 0) {
errorString = getErrorString("asset_code", "INVLDASTCD", userId);
}
} catch (SQLException e) {
BaseLogger.log("3", null, null,
"Catch block of asset_code pophelp validation" + e.getMessage());
e.printStackTrace();
}
break;
}
}
return errorString;
//Added new case by amol on 19-March for the validation on assetcode pophelp --End
}// end of switch }// end of switch
int errListSize = errList.size(); int errListSize = errList.size();
int count = 0; int count = 0;
...@@ -1681,7 +1736,7 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract ...@@ -1681,7 +1736,7 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract
valueXmlString.append("</Detail2>"); valueXmlString.append("</Detail2>");
break; break;
//Added by Amol S on 20 Feb -24 to apply itemchane on Asses_Code Field --START //Added by Amol S on 20 Feb-25 to apply item-change on Asset_Code Field --START
case 3: case 3:
{ {
BaseLogger.log("3", null, null, "Inside the case 3 "); BaseLogger.log("3", null, null, "Inside the case 3 ");
...@@ -1733,7 +1788,7 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract ...@@ -1733,7 +1788,7 @@ public class RetainerContractIC extends ValidatorEJB implements RetainerContract
valueXmlString.append("</Detail3>"); valueXmlString.append("</Detail3>");
} }
//Added by Amol S on 20 Feb -24 to apply itemchane on Asses_Code field --END //Added by Amol S on 20-Feb-25 to apply item-change on Asset_Code field --END
}//switch }//switch
valueXmlString.append("</Root>"); valueXmlString.append("</Root>");
......
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