autosync_backend2 1.2.85 → 1.2.87

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 CHANGED
@@ -1322,6 +1322,7 @@ export declare const app: Elysia<"", {
1322
1322
  orderId: string | null;
1323
1323
  transferId: string | null;
1324
1324
  transferItemId: string | null;
1325
+ msRecordProductId: string | null;
1325
1326
  id: string;
1326
1327
  createdAt: string;
1327
1328
  updatedAt: string;
@@ -11083,6 +11084,7 @@ export declare const app: Elysia<"", {
11083
11084
  body: unknown;
11084
11085
  params: {};
11085
11086
  query: {
11087
+ id?: string | undefined;
11086
11088
  pagination: {
11087
11089
  size: number;
11088
11090
  page: number;
@@ -11435,7 +11437,7 @@ export declare const app: Elysia<"", {
11435
11437
  response: {
11436
11438
  200: {
11437
11439
  msRecordId: string;
11438
- companyProductId: string;
11440
+ companyProductId: string | null;
11439
11441
  uomId: string;
11440
11442
  quantity: number | null;
11441
11443
  id: string;
@@ -11544,6 +11546,7 @@ export declare const app: Elysia<"", {
11544
11546
  serviceKindId: string;
11545
11547
  pmPlanId: string | null;
11546
11548
  pmPlanMachineId: string | null;
11549
+ woTaskId: string | null;
11547
11550
  employeeTechnicianId: string;
11548
11551
  state: string;
11549
11552
  note: string | null;
@@ -11577,6 +11580,7 @@ export declare const app: Elysia<"", {
11577
11580
  timeCompleted?: Date | null | undefined;
11578
11581
  pmPlanId?: string | null | undefined;
11579
11582
  pmPlanMachineId?: string | null | undefined;
11583
+ woTaskId?: string | null | undefined;
11580
11584
  state: string;
11581
11585
  serviceKindId: string;
11582
11586
  machineId: string;
@@ -11612,6 +11616,7 @@ export declare const app: Elysia<"", {
11612
11616
  machineId?: string | undefined;
11613
11617
  pmPlanId?: string | null | undefined;
11614
11618
  pmPlanMachineId?: string | null | undefined;
11619
+ woTaskId?: string | null | undefined;
11615
11620
  employeeTechnicianId?: string | undefined;
11616
11621
  };
11617
11622
  params: {
package/dist/index.js CHANGED
@@ -276628,6 +276628,7 @@ var maintenanceServiceRecordTable = maintenanceServiceSchema.table("record", {
276628
276628
  serviceKindId: uuid5().notNull(),
276629
276629
  pmPlanId: uuid5(),
276630
276630
  pmPlanMachineId: uuid5(),
276631
+ woTaskId: uuid5(),
276631
276632
  employeeTechnicianId: uuid5().notNull(),
276632
276633
  state: varchar().notNull(),
276633
276634
  note: text(),
@@ -276636,7 +276637,7 @@ var maintenanceServiceRecordTable = maintenanceServiceSchema.table("record", {
276636
276637
  var maintenanceServiceRecordProductTable = maintenanceServiceSchema.table("record_product", {
276637
276638
  ...base_schema_helper_default,
276638
276639
  msRecordId: uuid5().notNull(),
276639
- companyProductId: uuid5().notNull(),
276640
+ companyProductId: uuid5(),
276640
276641
  uomId: uuid5().notNull(),
276641
276642
  quantity: numeric({ mode: "number" })
276642
276643
  });
@@ -276803,7 +276804,8 @@ var warehouseItemTransactionTable = warehouseSchema.table("item_transaction", {
276803
276804
  salesId: uuid5(),
276804
276805
  orderId: uuid5(),
276805
276806
  transferId: uuid5(),
276806
- transferItemId: uuid5()
276807
+ transferItemId: uuid5(),
276808
+ msRecordProductId: uuid5()
276807
276809
  });
276808
276810
  var warehouseTransferStateEnum = warehouseSchema.enum("transfer_state", ["CREATED", "PERMISSION", "COMPLETE"]);
276809
276811
  var warehouseTransferSourceTypeEnum = warehouseSchema.enum("tranfer_source_type", ["ORDER", "FILE_INPUT"]);
@@ -286046,7 +286048,7 @@ var DashboardAdminLogic;
286046
286048
  const result = await db_default.select({
286047
286049
  model: techdocVehicleKindTable.name,
286048
286050
  count: count(crmVehicleTable.id).mapWith(Number)
286049
- }).from(techdocVehicleKindTable).where(eq(techdocVehicleKindTable.vehicleKindEnum, "MODEL")).leftJoin(crmVehicleTable, eq(crmVehicleTable.vehicleKindId, techdocVehicleKindTable.id)).orderBy((t2) => desc(t2.count)).limit(10);
286051
+ }).from(techdocVehicleKindTable).where(eq(techdocVehicleKindTable.vehicleKindEnum, "MODEL")).leftJoin(crmVehicleTable, eq(crmVehicleTable.vehicleKindId, techdocVehicleKindTable.id)).groupBy((t2) => t2.model).orderBy((t2) => desc(t2.count)).limit(10);
286050
286052
  return result;
286051
286053
  };
286052
286054
  DashboardAdminLogic.getCpOrderItemTotalAmountByMonth = async () => {
@@ -287942,7 +287944,7 @@ var ms_default = msRoutes;
287942
287944
  var PmPlanLogic;
287943
287945
  ((PmPlanLogic) => {
287944
287946
  PmPlanLogic.select = async (query, user2) => {
287945
- const filter = and(eq(pmPlanTable.companyId, user2.companyId), softDeletedFilter(pmPlanTable));
287947
+ const filter = and(eq(pmPlanTable.companyId, user2.companyId), eq(pmPlanTable.id, query.id).if(query.id), softDeletedFilter(pmPlanTable));
287946
287948
  const columns = getTableColumns(pmPlanTable);
287947
287949
  const baseQuery = db_default.select({
287948
287950
  ...columns,
@@ -287995,9 +287997,11 @@ var PmPlanLogic;
287995
287997
  });
287996
287998
  };
287997
287999
  PmPlanLogic.update = async (id, body, user2) => {
287998
- await db_default.update(pmPlanTable).set({
288000
+ console.log(body);
288001
+ const [result] = await db_default.update(pmPlanTable).set({
287999
288002
  ...body
288000
- }).where(and(eq(pmPlanTable.id, id), eq(pmPlanTable.companyId, user2.companyId)));
288003
+ }).where(and(eq(pmPlanTable.id, id), eq(pmPlanTable.companyId, user2.companyId))).returning();
288004
+ console.log(result);
288001
288005
  };
288002
288006
  PmPlanLogic.remove = async (id, user2) => {
288003
288007
  await db_default.update(pmPlanTable).set({
@@ -288098,7 +288102,12 @@ var PmPlanModel;
288098
288102
  machineId: t.String({ format: "uuid" })
288099
288103
  });
288100
288104
  PmPlanModel.update = OmitBaseSchema(updateSchema);
288101
- PmPlanModel.select = t.Composite([PaginationSchema]);
288105
+ PmPlanModel.select = t.Composite([
288106
+ PaginationSchema,
288107
+ t.Partial(t.Object({
288108
+ id: t.String({ format: "uuid" })
288109
+ }))
288110
+ ]);
288102
288111
  })(PmPlanModel ||= {});
288103
288112
  var model_default33 = PmPlanModel;
288104
288113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autosync_backend2",
3
- "version": "1.2.85",
3
+ "version": "1.2.87",
4
4
  "module": "src/index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",