|
@@ -3,11 +3,13 @@ package com.github.zuihou.business.productionResourceCenter.service.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.github.zuihou.business.DemoLine.DemoCacheKey;
|
|
|
import com.github.zuihou.business.DemoLine.DemoLineConstant;
|
|
|
+import com.github.zuihou.business.DemoLine.YunjianConstant;
|
|
|
import com.github.zuihou.business.edgeLibrary.entity.Storge;
|
|
|
import com.github.zuihou.business.edgeLibrary.service.StorgeService;
|
|
|
import com.github.zuihou.business.modelingCenter.entity.MModuleField;
|
|
@@ -244,8 +246,11 @@ public class MachineNodeServiceImpl implements NodeOperationService {
|
|
|
if("2".equals(functionType) && moduleInstructions.size() == 1){
|
|
|
instructionUrl = instructionUrl.replace("8083","8081");
|
|
|
//打标
|
|
|
-// map.put("zkIp", ZK_ip_rxx);
|
|
|
-// map.put(DemoLineConstant.DEMOLINE_BIZ_TYPE, "print");
|
|
|
+ if(ObjectUtil.isNotEmpty(msgUtil.redis_get(YunjianConstant.YUNJIAN_LABEL_STATUS+"_"+task.getId().toString()))){
|
|
|
+ map.put("result", false);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
//获取打标指令编码imcs_t_workpiece
|
|
|
map.put("method", moduleInstructions.get(0).getCode());
|
|
|
map.put("url",plcInfo.get("url"));
|
|
@@ -277,6 +282,7 @@ public class MachineNodeServiceImpl implements NodeOperationService {
|
|
|
String nextBatchNo = incrementBatchNo(completeBatchNoFormat(order.getBatchNo())); //生成下一个编号
|
|
|
order.setBatchNo(nextBatchNo); //更新订单编号
|
|
|
orderMapper.updateById(order); //保存到数据库
|
|
|
+ msgUtil.redis_set(YunjianConstant.YUNJIAN_LABEL_STATUS+"_"+task.getId().toString(), task.getId(), 2, TimeUnit.DAYS );
|
|
|
map.put("data", data);
|
|
|
map.put("result", true);
|
|
|
}
|