|
@@ -38,10 +38,7 @@ import com.github.zuihou.business.productionResourceCenter.service.impl.OtherNod
|
|
|
import com.github.zuihou.business.productionResourceCenter.service.impl.RobotNodeServiceImpl;
|
|
|
import com.github.zuihou.business.util.DynamicRabbitMq;
|
|
|
import com.github.zuihou.business.util.MsgUtil;
|
|
|
-import com.github.zuihou.common.constant.BizConstant;
|
|
|
-import com.github.zuihou.common.constant.CacheKey;
|
|
|
-import com.github.zuihou.common.constant.DictionaryKey;
|
|
|
-import com.github.zuihou.common.constant.UrlConfConstant;
|
|
|
+import com.github.zuihou.common.constant.*;
|
|
|
import com.github.zuihou.common.util.StringUtil;
|
|
|
import com.github.zuihou.context.BaseContextHandler;
|
|
|
import com.github.zuihou.database.mybatis.conditions.Wraps;
|
|
@@ -294,9 +291,9 @@ public class TaskWorkNode {
|
|
|
|
|
|
//动态调用接口和新增指令执行时间
|
|
|
log.setZoneId(zZone.getId()).setMethod(conMap.get("method").toString()).setExecuteTime(new Date());
|
|
|
- String instructionUrl = DictionaryKey.INSTRUCTION_URL + "/api/" + conMap.get("method").toString();
|
|
|
- System.out.println("instructionUrl=" + instructionUrl);
|
|
|
- System.out.println("jsonParam=" + jsonParam);
|
|
|
+ String instructionUrl = conMap.get("instructionUrl") + "/api/" + conMap.get("method").toString();
|
|
|
+ logger.info("instructionUrl=" + instructionUrl);
|
|
|
+ logger.info("jsonParam=" + jsonParam);
|
|
|
returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
|
|
|
|
|
|
logger.info("returnData=", returnData);
|
|
@@ -325,9 +322,9 @@ public class TaskWorkNode {
|
|
|
|
|
|
//动态调用接口和新增指令执行时间
|
|
|
log.setZoneId(zZone.getId()).setMethod(conMap.get("method").toString()).setExecuteTime(new Date());
|
|
|
- String instructionUrl = DictionaryKey.INSTRUCTION_URL + "/api/" + conMap.get("method").toString();
|
|
|
- System.out.println("instructionUrl=" + instructionUrl);
|
|
|
- System.out.println("jsonParam=" + jsonParam);
|
|
|
+ String instructionUrl = conMap.get("instructionUrl") + "/api/" + conMap.get("method").toString();
|
|
|
+ logger.info("instructionUrl=" + instructionUrl);
|
|
|
+ logger.info("jsonParam=" + jsonParam);
|
|
|
returnData = restTemplate.postForObject(instructionUrl, formEntity, String.class);
|
|
|
}
|
|
|
}
|
|
@@ -683,6 +680,15 @@ public class TaskWorkNode {
|
|
|
*/
|
|
|
public Map checkXbkCon(TaskNode taskNode, TTask task, Map<String, Object> dataMap) {
|
|
|
ZZone zone = dataMap.get("zone") == null ? null : (ZZone) dataMap.get("zone");
|
|
|
+
|
|
|
+ String paramKey = zone.getNo() + "_plc";
|
|
|
+ String instructionUrl = (null == msgUtil.redis_get(ParameterKey.PARAMETERS)? "": ((Map<String,String>)msgUtil.redis_get(ParameterKey.PARAMETERS)).get(paramKey).toString());
|
|
|
+
|
|
|
+ // TODO 后续删除代码,目前条用模拟接口
|
|
|
+ if(!"capsule".equals(zone.getNo())){
|
|
|
+ instructionUrl = instructionUrl.replace("8081","8083");
|
|
|
+ }
|
|
|
+
|
|
|
int count = Integer.parseInt(dataMap.get(taskNode.getId().toString() + "count") == null ? "0" : dataMap.get(taskNode.getId().toString() + "count").toString());
|
|
|
BomProcedure bomProcedure = bomProcedureMapper.selectOne(Wraps.<BomProcedure>lbQ().eq(BomProcedure::getId,task.getProcedureId()));
|
|
|
BBom bom = bBomMapper.selectById(task.getBomId());
|
|
@@ -910,6 +916,7 @@ public class TaskWorkNode {
|
|
|
dataMap.put("result", true);
|
|
|
}
|
|
|
}
|
|
|
+ dataMap.put("instructionUrl", instructionUrl);
|
|
|
return dataMap;
|
|
|
}
|
|
|
|