opt: 物料图片显示,修复冲床先取上再取下的问题
This commit is contained in:
@@ -161,8 +161,8 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
||||
byte indexlow = (byte) IntToHexLow(index);
|
||||
byte phasehigh = (byte) IntToHexHigh(phase);
|
||||
byte phaselow = (byte) IntToHexLow(phase);
|
||||
byte nextPointHigh =(byte) IntToHexHigh(nextPoint);
|
||||
byte nextPointLow =(byte) IntToHexLow(nextPoint);
|
||||
byte startPointHigh =(byte) IntToHexHigh(startPoint);
|
||||
byte startPointLow =(byte) IntToHexLow(startPoint);
|
||||
|
||||
byte[] b = new byte[]{(byte) 0X87, (byte) 0XCD,
|
||||
(byte) 0X00, (byte) 0X08,
|
||||
@@ -173,7 +173,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
|
||||
(byte) indexhigh, (byte) indexlow,
|
||||
(byte) 0X01, (byte) 0X12,
|
||||
(byte) phasehigh, (byte) phaselow,
|
||||
(byte) nextPointHigh,(byte) nextPointLow
|
||||
(byte) startPointHigh,(byte) startPointLow
|
||||
};
|
||||
|
||||
log.info("反馈agv动作数据--index:" + hexToString(indexhigh & 0xFF) + hexToString(indexlow & 0xFF) + ",phase:" + hexToString(phasehigh & 0xFF) + hexToString(phaselow & 0xFF));
|
||||
|
||||
@@ -582,19 +582,27 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
|
||||
|
||||
private byte[] getData(byte[] data, int index, Instruction inst, TaskDto task) {
|
||||
String hasWms = paramService.findByCode("hasWms").getValue();
|
||||
if ("3".equals(task.getTask_type()) && StrUtil.isNotEmpty(hasWms) && "1".equals(hasWms)) {
|
||||
String resp = acsToWmsService.requestTaskAgain(task.getNext_point_code(), task.getExt_task_id(), inst.getVehicle_code());
|
||||
if ("2".equals(task.getTask_type())) {
|
||||
String resp = acsToWmsService.requestTaskAgain(task.getStart_point_code(), task.getExt_task_id(), inst.getVehicle_code());
|
||||
if (StrUtil.isEmpty(resp)) {
|
||||
log.info("申请分配二次点位失败,响应参数:{}", resp);
|
||||
return null;
|
||||
}
|
||||
String start_point_code = task.getStart_point_code();
|
||||
JSONObject respjson = JSONObject.parseObject(resp);
|
||||
String point_code = respjson.getString("point_code");
|
||||
task.setStart_device_code2(point_code);
|
||||
int start_address = deviceService.queryAddressBydeviceCode(inst.getStart_point_code());
|
||||
int next_address = deviceService.queryAddressBydeviceCode(point_code);
|
||||
task.setStart_device_code(point_code);
|
||||
task.setStart_point_code(point_code);
|
||||
task.setPut_device_code(start_point_code);
|
||||
task.setPut_point_code(start_point_code);
|
||||
inst.setPut_device_code(start_point_code);
|
||||
inst.setPut_point_code(start_point_code);
|
||||
inst.setStart_device_code(point_code);
|
||||
inst.setStart_point_code(point_code);
|
||||
taskService.update(task);
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, start_address, next_address, 0, 0);
|
||||
instructionService.update(inst);
|
||||
int start_address = deviceService.queryAddressBydeviceCode(point_code);
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, start_address, 0, 0, 0);
|
||||
log.info("指令号:{},phase:{},acs请求wms申请成功", inst.getInstruction_code(), phase);
|
||||
} else {
|
||||
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0, 0, 0, 0, 0);
|
||||
|
||||
@@ -157,8 +157,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
jo.put("device_code",address);
|
||||
String result2 = null;
|
||||
|
||||
AddressDto addressDto = addressService.findByCode("requestTaskAgain");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String methods_url = "/api/wms/task/feedAgvAgain";
|
||||
String url = wmsurl + methods_url;
|
||||
log.info("requestTaskAgain----请求参数{}", jo);
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.enums.GoodsEnum;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.system.service.notice.ISysNoticeService;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.wms.cockpit.service.dao.DasDeviceFault;
|
||||
import org.nl.wms.cockpit.service.mapper.CockpitMapper;
|
||||
import org.nl.wms.database.material.service.IMdBaseMaterialService;
|
||||
@@ -41,14 +42,14 @@ import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
||||
import org.nl.wms.sch.task.service.ISchBaseTaskconfigService;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTaskconfig;
|
||||
import org.nl.wms.sch.task_manage.AbstractTask;
|
||||
import org.nl.wms.sch.task_manage.GeneralDefinition;
|
||||
import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum;
|
||||
import org.nl.wms.sch.task_manage.task.TaskFactory;
|
||||
import org.nl.wms.sch.task_manage.task.core.TaskStatus;
|
||||
import org.nl.wms.sch.task_manage.task.core.TaskType;
|
||||
import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper;
|
||||
import org.nl.wms.util.PointUtils;
|
||||
import org.nl.wms.util.TaskUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@@ -56,12 +57,11 @@ import org.springframework.util.CollectionUtils;
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
@@ -104,6 +104,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
private IMdBaseMaterialService iMdBaseMaterialService;
|
||||
@Autowired
|
||||
private FabServiceImpl FabServiceImpl;
|
||||
@Autowired
|
||||
private ISysParamService sysParamService;
|
||||
|
||||
/**
|
||||
* 初始化反射方法
|
||||
@@ -338,13 +340,32 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
if (ObjectUtil.isEmpty(schBaseTask)) {
|
||||
throw new BadRequestException("任务不存在!task_id:" + task_id);
|
||||
}
|
||||
if (device_code.equals(schBaseTask.getPoint_code2())) throw new BadRequestException("设备号与任务设备不匹配!");
|
||||
//查询点位是否存在
|
||||
SchBasePoint schBasePoint = pointService.selectByPointCode(device_code);
|
||||
if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("点位不存在!device_code:" + device_code);
|
||||
SchBasePoint schBasePoint1 = pointService.selectByNextWaitPoint(device_code, schBaseTask.getVehicle_code());
|
||||
if (ObjectUtil.isEmpty(schBasePoint1)) throw new BadRequestException("未查询到可用点位!等待点位:" + device_code);
|
||||
return schBasePoint1;
|
||||
SchBasePoint schBasePoint1 = null;
|
||||
List<String> list = GeneralDefinition.CYZZD01.get(device_code);
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
list = GeneralDefinition.CYZZD02.get(device_code);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
for (String s : list) {
|
||||
schBasePoint1 = pointService.getOne(Wrappers.lambdaQuery(SchBasePoint.class)
|
||||
.eq(SchBasePoint::getPoint_code, s)
|
||||
.eq(SchBasePoint::getIs_lock, false));
|
||||
if (ObjectUtil.isNotEmpty(schBasePoint1)) {
|
||||
pointService.update(Wrappers.lambdaUpdate(SchBasePoint.class)
|
||||
.eq(SchBasePoint::getPoint_code, schBasePoint1.getPoint_code())
|
||||
.set(SchBasePoint::getIs_lock, true));
|
||||
schBaseTask.setPoint_code1(schBasePoint1.getPoint_code());
|
||||
schBaseTask.setStart_wait_point(device_code);
|
||||
TaskUtils.setUpdateByAcs(schBaseTask);
|
||||
taskService.update(schBaseTask);
|
||||
return schBasePoint1;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -454,7 +475,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
json.put("status", status);
|
||||
json.put("device_code", schBaseTask.getPoint_code1());
|
||||
json.put("task_code", schBaseTask.getTask_code());
|
||||
//AcsResponse acsResponse = connectorService.feedAgvTaskStatus(json);
|
||||
AcsResponse acsResponse = connectorService.feedAgvTaskStatus(json);
|
||||
}
|
||||
if ("2".equals(is_connector)) {
|
||||
JSONObject json = new JSONObject();
|
||||
@@ -488,6 +509,25 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
json.put("status", status);
|
||||
json.put("device_code", schBaseTask.getPoint_code1());
|
||||
json.put("task_code", schBaseTask.getTask_code());
|
||||
if(schBaseTask.getPoint_code1().endsWith("1")){
|
||||
String replace = schBaseTask.getPoint_code1().replace("1", "2");
|
||||
SchBaseTask schBaseTask1 = taskService.getOne(Wrappers.lambdaQuery(SchBaseTask.class)
|
||||
.eq(SchBaseTask::getPoint_code1, replace)
|
||||
.eq(SchBaseTask::getTask_status,TaskStatus.TIMEOUT.getCode()));
|
||||
if(ObjectUtil.isNotEmpty(schBaseTask1)){
|
||||
schBaseTask1.setTask_status(TaskStatus.CREATED.getCode());
|
||||
taskService.update(schBaseTask1);
|
||||
}
|
||||
} else if(schBaseTask.getPoint_code1().endsWith("3")){
|
||||
String replace = schBaseTask.getPoint_code1().replace("3", "4");
|
||||
SchBaseTask schBaseTask2 = taskService.getOne(Wrappers.lambdaQuery(SchBaseTask.class)
|
||||
.eq(SchBaseTask::getPoint_code1, replace)
|
||||
.eq(SchBaseTask::getTask_status,TaskStatus.TIMEOUT.getCode()));
|
||||
if(ObjectUtil.isNotEmpty(schBaseTask2)){
|
||||
schBaseTask2.setTask_status(TaskStatus.CREATED.getCode());
|
||||
taskService.update(schBaseTask2);
|
||||
}
|
||||
}
|
||||
boolean flag = true;
|
||||
String jobName = null;
|
||||
iSchBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
|
||||
|
||||
@@ -74,26 +74,23 @@ public class ConnectorToWmsServiceImpl implements ConnectorToWmsService {
|
||||
map1.put("status", HttpStatus.HTTP_INTERNAL_ERROR);
|
||||
map1.put("message", StrUtil.isEmpty(task_code) ? "任务号不能为空!"
|
||||
: StrUtil.isEmpty(start_device_code) ? "起点参数不能为空!" : StrUtil.isEmpty(vehicle_code) ? "载具号不能为空!" : "未知");
|
||||
objects.add(map1);
|
||||
log.info(StrUtil.isEmpty(task_code) ? "任务号不能为空!"
|
||||
: StrUtil.isEmpty(start_device_code) ? "起点参数不能为空!" : StrUtil.isEmpty(vehicle_code) ? "载具号不能为空!" : "未知");
|
||||
continue;
|
||||
return map1;
|
||||
}
|
||||
SchBasePoint schBasePoint = schBasePointService.selectByPointCode(start_device_code);
|
||||
if (ObjectUtil.isEmpty(schBasePoint)) {
|
||||
map1.put("task_code", task_code);
|
||||
map1.put("status", HttpStatus.HTTP_INTERNAL_ERROR);
|
||||
map1.put("message", start_device_code + "点位设备不存在!");
|
||||
objects.add(map1);
|
||||
log.info(start_device_code + "点位设备不存在!");
|
||||
continue;
|
||||
return map1;
|
||||
} else if (schBasePoint.getIs_lock()) {
|
||||
map1.put("task_code", task_code);
|
||||
map1.put("status", HttpStatus.HTTP_INTERNAL_ERROR);
|
||||
map1.put("message", start_device_code + "该设备正在执行任务!");
|
||||
objects.add(map1);
|
||||
log.info(start_device_code + "该设备正在执行任务!");
|
||||
continue;
|
||||
return map1;
|
||||
}
|
||||
//TODO:固定的载具类型,根据载具类型来决定终点
|
||||
String task_type = data.getString("task_type");
|
||||
@@ -115,17 +112,12 @@ public class ConnectorToWmsServiceImpl implements ConnectorToWmsService {
|
||||
connectorTask.apply(param);
|
||||
schBasePoint.setIs_lock(true);
|
||||
schBasePointService.updateById(schBasePoint);
|
||||
map1.put("task_code", task_code);
|
||||
map1.put("status", HttpStatus.HTTP_OK);
|
||||
map1.put("message", "操作成功!");
|
||||
objects.add(map1);
|
||||
}
|
||||
map.put("status", HttpStatus.HTTP_OK);
|
||||
map.put("message", "操作成功!");
|
||||
} catch (Exception e) {
|
||||
map.put("status", HttpStatus.HTTP_INTERNAL_ERROR);
|
||||
map.put("message", e.getMessage());
|
||||
objects.add(map);
|
||||
log.info("connector下发agv任务异常:{}", e.getMessage());
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -94,4 +94,9 @@ public interface ISchBaseVehiclematerialgroupService extends IService<SchBaseVeh
|
||||
* @return
|
||||
*/
|
||||
Object createTask(JSONObject entity);
|
||||
|
||||
/**
|
||||
* 查询物料路径是空的
|
||||
*/
|
||||
List<SchBaseVehiclematerialgroup> selectMaterialPathIsEmpty();
|
||||
}
|
||||
|
||||
@@ -159,6 +159,9 @@ public class SchBaseVehiclematerialgroup implements Serializable {
|
||||
@ApiModelProperty(value = "移动途径")
|
||||
private String move_way;
|
||||
|
||||
@ApiModelProperty(value = "物料图片路径")
|
||||
private String material_path;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String material_name;
|
||||
|
||||
@@ -88,9 +88,12 @@
|
||||
<if test="query.job_name != null">
|
||||
AND vg.job_name like CONCAT('%', #{query.job_name}, '%')
|
||||
</if>
|
||||
<if test="query.region_code != null">
|
||||
<if test="query.region_code != null and query.region_code != 1">
|
||||
AND vg.region_code = #{query.region_code}
|
||||
</if>
|
||||
<if test="query.region_code == 1">
|
||||
AND vg.region_code is null
|
||||
</if>
|
||||
<if test="query.order_code != null">
|
||||
AND vg.order_code like CONCAT('%', #{query.order_code}, '%')
|
||||
</if>
|
||||
|
||||
@@ -212,6 +212,13 @@ public class SchBaseVehiclematerialgroupServiceImpl extends ServiceImpl<SchBaseV
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SchBaseVehiclematerialgroup> selectMaterialPathIsEmpty() {
|
||||
return this.list(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class)
|
||||
.isNull(SchBaseVehiclematerialgroup::getMaterial_path)
|
||||
.eq(SchBaseVehiclematerialgroup::getGroup_id,"9434"));
|
||||
}
|
||||
|
||||
private Long getTime(String dateString) {
|
||||
String pattern = "yyyy-MM-dd HH:mm:ss";
|
||||
java.util.Date date = DateUtil.parse(dateString, pattern);
|
||||
|
||||
@@ -345,7 +345,9 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
|
||||
@Override
|
||||
public SchBasePoint selectByNextWaitPoint(String device_code, String vehicleCode) {
|
||||
List<SchBasePoint> schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getNext_wait_point, device_code).eq(SchBasePoint::getIs_used, true)
|
||||
List<SchBasePoint> schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class)
|
||||
.eq(SchBasePoint::getNext_wait_point, device_code)
|
||||
.eq(SchBasePoint::getIs_used, true)
|
||||
.eq(SchBasePoint::getIs_lock, false).isNull(SchBasePoint::getVehicle_code)
|
||||
.eq(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue()));
|
||||
if (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) {
|
||||
|
||||
@@ -76,7 +76,7 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
||||
if (ObjectUtil.isNotEmpty(collect)) {
|
||||
lam.in(SchBaseTask::getTask_status, collect);
|
||||
} else {
|
||||
lam.in(SchBaseTask::getTask_status, TaskStatus.APPLY.getCode(), TaskStatus.CREATED.getCode(), TaskStatus.ISSUED.getCode(), TaskStatus.EXECUTING.getCode());
|
||||
lam.in(SchBaseTask::getTask_status, TaskStatus.APPLY.getCode(), TaskStatus.CREATED.getCode(), TaskStatus.ISSUED.getCode(), TaskStatus.EXECUTING.getCode(), TaskStatus.TIMEOUT.getCode());
|
||||
}
|
||||
lam.orderByDesc(SchBaseTask::getUpdate_time);
|
||||
IPage<SchBaseTask> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
package org.nl.wms.sch.task_manage;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.system.service.param.dao.Param;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.sch.group.service.ISchBaseVehiclematerialgroupService;
|
||||
import org.nl.wms.sch.group.service.dao.SchBaseVehiclematerialgroup;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 查询物料图片路径
|
||||
*
|
||||
* @author LENOVO
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class AutoQueryFilePath {
|
||||
|
||||
@Autowired
|
||||
private ISchBaseVehiclematerialgroupService iSchBaseVehiclematerialgroupService;
|
||||
|
||||
@Autowired
|
||||
private SysParamServiceImpl sysParamService;
|
||||
|
||||
private String materialUrl = null;
|
||||
|
||||
private File directory = null;
|
||||
|
||||
@SneakyThrows
|
||||
public void run() {
|
||||
List<SchBaseVehiclematerialgroup> schBaseVehiclematerialgroups = iSchBaseVehiclematerialgroupService.selectMaterialPathIsEmpty();
|
||||
if(StrUtil.isEmpty(materialUrl)){
|
||||
Param byCode = sysParamService.findByCode(GeneralDefinition.MATERIAL_URL);
|
||||
materialUrl = byCode.getValue();
|
||||
directory = new File(materialUrl);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(materialUrl)) {
|
||||
schBaseVehiclematerialgroups.stream().forEach(schBaseVehiclematerialgroup -> {
|
||||
if (directory.exists() && directory.isDirectory()) {
|
||||
selectMaterialPath(directory, schBaseVehiclematerialgroup);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查找物料图片路径
|
||||
*/
|
||||
public void selectMaterialPath(File directory,SchBaseVehiclematerialgroup schBaseVehiclematerialgroup) {
|
||||
File[] files = directory.listFiles();
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
if (file.isDirectory()) {
|
||||
selectMaterialPath(file,schBaseVehiclematerialgroup);
|
||||
} else if (file.isFile() && file.getName().substring(0, file.getName().lastIndexOf('.')).equals(schBaseVehiclematerialgroup.getMaterial_id())) {
|
||||
File parentFile = file.getParentFile();
|
||||
if(parentFile != null) {
|
||||
String name = parentFile.getName();
|
||||
if (StrUtil.isNotEmpty(name)) {
|
||||
iSchBaseVehiclematerialgroupService.update(Wrappers.lambdaUpdate(SchBaseVehiclematerialgroup.class)
|
||||
.eq(SchBaseVehiclematerialgroup::getGroup_id, schBaseVehiclematerialgroup.getGroup_id())
|
||||
.set(SchBaseVehiclematerialgroup::getMaterial_path, parentFile.getPath() + "\\" + name + "_large.png"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,62 +1,113 @@
|
||||
package org.nl.wms.sch.task_manage;
|
||||
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import org.nl.config.MapOf;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Description: 通用定义类型数据
|
||||
* @Date: 2023/7/13
|
||||
*/
|
||||
public class GeneralDefinition {
|
||||
/** 未知 */
|
||||
/**
|
||||
* 未知
|
||||
*/
|
||||
public static final String UNKNOWN = "-";
|
||||
// 统一编码定义
|
||||
/** 窑自动任务开启 */
|
||||
/**
|
||||
* 窑自动任务开启
|
||||
*/
|
||||
public static final String AUTO_KILN_CALL = "auto_kiln_call";
|
||||
// 是否
|
||||
/**是/正确/可用... */
|
||||
/**
|
||||
* 是/正确/可用...
|
||||
*/
|
||||
public static final String YES = "1";
|
||||
/** 否/错误/不可用... */
|
||||
/**
|
||||
* 否/错误/不可用...
|
||||
*/
|
||||
public static final String NO = "0";
|
||||
// 载具类型
|
||||
/** 料盅 */
|
||||
/**
|
||||
* 料盅
|
||||
*/
|
||||
public static final String MATERIAL_CUP = "LZ";
|
||||
/** 钢托盘 */
|
||||
/**
|
||||
* 钢托盘
|
||||
*/
|
||||
public static final String STEEL_TRAY = "GTP";
|
||||
/** 连涂 */
|
||||
/**
|
||||
* 连涂
|
||||
*/
|
||||
public static final String CONTINUOUS_COATING = "2";
|
||||
/** 普涂 */
|
||||
/**
|
||||
* 普涂
|
||||
*/
|
||||
public static final String COMMON_COATING = "1";
|
||||
// 账号定义
|
||||
/** acs系统 */
|
||||
/**
|
||||
* acs系统
|
||||
*/
|
||||
public static final String ACS_ID = "2";
|
||||
/** acs系统 */
|
||||
/**
|
||||
* acs系统
|
||||
*/
|
||||
public static final String ACS_NAME = "ACS系统";
|
||||
/** mes系统 */
|
||||
/**
|
||||
* mes系统
|
||||
*/
|
||||
public static final String MES_ID = "3";
|
||||
/** mes系统 */
|
||||
/**
|
||||
* mes系统
|
||||
*/
|
||||
public static final String MES_NAME = "MES系统";
|
||||
// 任务生产方式
|
||||
/**自动创建**/
|
||||
/**
|
||||
* 自动创建
|
||||
**/
|
||||
public static final String AUTO_CREATION = "1";
|
||||
/**ACS创建**/
|
||||
/**
|
||||
* ACS创建
|
||||
**/
|
||||
public static final String ACS_CREATION = "2";
|
||||
/**PDA手持**/
|
||||
/**
|
||||
* PDA手持
|
||||
**/
|
||||
public static final String PDA_CREATION = "3";
|
||||
// 请求方向
|
||||
/**ACS->LMS**/
|
||||
/**
|
||||
* ACS->LMS
|
||||
**/
|
||||
public static final String ACS_LMS = "1";
|
||||
/**LMS->ACS**/
|
||||
/**
|
||||
* LMS->ACS
|
||||
**/
|
||||
public static final String LMS_ACS = "2";
|
||||
/**MES->LMS**/
|
||||
/**
|
||||
* MES->LMS
|
||||
**/
|
||||
public static final String MES_LMS = "3";
|
||||
/**LMS->MES**/
|
||||
/**
|
||||
* LMS->MES
|
||||
**/
|
||||
public static final String LMS_MES = "4";
|
||||
// 特殊: 1-缓存输送线入口,2-缓存输送线出口,3-上输送线,4-下输送线
|
||||
/** 上输送线 */
|
||||
/**
|
||||
* 上输送线
|
||||
*/
|
||||
public static final String UPPER_CONVEYOR_LINE = "3";
|
||||
/** 下输送线 */
|
||||
/**
|
||||
* 下输送线
|
||||
*/
|
||||
public static final String LOWER_CONVEYOR_LINE = "4";
|
||||
// 参数名称
|
||||
/** 是否连接 */
|
||||
/**
|
||||
* 是否连接
|
||||
*/
|
||||
public static final String IS_CONNECT_ACS = "is_connect_acs";
|
||||
public static final String IS_CONNECT_CONNECTOR = "is_connect_connector";
|
||||
/**
|
||||
@@ -75,33 +126,61 @@ public class GeneralDefinition {
|
||||
* 手持登录时间
|
||||
*/
|
||||
public static final String HANDHELD_LOGIN_TIME = "handheld_login_time";
|
||||
/** ACS路径 */
|
||||
/**
|
||||
* ACS路径
|
||||
*/
|
||||
public static final String ACS_URL = "acs_url";
|
||||
/**
|
||||
* CONNECTOR路径
|
||||
*/
|
||||
public static final String CONNECTOR_URL = "connector_url";
|
||||
public static final String SORTING_URL = "sorting_url";
|
||||
/** 是否连接 */
|
||||
/**
|
||||
* 是否连接
|
||||
*/
|
||||
public static final String IS_CONNECT_MES = "is_connect_mes";
|
||||
/** MES路径 */
|
||||
/**
|
||||
* MES路径
|
||||
*/
|
||||
public static final String MES_URL = "mes_url";
|
||||
// 完成/取消
|
||||
/** 任务完成 */
|
||||
/**
|
||||
* 任务完成
|
||||
*/
|
||||
public static final String TASK_FINISH = "任务完成";
|
||||
/** 任务取消 */
|
||||
/**
|
||||
* 任务取消
|
||||
*/
|
||||
public static final String TASK_CANCEL = "任务取消";
|
||||
// 固化方案
|
||||
/** 不混料 */
|
||||
/**
|
||||
* 不混料
|
||||
*/
|
||||
public static final String NOT_MIXING = "1";
|
||||
/** 可混料 */
|
||||
/**
|
||||
* 可混料
|
||||
*/
|
||||
public static final String CAN_MIXING = "2";
|
||||
/** 自定义混料 */
|
||||
/**
|
||||
* 自定义混料
|
||||
*/
|
||||
public static final String CUSTOM_MIXING = "3";
|
||||
// 出入口
|
||||
/**入口**/
|
||||
/**
|
||||
* 入口
|
||||
**/
|
||||
public static final String ENTRANCE = "4";
|
||||
/**出口**/
|
||||
/**
|
||||
* 出口
|
||||
**/
|
||||
public static final String EXIT = "3";
|
||||
|
||||
/**
|
||||
* 物料图片路径
|
||||
*/
|
||||
public static final String MATERIAL_URL = "material_url";
|
||||
|
||||
public static final Map<String,List<String>> CYZZD01 = MapOf.of("CYZZD01", ListUtil.of("CYXLDJW01", "CYXLDJW02"));
|
||||
public static final Map<String,List<String>> CYZZD02 = MapOf.of("CYZZD02", ListUtil.of("CYXLDJW03", "CYXLDJW04"));
|
||||
|
||||
}
|
||||
|
||||
@@ -66,7 +66,6 @@ public class CNTTask extends AbstractTask {
|
||||
};
|
||||
tasks = tasks.stream().sorted(numericSuffixComparator).collect(Collectors.toList());
|
||||
for (SchBaseTask task : tasks) {
|
||||
TaskUtils.setUpdateByAcs(task);
|
||||
// 找起点
|
||||
SchBasePoint schBasePoint = null;
|
||||
if (TaskType.CARRY_TASK.getValue().equals(task.getTask_type())) {
|
||||
@@ -88,7 +87,25 @@ public class CNTTask extends AbstractTask {
|
||||
task.setTask_status(TaskStatus.CREATED.getCode());
|
||||
if (task.getPoint_code1().endsWith("1") || task.getPoint_code1().endsWith("3")) {
|
||||
task.setAcs_trace_id("4");
|
||||
} else {
|
||||
if(task.getPoint_code1().endsWith("2")){
|
||||
String replace = task.getPoint_code1().replace("2", "1");
|
||||
SchBaseTask schBaseTask = taskService.getOne(Wrappers.lambdaQuery(SchBaseTask.class)
|
||||
.eq(SchBaseTask::getPoint_code1, replace)
|
||||
.le(SchBaseTask::getTask_status,TaskStatus.EXECUTING.getCode()));
|
||||
if(ObjectUtil.isNotEmpty(schBaseTask)){
|
||||
task.setTask_status(TaskStatus.TIMEOUT.getCode());
|
||||
}
|
||||
} else if(task.getPoint_code1().endsWith("4")){
|
||||
String replace = task.getPoint_code1().replace("4", "3");
|
||||
SchBaseTask schBaseTask = taskService.getOne(Wrappers.lambdaQuery(SchBaseTask.class)
|
||||
.eq(SchBaseTask::getPoint_code1, replace));
|
||||
if(ObjectUtil.isNotEmpty(schBaseTask)){
|
||||
task.setTask_status(TaskStatus.TIMEOUT.getCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
TaskUtils.setUpdateByAcs(task);
|
||||
taskService.updateById(task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,8 @@
|
||||
</logger>
|
||||
</springProfile>
|
||||
<springProfile name="prod">
|
||||
<root level="debug">
|
||||
<root level="info">
|
||||
<appender-ref ref="asyncLuceneAppender"/>
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
</root>
|
||||
<logger name="org.springframework" level="ERROR" additivity="false">
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog :visible.sync="dialogVisible1" title="物料图片">
|
||||
<img :src="errGif" alt="物料图片" style="max-width: 100%;">
|
||||
<img :src="imageUrl" alt="物料图片" style="max-width: 100%;">
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="创建任务"
|
||||
@@ -287,7 +287,6 @@
|
||||
style="width: 240px;"
|
||||
clearable
|
||||
filterable
|
||||
:filter-method="filterPoint"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointList"
|
||||
@@ -345,7 +344,7 @@
|
||||
<el-table-column v-if="false" prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'物料规格')" />
|
||||
<el-table-column prop="theLocation" label="存放点位" :min-width="flexWidth('theLocation',crud.data,'存放点位')" />
|
||||
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
||||
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
|
||||
<el-table-column prop="create_name" label="创建人" width="100" />
|
||||
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
|
||||
<el-table-column v-if="false" prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')" />
|
||||
<el-table-column v-if="false" prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
|
||||
@@ -426,7 +425,6 @@ const defaultForm = {
|
||||
due_date: null,
|
||||
order_code: null,
|
||||
region_code: null
|
||||
|
||||
}
|
||||
export default {
|
||||
name: 'VehicleMaterialGroup',
|
||||
|
||||
Reference in New Issue
Block a user