严智鑫
2024-04-09 95db3e96a9465f137fdf16540e0c5985752894c2
TemperingGlassModule/src/main/java/com/mes/service/TemperingService.java
@@ -1,12 +1,10 @@
package com.mes.service;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.mes.common.PlcTools.S7control;
import com.mes.entity.GlassInfo;
import com.mes.entity.userInfo.SysError;
import com.mes.entity.Tempering;
import com.mes.mapper.TemperingMapper;
import com.mes.mapper.userInfo.SysErrorMapper;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import org.springframework.stereotype.Service;
@Service
@@ -21,7 +19,7 @@
    }
    //接收id返回坐标和数据
    public GlassInfo SelectOutGlass (String glassid) {
        GlassInfo GlassInfo = temperingMapper.SelectOutGlass(glassid);
        GlassInfo GlassInfo = temperingMapper.SelectGlass(glassid);
        return GlassInfo;
    }
    //发送坐标信息
@@ -38,15 +36,23 @@
        else {
            return 0;
        }
    }
    //发送进炉信号
    public void SendIntoGlass (short start) {
        s7control.WriteWord("DB100.10", start);
    }
    //接受完成字回复确认字
    public void SendIntoGlass () {
        s7control.WriteWord("DB100.10", (short)1);
    }
    //显示等待中的版图
    public List <Tempering> SelectWaitingGlass () {
        List<Tempering> WaitingGlass = temperingMapper.SelectWaitingGlass();
        return WaitingGlass;
    }
    //显示正在进炉的版图
    public List<Tempering> SelectIntoGlass () {
        List<Tempering> IntoGlass = temperingMapper.SelectInGlass();
        return IntoGlass;
    }
}