Ejemplo n.º 1
0
def GetUrunStratejisi(stokkodu):
    DB()
    _urun: list[dbUrunlerModel] = DB.select("select * from Urunler where stokkodu = '{}'".format(stokkodu))
    assert len(_urun) == 1, "Aranılan stokkodu bulunamadı."
    grupId = _urun[0].GrupId
    import Business.GrupBusiness as GrupBus
    return GrupBus.GetGrupStratejileri(grupId)
Ejemplo n.º 2
0
def GrupStrateji(grupId):
    if IsAllow(request, Roller.TumHesaplar):
        try:
            return json_dumps(GrupBusiness.GetGrupStratejileri(grupId))
        except Exception:
            FailedError()
    else:
        UnauthorizedError()