diff --git a/packages/plugins/@hera/plugin-core/src/server/interfaces/record.ts b/packages/plugins/@hera/plugin-core/src/server/interfaces/record.ts index b02c46b7b..93971c73a 100644 --- a/packages/plugins/@hera/plugin-core/src/server/interfaces/record.ts +++ b/packages/plugins/@hera/plugin-core/src/server/interfaces/record.ts @@ -1,9 +1,9 @@ import { RecordCategory } from '../../utils/constants'; -import { recordItems, record_fee_item } from './records'; +import { RecordItems, Record_fee_item } from './records'; export interface Record { weight_items: any; - record_items: recordItems[]; + record_items: RecordItems[]; systemTitle: any; record_lease_rules: any; weight: number; @@ -20,6 +20,6 @@ export interface Record { original_number: any; movement: number; category: RecordCategory; - record_fee_items: record_fee_item[]; + record_fee_items: Record_fee_item[]; pdfExplain: string; } diff --git a/packages/plugins/@hera/plugin-core/src/server/interfaces/records.ts b/packages/plugins/@hera/plugin-core/src/server/interfaces/records.ts index caf67627e..9ae4aab71 100644 --- a/packages/plugins/@hera/plugin-core/src/server/interfaces/records.ts +++ b/packages/plugins/@hera/plugin-core/src/server/interfaces/records.ts @@ -1,9 +1,9 @@ -export interface recordItems { +export interface RecordItems { id: number; sort: number; count: number; comment: string; - product: product; + product: Product; createdAt: string; record_id: number; t_item_id: any; @@ -12,10 +12,10 @@ export interface recordItems { unit_price: any; createdById: number; updatedById: number; - record_item_fee_items: record_fee_item[]; + record_item_fee_items: Record_fee_item[]; } -export interface product { +export interface Product { id: number; name: string; sort: number; @@ -30,10 +30,10 @@ export interface product { createdById: number; custom_name: string; updatedById: number; - product_category: product_category; + product_category: Product_category; } -export interface product_category { +export interface Product_category { id: number; attr: string[]; name: string; @@ -49,8 +49,8 @@ export interface product_category { conversion_unit: string; } -export interface record_fee_item { - product: product; +export interface Record_fee_item { + product: Product; id: number; sort: number; count: number; diff --git a/packages/plugins/@hera/plugin-core/src/server/interfaces/rule.ts b/packages/plugins/@hera/plugin-core/src/server/interfaces/rule.ts index 276c5fe43..652982d09 100644 --- a/packages/plugins/@hera/plugin-core/src/server/interfaces/rule.ts +++ b/packages/plugins/@hera/plugin-core/src/server/interfaces/rule.ts @@ -1,9 +1,9 @@ -import { product } from './records'; +import { Product } from './records'; import { ConversionLogics, countCource } from '../../utils/constants'; export interface FeeRule extends LeaseRule { id: number; - product: product; + product: Product; fee_product_id: number; count_source: countCource; unit: string; @@ -19,7 +19,7 @@ export interface LeaseRule { unit_price: number; product_id?: number; conversion_logic_id: ConversionLogics; - ucl: weightRule; + ucl: WeightRule; product_fee: any; products: any; } @@ -36,6 +36,6 @@ export interface RuleItem { rule: Rule; } -export interface weightRule { +export interface WeightRule { weight_items: any[]; } diff --git a/packages/plugins/@hera/plugin-rental/src/server/interfaces/contract.ts b/packages/plugins/@hera/plugin-rental/src/interfaces/contract.ts similarity index 100% rename from packages/plugins/@hera/plugin-rental/src/server/interfaces/contract.ts rename to packages/plugins/@hera/plugin-rental/src/interfaces/contract.ts diff --git a/packages/plugins/@hera/plugin-rental/src/server/interfaces/options.ts b/packages/plugins/@hera/plugin-rental/src/interfaces/options.ts similarity index 55% rename from packages/plugins/@hera/plugin-rental/src/server/interfaces/options.ts rename to packages/plugins/@hera/plugin-rental/src/interfaces/options.ts index 2821f2e5b..cf752c863 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/interfaces/options.ts +++ b/packages/plugins/@hera/plugin-rental/src/interfaces/options.ts @@ -1,4 +1,4 @@ -export interface recordPdfOptions { +export interface RecordPdfOptions { isDouble: number; printSetup: String; } diff --git a/packages/plugins/@hera/plugin-rental/src/server/interfaces/record.ts b/packages/plugins/@hera/plugin-rental/src/interfaces/record.ts similarity index 68% rename from packages/plugins/@hera/plugin-rental/src/server/interfaces/record.ts rename to packages/plugins/@hera/plugin-rental/src/interfaces/record.ts index fbca95450..ea24acf2b 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/interfaces/record.ts +++ b/packages/plugins/@hera/plugin-rental/src/interfaces/record.ts @@ -1,10 +1,10 @@ -import { RecordCategory } from '../../utils/constants'; -import { recordItems, record_fee_item } from './records'; +import { RecordCategory } from '../utils/constants'; +import { RecordItems, Record_fee_item } from './records'; export interface Record { weight_items: any; - record_items: recordItems[]; - items: recordItems[]; + record_items: RecordItems[]; + items: RecordItems[]; systemTitle: any; record_lease_rules: any; weight: number; @@ -21,7 +21,7 @@ export interface Record { original_number: any; movement: string; category: RecordCategory; - record_fee_items: record_fee_item[]; + record_fee_items: Record_fee_item[]; pdfExplain: string; direct_record_id: number; id: number; diff --git a/packages/plugins/@hera/plugin-rental/src/server/interfaces/records.ts b/packages/plugins/@hera/plugin-rental/src/interfaces/records.ts similarity index 79% rename from packages/plugins/@hera/plugin-rental/src/server/interfaces/records.ts rename to packages/plugins/@hera/plugin-rental/src/interfaces/records.ts index 8c3aa810a..a1ae70aae 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/interfaces/records.ts +++ b/packages/plugins/@hera/plugin-rental/src/interfaces/records.ts @@ -1,10 +1,10 @@ -export interface recordItems { +export interface RecordItems { label: string; id: number; sort: number; count: number; comment: string; - product: product; + product: Product; createdAt: string; record_id: number; t_item_id: any; @@ -13,10 +13,10 @@ export interface recordItems { unit_price: any; createdById: number; updatedById: number; - record_item_fee_items: record_fee_item[]; + record_item_fee_items: Record_fee_item[]; } -export interface product { +export interface Product { id: number; name: string; sort: number; @@ -28,14 +28,14 @@ export interface product { createdAt: Date; updatedAt: Date; category_id: number; - category: product_category; + category: Product_category; createdById: number; custom_name: string; updatedById: number; - product_category: product_category; + product_category: Product_category; } -export interface product_category { +export interface Product_category { id: number; attr: string[]; name: string; @@ -51,8 +51,8 @@ export interface product_category { conversion_unit: string; } -export interface record_fee_item { - product: product; +export interface Record_fee_item { + product: Product; id: number; sort: number; count: number; diff --git a/packages/plugins/@hera/plugin-rental/src/server/interfaces/rule.ts b/packages/plugins/@hera/plugin-rental/src/interfaces/rule.ts similarity index 78% rename from packages/plugins/@hera/plugin-rental/src/server/interfaces/rule.ts rename to packages/plugins/@hera/plugin-rental/src/interfaces/rule.ts index 276c5fe43..c35067811 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/interfaces/rule.ts +++ b/packages/plugins/@hera/plugin-rental/src/interfaces/rule.ts @@ -1,9 +1,9 @@ -import { product } from './records'; -import { ConversionLogics, countCource } from '../../utils/constants'; +import { Product } from './records'; +import { ConversionLogics, countCource } from '../utils/constants'; export interface FeeRule extends LeaseRule { id: number; - product: product; + product: Product; fee_product_id: number; count_source: countCource; unit: string; @@ -19,7 +19,7 @@ export interface LeaseRule { unit_price: number; product_id?: number; conversion_logic_id: ConversionLogics; - ucl: weightRule; + ucl: WeightRule; product_fee: any; products: any; } @@ -36,6 +36,6 @@ export interface RuleItem { rule: Rule; } -export interface weightRule { +export interface WeightRule { weight_items: any[]; } diff --git a/packages/plugins/@hera/plugin-rental/src/server/interfaces/settlement.ts b/packages/plugins/@hera/plugin-rental/src/interfaces/settlement.ts similarity index 100% rename from packages/plugins/@hera/plugin-rental/src/server/interfaces/settlement.ts rename to packages/plugins/@hera/plugin-rental/src/interfaces/settlement.ts diff --git a/packages/plugins/@hera/plugin-rental/src/server/interfaces/systemSetting.ts b/packages/plugins/@hera/plugin-rental/src/interfaces/systemSetting.ts similarity index 100% rename from packages/plugins/@hera/plugin-rental/src/server/interfaces/systemSetting.ts rename to packages/plugins/@hera/plugin-rental/src/interfaces/systemSetting.ts diff --git a/packages/plugins/@hera/plugin-rental/src/server/interfaces/waybill.ts b/packages/plugins/@hera/plugin-rental/src/interfaces/waybill.ts similarity index 100% rename from packages/plugins/@hera/plugin-rental/src/server/interfaces/waybill.ts rename to packages/plugins/@hera/plugin-rental/src/interfaces/waybill.ts diff --git a/packages/plugins/@hera/plugin-rental/src/server/actions/waybills-controller.ts b/packages/plugins/@hera/plugin-rental/src/server/actions/waybills-controller.ts index c666c0d68..8dd863329 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/actions/waybills-controller.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/actions/waybills-controller.ts @@ -3,7 +3,7 @@ import { renderWaybill } from '../pdf-documents/waybills-document'; import { SqlLoader } from '@hera/plugin-core'; import { Action, Controller, Inject } from '@nocobase/utils'; import { QueryTypes } from 'sequelize'; -import { Waybill } from '../interfaces/waybill'; +import { Waybill } from '../../interfaces/waybill'; @Controller('waybills') export class WaybillsController { diff --git a/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/records-document.tsx b/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/records-document.tsx index 9f16eb5db..c47d287ad 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/records-document.tsx +++ b/packages/plugins/@hera/plugin-rental/src/server/pdf-documents/records-document.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Document, Page, Text, View, StyleSheet, Image, renderToStream, Font } from '@hera/plugin-core'; -import { Record } from '../interfaces/record'; +import { Record } from '../../interfaces/record'; import * as QRCode from 'qrcode'; import { ConversionLogics, RecordCategory } from '../../utils/constants'; import { formatCurrency, formatQuantity } from '../../utils/currencyUtils'; diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/record-pdf-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/record-pdf-service.ts index 635bf18e9..7612a5d5f 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/record-pdf-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/record-pdf-service.ts @@ -1,12 +1,12 @@ import { ConversionLogics, RecordCategory, RulesNumber, SourcesType, countCource } from '../../utils/constants'; import { renderItV2 } from '../pdf-documents/records-documentV2'; import { Service } from '@nocobase/utils'; -import { recordPdfOptions } from '../interfaces/options'; +import { RecordPdfOptions } from '../../interfaces/options'; import { PrintSetup } from '../../utils/system'; @Service() export class RecordPdfService { - async transformPdfV2(recordData: any, lease_data: any, fee_data: any, options: recordPdfOptions) { + async transformPdfV2(recordData: any, lease_data: any, fee_data: any, options: RecordPdfOptions) { const { isDouble, printSetup } = options; // 直发单不需要打印预览 diff --git a/packages/plugins/@hera/plugin-rental/src/server/services/settlement-service.ts b/packages/plugins/@hera/plugin-rental/src/server/services/settlement-service.ts index 47dedadb8..1a6498ead 100644 --- a/packages/plugins/@hera/plugin-rental/src/server/services/settlement-service.ts +++ b/packages/plugins/@hera/plugin-rental/src/server/services/settlement-service.ts @@ -11,10 +11,10 @@ import { } from '../../utils/constants'; import { converDate } from '../../utils/daysUtils'; import { converUnitCount } from '../../utils/unitUtils'; -import { Settlement } from '../interfaces/settlement'; -import { FeeRule, LeaseRule } from '../interfaces/rule'; -import { Record } from '../interfaces/record'; -import { recordItems } from '../interfaces/records'; +import { Settlement } from '../../interfaces/settlement'; +import { FeeRule, LeaseRule } from '../../interfaces/rule'; +import { Record } from '../../interfaces/record'; +import { RecordItems } from '../../interfaces/records'; import { formatQuantity } from '../../utils/currencyUtils'; @Service() @@ -852,7 +852,7 @@ const recordWeight = (rule, item, settlementsId, productRule, rulefee?) => { * @param itemCount 需要计算的订单数量 * @returns count,unit 返回了最后的计算数量和单位 */ -const ruleCount = (rules: FeeRule | LeaseRule, item: Record, recordItem: recordItems, valueCount?, rulefee?) => { +const ruleCount = (rules: FeeRule | LeaseRule, item: Record, recordItem: RecordItems, valueCount?, rulefee?) => { let count, unit; const itemCount = valueCount ? valueCount : recordItem.count; const conversion_logic_id = rulefee ? rulefee.conversion_logic_id : rules.conversion_logic_id;