|
@@ -11,6 +11,7 @@ import com.github.zuihou.business.edgeLibrary.entity.Storge;
|
|
|
import com.github.zuihou.business.edgeLibrary.service.StorgeService;
|
|
|
import com.github.zuihou.business.modelingCenter.entity.MModuleField;
|
|
|
import com.github.zuihou.business.operationManagementCenter.dao.OrderQualityMapper;
|
|
|
+import com.github.zuihou.business.operationManagementCenter.entity.Order;
|
|
|
import com.github.zuihou.business.operationManagementCenter.entity.OrderQuality;
|
|
|
import com.github.zuihou.business.operationManagementCenter.entity.TTask;
|
|
|
import com.github.zuihou.business.operationManagementCenter.entity.TaskNode;
|
|
@@ -20,11 +21,9 @@ import com.github.zuihou.business.productionReadyCenter.dao.BomProcedureProgramM
|
|
|
import com.github.zuihou.business.productionReadyCenter.entity.BomProcedure;
|
|
|
import com.github.zuihou.business.productionReadyCenter.entity.BomProcedureProgram;
|
|
|
import com.github.zuihou.business.productionReadyCenter.service.BomProcedureService;
|
|
|
+import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourceBizMapper;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourcePositionMapper;
|
|
|
-import com.github.zuihou.business.productionResourceCenter.entity.ProductionresourcePosition;
|
|
|
-import com.github.zuihou.business.productionResourceCenter.entity.ResourceAutoCode;
|
|
|
-import com.github.zuihou.business.productionResourceCenter.entity.ZZone;
|
|
|
-import com.github.zuihou.business.productionResourceCenter.entity.ZZoneProductionresource;
|
|
|
+import com.github.zuihou.business.productionResourceCenter.entity.*;
|
|
|
import com.github.zuihou.business.productionResourceCenter.service.NodeOperationService;
|
|
|
import com.github.zuihou.business.productionResourceCenter.service.ProductionresourcePositionService;
|
|
|
import com.github.zuihou.business.productionResourceCenter.service.ZZoneProductionresourceService;
|
|
@@ -91,6 +90,8 @@ public class MachineNodeServiceImpl implements NodeOperationService {
|
|
|
private ZZoneProductionresourceService zZoneProductionresourceService;
|
|
|
@Autowired
|
|
|
private ZZoneService zoneService;
|
|
|
+ @Autowired
|
|
|
+ private ProductionresourceBizMapper productionresourceBizMapper;
|
|
|
|
|
|
private Map<String, Object> map = Maps.newHashMap();
|
|
|
|
|
@@ -213,7 +214,10 @@ public class MachineNodeServiceImpl implements NodeOperationService {
|
|
|
}
|
|
|
break;
|
|
|
case "smu50":
|
|
|
- if ("1".equals(functionType)) {
|
|
|
+ Productionresource productionresource = productionresourceBizMapper.selectOne(Wraps.<Productionresource>lbQ().eq(Productionresource::getId,taskNode.getTargetResourceId()));
|
|
|
+ map.put("url",productionresource.getIp());
|
|
|
+ map.put("port",productionresource.getPort());
|
|
|
+ if ("1".equals(functionType)) {
|
|
|
//程序文件上传
|
|
|
List<BomProcedureProgram>procedureProgramList = bomProcedureProgramMapper.selectList(Wraps.<BomProcedureProgram>lbQ().eq(BomProcedureProgram::getProcedureId,task.getProcedureId()));
|
|
|
|
|
@@ -227,8 +231,6 @@ public class MachineNodeServiceImpl implements NodeOperationService {
|
|
|
});
|
|
|
//map.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "uploadProgram");
|
|
|
map.put("method", "UploadFile");
|
|
|
- map.put("url",task.getIp());
|
|
|
- map.put("port",task.getPort());
|
|
|
JSONObject data = new JSONObject();
|
|
|
data.put("fileName", fileList.get(0).get("fileName"));
|
|
|
map.put("data", data);
|
|
@@ -256,39 +258,26 @@ public class MachineNodeServiceImpl implements NodeOperationService {
|
|
|
else if ("3".equals(functionType)){
|
|
|
// 加工前写入工件坐标系 根据taskid查找工件三坐标测量的工件坐标系,可能存在装夹一次未果的情况,所以取最后一条数据
|
|
|
// TODO 工件坐标系根据机场不同系统,不同通讯协议调用不同的接口
|
|
|
- QueryWrapper<OrderQuality> orderQualityWrapper = new QueryWrapper<OrderQuality>();
|
|
|
- orderQualityWrapper.in("taskId", task.getId()).in("measuringType", "2").orderByDesc("updateTime").last("limit 1");
|
|
|
- OrderQuality orderQuality = orderQualityMapper.selectOne(orderQualityWrapper);
|
|
|
+ OrderQuality orderQuality = orderQualityMapper.selectOne(Wraps.<OrderQuality>lbQ().eq(OrderQuality::getProcedureId,task.getProcedureId()).eq(OrderQuality::getWorkpieceId,task.getCompleteBatchNo()));
|
|
|
if(null == orderQuality){
|
|
|
// 简单处理的方式,直接将坐标偏移全部设置成0
|
|
|
- queryMap.put("sketchyXaxisOffset", 0);
|
|
|
- queryMap.put("sketchyYaxisOffset", 0);
|
|
|
- queryMap.put("sketchyZaxisOffset", 0);
|
|
|
- queryMap.put("sketchyAaxisOffset", 0);
|
|
|
- queryMap.put("sketchyBaxisOffset", 0);
|
|
|
- queryMap.put("sketchyCaxisOffset", 0);
|
|
|
- queryMap.put("exactXaxisOffset", 0);
|
|
|
- queryMap.put("exactXaxisOffset", 0);
|
|
|
- queryMap.put("exactXaxisOffset", 0);
|
|
|
- queryMap.put("exactXaxisOffset", 0);
|
|
|
- queryMap.put("exactXaxisOffset", 0);
|
|
|
- queryMap.put("exactXaxisOffset", 0);
|
|
|
+ queryMap.put("x", "0");
|
|
|
+ queryMap.put("y", "0");
|
|
|
+ queryMap.put("z", "0");
|
|
|
+ queryMap.put("a", "0");
|
|
|
+ queryMap.put("b", "0");
|
|
|
+ queryMap.put("c", "0");
|
|
|
}else{
|
|
|
- queryMap.put("sketchyXaxisOffset", orderQuality.getSketchyXaxisOffset());
|
|
|
- queryMap.put("sketchyYaxisOffset", orderQuality.getSketchyYaxisOffset());
|
|
|
- queryMap.put("sketchyZaxisOffset", orderQuality.getSketchyZaxisOffset());
|
|
|
- queryMap.put("sketchyAaxisOffset", orderQuality.getSketchyAaxisOffset());
|
|
|
- queryMap.put("sketchyBaxisOffset", orderQuality.getSketchyBaxisOffset());
|
|
|
- queryMap.put("sketchyCaxisOffset", orderQuality.getSketchyCaxisOffset());
|
|
|
- queryMap.put("exactXaxisOffset", orderQuality.getExactXaxisOffset());
|
|
|
- queryMap.put("exactXaxisOffset", orderQuality.getExactYaxisOffset());
|
|
|
- queryMap.put("exactXaxisOffset", orderQuality.getExactZaxisOffset());
|
|
|
- queryMap.put("exactXaxisOffset", orderQuality.getExactAaxisOffset());
|
|
|
- queryMap.put("exactXaxisOffset", orderQuality.getExactBaxisOffset());
|
|
|
- queryMap.put("exactXaxisOffset", orderQuality.getExactCaxisOffset());
|
|
|
+ queryMap.put("x", String.valueOf(orderQuality.getSketchyXaxisOffset()));
|
|
|
+ queryMap.put("y", String.valueOf(orderQuality.getSketchyYaxisOffset()));
|
|
|
+ queryMap.put("z", String.valueOf(orderQuality.getSketchyZaxisOffset()));
|
|
|
+ queryMap.put("a", String.valueOf(orderQuality.getSketchyAaxisOffset()));
|
|
|
+ queryMap.put("b", String.valueOf(orderQuality.getSketchyBaxisOffset()));
|
|
|
+ queryMap.put("c", String.valueOf(orderQuality.getSketchyCaxisOffset()));
|
|
|
}
|
|
|
+
|
|
|
map.put("method", "SendLinShift");
|
|
|
- map.put("data", JSONObject.toJSONString(queryMap));
|
|
|
+ map.put("data", queryMap);
|
|
|
map.put("result", true);
|
|
|
}
|
|
|
|
|
@@ -303,6 +292,7 @@ public class MachineNodeServiceImpl implements NodeOperationService {
|
|
|
map.put("url",plcInfo.get("url"));
|
|
|
map.put("port",plcInfo.get("port"));
|
|
|
map.put("result", true);
|
|
|
+ map.put("data", new HashMap<>());
|
|
|
}
|
|
|
break;
|
|
|
case "三坐标检测仪":
|