|
@@ -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;
|