From 539a56279625242c497b4b4093f2defbb9d80334 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期四, 29 一月 2026 14:05:44 +0800
Subject: [PATCH] #i18n翻译

---
 src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java |  215 ++++++++++++++++++++++++++---------------------------
 1 files changed, 107 insertions(+), 108 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
index ee82d68..0112163 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -108,7 +108,7 @@
 //        List<String> batchs = param.getList().stream().map(FullStoreParam.MatCodeStore::getBatch).distinct().collect(Collectors.toList());
         StartupDto dto = commonService.getLocNo(1, param.getDevpNo(), matnrs.get(0), null, null,locTypeDto);
         if (Cools.isEmpty(dto)){
-            throw new CoolException("鏌ヨ搴撲綅澶辫触锛侊紒==銆媠tartupFullPutStore ==銆� commonService.getLocNo");
+            throw new CoolException("response.query_loc_failed");
         }
         // 鐢熸垚宸ヤ綔鍙�
         int workNo = dto.getWorkNo();
@@ -135,7 +135,7 @@
         wrkMast.setModiUser(userId);
         wrkMast.setModiTime(now);
         if (!wrkMastService.insert(wrkMast)) {
-            throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�");
+            throw new CoolException("response.save_work_master_failed");
         }
         // 鐢熸垚宸ヤ綔妗f槑缁�
         List<DetlDto> detlDtos = new ArrayList<>();
@@ -155,7 +155,7 @@
         sourceStaNo.setModiUser(userId);
         sourceStaNo.setModiTime(now);
         if (!basDevpService.updateById(sourceStaNo)){
-            throw new CoolException("鏇存柊婧愮珯澶辫触");
+            throw new CoolException("response.update_source_station_failed");
         }
         // 鏇存柊鐩爣搴撲綅鐘舵��
         LocMast locMast = locMastService.selectById(dto.getLocNo());
@@ -164,10 +164,10 @@
             locMast.setModiUser(userId);
             locMast.setModiTime(now);
             if (!locMastService.updateById(locMast)){
-                throw new CoolException("鏀瑰彉搴撲綅鐘舵�佸け璐�");
+                throw new CoolException("response.change_loc_status_failed");
             }
         } else {
-            throw new CoolException(dto.getLocNo()+"鐩爣搴撲綅宸茶鍗犵敤");
+            throw new CoolException("response.target_loc_occupied");
         }
         return dto.getLocNo();
     }
@@ -189,7 +189,7 @@
             // 鍚姩鍑哄簱寮�濮� 101.鍑哄簱
             stockOut(staNo, locDetlDtos, null, userId);
         } else {
-            throw new CoolException("搴撳瓨涓嶅瓨鍦�");
+            throw new CoolException("response.stock_not_exist");
         }
     }
     /**
@@ -206,7 +206,7 @@
         LocGroupOrder currentGroup = locGroupAscOrder.stream()
                 .filter(g -> g.getRowList().contains(locMast.getRow1()))
                 .findFirst()
-                .orElseThrow(() -> new CoolException("褰撳墠鎺掍笉鍦ㄤ换浣曞嚭搴撲紭鍏堝垎缁勪腑锛屾棤娉曡繘琛屾繁搴撲綅妫�鏌�: row=" + locMast.getRow1()));
+                .orElseThrow(() -> new CoolException("response.current_row_not_in_priority_group"));
 
         List<Integer> orderedRows = currentGroup.getRowList();
 
@@ -235,7 +235,7 @@
 
             // 鍓嶆柟鏈夎揣锛團鐘舵�侊級
             if ("F".equals(prevLoc.getLocSts())) {
-                throw new CoolException(locNo + " 鐨勫墠鏂逛綅缃� " + prevLoc.getLocNo() + " 鏈夎揣锛岀姝㈠嚭搴�");
+                throw new CoolException("response.front_loc_has_goods_forbid_out");
             }
 
             // 鍓嶆柟鏈夊叆搴撲换鍔★紙鍋囪 io_type=100 涓哄叆搴擄紝鏍规嵁瀹為檯璋冩暣锛�
@@ -248,12 +248,12 @@
             );
 
             if (frontTask != null) {
-                throw new CoolException(locNo + " 鐨勫墠鏂逛綅缃� " + prevLoc.getLocNo() + " 瀛樺湪鍏ュ簱浠诲姟锛岀姝㈠嚭搴�");
+                throw new CoolException("response.front_loc_has_in_task_forbid_out");
             }
         }
 
         if (!foundSelf) {
-            throw new CoolException("鍒嗙粍鍐呮湭鎵惧埌鐩爣搴撲綅锛岃妫�鏌ユ暟鎹竴鑷存��: " + locNo);
+            throw new CoolException("response.target_loc_not_found_in_group");
         }
     }
     private boolean isInNormalRule(LocMast lm) {
@@ -388,7 +388,7 @@
         );
 
         if (allSelectedMasts.size() != locNos.size()) {
-            throw new CoolException("閮ㄥ垎閫変腑搴撲綅涓嶅瓨鍦ㄦ垨鏁版嵁寮傚父");
+            throw new CoolException("response.selected_loc_not_exist_or_error");
         }
 
         // 2. 鍖哄垎姝e父搴撲綅锛堥渶瑕佷弗鏍兼繁搴撲綅妫�鏌ワ級涓庤ˉ鍏呭簱浣�
@@ -425,7 +425,7 @@
         allMasts.addAll(supplementMasts);
 
         if (allMasts.isEmpty()) {
-            throw new CoolException("娌℃湁鏈夋晥鐨勫嚭搴撳簱浣�");
+            throw new CoolException("response.no_valid_out_loc");
         }
 
         // 5. 缁熶竴鎸夋帓鍙凤紙row锛夊�掑簭鎺掑簭锛堥珮鎺掑厛鍑猴級
@@ -470,7 +470,7 @@
                 dto = dtos.stream()
                         .filter(d -> d.getLocNo().equals(locNo))
                         .findFirst()
-                        .orElseThrow(() -> new CoolException("鎵句笉鍒板搴旂殑鍑哄簱鏄庣粏锛�" + locNo));
+                        .orElseThrow(() -> new CoolException("response.out_detail_not_found"));
                 // 鐢熸垚宸ヤ綔妗�
                 wrkMast.setWrkNo(workNo);
                 wrkMast.setIoTime(now);
@@ -509,8 +509,8 @@
                     wrkDetl.setModiTime(now);
                     wrkDetl.setModiUser(userId);
                     if (!wrkDetlService.insert(wrkDetl)) {
-                        throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�");
-                    }
+            throw new CoolException("response.save_work_detail_failed");
+        }
                 }
             }else{
                 List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no",locNo));
@@ -555,13 +555,13 @@
                         wrkDetl.setModiTime(now);
                         wrkDetl.setModiUser(userId);
                         if (!wrkDetlService.insert(wrkDetl)) {
-                            throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�");
+                            throw new CoolException("response.save_work_detail_failed");
                         }
                     }
                 }
             }
             if (!wrkMastService.insert(wrkMast)) {
-                throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐ワ紝搴撲綅锛�" + locNo);
+                throw new CoolException("response.save_work_master_failed_loc|" + locNo);
             }
 
             if(locMastNew != null){
@@ -570,10 +570,10 @@
                     locMastNew.setModiUser(userId);
                     locMastNew.setModiTime(now);
                     if (!locMastService.updateById(locMastNew)) {
-                        throw new CoolException("鏇存柊搴撲綅鐘舵�佸け璐ワ紝搴撲綅锛�" + locNo);
+                        throw new CoolException("response.update_loc_status_failed_loc|" + locNo);
                     }
                 } else {
-                    throw new CoolException("搴撲綅鐘舵�佸紓甯革紝闈炵┖鏉跨姸鎬侊細" + locNo);
+                    throw new CoolException("response.loc_status_error_not_empty|" + locNo);
                 }
             }
             // 鏇存柊搴撲綅鐘舵��
@@ -583,11 +583,11 @@
                 locMast.setModiUser(userId);
                 locMast.setModiTime(now);
                 if (!locMastService.updateById(locMast)) {
-                    throw new CoolException("棰勭害搴撲綅鐘舵�佸け璐ワ紝搴撲綅鍙凤細" + locNo);
-                }
-            } else {
-                throw new CoolException(locNo + " 搴撲綅涓嶆槸鍦ㄥ簱鐘舵��");
+                throw new CoolException("response.reserve_loc_status_failed|" + locNo);
             }
+        } else {
+            throw new CoolException("response.loc_not_in_store|" + locNo);
+        }
         }
     }
 
@@ -598,7 +598,7 @@
         List<LocDto> locDtos = taskDto.getLocDtos();
         for (LocDto locDto : locDtos) {
             if (!taskDto.getLocNo().equals(locDto.getLocNo()) && !taskDto.getStaNo().equals(locDto.getStaNo())) {
-                throw new CoolException("璁㈠崟鍑哄簱寮傚父锛岃鑱旂郴绠$悊鍛�");
+                throw new CoolException("response.order_out_error_contact_admin");
             }
         }
         // 鑾峰彇搴撲綅
@@ -630,7 +630,7 @@
         wrkMast.setModiUser(userId);
         wrkMast.setModiTime(now);
         if (!wrkMastService.insert(wrkMast)) {
-            throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐ワ紝鍑哄簱搴撲綅鍙凤細"+taskDto.getLocNo());
+            throw new CoolException("response.save_work_master_failed_out_loc|" + taskDto.getLocNo());
         }
         // 鐢熸垚宸ヤ綔妗f槑缁�
         for (LocDto locDto : taskDto.getLocDtos()) {
@@ -652,11 +652,11 @@
             wrkDetl.setModiTime(now);
             wrkDetl.setModiUser(userId);
             if (!wrkDetlService.insert(wrkDetl)) {
-                throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�");
+                throw new CoolException("response.save_work_detail_failed");
             }
             // 淇敼璁㈠崟鏄庣粏
             if (!orderDetlService.increaseWorkQty(orderDetl.getOrderId(), orderDetl.getMatnr(), orderDetl.getBatch(), locDto.getAnfme())) {
-                throw new CoolException("淇敼璁㈠崟鏄庣粏鏁伴噺澶辫触");
+                throw new CoolException("response.update_order_detail_qty_failed");
             }
             orderService.updateSettle(orderDetl.getOrderId(), 2L, userId);
         }
@@ -667,10 +667,10 @@
             locMast.setModiUser(userId);
             locMast.setModiTime(now);
             if (!locMastService.updateById(locMast)) {
-                throw new CoolException("棰勭害搴撲綅鐘舵�佸け璐ワ紝搴撲綅鍙凤細"+taskDto.getLocNo());
+                throw new CoolException("response.reserve_loc_status_failed_loc|" + taskDto.getLocNo());
             }
         } else {
-            throw new CoolException(taskDto.getLocNo() + "搴撲綅涓嶆槸鍦ㄥ簱鐘舵��");
+            throw new CoolException("response.loc_not_in_store_status|" + taskDto.getLocNo());
         }
     }
 
@@ -708,14 +708,14 @@
         wrkMast.setModiTime(now);
         boolean res = wrkMastService.insert(wrkMast);
         if (!res) {
-            throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�");
+            throw new CoolException("response.save_work_master_failed");
         }
         // 鏇存柊婧愮珯鐐逛俊鎭�
         sourceStaNo.setWrkNo(workNo);
         sourceStaNo.setModiUser(userId);
         sourceStaNo.setModiTime(now);
         if (!basDevpService.updateById(sourceStaNo)){
-            throw new CoolException("鏇存柊婧愮珯澶辫触");
+            throw new CoolException("response.update_source_station_failed");
         }
         // 鏇存柊鐩爣搴撲綅鐘舵��
         LocMast locMast = locMastService.selectById(dto.getLocNo());
@@ -724,10 +724,10 @@
             locMast.setModiUser(userId);
             locMast.setModiTime(now);
             if (!locMastService.updateById(locMast)){
-                throw new CoolException("鏀瑰彉搴撲綅鐘舵�佸け璐�");
+                throw new CoolException("response.change_loc_status_failed");
             }
         } else {
-            throw new CoolException(dto.getLocNo()+"鐩爣搴撲綅宸茶鍗犵敤");
+            throw new CoolException("response.target_loc_occupied|" + dto.getLocNo());
         }
         return dto.getLocNo();
     }
@@ -752,7 +752,7 @@
         );
 
         if (selectedMasts.size() != selectedLocNos.size()) {
-            return LockingCheckResultParam.fail("閮ㄥ垎閫変腑搴撲綅涓嶅瓨鍦ㄦ垨鏁版嵁寮傚父");
+            return LockingCheckResultParam.fail("response.selected_loc_invalid_or_missing");
         }
 
         // 2. 鎸夊垎缁勮仛鍚堥�変腑鐨勫簱浣嶏紙鏀寔澶氬垎缁勶級
@@ -761,7 +761,7 @@
             LocGroupOrder group = locGroupAscOrder.stream()
                     .filter(g -> g.getRowList().contains(lm.getRow1()))
                     .findFirst()
-                    .orElseThrow(() -> new CoolException("鎺掍笉鍦ㄥ嚭搴撳垎缁勯厤缃腑: row=" + lm.getRow1()));
+                    .orElseThrow(() -> new CoolException("response.row_not_in_group_config|" + lm.getRow1()));
 
             groupSelected.computeIfAbsent(group, k -> new ArrayList<>()).add(lm);
         }
@@ -785,7 +785,7 @@
 
             // 妫�鏌ユ槸鍚﹂噸澶嶆垨鏃犳晥
             if (selectedRows.size() != selected.size()) {
-                return LockingCheckResultParam.fail("閫変腑搴撲綅瀛樺湪閲嶅鎴栨棤鏁堟帓");
+                return LockingCheckResultParam.fail("response.selected_loc_duplicate_or_invalid_row");
             }
 
             int minIndex = fullRows.indexOf(selectedRows.get(0));
@@ -794,7 +794,7 @@
             // 1. 蹇呴』鏄繛缁锛堟棤缂哄彛锛�
             if (maxIndex - minIndex + 1 != selectedRows.size()) {
                 return LockingCheckResultParam.fail(
-                        "閫変腑鎺掑繀椤昏繛缁紝鏃犵己鍙c�備粠 " + fullRows.get(minIndex) + " 鍒� " + fullRows.get(maxIndex)
+                        "response.selected_rows_must_be_continuous|" + fullRows.get(minIndex) + "|" + fullRows.get(maxIndex)
                 );
             }
 
@@ -821,15 +821,14 @@
             // 4. 鑷冲皯鏈変竴渚ф竻绌烘墠鍏佽鍑哄簱锛堜慨鏀癸細鏀惧锛屽鏋滀袱渚ч兘鍫碉紝杩斿洖鐗瑰畾閿欒鐮佹垨缁х画锛�
             if (!leftClear && !rightClear) {
                 return LockingCheckResultParam.fail(
-                        "閫変腑娈� " + fullRows.get(minIndex) + "~" + fullRows.get(maxIndex) +
-                                " 涓や晶鍓嶆柟閮芥湁绌烘澘/鏁呴殰锛屾棤娉曞嚭搴擄紙姝e簭鎴栧�掑簭鏂瑰悜閮藉牭濉烇級"
+                        "response.both_sides_blocked|" + fullRows.get(minIndex) + "|" + fullRows.get(maxIndex)
                 );
             }
 
             // 5. 閫変腑娈靛唴鎵�鏈夊簱浣嶅繀椤绘槸 D 鐘舵��
             for (LocMast lm : selected) {
                 if (!"D".equals(lm.getLocSts())) {
-                    return LockingCheckResultParam.fail("閫変腑搴撲綅闈炵┖鏉跨姸鎬�: " + lm.getLocNo());
+                    return LockingCheckResultParam.fail("response.selected_loc_not_empty_status|" + lm.getLocNo());
                 }
             }
 
@@ -878,7 +877,7 @@
         LocGroupOrder group = locGroupAscOrder.stream()
                 .filter(g -> g.getRowList().contains(normalMasts.get(0).getRow1()))
                 .findFirst()
-                .orElseThrow(() -> new CoolException("鍒嗙粍寮傚父"));
+                .orElseThrow(() -> new CoolException("response.group_exception"));
 
         List<Integer> fullRows = group.getRowList();
 
@@ -945,7 +944,7 @@
     @Transactional
     public void emptyPlateOut(EmptyPlateOutParam param, Long userId) {
         if (Cools.isEmpty(param.getOutSite())) {
-            throw new CoolException("绔欑偣涓嶅瓨鍦�");
+            throw new CoolException("response.site_not_exist");
         }
 
         // 浣跨敤鍑哄簱涓撶敤鍒嗙粍閰嶇疆
@@ -957,7 +956,7 @@
         );
 
         if (selectedMasts.size() != param.getLocNos().size()) {
-            throw new CoolException("閮ㄥ垎閫変腑搴撲綅涓嶅瓨鍦ㄦ垨鏁版嵁寮傚父");
+            throw new CoolException("response.selected_loc_abnormal");
         }
 
         // 2. 鍖哄垎姝e父鍒嗙粍鍐呯殑搴撲綅 鍜� 闇�瑕佽ˉ鍏呯殑搴撲綅锛堣鍒欏鐨勶級
@@ -987,7 +986,7 @@
 
             if (!checkResult.isSuccess()) {
                 String errMsg = checkResult.getErrorMessage();
-                if (errMsg.contains("涓や晶鍓嶆柟閮芥湁绌烘澘/鏁呴殰")) {
+                if (errMsg.contains("response.both_sides_blocked")) {
                     // 涓や晶閮藉牭 鈫� 杩涘叆琛ラ綈閫昏緫
                     supplementBothSidesBlocked(normalMasts, locGroupAscOrder, supplementMasts, isLeftSideSupplement);
                 } else {
@@ -1004,7 +1003,7 @@
         allMasts.addAll(supplementMasts);
 
         if (allMasts.isEmpty()) {
-            throw new CoolException("娌℃湁鏈夋晥鐨勭┖鏉垮簱浣嶅彲鍑哄簱");
+            throw new CoolException("response.no_valid_empty_pallet_loc");
         }
 
         // 5. 缁熶竴鎸� row 鈫� bay 鈫� lev 鎺掑簭锛堜粠灏忓埌澶э級
@@ -1038,7 +1037,7 @@
             Integer sourceStaNo = staDesc != null ? staDesc.getCrnStn() : null;
 
             if (Cools.isEmpty(sourceStaNo)) {
-                throw new CoolException("妫�绱㈡簮绔欏け璐ワ紝搴撲綅锛�" + locNo);
+                throw new CoolException("response.query_source_station_failed_loc|" + locNo);
             }
 
             // 璁$畻浼樺厛绾э紙绀轰緥锛氳ˉ鍏呯殑浼樺厛绾х◢浣庯級
@@ -1098,7 +1097,7 @@
             }
 
             if (!wrkMastService.insert(wrkMast)) {
-                throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐ワ紝搴撲綅锛�" + locNo);
+                throw new CoolException("response.save_work_master_failed_loc|" + locNo);
             }
 
             if(locMastNew != null){
@@ -1107,10 +1106,10 @@
                     locMastNew.setModiUser(userId);
                     locMastNew.setModiTime(now);
                     if (!locMastService.updateById(locMastNew)) {
-                        throw new CoolException("鏇存柊搴撲綅鐘舵�佸け璐ワ紝搴撲綅锛�" + locNo);
+                        throw new CoolException("response.update_loc_status_failed_loc|" + locNo);
                     }
                 } else {
-                    throw new CoolException("搴撲綅鐘舵�佸紓甯革紝闈炵┖鏉跨姸鎬侊細" + locNo);
+                    throw new CoolException("response.loc_status_error_not_empty|" + locNo);
                 }
             }
 
@@ -1120,10 +1119,10 @@
                 locMast.setModiUser(userId);
                 locMast.setModiTime(now);
                 if (!locMastService.updateById(locMast)) {
-                    throw new CoolException("鏇存柊搴撲綅鐘舵�佸け璐ワ紝搴撲綅锛�" + locNo);
+                    throw new CoolException("response.update_loc_status_failed_loc|" + locNo);
                 }
             } else {
-                throw new CoolException("搴撲綅鐘舵�佸紓甯革紝闈炵┖鏉跨姸鎬侊細" + locNo);
+                throw new CoolException("response.loc_status_error_not_empty|" + locNo);
             }
         }
     }
@@ -1132,7 +1131,7 @@
     public WrkMast emptyPlateOut(EmptyPlateOutParam param) {
         WrkMast wrkMast = new WrkMast();
         if (Cools.isEmpty(param.getOutSite())) {
-            throw new CoolException("绔欑偣涓嶅瓨鍦�");
+            throw new CoolException("response.site_not_exist");
         }
         for (String locNo : param.getLocNos()) {
             // 鑾峰彇宸ヤ綔鍙�
@@ -1140,7 +1139,7 @@
             // 鑾峰彇搴撲綅
             LocMast locMast = locMastService.selectById(locNo);
             if (Cools.isEmpty(locMast)) {
-                throw new CoolException(locNo+"搴撲綅涓嶅瓨鍦�");
+                throw new CoolException("response.loc_not_exist|" + locNo);
             }
             // 鑾峰彇婧愮珯
             Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>()
@@ -1150,7 +1149,7 @@
             StaDesc staDesc = staDescService.selectOne(wrapper);
             Integer sourceStaNo = staDesc.getCrnStn();
             if (Cools.isEmpty(sourceStaNo)) {
-                throw new CoolException("妫�绱㈡簮绔欏け璐�");
+                throw new CoolException("response.query_source_station_failed");
             }
             Date now = new Date();
             // 淇濆瓨宸ヤ綔妗�
@@ -1173,10 +1172,10 @@
             wrkMast.setAppeTime(now);
             wrkMast.setModiUser(1L);
             wrkMast.setModiTime(now);
-            wrkMast.setMemo("鐢熸垚鑷姩绌烘澘鍑哄簱");
+            wrkMast.setMemo("response.memo_auto_empty_pallet_out");
             boolean res = wrkMastService.insert(wrkMast);
             if (!res) {
-                throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�");
+                throw new CoolException("response.save_work_master_failed");
             }
             // 鏇存柊搴撲綅鐘舵�� D.绌烘澘 -> R.鍑哄簱棰勭害
             if (locMast.getLocSts().equals("D")){
@@ -1184,7 +1183,7 @@
                 locMast.setModiUser(1L);
                 locMast.setModiTime(now);
                 if (!locMastService.updateById(locMast)) {
-                    throw new CoolException("鏇存柊搴撲綅鐘舵�佸け璐�");
+                    throw new CoolException("response.update_loc_status_failed_simple");
                 }
             }
         }
@@ -1210,10 +1209,10 @@
                 // 鍚姩鍑哄簱寮�濮� 107.鐩樼偣鍑哄簱
                 stockOut(staNo, locDetlDtos, IoWorkType.CHECK_OUT, userId);
             }else {
-                throw new CoolException("鎵�閫夊簱浣嶅瓨鍦ㄧ姸鎬佷笉涓篎鐨勫簱浣嶏紝搴撲綅鍙凤細"+locMast.getLocNo()+" 銆佸綋鍓嶇姸鎬侊細"+locMast.getLocSts()+"-"+locMast.getLocSts$());
+                throw new CoolException("response.selected_loc_status_error|" + locMast.getLocNo() + "," + locMast.getLocSts() + "-" + locMast.getLocSts$());
             }
         } else {
-            throw new CoolException("搴撲綅鐗╂枡涓嶅瓨鍦�");
+            throw new CoolException("response.loc_material_not_exist");
         }
     }
 
@@ -1223,17 +1222,17 @@
         LocMast sourceLoc = locMastService.selectById(sourceLocNo);
         List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", sourceLocNo));
         if (Cools.isEmpty(sourceLoc)){
-            throw new CoolException("鏈壘鍒板簱浣�");
+            throw new CoolException("response.loc_not_found");
         }
         LocMast loc = locMastService.selectById(locNo);
         if (Cools.isEmpty(loc)){
-            throw new CoolException("鏈壘鍒板簱浣�");
+            throw new CoolException("response.loc_not_found");
         }
         if (!loc.getLocSts().equals("O") || (!sourceLoc.getLocSts().equals("F") && !sourceLoc.getLocSts().equals("D"))){
-            throw new CoolException("搴撲綅鐘舵�佸凡鏀瑰彉");
+            throw new CoolException("response.loc_status_changed");
         }
         if (!sourceLoc.getCrnNo().equals(loc.getCrnNo())) {
-            throw new CoolException("绉昏浆搴撲綅灞炰簬涓嶅悓鍫嗗灈鏈�");
+            throw new CoolException("response.transfer_loc_diff_crn");
         }
         Date now = new Date();
         // 鑾峰彇宸ヤ綔鍙�
@@ -1260,7 +1259,7 @@
         wrkMast.setModiTime(now);
         boolean res = wrkMastService.insert(wrkMast);
         if (!res) {
-            throw new CoolException("淇濆瓨宸ヤ綔妗eけ璐�");
+            throw new CoolException("response.save_work_master_failed_simple");
         }
         // 宸ヤ綔妗f槑缁嗕繚瀛�
         for (LocDetl locDetl : locDetls) {
@@ -1274,7 +1273,7 @@
             wrkDetl.setModiTime(now);
             wrkDetl.setModiUser(userId);
             if (!wrkDetlService.insert(wrkDetl)) {
-                throw new CoolException("淇濆瓨宸ヤ綔妗f槑缁嗗け璐�");
+                throw new CoolException("response.save_work_detail_failed");
             }
         }
         // 淇敼婧愬簱浣嶇姸鎬�
@@ -1283,10 +1282,10 @@
             sourceLoc.setModiUser(userId);
             sourceLoc.setModiTime(now);
             if (!locMastService.updateById(sourceLoc)){
-                throw new CoolException("鏇存柊婧愬簱浣嶇姸鎬佸け璐�");
+                throw new CoolException("response.update_source_loc_status_failed");
             }
         } else {
-            throw new CoolException("婧愬簱浣嶅嚭搴撳け璐ワ紝鐘舵�侊細"+sourceLoc.getLocSts$());
+            throw new CoolException("response.source_loc_out_failed_status|" + sourceLoc.getLocSts$());
         }
         // 淇敼鐩爣搴撲綅鐘舵��
         if (loc.getLocSts().equals("O")) {
@@ -1294,10 +1293,10 @@
             loc.setModiTime(now);
             loc.setModiUser(userId);
             if (!locMastService.updateById(loc)) {
-                throw new CoolException("鏇存柊鐩爣搴撲綅鐘舵�佸け璐�");
+                throw new CoolException("response.update_target_loc_status_failed");
             }
         } else {
-            throw new CoolException("绉昏浆澶辫触锛岀洰鏍囧簱浣嶇姸鎬侊細"+loc.getLocSts$());
+            throw new CoolException("response.transfer_failed_target_loc_status|" + loc.getLocSts$());
         }
     }
 
@@ -1306,10 +1305,10 @@
     public void completeWrkMast(String workNo, Long userId) {
         WrkMast wrkMast = wrkMastService.selectById(workNo);
         if (Cools.isEmpty(wrkMast)){
-            throw new CoolException(workNo+"宸ヤ綔妗d笉瀛樺湪");
+            throw new CoolException("response.work_master_not_exist|" + workNo);
         }
         if (wrkMast.getWrkSts() == 4 || wrkMast.getWrkSts() == 14) {
-            throw new CoolException("褰撳墠宸ヤ綔妗e凡瀹屾垚");
+            throw new CoolException("response.work_master_completed");
         }
         // 鍑哄簱
         if (wrkMast.getIoType() > 100) {
@@ -1325,9 +1324,9 @@
         wrkMast.setModiTime(now);
         wrkMast.setModiUser(userId);
         // 瀹屾垚鎿嶄綔浜哄憳璁板綍
-        wrkMast.setManuType("鎵嬪姩瀹屾垚");
+        wrkMast.setManuType("response.manu_complete");
         if (!wrkMastService.updateById(wrkMast)) {
-            throw new CoolException("淇敼宸ヤ綔妗eけ璐�");
+            throw new CoolException("response.update_work_master_failed");
         }
     }
 
@@ -1337,10 +1336,10 @@
         param.integrate();
         LocMast locMast = locMastService.selectById(param.getLocNo());
         if (Cools.isEmpty(locMast)) {
-            throw new CoolException("搴撲綅涓嶅瓨鍦�");
+            throw new CoolException("response.loc_not_exist_simple");
         }
         if (!(locMast.getLocSts().equals("F") || locMast.getLocSts().equals("D") || locMast.getLocSts().equals("O"))) {
-            throw new CoolException("褰撳墠搴撲綅涓嶅彲璋冩暣锛佸簱浣嶇姸鎬侊細" + locMast.getLocSts$());
+            throw new CoolException("response.loc_not_adjustable|" + locMast.getLocSts$());
         }
 
         Date now = new Date();
@@ -1362,7 +1361,7 @@
                         // todo 鐩樼偣璁板綍
                         // 淇敼搴撳瓨
                         if (!locDetlService.updateAnfme(adjust.getCount(), locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch())) {
-                            throw new CoolException(locDetl.getLocNo() + "搴撲綅锛�" + locDetl.getMatnr() + "鍟嗗搧锛�" + locDetl.getBatch() + "鎵瑰彿淇敼鏁伴噺澶辫触");
+                            throw new CoolException("response.update_stock_qty_failed|" + locDetl.getLocNo() + "," + locDetl.getMatnr() + "," + locDetl.getBatch());
                         }
                         // 淇濆瓨璋冩暣璁板綍
                         AdjDetl adjDetl = new AdjDetl();
@@ -1387,7 +1386,7 @@
         for (LocDetl locDetl : locDetls) {
             // todo 鐩樼偣璁板綍
             if (!locDetlService.updateAnfme(-1.0D, locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getBatch())) {
-                throw new CoolException("鍒犻櫎" + locDetl.getLocNo() + "搴撲綅锛�" + locDetl.getMatnr() + "鍟嗗搧锛�" + locDetl.getBatch() + "鎵瑰彿搴撳瓨鏄庣粏澶辫触");
+                throw new CoolException("response.delete_stock_detail_failed|" + locDetl.getLocNo() + "," + locDetl.getMatnr() + "," + locDetl.getBatch());
             }
             // 淇濆瓨璋冩暣璁板綍
             AdjDetl adjDetl = new AdjDetl();
@@ -1417,7 +1416,7 @@
             locDetl.setAppeUser(userId);
             locDetl.setAppeTime(now);
             if (!locDetlService.insert(locDetl)) {
-                throw new CoolException("娣诲姞" + locDetl.getLocNo() + "搴撲綅锛�" + locDetl.getMatnr() + "鍟嗗搧锛�" + locDetl.getBatch() + "鎵瑰彿搴撳瓨鏄庣粏澶辫触");
+                throw new CoolException("response.add_stock_detail_failed|" + locDetl.getLocNo() + "," + locDetl.getMatnr() + "," + locDetl.getBatch());
             }
             // 淇濆瓨璋冩暣璁板綍
             AdjDetl adjDetl = new AdjDetl();
@@ -1447,7 +1446,7 @@
         locMast.setModiUser(userId);
         locMast.setModiTime(now);
         if (!locMastService.updateById(locMast)) {
-            throw new CoolException("鏇存柊搴撲綅鐘舵�佸け璐�");
+            throw new CoolException("response.update_loc_status_failed");
         }
     }
 
@@ -1458,7 +1457,7 @@
         Date now = new Date();
         WrkMast wrkMast = wrkMastService.selectById(workNo);
         if (Cools.isEmpty(wrkMast)){
-            throw new CoolException(workNo+"宸ヤ綔妗d笉瀛樺湪");
+            throw new CoolException("response.work_master_not_exist|" + workNo);
         }
         String locNo = ""; // 寰呬慨鏀圭洰鏍囧簱浣�
         String locSts = ""; // 寰呬慨鏀圭洰鏍囧簱浣嶇姸鎬�
@@ -1472,7 +1471,7 @@
                 // 搴撲綅杞Щ锛氭簮搴撲綅
                 LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo());
                 if (Cools.isEmpty(locMast)) {
-                    throw new CoolException("鍙栨秷搴撲綅杞Щ澶辫触锛屾簮搴撲綅涓嶅瓨鍦�:"+ wrkMast.getSourceLocNo());
+                    throw new CoolException("response.cancel_transfer_failed_source_not_exist|" + wrkMast.getSourceLocNo());
                 }
                 locMast.setLocSts(wrkMast.getFullPlt().equalsIgnoreCase("N")?"D":"F");
                 locMast.setModiTime(now);
@@ -1494,7 +1493,7 @@
                 // 搴撲綅杞Щ锛氱洰鏍囧簱浣�
                 LocMast locMast = locMastService.selectById(wrkMast.getLocNo());
                 if (Cools.isEmpty(locMast)) {
-                    throw new CoolException("鍙栨秷搴撲綅杞Щ澶辫触锛岀洰鏍囧簱浣嶄笉瀛樺湪:"+ wrkMast.getSourceLocNo());
+                    throw new CoolException("response.cancel_transfer_failed_target_not_exist|" + wrkMast.getLocNo());
                 }
                 locMast.setLocSts("O");
                 locMast.setModiTime(now);
@@ -1502,7 +1501,7 @@
                 locMastService.updateById(locMast);
             }
         } else {
-            throw new CoolException("褰撳墠宸ヤ綔鐘舵�佹棤娉曞彇娑�");
+            throw new CoolException("response.work_status_cannot_cancel");
         }
 
         //鍙栨秷鍏ュ簱宸ヤ綔妗f椂锛屾煡璇㈢粍鎵樿〃锛屽鏋滄湁灏嗙姸鎬佹敼涓哄緟澶勭悊
@@ -1526,7 +1525,7 @@
             for (WrkDetl wrkDetl : wrkDetls) {
                 if (!Cools.isEmpty(wrkDetl.getOrderNo())) {
                     if (!orderDetlService.decrease(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch(), wrkDetl.getAnfme())) {
-                        throw new CoolException("璁㈠崟鏁版嵁鍥炴粴澶辫触");
+                        throw new CoolException("response.order_data_rollback_failed");
                     }
 
                     //淇敼璁㈠崟涓昏〃鐘舵��,娌℃湁浣滀笟鏁伴噺鏃舵墠鍙互淇敼
@@ -1545,7 +1544,7 @@
                             order.setUpdateTime(now);
                         }
                         if(!orderService.update(order,new EntityWrapper<Order>().eq("order_no",wrkDetl.getOrderNo()))){
-                            throw new CoolException("淇敼璁㈠崟鐘舵�佸け璐�");
+                            throw new CoolException("response.update_order_status_failed");
                         }
                     }
                 }
@@ -1566,15 +1565,15 @@
 //        }
 
         // 鍙栨秷鎿嶄綔浜哄憳璁板綍
-        wrkMast.setManuType("鎵嬪姩鍙栨秷");
+        wrkMast.setManuType("response.manu_cancel");
         wrkMast.setModiUser(userId);
         wrkMast.setModiTime(now);
         if (!wrkMastService.updateById(wrkMast)) {
-            throw new CoolException("鍙栨秷宸ヤ綔妗eけ璐�");
+            throw new CoolException("response.cancel_work_master_failed");
         }
         // 淇濆瓨宸ヤ綔涓绘。鍘嗗彶妗�
         if (!wrkMastLogService.save(wrkMast.getWrkNo())) {
-            throw new CoolException("淇濆瓨宸ヤ綔鍘嗗彶妗eけ璐�, workNo = " + wrkMast.getWrkNo());
+            throw new CoolException("response.save_work_log_failed|" + wrkMast.getWrkNo());
         }
         // 鍒犻櫎宸ヤ綔涓绘。
         boolean wrkMastRes = wrkMastService.deleteById(wrkMast);
@@ -1591,14 +1590,14 @@
         // 淇敼搴撲綅鐘舵��
         LocMast locMast = locMastService.selectById(locNo);
         if (Cools.isEmpty(locMast)) {
-            throw new CoolException("鍙栨秷宸ヤ綔妗eけ璐ワ紝搴撲綅涓嶅瓨鍦�:"+ locNo);
+            throw new CoolException("response.cancel_work_master_failed_loc_not_exist|" + locNo);
         }
         locMast.setLocSts(locSts);
         locMast.setModiTime(now);
         locMast.setModiUser(userId);
         boolean locMastRes = locMastService.updateById(locMast);
         if (!wrkMastRes || !locMastRes) {
-            throw new CoolException("淇濆瓨鏁版嵁澶辫触");
+            throw new CoolException("response.save_data_failed");
         }
 
         //wms鍙栨秷浠诲姟 鍚屾椂璋冪敤wcs浠诲姟鍙栨秷鎺ュ彛閫氱煡wcs
@@ -1623,7 +1622,7 @@
                 flag = true;
             }else {
                 log.error("wms鍙栨秷浠诲姟涓嬪彂wcs澶辫触--->url锛歿}锛況equest锛歿}锛況esponse锛歿}", url+"/"+cancel, JSON.toJSONString(wrkCancel), response);
-                throw new CoolException("wms鍙栨秷浠诲姟涓嬪彂wcs澶辫触");
+                throw new CoolException("response.wms_cancel_task_wcs_failed");
             }
         }catch (Exception e){
             log.error("fail", e);
@@ -1652,15 +1651,15 @@
     public void pickWrkMast(String workNo, Long userId) {
         WrkMast wrkMast = wrkMastService.selectById(workNo);
         if (Cools.isEmpty(wrkMast)){
-            throw new CoolException(workNo+"宸ヤ綔妗d笉瀛樺湪");
+            throw new CoolException("response.work_master_not_exist|" + workNo);
         }
         // 鍏ュ嚭搴撶被鍨嬪垽鏂�
         if (wrkMast.getIoType() != 103 && wrkMast.getIoType() != 104 && wrkMast.getIoType() != 107) {
-            throw new CoolException("褰撳墠鍏ュ嚭搴撶被鍨嬫棤娉曡繘琛屾搷浣�");
+            throw new CoolException("response.io_type_cannot_operate");
         }
         // 宸ヤ綔鐘舵�佸垽鏂�
         if (wrkMast.getWrkSts() < 11 || wrkMast.getWrkSts() == 15) {
-            throw new CoolException("褰撳墠宸ヤ綔鐘舵�佹棤娉曡繘琛屾搷浣�");
+            throw new CoolException("response.work_status_cannot_operate");
         }
         // 淇濆瓨宸ヤ綔鏄庣粏妗e巻鍙叉。
 //        if (!wrkDetlLogService.save(wrkMast.getWrkNo())) {
@@ -1668,7 +1667,7 @@
 //        }
         // 淇濆瓨宸ヤ綔涓绘。鍘嗗彶妗�
         if (!wrkMastLogService.save(wrkMast.getWrkNo())) {
-            throw new CoolException("淇濆瓨宸ヤ綔涓绘。鍘嗗彶妗eけ璐�");
+            throw new CoolException("response.save_work_master_log_failed");
         }
         // 鑾峰彇鐩爣绔�
         Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>()
@@ -1677,7 +1676,7 @@
                 .eq("crn_no", wrkMast.getCrnNo()); // 鍫嗗灈鏈哄彿
         StaDesc staDesc = staDescService.selectOne(wrapper);
         if (Cools.isEmpty(staDesc)) {
-            throw new CoolException("鍏ュ簱璺緞涓嶅瓨鍦�");
+            throw new CoolException("response.in_route_not_exist");
         }
         Date now = new Date();
         // 鍫嗗灈鏈虹珯鐐�(鐩爣绔�)
@@ -1692,7 +1691,7 @@
         wrkMast.setModiTime(now);
         wrkMast.setModiUser(userId);
         if (!wrkMastService.updateById(wrkMast)) {
-            throw new CoolException("鏇存柊宸ヤ綔妗f暟鎹姸鎬佸け璐�");
+            throw new CoolException("response.update_work_master_status_failed");
         }
         // 淇敼搴撲綅鐘舵�� Q.鎷f枡/鐩樼偣/骞舵澘鍐嶅叆搴�
         LocMast locMast = locMastService.selectById(wrkMast.getLocNo());
@@ -1700,14 +1699,14 @@
         locMast.setModiTime(now);
         locMast.setModiUser(userId);
         if (!locMastService.updateById(locMast)) {
-            throw new CoolException("淇敼搴撲綅鐘舵�佸け璐�");
+            throw new CoolException("response.update_loc_status_failed");
         }
     }
 
     @Override
     public StartupDto createWaitPainWrkMastStart(List<WaitPakin> list, Long userId) {
         if (Cools.isEmpty(list)) {
-            throw new CoolException("鍏ュ簱閫氱煡妗d笉鑳戒负绌�");
+            throw new CoolException("response.wait_pakin_empty");
         }
         LocTypeDto locTypeDto = new LocTypeDto();
         locTypeDto.setLocType1((short) 1);
@@ -1719,7 +1718,7 @@
     public String dealPreHaveStart(Integer wrkNo, Long userId) {
         WrkMast wrkMast = wrkMastService.selectById(wrkNo);
         if (wrkMast == null) {
-            throw new CoolException("浠诲姟宸插け鏁�");
+            throw new CoolException("response.task_invalid");
         }
         String locNo = wrkMast.getLocNo();
         LocMast locMast = locMastService.selectById(locNo);
@@ -1769,14 +1768,14 @@
         }
 
         if (targetLoc == null) {
-            throw new CoolException("鎿嶄綔澶辫触锛屽綋鍓嶄粨搴撴壘涓嶅埌绌哄簱浣�");
+            throw new CoolException("response.no_empty_loc_found");
         }
 
         Date now = new Date();
         // 淇敼宸ヤ綔妗�
         StaDesc staDesc = staDescService.queryCrnStn(targetLoc.getCrnNo());
         if (Cools.isEmpty(staDesc)) {
-            throw new CoolException("鍏ュ簱璺緞涓嶅瓨鍦�");
+            throw new CoolException("response.in_route_not_exist");
         }
         wrkMast.setWrkSts(2L);
         wrkMast.setLocNo(targetLoc.getLocNo());
@@ -1786,7 +1785,7 @@
         wrkMast.setModiUser(userId);
         wrkMast.setPreHave("N");
         if (!wrkMastService.updateById(wrkMast)) {
-            throw new CoolException("淇敼宸ヤ綔妗eけ璐�");
+            throw new CoolException("response.update_work_master_failed");
         }
         // 淇敼搴撲綅鐘舵�� O ===>>> S
         if (targetLoc.getLocSts().equals("O")){
@@ -1794,10 +1793,10 @@
             targetLoc.setModiUser(userId);
             targetLoc.setModiTime(now);
             if (!locMastService.updateById(targetLoc)){
-                throw new CoolException("鏀瑰彉搴撲綅鐘舵�佸け璐�");
+                throw new CoolException("response.update_loc_status_failed");
             }
         } else {
-            throw new CoolException(targetLoc.getLocNo()+"鐩爣搴撲綅宸茶鍗犵敤");
+            throw new CoolException("response.target_loc_occupied|" + targetLoc.getLocNo());
         }
         // 绂佺敤寮傚父搴撲綅
 //        locMast.setLocSts("X"); // X.绂佺敤
@@ -1814,16 +1813,16 @@
     public void turnMatLocDetl(EmptyPlateOutParam param, Long userId) {
         Mat mat = matService.selectOne(new EntityWrapper<Mat>().eq("id", param.getMatId()));
         if (Cools.isEmpty(mat)){
-            throw new CoolException("鐩爣搴撲綅鍟嗗搧缂栫爜鏈夎锛�");
+            throw new CoolException("response.target_loc_mat_error");
         }
         List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr", param.getLocDetls().get(0).getMatnr()));
         if (Cools.isEmpty(locDetls) || locDetls.size()<1){
-            throw new CoolException("寰呬慨鏀瑰晢鍝佹棤搴撳瓨锛屾棤闇�淇敼锛�  鍝佸彿锛�"+param.getLocDetls().get(0).getMatnr());
+            throw new CoolException("response.mat_no_stock_no_need_update|" + param.getLocDetls().get(0).getMatnr());
         }
         try {
             locDetlService.updateMatTurn(param.getLocDetls().get(0).getMatnr(),mat.getMatnr());
         }catch (Exception e){
-            throw new CoolException("瀵规暟鎹簱淇敼鍑洪敊锛�");
+            throw new CoolException("response.db_update_error");
         }
         for (LocDetl locDetl:locDetls){
             // 淇濆瓨璋冩暣璁板綍

--
Gitblit v1.9.1