...
Раскрыть | ||
---|---|---|
| ||
select "dcPartners"."PartnerID", "dcAmounts"."Name" as "AmountName", "dcAmounts"."AmountID" as "AmountID", "sysCreditTypes"."Name" as "CreditName", "dcCreditRestrictions"."Credit", "dcCreditRestrictions"."Period", "dcCreditRestrictions"."Price", "dcCreditRestrictions"."AutoMigration", "GetCreditRest"."Rest" from "dcPartners" left join "dcCreditRestrictions" on "dcCreditRestrictions"."PartnerID" = "dcPartners"."PartnerID" left join "dcAmounts" on "dcAmounts"."AmountID" = "dcCreditRestrictions"."AmountID" left join "sysCreditTypes" on "sysCreditTypes"."CreditTypeID" = "dcCreditRestrictions"."CreditTypeID" left join "GetCreditRest"("dcCreditRestrictions"."PartnerID", "dcCreditRestrictions"."AmountID") on 1=1 where "dcPartners"."PartnerID" = :"PartnerID"; |
Раскрыть | ||
---|---|---|
| ||
select "Name", "Code", "Enabled", "ExpireDate", "ExtCode", "CarNumber", "CarModel", "PhoneNumber", "Rem" from "dcCards"
where "PartnerID" = (select "PartnerID" from "dcPartners" where "Inn" = :"Inn") Наименование карты, номер карты, вкл/выкл, использовать до, внешний код, номер ТС, модель ТС, номер телефона, отметки. |
Раскрыть | ||
---|---|---|
| ||
select "Name", "Enabled", "ExpireDate", "ExtCode", "CarNumber", "CarModel", "PhoneNumber" from "dcCards" where "Code" = : "Code" Наименование карты, вкл/выкл, использовать до, внешний код, номер ТС, модель ТС, номер телефона, балансы на доступных кошельках, кредитные ограничения на кошельках |
Раскрыть | ||
---|---|---|
| ||
select "dcCards"."CardID", "dcAmounts"."AmountID", "dcAmounts"."Name" as "AmountName", "sysLimitTypes"."Name" as "LimitName",
"dcLimitRestrictions"."Limit", "dcLimitRestrictions"."Period", "dcLimitRestrictions"."StartPeriod",
"GetCreditRest_byCard"."Rest" as "Rest"
from "dcCards"
left join "dcLimitRestrictions" on "dcLimitRestrictions"."CardID" = "dcCards"."CardID"
left join "dcAmounts" on "dcAmounts"."AmountID" = "dcLimitRestrictions"."AmountID"
left join "sysLimitTypes" on "sysLimitTypes"."LimitTypeID" = "dcLimitRestrictions"."LimitTypeID"
left join "GetCreditRest_byCard"("dcLimitRestrictions"."CardID", "dcLimitRestrictions"."AmountID") on 1=1
where "dcCards"."CardID" = :"CardID" |
Раскрыть | ||
---|---|---|
| ||
select "dcCards"."CardID", "dcAmounts"."AmountID", "dcAmounts"."Name" as "AmountName", "sysLimitTypes"."Name" as "LimitName",
"dcLimitRestrictions"."Limit", "dcLimitRestrictions"."Period", "dcLimitRestrictions"."StartPeriod",
case when "GetLimitRest"."Rest" < 0 then "GetCreditRest"."Rest"
else case when "GetCreditRest"."Rest" > "GetLimitRest"."Rest" then "GetLimitRest"."Rest"
else "GetCreditRest"."Rest" end end as "Rest"
from "dcCards"
left join "dcLimitRestrictions" on "dcLimitRestrictions"."CardID" = "dcCards"."CardID"
left join "dcAmounts" on "dcAmounts"."AmountID" = "dcLimitRestrictions"."AmountID"
left join "sysLimitTypes" on "sysLimitTypes"."LimitTypeID" = "dcLimitRestrictions"."LimitTypeID"
left join "GetLimitRest"("dcLimitRestrictions"."CardID", "dcLimitRestrictions"."AmountID") on 1=1
left join "GetCreditRest"("dcCards"."PartnerID", "dcLimitRestrictions"."AmountID") on 1=1
where "dcCards"."CardID" = :"CardID"; |
Раскрыть | ||
---|---|---|
| ||
select "rgAmountRests"."Quantity",
"rgAmountRests"."Amount",
"rgAmountRests"."Price",
"rgAmountRests"."Date",
"rgAmountRests"."AZSCode",
"dcCards"."Name"
from "dcPartners"
left join "rgAmountRests" on "rgAmountRests"."PartnerID" = "dcPartners"."PartnerID"
left join "dcCards" on "rgAmountRests"."CardID" = "dcCards"."CardID"
left join "dcAmounts" on "dcAmounts"."AmountID" = "rgAmountRests"."AmountID"
where "dcPartners"."PartnerID" = :"PartnerID" AND "rgAmountRests"."DocTypeID" = 3 order by "rgAmountRests"."Date" desc; Литраж, сумма, цена, дата, азс, наименование карты |
Раскрыть | ||
---|---|---|
| ||
select "rgAmountRests"."Quantity", "rgAmountRests"."Amount", "rgAmountRests"."Price", "rgAmountRests"."Date", "rgAmountRests"."AZSCode", "dcCards"."Name" from "dcCards" left join "rgAmountRests" on "rgAmountRests"."CardID" = "dcCards"."CardID" left join "dcAmounts" on "dcAmounts"."AmountID" = "rgAmountRests"."AmountID" where "dcCards"."Code" = :"Code" AND "rgAmountRests"."DocTypeID" = 3 order by "rgAmountRests"."Date" desc; Литраж, сумма, цена, дата, азс. |
Раскрыть | ||
---|---|---|
| ||
update "dcCards"set "Name" = :"Name",
"Enabled" = :"Enabled",
"ExpireDate" = :"ExpireDate",
"Rem" = :"Rem",
"AllowInOffline" = :"AllowInOffline",
"PIN" = :"PIN",
"ExtCode" = :"ExtCode",
"PhoneNumber" = :"PhoneNumber",
"CarNumber" = :"CarNumber",
"CarModel" = :"CarModel",
"Email" = :"Email"
where "Code" = :"Code" |
Раскрыть | ||
---|---|---|
| ||
update "dcFuels" set "Price" = :price where "FuelID" = :fuleId |
Раскрыть | ||
---|---|---|
| ||
insert into "dcCards" (""PartnerID",
"Name",
"Code",
"Enabled",
"ExpireDate",
"Rem",
"AllowInOffline",
"TransactionID",
PIN,
"ExtCode",
"PhoneNumber",
"CarNumber",
"CarModel",
"Email")
valuee (...) |
Раскрыть | ||
---|---|---|
| ||
update "dcLimitRestrictions" set "LimitTypeID" = ?, "Limit" = ?, "Period" = ?, "StartPeriod" = ? where ("CardID" = ?) and ("AmountID" = ?) |
Раскрыть | ||
---|---|---|
| ||
select "dcCards"."CardID", "dcAmounts"."AmountID", "dcAmounts"."Name" as "AmountName", "sysLimitTypes"."Name" as "LimitName",
"dcLimitRestrictions"."Limit", "dcLimitRestrictions"."Period", "dcLimitRestrictions"."StartPeriod",
case when "GetLimitRest"."Rest" < 0 then "GetCreditRest"."Rest"
else case when "GetCreditRest"."Rest" > "GetLimitRest"."Rest" then "GetLimitRest"."Rest"
else "GetCreditRest"."Rest" end end as "Rest"
from "dcCards"
left join "dcLimitRestrictions" on "dcLimitRestrictions"."CardID" = "dcCards"."CardID"
left join "dcAmounts" on "dcAmounts"."AmountID" = "dcLimitRestrictions"."AmountID"
left join "sysLimitTypes" on "sysLimitTypes"."LimitTypeID" = "dcLimitRestrictions"."LimitTypeID"
left join "GetLimitRest"("dcLimitRestrictions"."CardID", "dcLimitRestrictions"."AmountID") on 1=1
left join "GetCreditRest"("dcCards"."PartnerID", "dcLimitRestrictions"."AmountID") on 1=1
where "dcCards"."CardID" = ид карты; |
Раскрыть | ||
---|---|---|
| ||
insert into "dcPartners" ( "Name", "Rem", "WithNDS", "Inn", "PartnersGrpID", "DiscountSchemaID", "Enabled", "ExtCode", "PhoneNumber") values (...) |
...