autosync_backend2 1.2.34 → 1.2.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +44 -0
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3661,6 +3661,22 @@ export declare const app: Elysia<"", {
|
|
|
3661
3661
|
deletedAt: string | null;
|
|
3662
3662
|
oldId: number | null;
|
|
3663
3663
|
} | null;
|
|
3664
|
+
discount_apply: {
|
|
3665
|
+
discountId: string | null;
|
|
3666
|
+
cpOrderId: string;
|
|
3667
|
+
cpOrderItemId: string | null;
|
|
3668
|
+
valueApplied: number;
|
|
3669
|
+
priceBeforeDiscount: number;
|
|
3670
|
+
priceAfterDiscount: number;
|
|
3671
|
+
note: string | null;
|
|
3672
|
+
authUserId: string;
|
|
3673
|
+
employeeId: string;
|
|
3674
|
+
id: string;
|
|
3675
|
+
createdAt: string;
|
|
3676
|
+
updatedAt: string;
|
|
3677
|
+
deletedAt: string | null;
|
|
3678
|
+
oldId: number | null;
|
|
3679
|
+
} | null;
|
|
3664
3680
|
product: {
|
|
3665
3681
|
supplierId: string;
|
|
3666
3682
|
productId: string | null;
|
|
@@ -8820,6 +8836,34 @@ export declare const app: Elysia<"", {
|
|
|
8820
8836
|
deletedAt: string | null;
|
|
8821
8837
|
oldId: number | null;
|
|
8822
8838
|
};
|
|
8839
|
+
machine: {
|
|
8840
|
+
companyId: string | null;
|
|
8841
|
+
machineKindId: string;
|
|
8842
|
+
customerId: string | null;
|
|
8843
|
+
name: string | null;
|
|
8844
|
+
assetCode: string | null;
|
|
8845
|
+
vin: string | null;
|
|
8846
|
+
licensePlate: string | null;
|
|
8847
|
+
color: string | null;
|
|
8848
|
+
engineCc: string | null;
|
|
8849
|
+
cylinder: string | null;
|
|
8850
|
+
gasType: string | null;
|
|
8851
|
+
transmissionType: string | null;
|
|
8852
|
+
vehicleType: string | null;
|
|
8853
|
+
yearManufacture: number | null;
|
|
8854
|
+
yearImport: number | null;
|
|
8855
|
+
steering: string | null;
|
|
8856
|
+
engineCode: string | null;
|
|
8857
|
+
transmissionCode: string | null;
|
|
8858
|
+
driveTrain: string | null;
|
|
8859
|
+
km: number;
|
|
8860
|
+
customData: unknown;
|
|
8861
|
+
id: string;
|
|
8862
|
+
createdAt: string;
|
|
8863
|
+
updatedAt: string;
|
|
8864
|
+
deletedAt: string | null;
|
|
8865
|
+
oldId: number | null;
|
|
8866
|
+
} | null;
|
|
8823
8867
|
totalCount: number;
|
|
8824
8868
|
template: {
|
|
8825
8869
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -147584,7 +147584,7 @@ var CrmCpOrderItemLogic;
|
|
|
147584
147584
|
((CrmCpOrderItemLogic) => {
|
|
147585
147585
|
CrmCpOrderItemLogic.select = async ({ cpOrderId }) => {
|
|
147586
147586
|
const filter = and(eq(crmCpOrderItemTable.cpOrderId, cpOrderId), softDeletedFilter(crmCpOrderItemTable));
|
|
147587
|
-
const rows = await db_default.select().from(crmCpOrderItemTable).leftJoin(companyServiceKindTable, eq(companyServiceKindTable.id, crmCpOrderItemTable.companyServiceKindId)).leftJoin(warehouseProductTable, eq(warehouseProductTable.id, crmCpOrderItemTable.companyProductId)).leftJoin(crmCpOrderItemEmployeeTable, eq(crmCpOrderItemEmployeeTable.cpOrderItemId, crmCpOrderItemTable.id)).leftJoin(companyEmployeeTable, eq(companyEmployeeTable.id, crmCpOrderItemEmployeeTable.employeeId)).leftJoin(crmCpOrderSpPackageTable, eq(crmCpOrderSpPackageTable.id, crmCpOrderItemTable.cpOrderSpPackageId)).leftJoin(crmSpPackageTable, eq(crmSpPackageTable.id, crmCpOrderSpPackageTable.spPackageId)).where(filter);
|
|
147587
|
+
const rows = await db_default.select().from(crmCpOrderItemTable).leftJoin(companyServiceKindTable, eq(companyServiceKindTable.id, crmCpOrderItemTable.companyServiceKindId)).leftJoin(warehouseProductTable, eq(warehouseProductTable.id, crmCpOrderItemTable.companyProductId)).leftJoin(crmCpOrderItemEmployeeTable, eq(crmCpOrderItemEmployeeTable.cpOrderItemId, crmCpOrderItemTable.id)).leftJoin(companyEmployeeTable, eq(companyEmployeeTable.id, crmCpOrderItemEmployeeTable.employeeId)).leftJoin(crmCpOrderSpPackageTable, eq(crmCpOrderSpPackageTable.id, crmCpOrderItemTable.cpOrderSpPackageId)).leftJoin(crmSpPackageTable, eq(crmSpPackageTable.id, crmCpOrderSpPackageTable.spPackageId)).leftJoin(crmDiscountApplyTable, eq(crmDiscountApplyTable.cpOrderItemId, crmCpOrderItemTable.id)).where(filter);
|
|
147588
147588
|
const result = rows.reduce((acc, row) => {
|
|
147589
147589
|
if (!acc[row.cp_order_item.id]) {
|
|
147590
147590
|
acc[row.cp_order_item.id] = {
|
|
@@ -154298,11 +154298,12 @@ var InspectionLogic;
|
|
|
154298
154298
|
const filter = and(eq(inspectionTable.machineId, query.machineId).if(query.machineId), eq(inspectionTable.templateId, query.templateId).if(query.templateId), eq(inspectionTable.state, query.state).if(query.state), gte(inspectionTable.createdAt, query.startDate).if(query.startDate), lte(inspectionTable.createdAt, query.endDate).if(query.endDate), eq(inspectionTable.id, query.id).if(query.id), or(eq(inspectionTemplateTable.companyId, user2.companyId), isNull2(inspectionTemplateTable.companyId)));
|
|
154299
154299
|
const baseQuery = db_default.select({
|
|
154300
154300
|
inspection: inspectionTable,
|
|
154301
|
+
machine: companyMachineTable,
|
|
154301
154302
|
totalCount: totalCountSql,
|
|
154302
154303
|
template: {
|
|
154303
154304
|
name: inspectionTemplateTable.name
|
|
154304
154305
|
}
|
|
154305
|
-
}).from(inspectionTable).leftJoin(inspectionTemplateTable, eq(inspectionTemplateTable.id, inspectionTable.templateId)).where(filter).$dynamic();
|
|
154306
|
+
}).from(inspectionTable).leftJoin(inspectionTemplateTable, eq(inspectionTemplateTable.id, inspectionTable.templateId)).leftJoin(companyMachineTable, eq(companyMachineTable.id, inspectionTable.machineId)).where(filter).$dynamic();
|
|
154306
154307
|
const result = await pagination_helper_default(baseQuery, query.pagination);
|
|
154307
154308
|
return getPaginationContent(result, query.pagination.size);
|
|
154308
154309
|
};
|