Compare commits
No commits in common. "f9af03b030232875caad48447d1ab2b07234e552" and "e5128e3c1f858b2822fb389e4e3aa295a891c720" have entirely different histories.
f9af03b030
...
e5128e3c1f
@ -28,8 +28,10 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 包装箱表
|
||||
@ -141,16 +143,9 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
||||
// matchColor(dto);
|
||||
QueryWrapper<WoPackagingBoxSubstrate> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq(StringUtils.isNotBlank(entity.getBoxNo()), WoPackagingBoxSubstrate.PACKAGING_BOX_ID, entity.getBoxNo());
|
||||
//重复上片基板去重
|
||||
// wrapper.select("DISTINCT WO_SUBSTRATE_ID").orderByDesc("CREATE_TIME");
|
||||
// wrapper.orderByAsc(WoPackagingBoxSubstrate.SLOT);
|
||||
wrapper.orderByAsc(WoPackagingBoxSubstrate.SLOT);
|
||||
List<WoPackagingBoxSubstrate> woPackagingBoxSubstrateList = substrateMapper.selectList(wrapper);
|
||||
List<WoPackagingBoxSubstrate> distinctList = woPackagingBoxSubstrateList.stream().collect(
|
||||
Collectors.collectingAndThen(
|
||||
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(WoPackagingBoxSubstrate::getWoSubstrateId))), ArrayList::new)
|
||||
);
|
||||
List<WoPackagingBoxSubstrate> sortedDistinctList = distinctList.stream().sorted(Comparator.comparing(WoPackagingBoxSubstrate::getSlot)).collect(Collectors.toList());
|
||||
dto.setSubstrateList(sortedDistinctList);
|
||||
dto.setSubstrateList(woPackagingBoxSubstrateList);
|
||||
return dto;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user