|
@@ -1551,6 +1551,7 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
|
|
|
public R<String> handModeStockOut(Map conMap) {
|
|
|
String pointId = conMap.get("pointId")==null?"":conMap.get("pointId").toString();
|
|
|
String category = conMap.get("category")==null?"":conMap.get("category").toString();
|
|
|
+ String goodsId = conMap.get("goodsId")==null?"":conMap.get("goodsId").toString();
|
|
|
Map queryMap = new HashMap();
|
|
|
queryMap.put("pointId", pointId);
|
|
|
List<ProductionresourcePosition> list = productionresourcePositionMapper.getPPList(queryMap);
|
|
@@ -1558,9 +1559,9 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
|
|
|
R<String> result = R.success("");
|
|
|
|
|
|
for(ProductionresourcePosition p:list){
|
|
|
- if(!category.equals(p.getCategory())){
|
|
|
+ String stockGoodsId = p.getGoodsId()==null?"":p.getGoodsId().toString();
|
|
|
+ if(!goodsId.equals(stockGoodsId))
|
|
|
continue;
|
|
|
- }
|
|
|
|
|
|
if("1".equals(p.getCategory())||"2".equals(p.getCategory())){//托盘夹具
|
|
|
BomProcedureTray tray = new BomProcedureTray();
|
|
@@ -1579,4 +1580,39 @@ public class TaskNodeServiceImpl extends SuperServiceImpl<TaskNodeMapper, TaskNo
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public R<String> handModeStockIn(Map conMap) {
|
|
|
+ String pointId = conMap.get("pointId")==null?"":conMap.get("pointId").toString();
|
|
|
+ String category = conMap.get("category")==null?"":conMap.get("category").toString();
|
|
|
+ String goodsId = conMap.get("goodsId")==null?"":conMap.get("goodsId").toString();
|
|
|
+ Map queryMap = new HashMap();
|
|
|
+ queryMap.put("pointId", pointId);
|
|
|
+ List<ProductionresourcePosition> list = productionresourcePositionMapper.getPPList(queryMap);
|
|
|
+
|
|
|
+ R<String> result = R.success("");
|
|
|
+
|
|
|
+ for(ProductionresourcePosition p:list){
|
|
|
+ String stockGoodsId = p.getGoodsId()==null?"":p.getGoodsId().toString();
|
|
|
+ if(!goodsId.equals(stockGoodsId))
|
|
|
+ continue;
|
|
|
+
|
|
|
+ if("1".equals(p.getCategory())||"2".equals(p.getCategory())){//托盘夹具
|
|
|
+ BomProcedureTray tray = new BomProcedureTray();
|
|
|
+ tray.setTrayId(p.getGoodsId());
|
|
|
+ result = stockInfoService.procedureTrayStockIn(tray, list.get(0).getStorgeId(), "", "");
|
|
|
+ }
|
|
|
+
|
|
|
+ if("4".equals(p.getCategory())){//原材料
|
|
|
+ BomProcedureMeterial meterial = new BomProcedureMeterial();
|
|
|
+ meterial.setMeterialId(p.getGoodsId());
|
|
|
+ result = stockInfoService.meterialStockIn(meterial, list.get(0).getStorgeId(), "","");
|
|
|
+ }
|
|
|
+ if (!result.getIsSuccess()) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|