| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.example.springboot.common.Result; |
| | | import com.example.springboot.component.Plchome; |
| | | import com.example.springboot.component.S7control; |
| | | import com.example.springboot.entity.Queue; |
| | | import com.example.springboot.entity.StorageCage; |
| | | import com.example.springboot.entity.StorageTask; |
| | | import com.example.springboot.mapper.HomeMapper; |
| | |
| | | List<StorageTask> cageList = homeMapper.SelectTaskByState(types); |
| | | for (StorageTask storageTask : cageList) { |
| | | // 判断出片任务位置并清除对应玻璃id |
| | | if ((storageTask.getGlassId().equals(A01glassid1)|| storageTask.getGlassId().equals(A01glassid2))&&DeviceList.get(4)==0) { |
| | | if ((storageTask.getGlassId().equals(A01glassid1) || storageTask.getGlassId().equals(A01glassid2)) |
| | | && DeviceList.get(4) == 0) { |
| | | outSliceServive.StopTask(storageTask.getGlassId(), types); |
| | | ClearGlassId("DB101.10.0"); |
| | | } |
| | |
| | | |
| | | // List<StorageCage> storageCages = homeMapper.selectinout(3); |
| | | // for (StorageCage storageCage : storageCages) { |
| | | // List<StorageCage> storageCagess = homeMapper.SelectStoragesGlassById(storageCage.getGlassId()); |
| | | // List<StorageCage> storageCagess = |
| | | // homeMapper.SelectStoragesGlassById(storageCage.getGlassId()); |
| | | |
| | | // for (StorageCage storageCagez : storageCagess) { |
| | | |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | public Result InsertQueueGlassId(Short id, Queue queue) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (Plchome.FeedState == false) { |
| | | Plchome.FeedState = true; |
| | | Short zhi = 200; |
| | | short result = homeMapper.SelectStorageByGlassId(queue.getglassId()); |
| | | if (result > 0) { |
| | | map.put("message", "300"); |
| | | } else { |
| | | if (id == 1) { |
| | | // 调用伍存储过程 |
| | | zhi = spianService.selectAll(queue.getglassId()); |
| | | if (zhi == 200) { |
| | | homeMapper.InsertQueueGlassId(queue, id); |
| | | } |
| | | } |
| | | map.put("message", zhi); |
| | | } |
| | | Plchome.FeedState = false; |
| | | } else { |
| | | map.put("message", 200); |
| | | } |
| | | return Result.success(map); |
| | | } |
| | | |
| | | } |