|
@@ -7,6 +7,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.github.zuihou.base.service.SuperServiceImpl;
|
|
|
import com.github.zuihou.business.DemoLine.DemoCacheKey;
|
|
|
import com.github.zuihou.business.DemoLine.DemoLineConstant;
|
|
|
+import com.github.zuihou.business.edgeLibrary.dao.StockInfoMapper;
|
|
|
+import com.github.zuihou.business.edgeLibrary.dao.StorgeMapper;
|
|
|
+import com.github.zuihou.business.edgeLibrary.entity.StockInfo;
|
|
|
+import com.github.zuihou.business.edgeLibrary.entity.Storge;
|
|
|
import com.github.zuihou.business.mq.HandModeWorkNode;
|
|
|
import com.github.zuihou.business.operationManagementCenter.dao.*;
|
|
|
import com.github.zuihou.business.operationManagementCenter.dto.OrderProductUpdateDTO;
|
|
@@ -70,6 +74,9 @@ public class WorkpieceServiceImpl extends SuperServiceImpl<WorkpieceMapper, TWor
|
|
|
@Autowired
|
|
|
private HandModeWorkNode handModeWorkNode;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private StorgeMapper storgeMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public IPage<TWorkpiece> pageList(IPage page, LbqWrapper<TWorkpiece> wrapper) {
|
|
|
return baseMapper.pageList(page, wrapper);
|
|
@@ -166,4 +173,56 @@ public class WorkpieceServiceImpl extends SuperServiceImpl<WorkpieceMapper, TWor
|
|
|
BaseContextHandler.setTenant("0000");
|
|
|
return handModeWorkNode.getRequestParam(map);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String handMove(Map conMap) {
|
|
|
+ BaseContextHandler.setTenant("0000");
|
|
|
+ String startPointId = conMap.get("startPointId")==null?"":conMap.get("startPointId").toString();
|
|
|
+ String endPointId = conMap.get("endPointId")==null?"":conMap.get("endPointId").toString();
|
|
|
+ JSONObject callBackJson = new JSONObject();
|
|
|
+ callBackJson.put("srcPosition",startPointId);
|
|
|
+ callBackJson.put("targetPostion",endPointId);
|
|
|
+ return taskNodeService.handModeStock(callBackJson).getData();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String delete(Map conMap) {
|
|
|
+ BaseContextHandler.setTenant("0000");
|
|
|
+ return taskNodeService.handModeStockOut(conMap).getData();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String lock(Map map) {
|
|
|
+ BaseContextHandler.setTenant("0000");
|
|
|
+ String pointId = map.get("pointId")==null?"":map.get("pointId").toString();
|
|
|
+ String lockType = map.get("lockType")==null?"":map.get("lockType").toString();
|
|
|
+
|
|
|
+ List<ProductionresourcePosition> pointList = productionresourcePositionMapper.selectList(Wraps.<ProductionresourcePosition>lbQ().eq(ProductionresourcePosition::getPointId, pointId));
|
|
|
+ if(CollectionUtil.isEmpty(pointList)){
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ ProductionresourcePosition position = pointList.get(0);
|
|
|
+ //获取
|
|
|
+ List<Storge> list = storgeMapper.selectList(Wraps.<Storge>lbQ().eq(Storge::getId, position.getStorgeId()));
|
|
|
+
|
|
|
+
|
|
|
+ if(CollectionUtil.isEmpty(list)){
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ Storge storge = list.get(0);
|
|
|
+
|
|
|
+ if("1".equals(lockType)){//锁定
|
|
|
+ storge.setLockStatus("0");
|
|
|
+ storgeMapper.updateById(storge);
|
|
|
+ }else if("0".equals(lockType)){//解锁
|
|
|
+ storge.setLockStatus("1");
|
|
|
+ storgeMapper.updateById(storge);
|
|
|
+ }
|
|
|
+
|
|
|
+ return "";
|
|
|
+
|
|
|
+ }
|
|
|
}
|