| | |
| | | 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 |
| | |
| | | } |
| | | //接收id返回坐标和数据 |
| | | public GlassInfo SelectOutGlass (String glassid) { |
| | | GlassInfo GlassInfo = temperingMapper.SelectOutGlass(glassid); |
| | | GlassInfo GlassInfo = temperingMapper.SelectGlass(glassid); |
| | | return GlassInfo; |
| | | } |
| | | //发送坐标信息 |
| | |
| | | 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; |
| | | } |
| | | } |