| | |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.job.PlcStorageCageTask; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.mapper.TemperingGlassInfoMapper; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | @Resource |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | |
| | | @Resource |
| | | private PlcStorageCageTask plcStorageCageTask; |
| | | |
| | | @Resource |
| | | private DamageService damageService; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean temperingGlass(String temperingLayoutId, String engineerId) { |
| | | public boolean temperingGlass(String temperingLayoutId, String engineerId, String temperingFeedSequence) { |
| | | LambdaQueryWrapper<TemperingGlassInfo> temperingGlassInfoLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | temperingGlassInfoLambdaQueryWrapper |
| | | .eq(TemperingGlassInfo::getState, Const.TEMPERING_NEW); |
| | |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .orderBy(Boolean.TRUE, sequenceOrder, GlassInfo::getTemperingFeedSequence)); |
| | | if (CollectionUtils.isNotEmpty(temperingGlassInfos)) { |
| | | if ("0".equals(temperingFeedSequence)){ |
| | | if (CollectionUtils.isNotEmpty(temperingGlassInfos)) { |
| | | plcStorageCageTask.computeOutMoreGlassInfo(temperingGlassInfos, Boolean.FALSE, ""); |
| | | } |
| | | }else{ |
| | | temperingGlassInfoService.saveBatch(temperingGlassInfos); |
| | | } |
| | | return true; |
| | | } |
| | | } |