浏览代码

去掉取消入库的限制

YL2767 2 个月前
父节点
当前提交
d3533263be
共有 1 个文件被更改,包括 13 次插入12 次删除
  1. 13
    12
      src/main/java/com/th/demo/service/impl/ware/InServiceImpl.java

+ 13
- 12
src/main/java/com/th/demo/service/impl/ware/InServiceImpl.java 查看文件

@@ -146,25 +146,26 @@ public class InServiceImpl implements InService {
146 146
             int currentLayer = Integer.parseInt(storeMapper.selectLayerByStackId(listStore.get(0).getStack().getId(), belongId));
147 147
             int min = listStore.get(0).getLayer();
148 148
             int max = listStore.get(listStore.size() - 1).getLayer();
149
-            if (currentLayer != max) {
149
+            /*if (currentLayer != max) {
150 150
                 result = JSONTools.toString(ResponseCodeMsg.CODE_EX, "必须包含最上层取消出库!");
151 151
             } else if (!WareTools.checkOrder(listStore)) {
152 152
                 result = JSONTools.toString(ResponseCodeMsg.CODE_EX, "请选中连续数据取消出库!");
153 153
             } else {
154
-                for (int i = 0; i < listStore.size(); i++) {
155
-                    int effStoreCnt = storeMapper.selEffStore(listStore.get(i).getPlateNo());
156
-                    if(effStoreCnt == 0){
157
-                        return JSONTools.toString(1,"库存中不存在板号"+listStore.get(i).getPlateNo()+",无法取消出库");
158
-                    }
159
-                    InRecord inRecord = getInRecord(listStore.get(i), "0", userId);
160
-                    num += inRecordMapper.insert(inRecord);
161 154
 
162
-                    //listStore.get(i).setOutId(outRecord.getId());
163
-                    listStore.get(i).setCancelFlag("1");
164
-                    num += storeMapper.updateByPrimaryKey(listStore.get(i));
155
+            }*/
156
+            for (int i = 0; i < listStore.size(); i++) {
157
+                int effStoreCnt = storeMapper.selEffStore(listStore.get(i).getPlateNo());
158
+                if(effStoreCnt == 0){
159
+                    return JSONTools.toString(1,"库存中不存在板号"+listStore.get(i).getPlateNo()+",无法取消出库");
165 160
                 }
166
-                result = Tools.moreThanZeroResultJSON(num);
161
+                InRecord inRecord = getInRecord(listStore.get(i), "0", userId);
162
+                num += inRecordMapper.insert(inRecord);
163
+
164
+                //listStore.get(i).setOutId(outRecord.getId());
165
+                listStore.get(i).setCancelFlag("1");
166
+                num += storeMapper.updateByPrimaryKey(listStore.get(i));
167 167
             }
168
+            result = Tools.moreThanZeroResultJSON(num);
168 169
         }
169 170
         return result;
170 171
     }

正在加载...
取消
保存