Kaynağa Gözat

去掉出库时的最上层的条件判定

YL2767 2 ay önce
ebeveyn
işleme
9c916006f5

+ 14
- 1
src/main/java/com/th/demo/service/impl/ware/OutServiceImpl.java Dosyayı Görüntüle

183
                 int currentLayer = Integer.parseInt(storeMapper.selectLayerByStackId(listStore.get(0).getStack().getId(), belongId));
183
                 int currentLayer = Integer.parseInt(storeMapper.selectLayerByStackId(listStore.get(0).getStack().getId(), belongId));
184
                 int min = listStore.get(0).getLayer();
184
                 int min = listStore.get(0).getLayer();
185
                 int max = listStore.get(listStore.size() - 1).getLayer();
185
                 int max = listStore.get(listStore.size() - 1).getLayer();
186
-                if (currentLayer != max) {
186
+                /*if (currentLayer != max) {
187
                     throw new Exception("库房:" + listStore.get(m).getWare().getName() + ",垛位:" + listStore.get(m).getStack().getName() + ",出库物料不在最上层,无法出库!");
187
                     throw new Exception("库房:" + listStore.get(m).getWare().getName() + ",垛位:" + listStore.get(m).getStack().getName() + ",出库物料不在最上层,无法出库!");
188
                     // result = JSONTools.toString(ResponseCodeMsg.CODE_EX, "必须选择最上层出库!");
188
                     // result = JSONTools.toString(ResponseCodeMsg.CODE_EX, "必须选择最上层出库!");
189
                 } else if (!WareTools.checkOrder(listStore)) {
189
                 } else if (!WareTools.checkOrder(listStore)) {
203
 
203
 
204
                     }
204
                     }
205
                     result = Tools.moreThanZeroResultJSON(num);
205
                     result = Tools.moreThanZeroResultJSON(num);
206
+                }*/
207
+                for (int i = 0; i < listStore.size(); i++) {
208
+                    OutRecord outRecord = getOutRecord(listStore.get(i), distribution.getId(), "1", userId);
209
+                    num += outRecordMapper.insert(outRecord);
210
+
211
+                    AccountDetail accountDetail = getAccountDetail(listStore.get(i), distribution.getSumWeight(), distribution.getSuttle(), userId, belongId);
212
+                    num += accountDetailMapper.insert(accountDetail);
213
+
214
+                    listStore.get(i).setOutId(outRecord.getId());
215
+                    listStore.get(i).setOutFlag("1");
216
+                    num += storeMapper.updateByPrimaryKey(listStore.get(i));
217
+
206
                 }
218
                 }
219
+                result = Tools.moreThanZeroResultJSON(num);
207
             }
220
             }
208
         }
221
         }
209
         return result;
222
         return result;

Loading…
İptal
Kaydet