From a7cf1913c376b53f487f0ef8dfff084c5bc010a7 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期六, 17 十月 2026 11:19:12 +0800
Subject: [PATCH] feat(mes): 支持二维码导出任务的分段下载功能
---
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/bagcode/MesProBagCodeServiceImpl.java | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/bagcode/MesProBagCodeServiceImpl.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/bagcode/MesProBagCodeServiceImpl.java
index bfcd3af..b60d9f8 100644
--- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/bagcode/MesProBagCodeServiceImpl.java
+++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/bagcode/MesProBagCodeServiceImpl.java
@@ -83,9 +83,9 @@
*/
private static final String UNIT_TYPE_TON = "鍚�";
/**
- * 璁¢噺鍗曚綅绫诲瀷銆孨鍗冨厠銆嶏細姣忔墭鐩樿 N 涓鐮�
+ * 璁¢噺鍗曚綅绫诲瀷銆孨琚嬨�嶏細姣忔墭鐩樿 N 涓鐮�
*/
- private static final Pattern KG_TYPE_PATTERN = Pattern.compile("^(\\d{1,5})鍗冨厠$");
+ private static final Pattern BAG_TYPE_PATTERN = Pattern.compile("^(\\d{1,5})琚�$");
@Resource
private MesCodeRedisDAO codeRedisDao;
@@ -99,9 +99,9 @@
MesMdmItemDO item = mdmItemService.validateItemExists(generateReqVO.getItemId());
String type = getUnitType(item);
- // 2. 鎸夌被鍨嬫崲绠楄鐮佹暟閲忥細N鍗冨厠 = 姣忔墭 N 琚� 脳 鎵樼洏鏁帮紱鍚� = 鐩存帴杈撳叆琚嬬爜鏁帮紙鏃犳墭鐩橈級
+ // 2. 鎸夌被鍨嬫崲绠楄鐮佹暟閲忥細N琚� = 姣忔墭 N 琚� 脳 鎵樼洏鏁帮紱鍚� = 鐩存帴杈撳叆琚嬬爜鏁帮紙鏃犳墭鐩橈級
boolean ton = UNIT_TYPE_TON.equals(type);
- int perPallet = ton ? 0 : parseKgPerPallet(type);
+ int perPallet = ton ? 0 : parseBagsPerPallet(type);
int totalCount;
int palletCount = 0;
if (ton) {
@@ -190,7 +190,7 @@
}
/**
- * 璇诲彇鍝佺涓昏閲忓崟浣嶇殑绫诲瀷锛�48鍗冨厠/100鍗冨厠/鍚級锛屾湭閰嶇疆鎴栨棤娉曡瘑鍒椂鎶ラ敊
+ * 璇诲彇鍝佺涓昏閲忓崟浣嶇殑绫诲瀷锛�48琚�/100琚�/鍚級锛屾湭閰嶇疆鎴栨棤娉曡瘑鍒椂鎶ラ敊
*/
private String getUnitType(MesMdmItemDO item) {
String type = null;
@@ -203,17 +203,17 @@
if (type == null) {
throw exception(PRO_BAG_CODE_ITEM_TYPE_NOT_CONFIGURED);
}
- if (!UNIT_TYPE_TON.equals(type) && !KG_TYPE_PATTERN.matcher(type).matches()) {
+ if (!UNIT_TYPE_TON.equals(type) && !BAG_TYPE_PATTERN.matcher(type).matches()) {
throw exception(PRO_BAG_CODE_ITEM_TYPE_NOT_CONFIGURED);
}
return type;
}
/**
- * 瑙f瀽銆孨鍗冨厠銆嶇被鍨嬪緱鍑烘瘡鎵樼洏琚嬫暟
+ * 瑙f瀽銆孨琚嬨�嶇被鍨嬪緱鍑烘瘡鎵樼洏琚嬫暟
*/
- private int parseKgPerPallet(String type) {
- Matcher matcher = KG_TYPE_PATTERN.matcher(type);
+ private int parseBagsPerPallet(String type) {
+ Matcher matcher = BAG_TYPE_PATTERN.matcher(type);
if (!matcher.matches()) {
throw exception(PRO_BAG_CODE_ITEM_TYPE_NOT_CONFIGURED);
}
--
Gitblit v1.9.3