|
@@ -499,6 +499,19 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
}else if (BizConstant.ROBOT_TYPE_NOCACHE.equals(zoneService.getRobotTypebyZone(zoneName))) {
|
|
}else if (BizConstant.ROBOT_TYPE_NOCACHE.equals(zoneService.getRobotTypebyZone(zoneName))) {
|
|
TaskNode nextTaskNode = taskNodeService.getNextNTaskNode(taskNode, 1);
|
|
TaskNode nextTaskNode = taskNodeService.getNextNTaskNode(taskNode, 1);
|
|
|
|
|
|
|
|
+ BomProcedure procedure = bomProcedureService.getById(task.getProcedureId());
|
|
|
|
+ String zoneType = (null == msgUtil.redis_get(ParameterKey.PARAMETERS)? "": ((Map<String,String>)msgUtil.redis_get(ParameterKey.PARAMETERS)).get(ParameterKey.ZONE_TYPE).toString());
|
|
|
|
+ if(zoneType.equals(ParameterKey.ZONE_YJ)
|
|
|
|
+ && ("1".equals(procedure.getThreeDimensionalConf()) || "1".equals(procedure.getThreeDimensionalDeviationConf()))){
|
|
|
|
+ TaskNode nextTwoTaskNode = taskNodeService.getNextNTaskNode(nextTaskNode, 1);
|
|
|
|
+ if("1".equals(procedure.getThreeDimensionalConf())){
|
|
|
|
+ nextTwoTaskNode.setNodeType("3");
|
|
|
|
+ }else if( "1".equals(procedure.getThreeDimensionalDeviationConf())){
|
|
|
|
+ nextTwoTaskNode.setNodeType("5");
|
|
|
|
+ }
|
|
|
|
+ taskNodeService.updateById(nextTwoTaskNode);
|
|
|
|
+ }
|
|
|
|
+
|
|
//获取当前位置
|
|
//获取当前位置
|
|
if(CollectionUtil.isNotEmpty(flikustockInfos)){//
|
|
if(CollectionUtil.isNotEmpty(flikustockInfos)){//
|
|
startStore = storgeMapper.selectById(flikustockInfos.get(0).getStorgeId());
|
|
startStore = storgeMapper.selectById(flikustockInfos.get(0).getStorgeId());
|
|
@@ -687,17 +700,35 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
// end add by yejian on 20220819 for 将机器人上的缓存位利用历来:如果缓存位数量n-1 >= 1,则可以将工件不放到线边库,直接放在缓存位上暂存后轮训线边库逻辑
|
|
// end add by yejian on 20220819 for 将机器人上的缓存位利用历来:如果缓存位数量n-1 >= 1,则可以将工件不放到线边库,直接放在缓存位上暂存后轮训线边库逻辑
|
|
}else if (BizConstant.ROBOT_TYPE_NOCACHE.equals(zoneService.getRobotTypebyZone(zoneName))) {
|
|
}else if (BizConstant.ROBOT_TYPE_NOCACHE.equals(zoneService.getRobotTypebyZone(zoneName))) {
|
|
Storge currentStore = workpieceService.getWorkPieceStock(taskNode.getCompleteBatchNo(), false);
|
|
Storge currentStore = workpieceService.getWorkPieceStock(taskNode.getCompleteBatchNo(), false);
|
|
-
|
|
|
|
|
|
+ Map locationMap = new HashMap();
|
|
if("质量中心".equals(zZone.getName())){
|
|
if("质量中心".equals(zZone.getName())){
|
|
dataMap.put("method", "SendQualityCenter");
|
|
dataMap.put("method", "SendQualityCenter");
|
|
}else{
|
|
}else{
|
|
- dataMap.put("method", "SendServoStacker");
|
|
|
|
|
|
+ String zoneType = (null == msgUtil.redis_get(ParameterKey.PARAMETERS)? "": ((Map<String,String>)msgUtil.redis_get(ParameterKey.PARAMETERS)).get(ParameterKey.ZONE_TYPE).toString());
|
|
|
|
+ if(zoneType.equals(ParameterKey.ZONE_YJ)) {
|
|
|
|
+ BomProcedure procedure = bomProcedureService.getById(task.getProcedureId());
|
|
|
|
+ // 判断是工件坐标系还是质量测量
|
|
|
|
+ if ("1".equals(procedure.getThreeDimensionalConf()) || "1".equals(procedure.getThreeDimensionalDeviationConf())) {
|
|
|
|
+ // 质量检测
|
|
|
|
+ dataMap.put("method", "SendThreeCoordinates");
|
|
|
|
+ locationMap.put("workId", taskNode.getCompleteBatchNo());
|
|
|
|
+ locationMap.put("procedureNo", task.getProcedureNo());
|
|
|
|
+ if("1".equals(procedure.getThreeDimensionalConf())){
|
|
|
|
+ locationMap.put("workProgramName", procedure.getThreeDimensionalPrograme());
|
|
|
|
+ }else if("1".equals(procedure.getThreeDimensionalDeviationConf())){
|
|
|
|
+ locationMap.put("workProgramName", procedure.getThreeDimensionalDeviationPrograme());
|
|
|
|
+ }
|
|
|
|
+ locationMap.put("stationId", DictionaryKey.ZEISS_LOCATION.entrySet().stream().collect(Collectors.toMap(entity-> entity.getValue(),entity-> entity.getKey())).get(targetStorge.getPointId()));
|
|
|
|
+ } else {
|
|
|
|
+ dataMap.put("method", "SendServoStacker");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
dataMap.put("toStorge", targetStorge);
|
|
dataMap.put("toStorge", targetStorge);
|
|
dataMap.put("fromStorge", currentStore);
|
|
dataMap.put("fromStorge", currentStore);
|
|
|
|
|
|
- Map locationMap = new HashMap();
|
|
|
|
|
|
+
|
|
locationMap.put("location",targetStorge.getPointId());
|
|
locationMap.put("location",targetStorge.getPointId());
|
|
dataMap.put("data", locationMap);
|
|
dataMap.put("data", locationMap);
|
|
|
|
|
|
@@ -885,15 +916,16 @@ public class RobotNodeServiceImpl implements NodeOperationService {
|
|
HttpEntity<String> formEntity = new HttpEntity<String>(jsonObject.toJSONString(), headers);
|
|
HttpEntity<String> formEntity = new HttpEntity<String>(jsonObject.toJSONString(), headers);
|
|
//动态调用接口和新增指令执行时间
|
|
//动态调用接口和新增指令执行时间
|
|
String requestUrl = instructionUrl + "/api/" + "QueryThreeCoordinatesFreePos";
|
|
String requestUrl = instructionUrl + "/api/" + "QueryThreeCoordinatesFreePos";
|
|
- String canPutInfo = restTemplate.postForObject(requestUrl, formEntity, String.class);
|
|
|
|
-
|
|
|
|
|
|
+ // TODO 先写死测试
|
|
|
|
+// String canPutInfo = restTemplate.postForObject(requestUrl, formEntity, String.class);
|
|
|
|
+ String canPutInfo ="{\"result\":\"L\"}";
|
|
JSONObject canPutInfoObject = JSONObject.parseObject(canPutInfo);
|
|
JSONObject canPutInfoObject = JSONObject.parseObject(canPutInfo);
|
|
if("false".equals(canPutInfoObject.getString("result"))){
|
|
if("false".equals(canPutInfoObject.getString("result"))){
|
|
targetList = null;
|
|
targetList = null;
|
|
}else{
|
|
}else{
|
|
String putLocation = canPutInfoObject.getString("result");
|
|
String putLocation = canPutInfoObject.getString("result");
|
|
String putPoint = DictionaryKey.ZEISS_LOCATION.get(putLocation);
|
|
String putPoint = DictionaryKey.ZEISS_LOCATION.get(putLocation);
|
|
- targetList = productionresourcePositionService.list(Wraps.<ProductionresourcePosition>lbQ().eq(ProductionresourcePosition::getResourceId, taskNode.getResourceId()).eq(ProductionresourcePosition::getPointId,putPoint));
|
|
|
|
|
|
+ targetList = productionresourcePositionService.list(Wraps.<ProductionresourcePosition>lbQ().eq(ProductionresourcePosition::getResourceId, taskNode.getTargetResourceId()).eq(ProductionresourcePosition::getPointId,putPoint));
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
targetList = productionresourcePositionService.getFreeProductionresourcePositionByIds(new String[] {resourceId.toString()});
|
|
targetList = productionresourcePositionService.getFreeProductionresourcePositionByIds(new String[] {resourceId.toString()});
|