Subversion Repositories SmartDukaan

Rev

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

Rev 33037 Rev 33043
Line 246... Line 246...
246
            vendorItemPricing.setNlc(vendorCatalogPricing.getTransferPrice());
246
            vendorItemPricing.setNlc(vendorCatalogPricing.getTransferPrice());
247
            vendorItemPricing.setTp(vendorCatalogPricing.getTransferPrice());
247
            vendorItemPricing.setTp(vendorCatalogPricing.getTransferPrice());
248
            vendorItemPricingRepository.persist(vendorItemPricing);
248
            vendorItemPricingRepository.persist(vendorItemPricing);
249
        }
249
        }
250
    }
250
    }
251
    /*
-
 
252
 
251
 
253
    item = Item()
-
 
254
    item.productGroup = product_group
-
 
255
    item.brand = brand
-
 
256
    item.modelNumber = model_number
-
 
257
    item.modelName = model_name
-
 
258
    item.color = color
-
 
259
            try:
-
 
260
    item.mrp = round(mrp)
-
 
261
    except:
-
 
262
    pass
-
 
263
            #if item is risky
-
 
264
            if categoryMap.has_key(category_name.strip()):
-
 
265
    item.category = categoryMap[category_name.strip()]
-
 
266
    item.itemStatus = 8
-
 
267
            else:
-
 
268
    print "can't find {0} at row {1}".format(category_name, rownum)
-
 
269
                continue
-
 
270
    item.sellingPrice = round(sp)
-
 
271
    item.startDate = long(to_java_date(datetime.datetime(1899, 12, 30) + timedelta(days=int(start_date))))
-
 
272
    item.preferredVendor = preferred_vendor
-
 
273
    item.risky = int(risky)
-
 
274
    item.weight = weight
-
 
275
    item.updatedOn = updatedOn
-
 
276
    item.type = int(item_type)
-
 
277
 
-
 
278
    cclient = CatalogClient().get_client()
-
 
279
                    for c1 in (5,5,5,5,5):
-
 
280
            try:
-
 
281
            prodClient.addItem(item)
-
 
282
            if len(states) > 0:
-
 
283
            for c3 in (1,2,3,4,5):
-
 
284
            try:
-
 
285
            prodClient.updateItemStateVat(item_id, states)
-
 
286
    print "break 1"
-
 
287
            break
-
 
288
    except Exception as e:
-
 
289
    prodClient = CatalogClient("catalog_service_server_host_prod").get_client()
-
 
290
    print "break 2"
-
 
291
            break
-
 
292
    except:
-
 
293
    prodClient = CatalogClient("catalog_service_server_host_prod").get_client()
-
 
294
    print "break 3"
-
 
295
            break
-
 
296
    except Exception as e:
-
 
297
    cclient = CatalogClient().get_client()
-
 
298
    vip = VendorItemPricing()
-
 
299
    vip.itemId = item_id
-
 
300
    vip.dealerPrice = round(dp)
-
 
301
    vip.mop = round(mop)
-
 
302
    vip.nlc = round(nlc)
-
 
303
    vip.transferPrice = round(tp)
-
 
304
    vip.vendorId = preferred_vendor
-
 
305
            for c in (1,2,3,4,5):
-
 
306
            try:
-
 
307
            iclient.addVendorItemPricing(vip)
-
 
308
            break
-
 
309
    except Exception as e:
-
 
310
    iclient = InventoryClient().get_client()
-
 
311
 
-
 
312
    except:
-
 
313
            traceback.print_exc()
-
 
314
    message = message + "\t" + str(brand) + "\t" + str(model_name) + "\t" + str(model_number) + "\t" + "\n"
-
 
315
    print message
-
 
316
    mail("build@shop2020.in", "cafe@nes", ["amit.gupta@shop2020.in", "chandan.kumar@shop2020.in"], "Problem while adding items", message, [], [], [])
-
 
317
    print "Successfully updated the item list information."
-
 
318
 
-
 
319
 
-
 
320
    def main():
-
 
321
    parser = optparse.OptionParser()
-
 
322
            parser.add_option("-f", "--file", dest="filename",
-
 
323
    default="ItemList.xls", type="string",
-
 
324
    help="Read the item list from FILE",
-
 
325
    metavar="FILE")
-
 
326
            (options, args) = parser.parse_args()
-
 
327
            if len(args) != 0:
-
 
328
            parser.error("You've supplied extra arguments. Are you sure you want to run this program?")
-
 
329
    filename = options.filename
-
 
330
    load_item_data(filename)
-
 
331
 
-
 
332
if __name__ == '__main__':
-
 
333
    main()
-
 
334
*/
-
 
335
}
252
}