From 2749ed7be0a8df46b947cf7f734922755746c130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=AB=E7=8C=ABguowen?= <9290821+guowen-the-cat@user.noreply.gitee.com> Date: Tue, 26 Aug 2025 10:09:28 +0800 Subject: [PATCH] =?UTF-8?q?KPI=E5=89=8D=E5=90=8E=E7=AB=AF=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kpi/service/impl/KpiServiceImpl.java | 31 ++--- .../resources/i18n/messages_en_US.properties | 16 +++ .../resources/i18n/messages_zh_CN.properties | 17 +++ ruoyi-ui/src/lang/en.js | 117 +++++++++--------- ruoyi-ui/src/lang/zh.js | 42 +------ .../src/views/kpi/inAnalysis/indexByTime.vue | 6 +- .../src/views/kpi/outAnalysis/indexByTime.vue | 6 +- ruoyi-ui/src/views/kpi/spacePlan/index.vue | 14 ++- 8 files changed, 124 insertions(+), 125 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/kpi/service/impl/KpiServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/kpi/service/impl/KpiServiceImpl.java index 4868d91..0a3dc49 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/kpi/service/impl/KpiServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/kpi/service/impl/KpiServiceImpl.java @@ -9,6 +9,7 @@ import cn.hutool.core.date.DateUtil; import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace; import com.ruoyi.bas.cargoSpace.mapper.BasCargoSpaceMapper; import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.MessageUtils; import com.ruoyi.job.mydojob.domain.MydoJob; import com.ruoyi.job.mydojobfinish.domain.MydoJobFinish; import com.ruoyi.job.mydojobfinish.mapper.MydoJobFinishMapper; @@ -76,7 +77,7 @@ public class KpiServiceImpl implements KpiService List counts = new ArrayList<>(); for (Map.Entry entry : roadwayCount.entrySet()) { - tunnels.add(entry.getKey() + "巷道"); + tunnels.add(entry.getKey() + MessageUtils.message("kpi.spacePlan.roadway")); counts.add(entry.getValue()); } @@ -132,7 +133,7 @@ public class KpiServiceImpl implements KpiService List counts = new ArrayList<>(); for (Map.Entry entry : roadwayCount.entrySet()) { - tunnels.add(entry.getKey() + "巷道"); + tunnels.add(entry.getKey() + MessageUtils.message("kpi.spacePlan.roadway")); counts.add(entry.getValue()); } @@ -206,7 +207,7 @@ public class KpiServiceImpl implements KpiService List outCountsList = new ArrayList<>(); for (String roadwayId : allRoadways) { - tunnels.add(roadwayId + "巷道"); + tunnels.add(roadwayId + MessageUtils.message("kpi.spacePlan.roadway")); inCountsList.add(inCounts.getOrDefault(roadwayId, 0)); outCountsList.add(outCounts.getOrDefault(roadwayId, 0)); } @@ -273,7 +274,7 @@ public class KpiServiceImpl implements KpiService // 为每个巷道添加数量,如果没有数据则为0 for (String roadwayId : roadwayIds) { - statusData.put("巷道" + roadwayId, entry.getValue().getOrDefault(roadwayId, 0)); + statusData.put(MessageUtils.message("kpi.spacePlan.roadway") + roadwayId, entry.getValue().getOrDefault(roadwayId, 0)); } result.add(statusData); @@ -306,7 +307,7 @@ public class KpiServiceImpl implements KpiService for (String roadwayId : roadwaySet) { Map roadway = new HashMap<>(); roadway.put("value", roadwayId); - roadway.put("label", "巷道" + roadwayId); + roadway.put("label", MessageUtils.message("kpi.spacePlan.roadway") + roadwayId); roadways.add(roadway); } @@ -337,7 +338,7 @@ public class KpiServiceImpl implements KpiService for (Long platoon : platoonSet) { Map platoonMap = new HashMap<>(); platoonMap.put("value", platoon.toString()); - platoonMap.put("label", platoon + "排"); + platoonMap.put("label", platoon + MessageUtils.message("kpi.spacePlan.platoon")); platoons.add(platoonMap); } @@ -391,13 +392,13 @@ public class KpiServiceImpl implements KpiService // 构建列和层的标签 StringBuilder columnLabels = new StringBuilder(); for (Long col : columnSet) { - columnLabels.append("'").append(col).append("列',"); + columnLabels.append("'").append(col).append(MessageUtils.message("kpi.spacePlan.column")).append("',"); } String column = "[" + columnLabels.toString() + "]"; StringBuilder floorLabels = new StringBuilder(); for (Long floor : floorSet) { - floorLabels.append("'").append(floor).append("层',"); + floorLabels.append("'").append(floor).append(MessageUtils.message("kpi.spacePlan.floor")).append("',"); } String floor = "[" + floorLabels.toString() + "]"; @@ -433,16 +434,16 @@ public class KpiServiceImpl implements KpiService StringBuilder info = new StringBuilder(); // 拼接货位信息 - info.append("货位名称:").append(space.getCargoSpaceName()).append("
"); - info.append("货位类型:").append(space.getTheTypeName()).append("
"); - info.append("是否锁定:").append("Y".equals(space.getLocked()) ? "是" : "否").append("
"); - info.append("托盘条码:").append(space.getTrayCode() != null ? space.getTrayCode() : "无").append("
"); - info.append("货位高度:").append(space.getCargoHight() != null ? space.getCargoHight() : "无").append("
"); - info.append("是否双伸:").append("Y".equals(space.getIssDouble()) ? "是" : "否").append("
"); + info.append(MessageUtils.message("kpi.spacePlan.CargoSpaceName")).append(space.getCargoSpaceName()).append("
"); + info.append(MessageUtils.message("kpi.spacePlan.TheTypeName")).append(space.getTheTypeName()).append("
"); + info.append(MessageUtils.message("kpi.spacePlan.Locked")).append("Y".equals(space.getLocked()) ? MessageUtils.message("kpi.spacePlan.Y") : MessageUtils.message("kpi.spacePlan.N")).append("
"); + info.append(MessageUtils.message("kpi.spacePlan.TrayCode")).append(space.getTrayCode() != null ? space.getTrayCode() : MessageUtils.message("kpi.spacePlan.W")).append("
"); + info.append(MessageUtils.message("kpi.spacePlan.CargoHight")).append(space.getCargoHight() != null ? space.getCargoHight() : MessageUtils.message("kpi.spacePlan.W")).append("
"); + info.append(MessageUtils.message("kpi.spacePlan.IssDouble")).append("Y".equals(space.getIssDouble()) ? MessageUtils.message("kpi.spacePlan.Y") : MessageUtils.message("kpi.spacePlan.N")).append("
"); response.put("msg", info.toString()); } else { - response.put("msg", "未找到货位信息"); + response.put("msg", MessageUtils.message("kpi.spacePlan.msg")); } return response; diff --git a/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties b/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties index 173827f..08f8578 100644 --- a/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties +++ b/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties @@ -98,6 +98,22 @@ error.message31=此起点无料架,请检查 stock.Maintain.createTime=Create Time +#KPI后台国际化 +kpi.spacePlan.CargoSpaceName=CargoSpaceName: +kpi.spacePlan.TheTypeName=TheTypeName: +kpi.spacePlan.Locked=Locked: +kpi.spacePlan.Y=YES +kpi.spacePlan.N=NO +kpi.spacePlan.W=NULL +kpi.spacePlan.TrayCode=TrayCode: +kpi.spacePlan.CargoHight=CargoHight: +kpi.spacePlan.IssDouble=IssDouble: +kpi.spacePlan.msg=Cargo Space Is Not Fined +kpi.spacePlan.roadway=roadway +kpi.spacePlan.platoon=platoon +kpi.spacePlan.column=column +kpi.spacePlan.floor=floor + #ViewStockWarning search.ViewStockWarning.stockId=Stock ID search.ViewStockWarning.cargoSpaceId=Cargo Space ID diff --git a/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties b/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties index 2d98f7a..74b8319 100644 --- a/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties +++ b/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties @@ -97,6 +97,23 @@ error.message31=此起点无料架,请检查 stock.Maintain.createTime=创建时间 +#KPI后台国际化 +kpi.spacePlan.CargoSpaceName=货位名称: +kpi.spacePlan.TheTypeName=货位类型: +kpi.spacePlan.Locked=是否锁定: +kpi.spacePlan.Y=是 +kpi.spacePlan.N=否 +kpi.spacePlan.W=无 +kpi.spacePlan.TrayCode=托盘条码: +kpi.spacePlan.CargoHight=货位高度: +kpi.spacePlan.IssDouble=是否双伸: +kpi.spacePlan.msg=未找到货位信息 +kpi.spacePlan.roadway=巷道 +kpi.spacePlan.platoon=排 +kpi.spacePlan.column=列 +kpi.spacePlan.floor=层 + + #ViewStockWarning search.ViewStockWarning.stockId=库存ID search.ViewStockWarning.cargoSpaceId=货位ID diff --git a/ruoyi-ui/src/lang/en.js b/ruoyi-ui/src/lang/en.js index cae3b6a..9887d7b 100644 --- a/ruoyi-ui/src/lang/en.js +++ b/ruoyi-ui/src/lang/en.js @@ -1249,32 +1249,32 @@ export default { // ***************入库分析************* inAnalysis: { - warehouse: '仓库', // 仓库 - selectWarehouse: '请选择仓库', // 请选择仓库 - timeRange: '时间范围', // 时间范围 - startDate: '开始日期', // 开始日期 - endDate: '结束日期', // 结束日期 - query: '查询', // 查询 - inboundQuantityStatistics: '入库数量统计', // 入库数量统计 - inboundQuantity: '入库数量', // 入库数量 - selectTimeRange: '请选择时间范围', // 请选择时间范围 - getWarehouseListFailed: '获取仓库列表失败', // 获取仓库列表失败 - getStatisticsDataFailed: '获取统计数据失败' // 获取统计数据失败 + warehouse: 'warehouse', // 仓库 + selectWarehouse: 'selectWarehouse', // 请选择仓库 + timeRange: 'timeRange', // 时间范围 + startDate: 'startDate', // 开始日期 + endDate: 'endDate', // 结束日期 + query: 'query', // 查询 + inboundQuantityStatistics: 'inboundQuantityStatistics', // 入库数量统计 + inboundQuantity: 'inboundQuantity', // 入库数量 + selectTimeRange: 'selectTimeRange', // 请选择时间范围 + getWarehouseListFailed: 'getWarehouseListFailed', // 获取仓库列表失败 + getStatisticsDataFailed: 'getStatisticsDataFailed' // 获取统计数据失败 }, // ***************出库分析************* outAnalysis: { - warehouse: '仓库', // 仓库 - selectWarehouse: '请选择仓库', // 请选择仓库 - timeRange: '时间范围', // 时间范围 - startDate: '开始日期', // 开始日期 - endDate: '结束日期', // 结束日期 - query: '查询', // 查询 - outboundQuantityStatistics: '出库数量统计', // 出库数量统计 - outboundQuantity: '出库数量', // 出库数量 - selectTimeRange: '请选择时间范围', // 请选择时间范围 - getWarehouseListFailed: '获取仓库列表失败', // 获取仓库列表失败 - getStatisticsDataFailed: '获取统计数据失败' // 获取统计数据失败 + warehouse: 'warehouse', // 仓库 + selectWarehouse: 'selectWarehouse', // 请选择仓库 + timeRange: 'timeRange', // 时间范围 + startDate: 'startDate', // 开始日期 + endDate: 'endDate', // 结束日期 + query: 'query', // 查询 + outboundQuantityStatistics: 'outboundQuantityStatistics', // 出库数量统计 + outboundQuantity: 'outboundQuantity', // 出库数量 + selectTimeRange: 'selectTimeRange', // 请选择时间范围 + getWarehouseListFailed: 'getWarehouseListFailed', // 获取仓库列表失败 + getStatisticsDataFailed: 'getStatisticsDataFailed' // 获取统计数据失败 }, menu: { @@ -3166,35 +3166,35 @@ export default { // ***************KPI分析:货位分析*************** KPIAnalysis_CargoSpace: { - warehouse: '仓库', + warehouse: 'warehouse', - placeholderWarehouse: '请选择仓库', + placeholderWarehouse: 'placeholderWarehouse', - btnSearch: '查询', - btnReset: '重置', + btnSearch: 'Search', + btnReset: 'Reset', //---handleQuery--- - errorGetData: '获取数据失败', + errorGetData: 'errorGetData', //---updateChart--- - warnInvalidChartData: '无效的图表数据', - roadway: '巷道', - roadway1: '巷道1', - roadway2: '巷道2', - roadway3: '巷道3', - roadway4: '巷道4', - config: '生成的系列配置', + warnInvalidChartData: 'warnInvalidChartData', + roadway: 'roadway', + roadway1: 'roadway1', + roadway2: 'roadway2', + roadway3: 'roadway3', + roadway4: 'roadway4', + config: 'generated series configuration', - textChartCargoSpace: '货位分析', - textValue: '数量', + textChartCargoSpace: 'ChartCargoSpace', + textValue: 'quantity', // 货位状态国际化 - 对应后台返回的中文状态 - statusEmpty: '空货位', // 空货位 - statusFull: '满货位', // 满货位 - statusInboundAllocated: '入库分配', // 入库分配 - statusOutboundAllocated: '出库分配', // 出库分配 - statusInboundNeedCheck: '入库需盘点', // 入库需盘点 - statusOutboundNeedCheck: '出库需盘点', // 出库需盘点 + statusEmpty: 'Empty', // 空货位 + statusFull: 'Full', // 满货位 + statusInboundAllocated: 'InboundAllocated', // 入库分配 + statusOutboundAllocated: 'OutboundAllocated', // 出库分配 + statusInboundNeedCheck: 'InboundNeedCheck', // 入库需盘点 + statusOutboundNeedCheck: 'OutboundNeedCheck', // 出库需盘点 lblWidthSearch: '68px' @@ -3202,25 +3202,26 @@ export default { // ***************KPI分析:库存平面图*************** KPIAnalysis_CargoPlan: { - warehouse: '仓库', - raodway: '巷道', - row: '排', - column: '列', - floor: '层', + warehouse: 'warehouse', + raodway: 'raodway', + row: 'row', + column: 'column', + floor: 'floor', + txtLoading: 'Loading...', - placeholderWarehouse: '请选择仓库', + placeholderWarehouse: 'please select warehouse', //---updateNormalChart--- - title: '库位分布平面图', - legendEmpty: '空位', - legendOccupied: '满位', - legendStockInAssigned: '入库已分配', - legendStockOutAssigned: '出库已分配', - legendStockInException: '入库需盘点', - legendStockOutException: '出库需盘点', + title: 'KPIAnalysis CargoPlan', + legendEmpty: 'legendEmpty', + legendOccupied: 'legendOccupied', + legendStockInAssigned: 'legendStockInAssigned', + legendStockOutAssigned: 'legendStockOutAssigned', + legendStockInException: 'legendStockInException', + legendStockOutException: 'legendStockOutException', //---formatTooltip--- - failGetCargoSpace: '获取货位信息失败', + failGetCargoSpace: 'failGetCargoSpace', lblWidthSearch: '68px' @@ -3965,7 +3966,7 @@ export default { shelfCalledSuccess: '料架 {containerCode} 已从 {sourcePortName} 呼叫到 {currentPortName}', callCancelled: '已取消呼叫' }, - + // **************Interface Log**************** interfaceLog: { // Query Form @@ -3977,7 +3978,7 @@ export default { selectIsSuccess: 'Please select success status', search: 'Search', reset: 'Reset', - + // Table Columns requestId: 'Request ID', requestTime: 'Request Time', diff --git a/ruoyi-ui/src/lang/zh.js b/ruoyi-ui/src/lang/zh.js index bf512f2..c368834 100644 --- a/ruoyi-ui/src/lang/zh.js +++ b/ruoyi-ui/src/lang/zh.js @@ -3208,6 +3208,7 @@ export default { row: '排', column: '列', floor: '层', + txtLoading: '加载中,请稍候...', placeholderWarehouse: '请选择仓库', @@ -3967,47 +3968,6 @@ export default { shelfCalledSuccess: '料架 {containerCode} 已从 {sourcePortName} 呼叫到 {currentPortName}', callCancelled: '已取消呼叫' }, - - // **************接口日志**************** - interfaceLog: { - // 查询表单 - requestParam: '请求参数', - inputRequestParam: '请输入请求参数', - errorInfo: '错误信息', - inputErrorInfo: '请输入错误信息', - isSuccess: '是否成功', - selectIsSuccess: '请选择是否成功', - search: '搜索', - reset: '重置', - - // 表格列 - requestId: '请求id', - requestTime: '请求时间', - sourceSystem: '来源系统', - targetSystem: '目标系统', - interfaceName: '接口名称', - requestUrl: '请求URL', - requestMethod: '请求方式', - requestHeaders: '请求头信息', - requestBody: '请求参数', - responseTime: '响应时间', - responseBody: '响应主体', - responseStatus: '响应状态', - errorDetails: '错误信息', - duration: '耗时', - isSuccessful: '是否成功', - - // 弹窗 - add: '添加接口记录', - edit: '修改接口记录', - inputContent: '请输入内容', - confirm: '确 定', - cancel: '取 消', - deleteConfirm: '是否确认删除接口记录编号为"{0}"的数据项?', - addSuccess: '新增成功', - editSuccess: '修改成功', - deleteSuccess: '删除成功' - }, dict: { is_available: { n: '否', diff --git a/ruoyi-ui/src/views/kpi/inAnalysis/indexByTime.vue b/ruoyi-ui/src/views/kpi/inAnalysis/indexByTime.vue index e594c87..ff308b6 100644 --- a/ruoyi-ui/src/views/kpi/inAnalysis/indexByTime.vue +++ b/ruoyi-ui/src/views/kpi/inAnalysis/indexByTime.vue @@ -15,8 +15,8 @@ ' + this.queryParams.thePlatoon + '排' + (params.data[0] + 1) + '列' + (params.data[1] + 1) + '层'; + return params.seriesName + '
' + this.$t("KPIAnalysis_CargoPlan.row")+ this.queryParams.thePlatoon + this.$t('KPIAnalysis_CargoPlan.column')+ (params.data[0] + 1) + this.$t('KPIAnalysis_CargoPlan.floor')+ (params.data[1] + 1); } else{ - return params.seriesName + '
' + this.$t('KPIAnalysis_CargoPlan.row') + ':' + this.queryParams.thePlatoon + ' ' + this.$t('KPIAnalysis_CargoPlan.column') + ':' + (params.data[0] + 1) + ' ' + this.$t('KPIAnalysis_CargoPlan.floor') + ': ' + (params.data[1] + 1); + return params.seriesName+ '
'+ this.queryParams.thePlatoon + this.$t('KPIAnalysis_CargoPlan.row') + ' ' + (params.data[0] + 1)+ this.$t('KPIAnalysis_CargoPlan.column') + ' '+ (params.data[1] + 1) + this.$t('KPIAnalysis_CargoPlan.floor'); } } @@ -347,11 +347,15 @@ this.getWarehouseList() // 如果已经在加载中,返回基本信息 if (this.loadingKeys && this.loadingKeys[key]) { - return `${params.seriesName}
${this.queryParams.thePlatoon}排${params.data[0] + 1}列${params.data[1] + 1}层
加载中...`; + if (this.$i18n.locale === 'zh-cn') { + return `${params.seriesName}
${this.queryParams.thePlatoon}${this.$t('KPIAnalysis_CargoPlan.row')}${params.data[0] + 1}${this.$t('KPIAnalysis_CargoPlan.column')}${params.data[1] + 1}${this.$t('KPIAnalysis_CargoPlan.floor')}
${this.$t('KPIAnalysis_CargoPlan.txtLoading')}`; + } else { + return `${params.seriesName}
${this.queryParams.thePlatoon}${this.$t('KPIAnalysis_CargoPlan.row')} ${params.data[0] + 1}${this.$t('KPIAnalysis_CargoPlan.column')} ${params.data[1] + 1}${this.$t('KPIAnalysis_CargoPlan.floor')}
${this.$t('KPIAnalysis_CargoPlan.txtLoading')}`; + } } // 返回基本信息 - const baseStr = `${params.seriesName}
${this.queryParams.thePlatoon}排${params.data[0] + 1}列${params.data[1] + 1}层`; + const baseStr = `${params.seriesName}
${this.queryParams.thePlatoon}${this.$t('KPIAnalysis_CargoPlan.row')}${params.data[0] + 1}${this.$t('KPIAnalysis_CargoPlan.column')}${params.data[1] + 1}${this.$t('KPIAnalysis_CargoPlan.floor')}`; // 设置加载状态 if (!this.loadingKeys) this.loadingKeys = {};