Commit c6507f48 authored by manohar's avatar manohar

Lot_sl included in key of map to store stock information


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93773 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3759b910
......@@ -601,7 +601,7 @@ public class ConsumeIssueAct extends ActionHandlerEJB implements ConsumeIssueAct
String acctCode = "", cctrCode = "", taxChap = "", taxClass = "", taxEnv = "", availableYn = "";
String allocDate = "", partQuantity = "", errCode = "", errString = "", sql = "", retResult = "";
String acctCodeInv = "", cctrCodeInv = "", sql1 = "";
String validateStr = "";
String validateStr = "",lotSerial = "";
double remainingQty = 0d, inputQty = 0d;
int minShelfLife = 0, noOfStkDet = 0;
String trackShelfLife = "", chkDate = "";
......@@ -840,11 +840,14 @@ public class ConsumeIssueAct extends ActionHandlerEJB implements ConsumeIssueAct
{
lotNum = rs.getString(1);
locCode1 = rs.getString(12);
lotSerial = rs.getString(2); // 11/10/13 manoharan included lot_sl
System.out.println("lotNum :"+lotNum);
System.out.println("locCode1 :"+locCode1);
if (! hm.containsKey(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum))
//if (! hm.containsKey(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum)) // 11/10/13 manoharan commented and included lot_sl
if (! hm.containsKey(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum + "~" + lotSerial ))
{
hm.put(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum,new Double(rs.getDouble(3)));
//hm.put(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum,new Double(rs.getDouble(3))); // 11/10/13 manoharan commented and included lot_sl
hm.put(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum+"~"+ lotSerial,new Double(rs.getDouble(3)));
}
}
System.out.println("Hashmap :"+hm);
......@@ -856,8 +859,9 @@ public class ConsumeIssueAct extends ActionHandlerEJB implements ConsumeIssueAct
noOfStkDet++;
lotNum = rs.getString(1);
locCode1 = rs.getString(12);
System.out.print("Combination Key : "+itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum);
hmQty = Double.parseDouble((hm.get(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum)).toString());
lotSerial = rs.getString(2);
System.out.print("Combination Key : "+itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum + "~" + lotSerial);
hmQty = Double.parseDouble((hm.get(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum + "~" + lotSerial)).toString());
System.out.println(" ::Value [hmQty] :: "+hmQty);
if (hmQty == 0)
{
......@@ -927,7 +931,7 @@ public class ConsumeIssueAct extends ActionHandlerEJB implements ConsumeIssueAct
inputQty = remainingQty;
System.out.println("inputQty :"+inputQty);
remainingQty = 0;
hm.put(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum,new Double(hmQty - inputQty));
hm.put(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum + "~" + lotSerial,new Double(hmQty - inputQty));
//hm.put(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum,new Double(0));
System.out.println("hmQty - remainingQty :"+(hmQty - inputQty));
System.out.println("hm if [hmQty >= remainingQty] :"+hm);
......@@ -941,7 +945,7 @@ public class ConsumeIssueAct extends ActionHandlerEJB implements ConsumeIssueAct
//remainingQty = remainingQty - rs.getDouble(3);
remainingQty = remainingQty - inputQty;
System.out.println("remainingQty :"+remainingQty);
hm.put(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum,new Double(0));
hm.put(itemCode+"~"+siteCodeReq+"~"+locCode1+"~"+lotNum + "~" + lotSerial,new Double(0));
}
System.out.println("Hashmap :"+hm);
valueXmlString.append("<Detail>\r\n");
......
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