| | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.api.controller.params.ReceviceTaskParams; |
| | | import com.zy.api.service.HmesApiService; |
| | | import com.zy.api.service.WcsApiService; |
| | | import com.zy.asrs.entity.BasDevice; |
| | | import com.zy.asrs.entity.LocAroundBind; |
| | | import com.zy.asrs.entity.LocMast; |
| | |
| | | |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | |
| | | @Autowired |
| | | private WcsApiService wcsApiService; |
| | | /** |
| | | * 接收MES穿线任务 |
| | | * @author Ryan |
| | |
| | | if (Objects.isNull(binds) || binds.isEmpty()) { |
| | | throw new CoolException("机台未绑定工作站台!!"); |
| | | } |
| | | Set<String> locs = binds.stream().map(LocAroundBind::getBLocNo).collect(Collectors.toSet()); |
| | | Set<String> locs = binds.stream().map(LocAroundBind::getBlocNo).collect(Collectors.toSet()); |
| | | |
| | | LocMast locMasts = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .in("loc_no", locs) |
| | |
| | | |
| | | //todo 锁库位需WCS锁定(相关库位,不可执行任务操作,不能只在WMS锁定) |
| | | List<LocMast> locMs = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .in("loc_no", locs) |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type)); |
| | | locMs.forEach(loc -> { |
| | |
| | | if (Objects.isNull(binds) || binds.isEmpty()) { |
| | | throw new CoolException("机台未绑定工作站台!!"); |
| | | } |
| | | Set<String> locs = binds.stream().map(LocAroundBind::getBLocNo).collect(Collectors.toSet()); |
| | | Set<String> locs = binds.stream().map(LocAroundBind::getBlocNo).collect(Collectors.toSet()); |
| | | |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().in("loc_no", locs).eq("loc_sts", LocStsType.LOC_STS_TYPE_X.type)); |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().in("loc_no", locs) |
| | | .eq("frozen", 0).eq("deleted", 0) |
| | | .eq("loc_sts", LocStsType.LOC_STS_TYPE_X.type)); |
| | | if (Objects.isNull(locMasts) || locMasts.isEmpty()) { |
| | | throw new CoolException("没有禁用库位,不需要释放!!"); |
| | | } |
| | |
| | | } |
| | | }); |
| | | |
| | | return R.ok(); |
| | | // wcsApiService.reportLockLocs(locs, "lock"); |
| | | |
| | | return R.ok("释放成功 !!"); |
| | | } |
| | | } |