Commit e65254e1 authored by agaikwad's avatar agaikwad

Request_id-D14LSUN004


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97617 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2f6bb9d2
...@@ -1927,17 +1927,19 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde ...@@ -1927,17 +1927,19 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
} }
if (childNodeName.equalsIgnoreCase("task_code")) { if (childNodeName.equalsIgnoreCase("task_code"))
{
task_code = genericUtility.getColumnValue("task_code", dom); task_code = genericUtility.getColumnValue("task_code", dom);
rel_agnst = genericUtility.getColumnValue("rel_agnst", dom); rel_agnst = genericUtility.getColumnValue("rel_agnst", dom);
if (rel_agnst == "05") { if (rel_agnst.equalsIgnoreCase("05")) {
if (task_code.trim().length() > 0 && task_code == null) if (task_code.trim().length() == 0&& task_code == null)
{ {
errCode = "VTNULTASK"; errCode = "VTNULTASK";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
else if (task_code != null && task_code.trim().length() == 0) else if (task_code != null && task_code.trim().length() > 0)
{ {
sql = "select count(*) from proj_task where task_code =?"; sql = "select count(*) from proj_task where task_code =?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -1962,12 +1964,12 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde ...@@ -1962,12 +1964,12 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
} }
} }
else if (rel_agnst == "06") else if (rel_agnst.equalsIgnoreCase("06"))
{ {
if (task_code.trim().length() > 0 && task_code == null) if (task_code.trim().length() == 0 && task_code == null)
{ {
errCode = "VTNULTASK"; errCode = "VTNULTASK";
} else if (task_code != null && task_code.trim().length() == 0) } else if (task_code != null && task_code.trim().length() > 0 )
{ {
sql = "select count(*) from gencodes where fld_Name = 'task_code' AND fld_value = ? AND mod_name = 'W_PORDER'"; sql = "select count(*) from gencodes where fld_Name = 'task_code' AND fld_value = ? AND mod_name = 'W_PORDER'";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -2023,7 +2025,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde ...@@ -2023,7 +2025,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
System.out.println("Maximum day"+mmax_day); System.out.println("Maximum day"+mmax_day);
System.out.println("Minnimum day"+mmin_day); System.out.println("Minnimum day"+mmin_day);
if (mmax_day <= mmin_day) if (mmax_day < mmin_day)
{ {
System.out.println("test in max if::::::::::::::::::::::::::"); System.out.println("test in max if::::::::::::::::::::::::::");
errCode = "VMMINDAY"; errCode = "VMMINDAY";
...@@ -2061,16 +2063,20 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde ...@@ -2061,16 +2063,20 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
min_amt1 = min_amt1 == null ? "0" : min_amt1.trim(); min_amt1 = min_amt1 == null ? "0" : min_amt1.trim();
mmin_amt =Double.parseDouble(min_amt1); mmin_amt =Double.parseDouble(min_amt1);
String max_amt1 =genericUtility.getColumnValue("max_amt", dom); String max_amt1 =genericUtility.getColumnValue("max_amt", dom);
max_amt1 = max_amt1 == null ? "0" : min_amt1.trim(); max_amt1 = max_amt1 == null ? "0" : max_amt1.trim();
mmax_amt = Double.parseDouble(max_amt1); mmax_amt = Double.parseDouble(max_amt1);
System.out.println("Maximum amount @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"+mmax_amt);
System.out.println("Minnimum amount@@@@@@@@@@@@@@@@@@@@@@@@@@"+mmin_amt);
if (mmin_amt < 0) if (mmin_amt < 0)
{ {
System.out.println("1111111@@@@@@@@@@@@@@@@@@@@@@@@@@222222");
errCode = "VMMINAMT1"; errCode = "VMMINAMT1";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
if (mmax_amt <= mmin_amt) if (mmax_amt < mmin_amt)
{ {
System.out.println("@@@@@@@@@@@@@@@@@@@@@@@@@@");
errCode = "VMMINAMT"; errCode = "VMMINAMT";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
...@@ -4164,29 +4170,30 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde ...@@ -4164,29 +4170,30 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
} else if (currentColumn.trim().equalsIgnoreCase("rel_agnst")) } else if (currentColumn.trim().equalsIgnoreCase("rel_agnst"))
{ {
value = genericUtility.getColumnValue("rel_agnst", dom1);
if (value == "05" || value == "06") value = genericUtility.getColumnValue("rel_agnst", dom);
System.out.println("Release against@@@@@@"+value);
if (value.equalsIgnoreCase("05")|| value.equalsIgnoreCase("06"))
{ {
valueXmlString.append("<due_date protect = \"0\">") .append("<![CDATA[" + duedate + "]]>").append("</due_date>"); System.out.println("Release against@@@@@@");
/*valueXmlString.append("<item_code protect = \"0\">").append("<![CDATA["+itemCode+"]]>").append("</item_code>");*/
valueXmlString.append("<task_code protect = \"0\">").append("<![CDATA[" + task_code + "]]>").append("</task_code>"); valueXmlString.append("<task_code protect = \"0\">").append("<![CDATA[" + task_code + "]]>").append("</task_code>");
} else } else
{ {
valueXmlString.append("<due_date protect = \"1\">").append("<![CDATA[" + duedate + "]]>").append("</due_date>");
valueXmlString.append("<task_code protect = \"1\">").append("<![CDATA[" + task_code + "]]>").append("</task_code>"); valueXmlString.append("<task_code protect = \"1\">").append("<![CDATA[" + task_code + "]]>").append("</task_code>");
} }
} else if (currentColumn.trim().equalsIgnoreCase( }
"itm_defaultedit")) { else if (currentColumn.trim().equalsIgnoreCase("itm_defaultedit"))
{
value = genericUtility.getColumnValue("rel_agnst", dom); value = genericUtility.getColumnValue("rel_agnst", dom);
if (value == "05" || value == "06") { if (value.equalsIgnoreCase("05")|| value.equalsIgnoreCase("06"))
valueXmlString.append("<due_date protect = \"0\">").append("<![CDATA[" + duedate + "]]>").append("</due_date>");valueXmlString.append("<task_code protect = \"0\">").append("<![CDATA[" + task_code + "]]>") {
.append("</task_code>"); valueXmlString.append("<task_code protect = \"0\">").append("<![CDATA[" + task_code + "]]>").append("</task_code>");
} else { } else
valueXmlString.append("<due_date protect = \"1\">") {
.append("<![CDATA[" + duedate + "]]>").append( valueXmlString.append("<task_code protect = \"1\">").append("<![CDATA[" + task_code + "]]>").append("</task_code>");
"</due_date>");
valueXmlString.append("<task_code protect = \"1\">")
.append("<![CDATA[" + task_code + "]]>")
.append("</task_code>");
} }
} }
valueXmlString.append("</Detail4>"); valueXmlString.append("</Detail4>");
......
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