Commit 49b55d0d authored by ssarkar's avatar ssarkar

Changed by manoj sharma Post Save corrected for Manual Cycle Count, Corrected...

Changed by manoj sharma Post Save corrected for Manual Cycle Count, Corrected Physical Count Schedule


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91937 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b4331394
...@@ -51,7 +51,7 @@ public class MPhyItemScanPos extends ValidatorEJB implements MPhyItemScanPosLoca ...@@ -51,7 +51,7 @@ public class MPhyItemScanPos extends ValidatorEJB implements MPhyItemScanPosLoca
System.out.println("STRING{"+domString+"}"); System.out.println("STRING{"+domString+"}");
dom = genericUtility.parseString(domString); dom = genericUtility.parseString(domString);
siteCode = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginSiteCode" ); siteCode = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginSiteCode" );
parentNodeList = dom.getElementsByTagName("Detail2"); parentNodeList = dom.getElementsByTagName("Detail3");
parentNodeListLength = parentNodeList.getLength(); parentNodeListLength = parentNodeList.getLength();
for(ctr = 0; ctr < parentNodeListLength ; ctr++ ) for(ctr = 0; ctr < parentNodeListLength ; ctr++ )
......
...@@ -1283,21 +1283,17 @@ private int generateDetRec(String empCode,int rec,Connection conn,String tranId, ...@@ -1283,21 +1283,17 @@ private int generateDetRec(String empCode,int rec,Connection conn,String tranId,
PreparedStatement pstmtInsert=null; PreparedStatement pstmtInsert=null;
try try
{ {
for(int ctr=0;ctr<arr.size();ctr++) for(int ctr=0;ctr<numberOfItemsPerdayA;ctr++)
{ {
//if(numberOfItemsPerdayA>=arr.get(ctr).size()) //if(numberOfItemsPerdayA>=arr.get(ctr).size())
System.out.println("ctr---"+ctr+"---"+priority); //System.out.println("ctr---"+ctr+"---"+priority);
if(ctr>=priority) //System.out.println("ctr----"+ctr+"---"+arr.get(ctr).isEmpty());
{ System.out.println("arr.get(ctr).size()----"+arr.get(ctr).size());
System.out.println("ctr----"+ctr+"---"+arr.get(ctr).isEmpty());
for(int ctr1=0;ctr1<arr.get(ctr).size();ctr1++) for(int ctr1=0;ctr1<arr.get(ctr).size();ctr1++)
{ {
System.out.println("ctr1----"+ctr1); System.out.println("ctr1----"+ctr1);
//System.out.println("aitem---"+aitem);
if(numberOfItemsPerdayA>priority)
{
priority++; priority++;
aitem=new SelectItem(); aitem=new SelectItem();
aitem=arr.get(ctr).get(ctr1); aitem=arr.get(ctr).get(ctr1);
...@@ -1324,13 +1320,10 @@ private int generateDetRec(String empCode,int rec,Connection conn,String tranId, ...@@ -1324,13 +1320,10 @@ private int generateDetRec(String empCode,int rec,Connection conn,String tranId,
pstmtInsert.executeUpdate(); pstmtInsert.executeUpdate();
pstmtInsert.close(); pstmtInsert.close();
pstmtInsert=null; pstmtInsert=null;
}
else
{
break;
}
} }
}
} }
...@@ -1393,6 +1386,7 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio ...@@ -1393,6 +1386,7 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio
ArrayList<SelectItem> b2list=null; ArrayList<SelectItem> b2list=null;
ArrayList<SelectItem> c2list=null; ArrayList<SelectItem> c2list=null;
int numberOfItemsA=0; int numberOfItemsA=0;
Set<String> set=new HashSet<String>();
try try
{ {
for(int ctr=0;ctr<alist.size();ctr++) for(int ctr=0;ctr<alist.size();ctr++)
...@@ -1416,18 +1410,47 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio ...@@ -1416,18 +1410,47 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio
System.out.println("hmOne.containsKey(itemCode+lotNo) "+hmOne.containsKey(itemCode+lotNo)); System.out.println("hmOne.containsKey(itemCode+lotNo) "+hmOne.containsKey(itemCode+lotNo));
//Changed By Pragyan 28/09/12 As logic has been changed by M Sharma lot sl should not be included in key. //Changed By Pragyan 28/09/12 As logic has been changed by M Sharma lot sl should not be included in key.
//if(!hmOne.containsKey(itemCode+lotNo+lotSl)) //if(!hmOne.containsKey(itemCode+lotNo+lotSl))
if(!hmOne.containsKey(itemCode+lotNo)) if(!hmOne.containsKey(itemCode))
{ {
a2list=new ArrayList<SelectItem>(); a2list=new ArrayList<SelectItem>();
a2list.add(aitem); a2list.add(aitem);
numberOfItemsA++; //numberOfItemsA++;
//System.out.println("aitem---"+aitem); //System.out.println("aitem---"+aitem);
System.out.println("a2list---"+a2list); System.out.println("a2list---"+a2list);
System.out.println("Entering for CycleCriteria 1---a2list ----"+a2list.toString()); System.out.println("Entering for CycleCriteria 1---a2list ----"+a2list.toString());
//Changed By Pragyan 28/09/12 As logic has been changed by M Sharma lot sl should not be included in key. //Changed By Pragyan 28/09/12 As logic has been changed by M Sharma lot sl should not be included in key.
//hmOne.put(itemCode+lotNo+lotSl,a2list) ; //hmOne.put(itemCode+lotNo+lotSl,a2list) ;
hmOne.put(itemCode+lotNo,a2list) ;
/* Set s=hmOne.keySet();
Iterator itr=s.iterator();
System.out.println("s.size()--"+s.size());
String key="";
if(!set.isEmpty())
{
while(itr.hasNext())
{
key=(String) itr.next();
System.out.println("Printing Key--"+key);
String[] sval=key.split("@");
System.out.println("sval[0]----"+sval[0]);
if(!sval[0].equalsIgnoreCase(aitem.getItemCode()))
{
hmOne.put(itemCode+"@"+lotNo,a2list) ;
}
else
{
break;
}
}
}
else
{
hmOne.put(itemCode+"@"+lotNo,a2list) ;
}*/
hmOne.put(itemCode,a2list) ;
// set.add(aitem.getItemCode());
} }
else else
{ {
...@@ -1457,8 +1480,9 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio ...@@ -1457,8 +1480,9 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio
{ {
a2list=new ArrayList<SelectItem>(); a2list=new ArrayList<SelectItem>();
a2list.add(aitem); a2list.add(aitem);
numberOfItemsA++; //numberOfItemsA++;
hmTwo.put(itemCode,a2list) ; hmTwo.put(itemCode,a2list) ;
//set.add(aitem.getItemCode());
} }
else else
{ {
...@@ -1475,7 +1499,8 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio ...@@ -1475,7 +1499,8 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio
if((sc.getLotNo()).equalsIgnoreCase(aitem.getLotNo())) if((sc.getLotNo()).equalsIgnoreCase(aitem.getLotNo()))
{ {
b2list.add(aitem); b2list.add(aitem);
numberOfItemsA++; //numberOfItemsA++;
//set.add(aitem.getItemCode());
break; break;
} }
} }
...@@ -1492,9 +1517,10 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio ...@@ -1492,9 +1517,10 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio
System.out.println("1--"+aitem.getItemCode()+"---"+aitem.getLotNo()+"---"+aitem.getlotSl()); System.out.println("1--"+aitem.getItemCode()+"---"+aitem.getLotNo()+"---"+aitem.getlotSl());
a2list=new ArrayList<SelectItem>(); a2list=new ArrayList<SelectItem>();
a2list.add(aitem); a2list.add(aitem);
numberOfItemsA++; // numberOfItemsA++;
hmThree.put(itemCode,a2list) ; hmThree.put(itemCode,a2list) ;
// set.add(aitem.getItemCode());
} }
else else
{ {
...@@ -1504,7 +1530,8 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio ...@@ -1504,7 +1530,8 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio
c2list=hmThree.get(itemCode); c2list=hmThree.get(itemCode);
System.out.println("before adding element to c2list.size()--"+c2list.size()); System.out.println("before adding element to c2list.size()--"+c2list.size());
c2list.add(aitem); c2list.add(aitem);
numberOfItemsA++;
//numberOfItemsA++;
System.out.println("after adding element to c2list.size()--"+c2list.size()); System.out.println("after adding element to c2list.size()--"+c2list.size());
for(int p=0;p<c2list.size();p++) for(int p=0;p<c2list.size();p++)
{ {
...@@ -1546,8 +1573,7 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio ...@@ -1546,8 +1573,7 @@ private ArrayList countItemValue(ArrayList<SelectItem> alist) throws ITMExceptio
System.out.println("Printing Key--"+key); System.out.println("Printing Key--"+key);
a2list=hmOne.get(key); a2list=hmOne.get(key);
System.out.println("a2list--"+a2list); System.out.println("a2list--"+a2list);
//Commented by manoj dtd 06/0/2012 records count during item add numberOfItemsA++;//=a2list.size();
//numberOfItemsA+=a2list.size();
arr.add(a2list); arr.add(a2list);
} }
System.out.println("Number of records elligible for scanning "+numberOfItemsA); System.out.println("Number of records elligible for scanning "+numberOfItemsA);
......
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