Commit ff426ee2 authored by mnair's avatar mnair

Changes done in validation of cost center

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@183476 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d7767402
......@@ -66,18 +66,7 @@ ItemAcctDetrICLocal, ItemAcctDetrICRemote
NodeList childNodeList = null;
Node childNode = null;
String childNodeName = "",itemSer="",itemCode="",grpCode="",finEntity="",active="",tranCat="",cctrCode="",acctCode="",sql="";
/*String acct_code__sal="",acct_code__dis="",acct_code__depr="",acct_code__acc_depr="",acct_code__depr_wb="",
acct_code__fa="",acct_code__pl="",acct_code__in="",acct_code__pr="",acct_code__ph="",acct_code__ap="",
acct_code__reco="",acct_code__wp="",acct_code__oh="",acct_code__ciss="",acct_code__wp_rcp="",
acct_code__qc_sample="",acct_code__yld_loss="",acct_code__yld_gain="",acct_code__arev="",
acct_code__crrev="",acct_code__tot_ar="",acct_code__inrev="";
String cctr_code__sal="",cctr_code__dis="",cctr_code__depr="",cctr_code__acc_depr="",cctr_code__depr_wb="",
cctr_code__fa="",cctr_code__pl="",cctr_code__in="",cctr_code__pr="",cctr_code__ph="",cctr_code__ap="",
cctr_code__recp="",cctr_code__wp="",cctr_code__oh="",cctr_code__ciss="",ctr_code__wp_rcp="",
cctr_code__qc_sample="",cctr_code__yld_loss="",cctr_code__yld_gain="",cctr_code__arev="",
cctr_code__crrev="",cctr_code__tot_ar="",cctr_code__inrev="";
*/String errString="",errCode="",errorType="",userId="";
String errString="",errCode="",errorType="",userId="";
ArrayList <String> errList = new ArrayList<String>();
ArrayList <String>errFields = new ArrayList <String> ();
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
......@@ -557,161 +546,356 @@ ItemAcctDetrICLocal, ItemAcctDetrICRemote
else if("cctr_code__sal".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__sal",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__sal["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__dis".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__dis",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__dis["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__depr".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__depr",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__depr["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__acc_depr".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__acc_depr",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__acc_depr["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__depr_wb".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__depr_wb",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__depr_wb["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__fa".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__fa",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__fa["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__pl".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__pl",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__pl["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__in".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__in",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__in["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__pr".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__pr",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__pr["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__ph".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__ph",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__ph["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__ap".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__ap",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__ap["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__recp".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__recp",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__recp["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__wp".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__wp",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__wp["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__oh".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__oh",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__oh["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__ciss".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__ciss",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__ciss["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("ctr_code__wp_rcp".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("ctr_code__wp_rcp",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("ctr_code__wp_rcp["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__qc_sample".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__qc_sample",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__qc_sample["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__yld_loss".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__yld_loss",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__yld_loss["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__yld_gain".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__yld_gain",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__yld_gain["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__arev".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__arev",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__arev["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__crrev".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__crrev",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__crrev["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__tot_ar".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__tot_ar",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__tot_ar["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if("cctr_code__inrev".equalsIgnoreCase(childNodeName))
{
cctrCode=genericUtility.getColumnValue("cctr_code__inrev",dom).trim();
if(cctrCode != null && cctrCode.trim().length() > 0)
{
cnt = getCostCtrDetail(cctrCode,conn);
System.out.println("cctr_code__inrev["+cnt+"]");
if(cnt == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
//Fin_entity
......@@ -1220,10 +1404,8 @@ ItemAcctDetrICLocal, ItemAcctDetrICRemote
{
PreparedStatement pstmt = null ;
ResultSet rs = null;
String sql="",errCode="",childNodeName="";
String sql="";
int count=0;
ArrayList <String> errList = new ArrayList<String>();
ArrayList <String>errFields = new ArrayList <String> ();
try{
if(cctrCode != null && cctrCode.trim().length() > 0)
......@@ -1236,14 +1418,6 @@ ItemAcctDetrICLocal, ItemAcctDetrICRemote
if(rs.next())
{
count = rs.getInt("cnt");
if(count == 0)
{
errCode = "VMCCTR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
rs.close();
rs = 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