'use strict'; const MainService = require('../../main'); /** * 系统方法层:report.deliveryLog(货主报表投递记录审计查询接口包装层)。 * 仅做出口包装与参数解构,业务逻辑下沉 systems/reportDelivery。 */ class ReportDeliveryLogMethodService extends MainService { constructor(ctx) { super(ctx); const _noNeedLogin = ''; // 审计查询属于管理类操作:不声明免权限,仅通配符角色(超级管理员/仓库管理员)可用, // 后续由 wms_permission 同步流程按需授权,不扩大任何角色授权范围 const _noNeedRight = ''; const _noNeedLog = ''; const _noNeedAuth = ''; this.systemInit(_noNeedLogin, _noNeedRight, _noNeedLog, _noNeedAuth); } /** * 分页查询投递记录(审计)。 * @param {Object} data 请求体 * @param {Object} [data.where] 查询条件(store_id/report_id/status) * @param {Object} [data.pagination] 分页 { page, pageSize } * @param {Object} [data.sort] 排序 { sortField, sortOrder } * @return {Promise} 统一 success 包装 */ async list(data = {}) { const { service } = this; const { whereValue = {} } = this.prepareWhereContext(data); const { store_id: storeId, report_id: reportId, status, } = whereValue; const { pagination = {}, sort = {} } = data; const result = await service.systems.reportDelivery.listLogs({ storeId, reportId, status, pagination, sort, }); return this.success('ok', result); } } module.exports = ReportDeliveryLogMethodService;