|
@@ -29,12 +29,8 @@ import com.github.zuihou.business.productionReadyCenter.dao.AAutoNodeLogMapper;
|
|
|
import com.github.zuihou.business.productionReadyCenter.dao.BBomMapper;
|
|
|
import com.github.zuihou.business.productionReadyCenter.dao.BomProcedureMapper;
|
|
|
import com.github.zuihou.business.productionReadyCenter.dao.BomProcedureProgramMapper;
|
|
|
-import com.github.zuihou.business.productionReadyCenter.entity.AAutoNodeLog;
|
|
|
-import com.github.zuihou.business.productionReadyCenter.entity.BBom;
|
|
|
-import com.github.zuihou.business.productionReadyCenter.entity.BomProcedure;
|
|
|
-import com.github.zuihou.business.productionReadyCenter.service.AAutoNodeLogService;
|
|
|
-import com.github.zuihou.business.productionReadyCenter.service.BomProcedureProductionresourceService;
|
|
|
-import com.github.zuihou.business.productionReadyCenter.service.BomProcedureService;
|
|
|
+import com.github.zuihou.business.productionReadyCenter.entity.*;
|
|
|
+import com.github.zuihou.business.productionReadyCenter.service.*;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourceBizMapper;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourcePositionMapper;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ResourceAutoCodeMapper;
|
|
@@ -174,6 +170,9 @@ public class TaskWorkNode {
|
|
|
@Autowired
|
|
|
private OrderTaskService orderTaskService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CuttingToolService cuttingToolService;
|
|
|
+
|
|
|
//总控端口
|
|
|
private final String ZK_port = "120";
|
|
|
|
|
@@ -421,9 +420,9 @@ public class TaskWorkNode {
|
|
|
planMapper.deleteById(plan.getId());
|
|
|
orderMapper.deleteById(order.getId());
|
|
|
|
|
|
- //原订单恢复初始化
|
|
|
+ //地轨原订单恢复初始化
|
|
|
//获取原订单零件批次号
|
|
|
- if(StringUtils.isNotEmpty(orderTask.getConfBatchNo())){
|
|
|
+ if(StringUtils.isNotEmpty(orderTask.getConfBatchNo()) && orderTask.getIsMachine().equals("1")){
|
|
|
String hostSystemUrl = (null == msgUtil.redis_get(ParameterKey.PARAMETERS)? "": ((Map<String,String>)msgUtil.redis_get(ParameterKey.PARAMETERS)).get(ParameterKey.ECSSYSTEMURL).toString());
|
|
|
String eraseWorkPieceUrl = hostSystemUrl + "/api/authority/toolbar/eraseWorkPiece";
|
|
|
JSONObject params = new JSONObject();
|
|
@@ -434,6 +433,40 @@ public class TaskWorkNode {
|
|
|
stockInfoMapper.delete(new LbqWrapper<StockInfo>().eq(StockInfo::getCompleteBatchNo, orderTask.getConfBatchNo()));
|
|
|
}
|
|
|
|
|
|
+ //天轨刀具换刀重新出发取操作流程
|
|
|
+ if(StringUtils.isNotEmpty(orderTask.getConfBatchNo()) && orderTask.getIsMachine().equals("0")){
|
|
|
+ String confBatchNo = orderTask.getConfBatchNo();
|
|
|
+ List<CuttingTool> cuttingToolList = cuttingToolService.list(new LbqWrapper<CuttingTool>().eq(CuttingTool::getCuttingToolNo, confBatchNo).or().eq(CuttingTool::getCuttingToolName, confBatchNo));
|
|
|
+ if(cuttingToolList.size() == 0 ){
|
|
|
+ msgUtil.createWarnLog("指定待取刀具数据不存在", "DataException");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ CuttingTool cuttingTool = cuttingToolList.get(0);
|
|
|
+ StockInfo stockInfo = stockInfoMapper.selectOne(new LbqWrapper<StockInfo>().eq(StockInfo::getGoodsType, "6").eq(StockInfo::getGoodsId, cuttingTool.getId()));
|
|
|
+ if(null == stockInfo){
|
|
|
+ msgUtil.createWarnLog("指定待取刀具库位信息不存在", "DataException");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String hostSystemUrl = (null == msgUtil.redis_get(ParameterKey.PARAMETERS)? "": ((Map<String,String>)msgUtil.redis_get(ParameterKey.PARAMETERS)).get(ParameterKey.ECSSYSTEMURL).toString());
|
|
|
+ String addCutToolTaskUrl = hostSystemUrl + "/api/authority/toolbar/addCutToolTask";
|
|
|
+
|
|
|
+ //触发取刀架刀具放入机床
|
|
|
+ //同步添加天轨处理订单
|
|
|
+ JSONObject params = new JSONObject();
|
|
|
+ ProductionresourcePosition productionresourcePosition = productionresourcePositionService.getOne(new LbqWrapper<ProductionresourcePosition>().eq(ProductionresourcePosition::getStorgeId, stockInfo.getStorgeId()).last("LIMIT 1"));
|
|
|
+ params.put("start", "CT_"+ productionresourcePosition.getPointId());
|
|
|
+ params.put("goal", orderTask.getStart());
|
|
|
+ params.put("cutGoalNo", orderTask.getCutStartNo());
|
|
|
+ params.put("cutStartNo", "0");
|
|
|
+ params.put("goalType", productionresourcePosition.getCode());
|
|
|
+
|
|
|
+ //添加刀具取任务
|
|
|
+ msgUtil.httpForPost(addCutToolTaskUrl, params.toJSONString());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ //删除自定义订单内容
|
|
|
+ orderTaskService.removeById(orderTask.getId());
|
|
|
}
|
|
|
|
|
|
}
|