Commit b704c28e authored by dpingle's avatar dpingle

*update cadre monthly paystructure on [15/10/19]

CadreMthadIC.java
d_cadre_mthad_edit.srd
w_cadre_mthad.sql
cadre_mthad21.xml


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@209595 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 04faac34
......@@ -102,7 +102,6 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre
conn = getConnection();
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
//loginSite = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSite");
System.out.println("Line no----");
if (objContext != null && objContext.trim().length() > 0)
{
......@@ -145,8 +144,15 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre
if ("ad_code".equalsIgnoreCase(childNodeName))
{
adCode = checkNull(genericUtility.getColumnValue("ad_code", dom));
cnt = 0;
sql = "select count(1) as cnt from allwdedn where ad_code = ?";
if (adCode == null || adCode.trim().length() == 0)
{
errList.add("VMADC1");
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = "select count(*) as cnt from allwdedn where ad_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, adCode);
rs = pstmt.executeQuery();
......@@ -167,9 +173,37 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre
}
if(cnt == 0)
{
errList.add("VMADC1");
errList.add("VMADC5");
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = "select count(*) as cnt from cadre_mthad where ad_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, adCode);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt("cnt");
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt > 0 && !"E".equalsIgnoreCase(editFlag))
{
errList.add("VMADC4");
errFields.add(childNodeName.toLowerCase());
}
}
}
}
else if ("eff_date".equalsIgnoreCase(childNodeName))
......@@ -189,7 +223,7 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre
if(expDateStr == null || expDateStr.trim().length() == 0)
{
errList.add("VTDATE11");
errList.add("VTDATE19");
errFields.add(childNodeName.toLowerCase());
}
if(effDateStr != null && expDateStr != null)
......@@ -413,16 +447,12 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre
{
payTable = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "pay_table");
valueXmlString.append("<pay_table ><![CDATA[").append(payTable).append("]]></pay_table>\r\n");
admCommon.setNodeValue(dom, "pay_table", payTable);
cadreCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "cadre_code");
valueXmlString.append("<cadre_code ><![CDATA[").append(cadreCode).append("]]></cadre_code>\r\n");
admCommon.setNodeValue(dom, "cadre_code", cadreCode);
monthCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "month_code");
valueXmlString.append("<month_code ><![CDATA[").append(monthCode).append("]]></month_code>\r\n");
admCommon.setNodeValue(dom, "month_code", monthCode);
adEffDate = admCommon.getEnv("999999", "AD_EFFDATE", conn);
System.out.println("lsVarValue==["+adEffDate+"]");
......@@ -434,10 +464,8 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre
adExpDate = genericUtility.getValidDateString(adExpDate, "dd-MM-yy", genericUtility.getApplDateFormat());
valueXmlString.append("<eff_date ><![CDATA[").append(adEffDate).append("]]></eff_date>\r\n");
admCommon.setNodeValue(dom, "eff_date", adEffDate);
valueXmlString.append("<exp_date ><![CDATA[").append(adExpDate).append("]]></exp_date>\r\n");
admCommon.setNodeValue(dom, "exp_date", adExpDate);
System.out.println("dom==["+genericUtility.serializeDom(dom)+"]");
if(monthCode != null && monthCode.trim().length() >0)
{
......@@ -485,10 +513,8 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre
pstmt = null;
}
valueXmlString.append("<allwdedn_descr ><![CDATA[").append(descr).append("]]></allwdedn_descr>\r\n");
admCommon.setNodeValue(dom, "allwdedn_descr", descr);
valueXmlString.append("<prop_yn ><![CDATA[").append(propYn).append("]]></prop_yn>\r\n");
admCommon.setNodeValue(dom, "prop_yn", propYn);
}
}
valueXmlString.append("</Detail1>");
......
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