|
@@ -1645,7 +1645,32 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
|
|
|
return rkresult;
|
|
|
}
|
|
|
return R.success("");
|
|
|
- } else if (DemoLineConstant.DEMOLINE_STOCK_TYPE_HAND_CK.equals(stockType)) {//手抓出库
|
|
|
+ } else if (DemoLineConstant.DEMOLINE_STOCK_TYPE_ALL_CRK_WITH_PLATE.equals(stockType)) {//托板出入库
|
|
|
+ List<BomProcedureMeterial> meterialList = bomProcedureMeterialService.list(Wraps.<BomProcedureMeterial>lbQ().eq(BomProcedureMeterial::getId, task.getProcedureMeterialId()));
|
|
|
+ R<String> ckresult = stockInfoService.meterialStockOut(meterialList.get(0), Long.parseLong(srcStorgeId), task.getCompleteBatchNo());
|
|
|
+ R<String> rkresult = null;
|
|
|
+ if (ckresult.getIsSuccess()) {
|
|
|
+ rkresult = stockInfoService.meterialStockIn(meterialList.get(0), Long.parseLong(targetStorgeId), ckresult.getData(), task.getCompleteBatchNo());
|
|
|
+ }
|
|
|
+ List<BomProcedureTray> trayList = procedureTrayService.list(Wraps.<BomProcedureTray>lbQ().eq(BomProcedureTray::getGroupId, task.getProcedureTrayGroupId()));
|
|
|
+ R<String> result = null;
|
|
|
+ if (trayList != null && trayList.size() > 0) {
|
|
|
+ for (BomProcedureTray tray : trayList) {
|
|
|
+ result = stockInfoService.procedureTrayStockOut(tray, Long.parseLong(srcStorgeId));
|
|
|
+ if (result.getIsSuccess()) {
|
|
|
+ result = stockInfoService.procedureTrayStockIn(tray, Long.parseLong(targetStorgeId), result.getData(), task.getCompleteBatchNo());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ R<StockInfo> ckresultStock = stockInfoService.plateStockOut(Long.parseLong(srcStorgeId));
|
|
|
+ R<String> rkresultStock = null;
|
|
|
+ if (ckresultStock.getIsSuccess()) {
|
|
|
+ rkresultStock = stockInfoService.plateStockIn(Long.parseLong(targetStorgeId), ckresultStock.getData());
|
|
|
+ return rkresultStock;
|
|
|
+ }
|
|
|
+ return R.success("");
|
|
|
+ }else if (DemoLineConstant.DEMOLINE_STOCK_TYPE_HAND_CK.equals(stockType)) {//手抓出库
|
|
|
//WMS只要把原材料入库
|
|
|
R<String> ckresult = stockInfoService.handStockOut();
|
|
|
return ckresult;
|