package com.mes.workstation.service.impl; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.mes.workstation.entity.UpWorkSequence; import com.mes.workstation.entity.UpWorkstation; import com.mes.workstation.mapper.UpWorkstationMapper; import com.mes.workstation.service.UpWorkstationService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; /** *

* 服务实现类 *

* * @author zhoush * @since 2024-04-07 */ @Service @Slf4j public class UpWorkstationServiceImpl extends ServiceImpl implements UpWorkstationService { public static final String DB_100_10 = "DB_100_10"; //判断是否可以吸片进行任务 public boolean isCanLoadGlass() { String loadstart = "吸片信号";//plcmes.getPlcParameter("吸片信号").getValue(); return "1".equals(loadstart); } //显示正在进行任务的工程信息 //判断优先吸片位置后发送出片任务 public UpWorkSequence selectPriority() { UpWorkSequence upwork= this.baseMapper.selectPriority(1); String start = "吸片信号";//plcmes.getPlcParameter("吸片信号").getValue(); if(upwork!=null&&start.equals("1")){ //发送出片任务 //plcmes.getPlcParameter("出片信号").setValue("1"); } return upwork; } /** * 增加人工输入的工位玻璃信息/删除人工搬走的玻璃信息 * @param upwork */ @Override public void updateGlassMessage(UpWorkstation upwork) { UpdateWrapper updateWrapper = new UpdateWrapper<>(); updateWrapper.eq("workstation_id", upwork.getWorkstationId()); int update = this.baseMapper.update(upwork, updateWrapper); } }