Pārlūkot izejas kodu

【MQ】恒轮逻辑优化

lxb 1 gadu atpakaļ
vecāks
revīzija
176c1a0eb4

+ 3 - 2
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/mq/TaskWorkNode.java

@@ -456,7 +456,7 @@ public class TaskWorkNode {
                                         JSONObject ret = new JSONObject();
                                         JSONObject ret = new JSONObject();
                                         ret.put("result","true");
                                         ret.put("result","true");
                                         returnData = ret.toJSONString();
                                         returnData = ret.toJSONString();
-                                    }else if(taskNode.getTargetResourceId() == Long.parseLong("1496354747433615360")){
+                                    }else if(!Objects.isNull(conMap.get("HELLER"))){
                                        logger.warn("恒轮机床上传程序内部调用");
                                        logger.warn("恒轮机床上传程序内部调用");
                                        JSONObject ret = new JSONObject();
                                        JSONObject ret = new JSONObject();
                                        ret.put("result","true");
                                        ret.put("result","true");
@@ -1425,6 +1425,7 @@ public class TaskWorkNode {
                         if(zoneType.equals(ParameterKey.ZONE_YJ)){
                         if(zoneType.equals(ParameterKey.ZONE_YJ)){
                             TTask task = taskMapper.selectById(taskNode.getTaskId());
                             TTask task = taskMapper.selectById(taskNode.getTaskId());
                             BomProcedure procedure = bomProcedureService.getById(task.getProcedureId());
                             BomProcedure procedure = bomProcedureService.getById(task.getProcedureId());
+                            Productionresource productionresource =  productionresourceBizMapper.selectOne(Wraps.<Productionresource>lbQ().eq(Productionresource::getId,resourceId));
                             // 判断是工件坐标系还是质量测量
                             // 判断是工件坐标系还是质量测量
                             if("1".equals(procedure.getThreeDimensionalConf()) || "1".equals(procedure.getThreeDimensionalDeviationConf())){
                             if("1".equals(procedure.getThreeDimensionalConf()) || "1".equals(procedure.getThreeDimensionalDeviationConf())){
                                 // 质量检测
                                 // 质量检测
@@ -1459,7 +1460,7 @@ public class TaskWorkNode {
                                     String putPoint = DictionaryKey.ZEISS_LOCATION.get("M");
                                     String putPoint = DictionaryKey.ZEISS_LOCATION.get("M");
                                     targetList = productionresourcePositionService.list(Wraps.<ProductionresourcePosition>lbQ().eq(ProductionresourcePosition::getResourceId, taskNode.getTargetResourceId()).eq(ProductionresourcePosition::getPointId,putPoint));
                                     targetList = productionresourcePositionService.list(Wraps.<ProductionresourcePosition>lbQ().eq(ProductionresourcePosition::getResourceId, taskNode.getTargetResourceId()).eq(ProductionresourcePosition::getPointId,putPoint));
                                 }
                                 }
-                            }else if(resourceId == Long.parseLong("1496354747433615360")){
+                            }else if(!Objects.isNull(productionresource) && StringUtils.isNotEmpty(productionresource.getModeSpecification()) && productionresource.getModeSpecification().contains("HELLER")){
                                 //恒轮
                                 //恒轮
                                 String hellerPoint = storgeService.getHellerPoint(taskNode);
                                 String hellerPoint = storgeService.getHellerPoint(taskNode);
                                 if(StringUtil.isNotEmpty(hellerPoint)) {
                                 if(StringUtil.isNotEmpty(hellerPoint)) {

+ 3 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionResourceCenter/service/impl/RobotNodeServiceImpl.java

@@ -1151,6 +1151,8 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                     if(zoneType.equals(ParameterKey.ZONE_YJ)){
                     if(zoneType.equals(ParameterKey.ZONE_YJ)){
                         TTask task = tTaskMapper.selectById(taskNode.getTaskId());
                         TTask task = tTaskMapper.selectById(taskNode.getTaskId());
                         BomProcedure procedure = bomProcedureService.getById(task.getProcedureId());
                         BomProcedure procedure = bomProcedureService.getById(task.getProcedureId());
+                        Productionresource productionresource =  productionresourceBizMapper.selectOne(Wraps.<Productionresource>lbQ().eq(Productionresource::getId,resourceId));
+
                         // 判断是工件坐标系还是质量测量
                         // 判断是工件坐标系还是质量测量
                         if("1".equals(procedure.getThreeDimensionalConf()) || "1".equals(procedure.getThreeDimensionalDeviationConf())){
                         if("1".equals(procedure.getThreeDimensionalConf()) || "1".equals(procedure.getThreeDimensionalDeviationConf())){
                             // 质量检测
                             // 质量检测
@@ -1183,7 +1185,7 @@ public class RobotNodeServiceImpl implements NodeOperationService {
                                 String putPoint = DictionaryKey.ZEISS_LOCATION.get("M");
                                 String putPoint = DictionaryKey.ZEISS_LOCATION.get("M");
                                 targetList = productionresourcePositionService.list(Wraps.<ProductionresourcePosition>lbQ().eq(ProductionresourcePosition::getResourceId, taskNode.getTargetResourceId()).eq(ProductionresourcePosition::getPointId,putPoint));
                                 targetList = productionresourcePositionService.list(Wraps.<ProductionresourcePosition>lbQ().eq(ProductionresourcePosition::getResourceId, taskNode.getTargetResourceId()).eq(ProductionresourcePosition::getPointId,putPoint));
                             }
                             }
-                        }else if(resourceId == Long.parseLong("1496354747433615360")){
+                        }else if(!Objects.isNull(productionresource) && StringUtils.isNotEmpty(productionresource.getModeSpecification()) && productionresource.getModeSpecification().contains("HELLER")){
                             targetList = null;
                             targetList = null;
                             //恒轮
                             //恒轮
                             String hellerPoint = storgeService.getHellerPoint(taskNode);
                             String hellerPoint = storgeService.getHellerPoint(taskNode);

+ 1 - 0
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/statisticalAnalysis/ProductLinePerformanceMapper.xml

@@ -272,5 +272,6 @@
           <if test="params.today !=null and params.today !=''">
           <if test="params.today !=null and params.today !=''">
             AND DATE_FORMAT(c.start_time, '%Y-%m-%d') = #{params.today}
             AND DATE_FORMAT(c.start_time, '%Y-%m-%d') = #{params.today}
           </if>
           </if>
+        order by c.start_time desc
     </select>
     </select>
 </mapper>
 </mapper>

+ 22 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/edgeLibrary/vo/FrockStockInfoVo.java

@@ -0,0 +1,22 @@
+package com.github.zuihou.business.edgeLibrary.vo;
+
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class FrockStockInfoVo {
+
+    @ApiModelProperty(value = "产线名称")
+    private String zoneName;
+
+    @ApiModelProperty(value = "点位名称")
+    private String storgeName;
+
+    @ApiModelProperty(value = "夹具名称")
+    private String frockName;
+
+    @ApiModelProperty(value = "是否在设备中")
+    private String modeSpecification;
+
+}