Subversion Repositories SmartDukaan

Rev

Rev 7958 | Rev 7963 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7958 Rev 7962
Line 35... Line 35...
35
import in.shop2020.thrift.clients.CatalogClient;
35
import in.shop2020.thrift.clients.CatalogClient;
36
import in.shop2020.util.NewCMP;
36
import in.shop2020.util.NewCMP;
37
import in.shop2020.util.Utils;
37
import in.shop2020.util.Utils;
38
 
38
 
39
import java.awt.image.CropImageFilter;
39
import java.awt.image.CropImageFilter;
-
 
40
import java.text.DecimalFormat;
40
import java.text.MessageFormat;
41
import java.text.MessageFormat;
41
import java.text.SimpleDateFormat;
42
import java.text.SimpleDateFormat;
42
import java.util.ArrayList;
43
import java.util.ArrayList;
43
import java.util.Arrays;
44
import java.util.Arrays;
44
import java.util.Collection;
45
import java.util.Collection;
Line 1636... Line 1637...
1636
    	NewCMP cmp = new NewCMP(Arrays.asList(this.entity));
1637
    	NewCMP cmp = new NewCMP(Arrays.asList(this.entity));
1637
    	Map<Long, Double> score = null;
1638
    	Map<Long, Double> score = null;
1638
		try {
1639
		try {
1639
			Map<Long, Map<Long, Double>> scoreMap = cmp.getSlideScores();
1640
			Map<Long, Map<Long, Double>> scoreMap = cmp.getSlideScores();
1640
			score = scoreMap.get(Long.parseLong(this.id));
1641
			score = scoreMap.get(Long.parseLong(this.id));
1641
			score.put(130054L, cmp.getFinalScores(scoreMap).get(Long.parseLong(this.id)/10));
1642
			score.put(130054L, cmp.getFinalScores(scoreMap).get(Long.parseLong(this.id))/10);
1642
			
1643
			
1643
		} catch (Exception e) {
1644
		} catch (Exception e) {
1644
			System.out.println("Some error occurred");
1645
			System.out.println("Some error occurred");
1645
			e.printStackTrace();
1646
			e.printStackTrace();
1646
		}
1647
		}
-
 
1648
		DecimalFormat oneDForm = new DecimalFormat("#.#");
-
 
1649
		for(Map.Entry<Long, Double> scoreEntry : score.entrySet()){
-
 
1650
			scoreEntry.setValue(Double.valueOf(oneDForm.format(scoreEntry.getValue())));
-
 
1651
		}
1647
		return score;
1652
		return score;
1648
    }
1653
    }
1649
    
1654
    
1650
	
1655
	
1651
}
1656
}