web-core-tcm 0.0.81 → 0.0.82

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.
@@ -6,7 +6,7 @@ export declare class AlovaHospital extends Hospital {
6
6
  put(): Promise<this>;
7
7
  post(): Promise<this>;
8
8
  delete(): Promise<this>;
9
- queryHospitalLink(user: UserState): Promise<Hospital[]>;
9
+ static queryHospitalLink(user: UserState): Promise<Hospital[]>;
10
10
  static query(page: number, pageSize: number, sort: string, hospitalState?: HospitalState, startTime?: string, endTime?: string): Promise<{
11
11
  data: AlovaHospital[];
12
12
  total: number;
@@ -1,5 +1,5 @@
1
- import { Hospital as p } from "../../hospital.js";
2
- class e extends p {
1
+ import { Hospital as l } from "../../hospital.js";
2
+ class e extends l {
3
3
  async get() {
4
4
  return this.of(
5
5
  await managerApi.hospitalStateRestful.getHospital({
@@ -31,13 +31,13 @@ class e extends p {
31
31
  }).send(!0)
32
32
  );
33
33
  }
34
- async queryHospitalLink(a) {
34
+ static async queryHospitalLink(a) {
35
35
  const s = await managerApi.hospitalStateRestful.queryHospitalLink({
36
36
  data: a
37
- }).send(), i = await Promise.all(
38
- s.map(async (n) => await new e().of(n))
37
+ }).send();
38
+ return Promise.all(
39
+ s.map(async (i) => await new e().of(i))
39
40
  );
40
- return Promise.resolve(i);
41
41
  }
42
42
  static query(a, s, i, n, o, r) {
43
43
  return managerApi.hospitalStateRestful.queryHospital({
@@ -51,7 +51,7 @@ class e extends p {
51
51
  },
52
52
  async transform(t) {
53
53
  return {
54
- data: await Promise.all(t.content.map((l) => new e().of(l))),
54
+ data: await Promise.all(t.content.map((p) => new e().of(p))),
55
55
  total: t.totalElements,
56
56
  page: t.number,
57
57
  pageSize: t.size,
@@ -20,6 +20,6 @@ export declare abstract class Hospital extends NetworkObject {
20
20
  abstract post(): Promise<this>;
21
21
  abstract put(): Promise<this>;
22
22
  abstract delete(): Promise<this>;
23
- abstract queryHospitalLink(user: UserState): Promise<Hospital[]>;
23
+ static queryHospitalLink(user: UserState): Promise<Hospital[]>;
24
24
  static query(page: number, pageSize: number, sort: string, hospitalState?: HospitalState, startTime?: string, endTime?: string): Promise<Page<Hospital>>;
25
25
  }
@@ -2,9 +2,9 @@ import "../core/index.js";
2
2
  import { Builder as d } from "../../../node_modules/builder-pattern/dist/index.js";
3
3
  import { Department as r } from "./department.js";
4
4
  import "../user/index.js";
5
- import { NetworkObject as h } from "../core/core.js";
6
- import { User as l } from "../user/user.js";
7
- class T extends h {
5
+ import { NetworkObject as l } from "../core/core.js";
6
+ import { User as h } from "../user/user.js";
7
+ class T extends l {
8
8
  static builder() {
9
9
  return d(this._default);
10
10
  }
@@ -22,7 +22,7 @@ class T extends h {
22
22
  updatedTimestamp = "";
23
23
  async of(e) {
24
24
  return e.id != null && (this.id = e.id), e.name != null && (this.name = e.name), e.level != null && (this.level = e.level), e.address != null && (this.address = e.address), e.note != null && (this.note = e.note), e.admins != null && (this.admins = await Promise.all(
25
- e.admins.map((i) => l.builder().build().of(i))
25
+ e.admins.map((i) => h.builder().build().of(i))
26
26
  )), e.members != null && (this.members = await Promise.all(
27
27
  e.members.map((i) => r.builder().build().of(i))
28
28
  )), e.createdTimestamp != null && (this.createdTimestamp = e.createdTimestamp), e.updatedTimestamp != null && (this.updatedTimestamp = e.updatedTimestamp), this;
@@ -31,14 +31,17 @@ class T extends h {
31
31
  const e = {};
32
32
  return this.id && (e.id = this.id), this.name && (e.name = this.name), this.level && (e.level = this.level), this.address && (e.address = this.address), this.note && (e.note = this.note), this.admins.length > 0 && (e.admins = this.admins), this.members.length > 0 && (e.members = this.members), this.createdTimestamp && (e.createdTimestamp = this.createdTimestamp), this.updatedTimestamp && (e.updatedTimestamp = this.updatedTimestamp), e;
33
33
  }
34
- static query(e, i, t, m, a, s) {
34
+ static queryHospitalLink(e) {
35
+ return this.default().queryHospitalLink(e);
36
+ }
37
+ static query(e, i, t, a, s, m) {
35
38
  return this.default().query(
36
39
  e,
37
40
  i,
38
41
  t,
39
- m,
40
42
  a,
41
- s
43
+ s,
44
+ m
42
45
  );
43
46
  }
44
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-core-tcm",
3
- "version": "0.0.81",
3
+ "version": "0.0.82",
4
4
  "description": "Core",
5
5
  "productName": "Core",
6
6
  "author": "wywywywywywywywywy <qa123456_0714@qq.com>",