Commit 6bdbdede by 杨铁龙

优化接口

parent 2c7c0c2b
Showing with 33 additions and 1 deletions
import type { UniplatSdk } from "uniplat-sdk"; import type { UniplatSdk } from "uniplat-sdk";
export * from "./order"; export * from "./order";
export * from "./order-product"
export const enum ChatRole { export const enum ChatRole {
Default = 25, Default = 25,
......
...@@ -64,14 +64,40 @@ class OrderService { ...@@ -64,14 +64,40 @@ class OrderService {
.execute(); .execute();
} }
/** 专项工单 */
public getOrders(params: { public getOrders(params: {
productCode?: GeneralOrderDirection; productCode?: GeneralOrderDirection;
index: number; index: number;
size?: number; size?: number;
}, isHrs = false) {
const list = this.getSdk()
.model(this.generalOrder)
.list(isHrs ? "hroOrgOrderList" : "userOrderList");
if (params.productCode) {
list.addPrefilter({ 'ProductId#product.Code': params.productCode });
}
return list
.query({ item_size: params.size || 100, pageIndex: params.index })
.then((r) => {
return {
total: r.pageData.record_count,
list: this.handler.buildRows<OrderTableListItem>(
r.pageData.rows,
orderPredict
),
};
});
}
public getProcessOrders(params: {
productCode?: GeneralOrderDirection;
index: number;
size?: number;
}) { }) {
const list = this.getSdk() const list = this.getSdk()
.model(this.generalOrder) .model(this.generalOrder)
.list("userOrderList"); .list("hroOrgDoingOrderList");
if (params.productCode) { if (params.productCode) {
list.addPrefilter({ 'ProductId#product.Code': params.productCode }); list.addPrefilter({ 'ProductId#product.Code': params.productCode });
} }
...@@ -184,6 +210,11 @@ class OrderService { ...@@ -184,6 +210,11 @@ class OrderService {
return this.getSdk().domainService("hro_spview", "OrderSetting", "sendPayAccountInfo") return this.getSdk().domainService("hro_spview", "OrderSetting", "sendPayAccountInfo")
.request("get", { params }) .request("get", { params })
} }
public sendPayAccountInfoForAgent(params: { send: string; userOrderPaymentId: number }) {
return this.getSdk().domainService("hro_spview", "OrderSetting", "sendPayAccountInfoForAgent")
.request("get", { params })
}
} }
export const orderService = new OrderService(); export const orderService = new OrderService();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment