|  |  |  | 
|---|
|  |  |  | // 检索库位 | 
|---|
|  |  |  | List<String> matNos = waitPakins.stream().map(WaitPakin::getMatnr).distinct().collect(Collectors.toList()); | 
|---|
|  |  |  | String batch = waitPakins.get(0).getBatch(); | 
|---|
|  |  |  | String owner = waitPakins.get(0).getOwner(); | 
|---|
|  |  |  | StartupDto dto = commonService.getLocNo(1, devpNo, matNos, batch, hostId, locTypeDto, 0); | 
|---|
|  |  |  | int workNo = dto.getWorkNo(); | 
|---|
|  |  |  | Date now = new Date(); | 
|---|
|  |  |  | 
|---|
|  |  |  | wrkMast.setModiTime(now); | 
|---|
|  |  |  | wrkMast.setHostId(hostId); | 
|---|
|  |  |  | wrkMast.setCrnNo(dto.getCrnNo()); | 
|---|
|  |  |  | wrkMast.setOwner(owner); | 
|---|
|  |  |  | boolean res = wrkMastService.save(wrkMast); | 
|---|
|  |  |  | if (!res) { | 
|---|
|  |  |  | throw new CoolException("保存工作档失败"); | 
|---|