vault backup: 2023-11-03 16:11:32
This commit is contained in:
parent
3df3595aad
commit
5074f5b8e5
10
api.ts
10
api.ts
@ -32,14 +32,16 @@ await client.connect();
|
|||||||
const query = await Deno.readTextFile("sql/get.pg.sql");
|
const query = await Deno.readTextFile("sql/get.pg.sql");
|
||||||
|
|
||||||
// Define a route to retrieve values from the database using parameters
|
// Define a route to retrieve values from the database using parameters
|
||||||
router.get('/price_info/part_cust/:partcode/:customer', async (ctx) => {
|
router.get('/code_price/:billcode/:shipcode/:partcode/:qty', async (ctx) => {
|
||||||
|
|
||||||
const partcode = ctx.params.partcode; // Extract the partcode parameter from the route
|
const partcode = ctx.params.partcode;
|
||||||
const customer = ctx.params.customer; // Extract the customer parameter from the route
|
const billcode = ctx.params.billcode;
|
||||||
|
const shipcode = ctx.params.shipcode;
|
||||||
|
const qty = ctx.params.qty;
|
||||||
|
|
||||||
//console.log(partcode)
|
//console.log(partcode)
|
||||||
//console.log(customer)
|
//console.log(customer)
|
||||||
const result = await client.queryObject({args: [customer, customer, partcode], text: query} );
|
const result = await client.queryObject({args: [billcode, shipcode, partcode, qty], text: query} );
|
||||||
ctx.response.body = result.rows;
|
ctx.response.body = result.rows;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
--select gg.d from rlarp.get_guidance('DIAM0004','DIAM0004','AMK06000G18B054',5000,2024) gg(d);
|
--select gg.d from rlarp.get_guidance('DIAM0004','DIAM0004','AMK06000G18B054',5000,2024) gg(d);
|
||||||
select gg.d doc from rlarp.get_guidance($1,$2, $3, 5000,2024) gg(d);
|
select gg.d doc from rlarp.get_guidance($1,$2, $3, $4,2024) gg(d);
|
||||||
|
Loading…
Reference in New Issue
Block a user