KPI前后端国际化

This commit is contained in:
猫猫guowen
2025-08-26 10:09:28 +08:00
parent eb551b3f1b
commit 2749ed7be0
8 changed files with 124 additions and 125 deletions

View File

@@ -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<Integer> counts = new ArrayList<>();
for (Map.Entry<String, Integer> 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<Integer> counts = new ArrayList<>();
for (Map.Entry<String, Integer> 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<Integer> 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<String, String> 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<String, String> 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("<br>");
info.append("货位类型:").append(space.getTheTypeName()).append("<br>");
info.append("是否锁定:").append("Y".equals(space.getLocked()) ? "是" : "否").append("<br>");
info.append("托盘条码:").append(space.getTrayCode() != null ? space.getTrayCode() : "无").append("<br>");
info.append("货位高度:").append(space.getCargoHight() != null ? space.getCargoHight() : "无").append("<br>");
info.append("是否双伸:").append("Y".equals(space.getIssDouble()) ? "是" : "否").append("<br>");
info.append(MessageUtils.message("kpi.spacePlan.CargoSpaceName")).append(space.getCargoSpaceName()).append("<br>");
info.append(MessageUtils.message("kpi.spacePlan.TheTypeName")).append(space.getTheTypeName()).append("<br>");
info.append(MessageUtils.message("kpi.spacePlan.Locked")).append("Y".equals(space.getLocked()) ? MessageUtils.message("kpi.spacePlan.Y") : MessageUtils.message("kpi.spacePlan.N")).append("<br>");
info.append(MessageUtils.message("kpi.spacePlan.TrayCode")).append(space.getTrayCode() != null ? space.getTrayCode() : MessageUtils.message("kpi.spacePlan.W")).append("<br>");
info.append(MessageUtils.message("kpi.spacePlan.CargoHight")).append(space.getCargoHight() != null ? space.getCargoHight() : MessageUtils.message("kpi.spacePlan.W")).append("<br>");
info.append(MessageUtils.message("kpi.spacePlan.IssDouble")).append("Y".equals(space.getIssDouble()) ? MessageUtils.message("kpi.spacePlan.Y") : MessageUtils.message("kpi.spacePlan.N")).append("<br>");
response.put("msg", info.toString());
} else {
response.put("msg", "未找到货位信息");
response.put("msg", MessageUtils.message("kpi.spacePlan.msg"));
}
return response;

View File

@@ -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

View File

@@ -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