32 lines
956 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
Сервис интеграции ПП Парус 8 с WEB API
Песочница для тестов
*/
require("module-alias/register");
const srvModel = require("./models/service");
const db = require("./core/db_connector.js"); //Взаимодействие с БД
const cfg = require("./config.js"); //Настройки сервера приложений
//const errors = srvModel.schema.validate({ nId: 123, sCode: "", nSrvType: "", sSrvType: "" });
//errors.forEach(e => {
//console.log(e.message);
//});
const dbConn = new db.DBConnector(cfg.dbConnect);
const test = async () => {
await dbConn.connect();
let r = await dbConn.getOutgoing({ nPortionSize: 123 });
console.log(r);
let rr = await dbConn.setQueueState({
nQueueId: 94568140,
nExecState: 1,
sExecMsg: "Обработано сервером приложений"
});
console.log(rr);
await dbConn.disconnect();
};
test();