Compare commits

..

1 Commits

Author SHA1 Message Date
Juan Ferrer 9f960c2820 refs #4685 First working version 2024-08-12 11:55:15 +02:00
14 changed files with 100 additions and 188 deletions

View File

@ -19,7 +19,6 @@ More info at https://github.com/nevill/zongji/issues/143
git clone https://github.com/juan-ferrer-toribio/zongji.git
cd zongji
git checkout fix-143
npm install
```
Apply *zongji.sql* script into DB.
@ -50,4 +49,4 @@ npm run consumer
* [Zongji](https://github.com/nevill/zongji)
* [MySQL2](https://github.com/sidorares/node-mysql2#readme)
* [RabbitMQ] (https://www.rabbitmq.com/)
* [RabbitMQ](https://www.rabbitmq.com/)

View File

@ -1,6 +1,6 @@
{
"name": "mycdc",
"version": "0.0.24",
"version": "0.0.15",
"author": "Verdnatura Levante SL",
"description": "Asynchronous DB calculations reading the binary log",
"license": "GPL-3.0",

View File

@ -1,29 +0,0 @@
query:
client: CALL vn.ticket_setRisk(:id)
includeSchema:
vn:
ticket:
key: clientFk
scope: client
columns:
- id
- clientFk
- shipped
- totalWithVat
- refFk
receipt:
key: clientFk
scope: client
columns:
- payed
- clientFk
- amountPaid
hedera:
tpvTransaction:
key: clientFk
scope: client
columns:
- clientFk
- amount
- status
- receiptFk

22
queues/comparative.yml Normal file
View File

@ -0,0 +1,22 @@
mode: changes
query: CALL vn.itemComparative_refresh(?, ?, ?)
includeSchema:
vn:
ticket:
key: id
columns:
- id
- shipped
- warehouseFk
- isDeleted
- clientFk
events:
- updaterows
sale:
key: id
columns:
- id
- ticketFk
- itemFk
- quantity
- priceFixed

View File

@ -1,8 +0,0 @@
query:
expedition: CALL vn.expedition_selfConsumptionPackaging(:id, 'add')
includeSchema:
vn:
expedition:
key: id
columns:
- id

View File

@ -1,21 +0,0 @@
query:
sale: CALL vn.sale_setProblemComponentLack(:id)
component: CALL vn.sale_setProblemComponentLackByComponent(:id)
includeSchema:
vn:
sale:
key: id
columns:
- id
saleComponent:
key: saleFk
scope: sale
columns:
- id
- saleFk
- componentFk
component:
key: id
columns:
- id
- isRequired

76
queues/stock.yml Normal file
View File

@ -0,0 +1,76 @@
query:
travel: CALL stock.buyAvailable_refresh('travel', :id)
entry: CALL stock.buyAvailable_refresh('entry', :id)
buy: CALL stock.buyAvailable_refresh('buy', :id)
ticket: CALL stock.outbound_refresh('ticket', :id)
sale: CALL stock.outbound_refresh('sale', :id)
order: CALL stock.outbound_refresh('order', :id)
orderRow: CALL stock.outbound_refresh('orderRow', :id)
includeSchema:
vn:
travel:
key: id
columns:
- id
- landed
- shipped
- landingHour
- warehouseInFk
- warehouseOutFk
- isReceived
events:
- updaterows
entry:
key: id
columns:
- id
- travelFk
- isRaid
events:
- updaterows
buy:
key: id
columns:
- id
- entryFk
- itemFk
- quantity
- life
- isAlive
ticket:
key: id
columns:
- id
- warehouseFk
- shipped
events:
- updaterows
sale:
key: id
columns:
- id
- ticketFk
- itemFk
- quantity
- created
- isPicked
hedera:
order:
key: id
columns:
- id
- date_send
- address_id
- company_id
- customer_id
- confirmed
events:
- updaterows
orderRow:
key: id
columns:
- orderFk
- itemFk
- warehouseFk
- shipment
- amount

View File

@ -1,15 +0,0 @@
query:
client: CALL vn.ticket_setProblemFreeze(:id)
includeSchema:
vn:
client:
key: id
columns:
- id
- isFreezed
ticket:
key: clientFk
scope: client
columns:
- id
- clientFk

View File

@ -1,15 +0,0 @@
query:
client: CALL vn.ticket_setProblemTaxDataChecked(:id)
includeSchema:
vn:
client:
key: id
columns:
- id
- isTaxDataChecked
ticket:
key: clientFk
scope: client
columns:
- id
- clientFk

View File

@ -1,36 +0,0 @@
query:
ticket: CALL vn.ticket_setProblemTooLittle(:id)
item: CALL vn.ticket_setProblemTooLittleItemCost(:id)
config: CALL vn.ticket_setProblemTooLittleItemCost(NULL)
includeSchema:
vn:
ticket:
key: id
columns:
- id
- totalWithoutVat
- warehouseFk
events:
- updaterows
sale:
key: ticketFk
scope: ticket
columns:
- id
- ticketFk
- itemFk
- quantity
itemCost:
key: itemFk
scope: item
columns:
- itemFk
- warehouseFk
- cm3delivery
volumeConfig:
scope: config
columns:
- minTicketValue
- minTicketVolume
events:
- updaterows

View File

@ -1,16 +0,0 @@
query:
ticket: CALL vn.ticket_setProblemRequest(:id)
includeSchema:
vn:
ticket:
key: id
columns:
- id
events:
- updaterows
ticketRequest:
key: ticketFk
scope: ticket
columns:
- ticketFk
- isOk

View File

@ -1,17 +0,0 @@
query:
ticket: CALL vn.ticket_setProblemRisk(:id)
client: CALL vn.ticket_setProblemRiskByClient(:id)
includeSchema:
vn:
ticket:
key: id
columns:
- id
- clientFk
- risk
client:
key: id
scope: client
columns:
- id
- credit

View File

@ -2,7 +2,6 @@ query:
ticket: CALL vn.ticket_recalc(:id, NULL)
client: CALL vn.ticket_recalcByScope('client', :id)
address: CALL vn.ticket_recalcByScope('address', :id)
item: CALL vn.ticket_recalcByScope('item', :id)
includeSchema:
vn:
ticket:
@ -41,10 +40,3 @@ includeSchema:
key: id
columns:
- isEqualizated
itemTaxCountry:
key: itemFk
scope: item
columns:
- itemFk
- countryFk
- taxClassFk

View File

@ -1,20 +0,0 @@
query:
ticket: CALL vn.ticket_setVolume(:id)
item: CALL vn.ticket_setVolumeItemCost(:id)
includeSchema:
vn:
sale:
key: ticketFk
scope: ticket
columns:
- id
- ticketFk
- itemFk
- quantity
itemCost:
key: itemFk
scope: item
columns:
- itemFk
- warehouseFk
- cm3delivery