Commit f02a7a2d authored by prane's avatar prane

To handle exception/error enancement

-Default value to be set wrong or undefined values of master
-Static variables to be on lefthand side

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@214740 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a884d22e
......@@ -69,6 +69,8 @@ public class ExplodeBom
double batchQty = 0;
double roundTo = 0;
char round;
String roundStr= "";
String roundToStr= "";
String suppCodeMfg= "",useInvStatus = "",mfgRef = "",dimension = "";
double minReqQty = 0;
......@@ -201,8 +203,24 @@ public class ExplodeBom
minQty = rs.getDouble(7);
operation = rs.getInt(8);
critItem = rs.getString(9);
round = rs.getString(10).charAt(0);
/**Modified by Pavan Rane 24dec19 start[system should take default value and to not give error in any definition not found.]*/
//round = rs.getString(10).charAt(0);
//roundTo = rs.getDouble(11);
roundStr = rs.getString(10);
if (roundStr == null || roundStr.trim().length() == 0 || "null".equalsIgnoreCase(roundStr))
{
round = 'N';
}else {
round = roundStr.charAt(0);
}
roundToStr = rs.getString(11);
if (roundToStr == null || roundToStr.trim().length() == 0 || "null".equalsIgnoreCase(roundToStr))
{
roundTo = 0;
}else {
roundTo = rs.getDouble(11);
}
/**Modified by Pavan Rane 24dec19 end[system should take default value and to not give error in any definition not found.]*/
//added field by rajendra on 14/06/07
matchPotency = rs.getString(12);
minPotencyPerc = rs.getDouble(13);
......@@ -313,17 +331,18 @@ public class ExplodeBom
//end by rajendra
//System.out.println("Item Code : " + itemCodeBomDet + "Item Ref : " + itemRef + " Line Type " + lineType);
if (lineType.equals("B"))
//if (lineType.equals("B"))
if ("B".equals(lineType))
{
if (reqType.equals("S"))
if ("S".equals(reqType))//if (reqType.equals("S"))
{
quantityUpdate = (quantity / batchQty) * perQty;
}
else if (reqType.equals("P"))
else if ("P".equals(reqType))//else if (reqType.equals("P"))
{
quantityUpdate = (perQty / batchQty) * quantity;
}
else if (reqType.equals("F"))
else if ("F".equals(reqType))//else if (reqType.equals("F"))
{
quantityUpdate = perQty;
}
......@@ -443,7 +462,7 @@ public class ExplodeBom
{
lineTypeInner = rsInner.getString(1);
if (!lineTypeInner.equals("F"))
if (!"F".equals(lineTypeInner))
{
lineTypeInner = "I";
}
......@@ -596,7 +615,7 @@ public class ExplodeBom
valueXmlString.append("</Detail>");
//Changed by Dadaso pawar on 08/09/15 [End] [D15GSUN002]
if ( lineTypeInner.equals("B") )
if ( "B".equals(lineTypeInner) )
{
// 22/06/10 manoharan mfg_lead_time to be calculated as per batch size
// 22/06/10 manoharan to calculate due_date based on batch size
......@@ -752,5 +771,8 @@ public class ExplodeBom
//nf.setMaximumIntegerDigits(10);
return nf.format(num);
}
private String checkNull(String value)
{
return E12GenericUtility.checkNull(value);
}
}
\ No newline at end of file
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