|  |  | 
 |  |  | import com.zy.asrs.service.LocDetlService; | 
 |  |  | import lombok.Data; | 
 |  |  |  | 
 |  |  | import java.util.Iterator; | 
 |  |  | import java.util.List; | 
 |  |  | import java.util.*; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * Created by vincent on 2020/6/17 | 
 |  |  | 
 |  |  |  | 
 |  |  |     private String locNo; | 
 |  |  |  | 
 |  |  |     private List<LocDetlDto> locDetlDtos; | 
 |  |  |     private List<LocDetlDto> locDetlDtos = new ArrayList<>(); | 
 |  |  |  | 
 |  |  |     public OutLocDto() { | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public OutLocDto(String locNo, List<LocDetlDto> locDetlDtos) { | 
 |  |  |     public OutLocDto(String locNo, LocDetlDto locDetlDto) { | 
 |  |  |         this.locNo = locNo; | 
 |  |  |         this.locDetlDtos = locDetlDtos; | 
 |  |  |         this.locDetlDtos.add(locDetlDto); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public boolean isAll(){ | 
 |  |  |         List<LocDetlDto> locDetlDtosCp = new ArrayList<>(this.locDetlDtos); | 
 |  |  |         // 查询当前库位号所有的库存明细 | 
 |  |  |         LocDetlService locDetlService = SpringUtils.getBean(LocDetlService.class); | 
 |  |  |         List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", this.locNo)); | 
 |  |  | 
 |  |  |         } | 
 |  |  |         int sameNumber = 0; | 
 |  |  |         for (LocDetl locDetl : locDetls) { | 
 |  |  |             Iterator<LocDetlDto> iterator = this.locDetlDtos.iterator(); | 
 |  |  |             Iterator<LocDetlDto> iterator = locDetlDtosCp.iterator(); | 
 |  |  |             while (iterator.hasNext()) { | 
 |  |  |                 LocDetl next = iterator.next().getLocDetl(); | 
 |  |  |                 if (!next.getMatnr().equals(locDetl.getMatnr())) { | 
 |  |  |                 LocDetlDto next = iterator.next(); | 
 |  |  |                 if (!next.getLocDetl().getMatnr().equals(locDetl.getMatnr())) { | 
 |  |  |                     continue; | 
 |  |  |                 } | 
 |  |  |                 if (!Cools.eq(next.getBatch(), locDetl.getBatch())) { | 
 |  |  |                 if (!Cools.eq(next.getLocDetl().getBatch(), locDetl.getBatch())) { | 
 |  |  |                     continue; | 
 |  |  |                 } | 
 |  |  |                 if (next.getAnfme() > locDetl.getAnfme()) { | 
 |  |  |                 if (next.getCount() > locDetl.getAnfme()) { | 
 |  |  |                     throw new CoolException("服务器内部错误"); | 
 |  |  |                 } | 
 |  |  |                 if (next.getAnfme().equals(locDetl.getAnfme())) { | 
 |  |  |                 if (next.getCount().equals(locDetl.getAnfme())) { | 
 |  |  |                     sameNumber++; | 
 |  |  |                     iterator.remove(); | 
 |  |  |                     break; |