Subversion Repositories SmartDukaan

Rev

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

Rev 32696 Rev 32972
Line 11... Line 11...
11
import com.spice.profitmandi.dao.repository.catalog.TagListingRepository;
11
import com.spice.profitmandi.dao.repository.catalog.TagListingRepository;
12
import com.spice.profitmandi.dao.repository.dtr.GadgetCopsInsuranceCalcRepository;
12
import com.spice.profitmandi.dao.repository.dtr.GadgetCopsInsuranceCalcRepository;
13
import com.spice.profitmandi.dao.repository.dtr.InsuranceProviderRepository;
13
import com.spice.profitmandi.dao.repository.dtr.InsuranceProviderRepository;
14
import com.spice.profitmandi.dao.repository.dtr.RetailerRegisteredAddressRepository;
14
import com.spice.profitmandi.dao.repository.dtr.RetailerRegisteredAddressRepository;
15
import com.spice.profitmandi.dao.repository.fofo.InventoryItemRepository;
15
import com.spice.profitmandi.dao.repository.fofo.InventoryItemRepository;
-
 
16
import com.spice.profitmandi.dao.repository.fofo.PartnerTypeChangeService;
16
import com.spice.profitmandi.dao.repository.user.AddressRepository;
17
import com.spice.profitmandi.dao.repository.user.AddressRepository;
17
import com.spice.profitmandi.service.scheme.SchemeService;
18
import com.spice.profitmandi.service.scheme.SchemeService;
18
import com.spice.profitmandi.service.tag.TagService;
19
import com.spice.profitmandi.service.tag.TagService;
19
import org.apache.commons.collections.CollectionUtils;
20
import org.apache.commons.collections.CollectionUtils;
20
import org.apache.logging.log4j.LogManager;
21
import org.apache.logging.log4j.LogManager;
Line 137... Line 138...
137
			e.printStackTrace();
138
			e.printStackTrace();
138
		}
139
		}
139
		return tagListings;
140
		return tagListings;
140
	}
141
	}
141
 
142
 
-
 
143
	@Autowired
-
 
144
	PartnerTypeChangeService partnerTypeChangeService;
-
 
145
 
-
 
146
 
142
	public static final List<Integer> mopVoilatedRetailerIds = Arrays.asList(175139363, 175139404);
147
	public static final List<Integer> mopVoilatedRetailerIds = Arrays.asList();
143
 
148
 
144
	@Override
149
	@Override
145
	public List<Integer> getMopVoilatedRetailerIds() {
150
	public List<Integer> getMopVoilatedRetailerIds() {
146
		return mopVoilatedRetailerIds;
151
		return mopVoilatedRetailerIds;
147
	}
152
	}
Line 166... Line 171...
166
				priceModel.setMop(true);
171
				priceModel.setMop(true);
167
				priceModel.setPrice(tagListing.getSellingPrice());
172
				priceModel.setPrice(tagListing.getSellingPrice());
168
			} else if (itemPriceMap.get(tagListing.getItemId()).getPrice() > tagListing.getMop()) {
173
			} else if (itemPriceMap.get(tagListing.getItemId()).getPrice() > tagListing.getMop()) {
169
				priceModel.setPrice(tagListing.getMop());
174
				priceModel.setPrice(tagListing.getMop());
170
				priceModel.setMop(true);
175
				priceModel.setMop(true);
-
 
176
				Map<Integer, Float> catalogSchemeCashBack =  schemeService.getCatalogSchemeCashBack(retailerId, Arrays.asList(item.getCatalogItemId()));
171
				if (schemeService.getCatalogSchemeCashBack().get(item.getCatalogItemId()) != null) {
177
				if(catalogSchemeCashBack.get(item.getCatalogItemId()) != null && catalogSchemeCashBack.get(item.getCatalogItemId()) > 0) {
172
					priceModel.setMaxDiscountAmount(schemeService.getCatalogSchemeCashBack().get(item.getCatalogItemId()));
178
					priceModel.setMaxDiscountAmount(catalogSchemeCashBack.get(item.getCatalogItemId()));
173
				}
179
				}
174
			} else if (item.getHsnCode().equals("85171400")) {
180
			} else if (item.getHsnCode().equals("85171400")) {
175
				priceModel.setMop(false);
181
				priceModel.setMop(false);
176
				priceModel.setPrice(tagListing.getSellingPrice());
182
				priceModel.setPrice(tagListing.getSellingPrice());
177
			}
183
			}