agent finished and updates servers

This commit is contained in:
2026-03-10 16:41:40 -05:00
parent 68d13b03d3
commit 4f24fe4660
24 changed files with 1738 additions and 53 deletions

View File

@@ -1,10 +1,10 @@
import axios from "axios";
import { settings } from "backend/db/schema/settings.schema.js";
import { addHours } from "date-fns";
import { formatInTimeZone } from "date-fns-tz";
import { eq, sql } from "drizzle-orm";
import { db } from "../db/db.controller.js";
import { opendockApt } from "../db/schema/opendock.schema.js";
import { settings } from "../db/schema/settings.schema.js";
import { createLogger } from "../logger/logger.controller.js";
import { prodQuery } from "../prodSql/prodSqlQuery.controller.js";
import {
@@ -80,9 +80,9 @@ const postRelease = async (release: Releases) => {
: release.DeliveryState === 3 // this will consider finished and if a correction needs made to the bol we need to cancel and reactivate the order
? "Completed"
: release.DeliveryState === 4 && "Completed",
userId: "2629b4f6-0003-472d-8b26-66a69ce5ac50", // this should be the carrierid
loadTypeId: "0aa7988e-b17b-4f10-acdd-3d029b44a773", // well get this and make it a default one
dockId: "00ba4386-ce5a-4dd1-9356-6e6d10a24609", // this the warehouse we want it in to start out
userId: process.env.DEFAULT_CARRIER, // this should be the carrierid
loadTypeId: process.env.DEFAULT_LOAD_TYPE, // well get this and make it a default one
dockId: process.env.DEFAULT_DOCK, // this the warehouse we want it in to start out
refNumbers: [release.ReleaseNumber],
refNumber: release.ReleaseNumber,
start: release.DeliveryDate,