瀏覽代碼

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

YL2767 2 月之前
父節點
當前提交
9c916006f5
共有 1 個檔案被更改,包括 14 行新增1 行删除
  1. 14
    1
      src/main/java/com/th/demo/service/impl/ware/OutServiceImpl.java

+ 14
- 1
src/main/java/com/th/demo/service/impl/ware/OutServiceImpl.java 查看文件

@@ -183,7 +183,7 @@ public class OutServiceImpl implements OutService {
183 183
                 int currentLayer = Integer.parseInt(storeMapper.selectLayerByStackId(listStore.get(0).getStack().getId(), belongId));
184 184
                 int min = listStore.get(0).getLayer();
185 185
                 int max = listStore.get(listStore.size() - 1).getLayer();
186
-                if (currentLayer != max) {
186
+                /*if (currentLayer != max) {
187 187
                     throw new Exception("库房:" + listStore.get(m).getWare().getName() + ",垛位:" + listStore.get(m).getStack().getName() + ",出库物料不在最上层,无法出库!");
188 188
                     // result = JSONTools.toString(ResponseCodeMsg.CODE_EX, "必须选择最上层出库!");
189 189
                 } else if (!WareTools.checkOrder(listStore)) {
@@ -203,7 +203,20 @@ public class OutServiceImpl implements OutService {
203 203
 
204 204
                     }
205 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 222
         return result;

Loading…
取消
儲存