|
|
|
@ -1427,18 +1427,22 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
// wrapper.le(StrUtil.isNotEmpty(endTime),VYpzsPlanInfo::getKEEP_BOOK_TIME,endTime+" 23:59:59");
|
|
|
|
|
|
|
|
|
|
wrapper.eq(StrUtil.isNotBlank(udiwmsThrOrderRequest.getBillNo()), VYpzsPlanInfo::getCGDBH, udiwmsThrOrderRequest.getBillNo());
|
|
|
|
|
|
|
|
|
|
//关键字模糊处理
|
|
|
|
|
wrapper.like(StrUtil.isNotBlank(udiwmsThrOrderRequest.getKeywords()), VYpzsPlanInfo::getCGDBH, udiwmsThrOrderRequest.getKeywords())
|
|
|
|
|
.or().
|
|
|
|
|
like(VYpzsPlanInfo::getCGDBH, udiwmsThrOrderRequest.getKeywords());
|
|
|
|
|
// TODO: 2024/9/17 字段进行匹配 //模糊 单据号、三方单据类型、发货方、收货方、单据时间,来源系统
|
|
|
|
|
String keywords = udiwmsThrOrderRequest.getKeyWords();
|
|
|
|
|
wrapper.and(StrUtil.isNotEmpty(keywords), t -> t.like(VYpzsPlanInfo::getCGDBH, keywords)//单据号
|
|
|
|
|
);
|
|
|
|
|
Page<VYpzsPlanInfo> page = vYpzsPlanInfoMapper.selectGroupedWithPagination(new Page<VYpzsPlanInfo>(udiwmsThrOrderRequest.getPage(), udiwmsThrOrderRequest.getLimit()), udiwmsThrOrderRequest);
|
|
|
|
|
|
|
|
|
|
IPage<VYpzsPlanInfo> page = vYpzsPlanInfoMapper.selectPage(new Page<VYpzsPlanInfo>(udiwmsThrOrderRequest.getPage(), udiwmsThrOrderRequest.getLimit()), wrapper);
|
|
|
|
|
List<VYpzsPlanInfo> planInfos = page.getRecords();
|
|
|
|
|
List<IoCollectOrder> ioCollectOrders = new ArrayList<>();
|
|
|
|
|
if (CollUtil.isNotEmpty(planInfos)) {
|
|
|
|
|
Map<String, List<VYpzsPlanInfo>> groupedByBz = planInfos.stream()
|
|
|
|
|
|
|
|
|
|
List<String> collect = planInfos.stream().map(VYpzsPlanInfo::getCGDBH).collect(Collectors.toList());
|
|
|
|
|
LambdaQueryWrapper<VYpzsPlanInfo> wrapper1 = new LambdaQueryWrapper<>();
|
|
|
|
|
wrapper1.in(VYpzsPlanInfo::getCGDBH,collect);
|
|
|
|
|
List<VYpzsPlanInfo> vYpzsPlanInfos = vYpzsPlanInfoMapper.selectList(wrapper1);
|
|
|
|
|
|
|
|
|
|
Map<String, List<VYpzsPlanInfo>> groupedByBz = vYpzsPlanInfos.stream()
|
|
|
|
|
.collect(Collectors.groupingBy(VYpzsPlanInfo::getCGDBH));
|
|
|
|
|
groupedByBz.forEach((key, value) -> {
|
|
|
|
|
VYpzsPlanInfo planInfo = value.get(0);
|
|
|
|
@ -1493,11 +1497,27 @@ public class CtqyyClient extends CommonHttpClient {
|
|
|
|
|
|
|
|
|
|
wrapper.eq(StrUtil.isNotBlank(udiwmsThrOrderRequest.getBillNo()), VYpzsIoInfo::getPHYSIC_CODE, udiwmsThrOrderRequest.getBillNo());
|
|
|
|
|
wrapper.eq(StrUtil.isNotBlank(udiwmsThrOrderRequest.getBusType()), VYpzsIoInfo::getIO_SORT, udiwmsThrOrderRequest.getBusType());
|
|
|
|
|
Page<VYpzsIoInfo> page = vYpzsIoInfoMapper.selectPage(new Page<VYpzsIoInfo>(udiwmsThrOrderRequest.getPage(), udiwmsThrOrderRequest.getLimit()), wrapper);
|
|
|
|
|
|
|
|
|
|
//关键字模糊处理
|
|
|
|
|
String keywords = udiwmsThrOrderRequest.getKeyWords();
|
|
|
|
|
wrapper.and(StrUtil.isNotEmpty(keywords), t -> t.like(VYpzsIoInfo::getPHYSIC_CODE, keywords)//单据号
|
|
|
|
|
.or().like(VYpzsIoInfo::getCONSIGNOR_NAME, keywords)//发货方
|
|
|
|
|
.or().like(VYpzsIoInfo::getCONSIGNEE_NAME, keywords)//收货方
|
|
|
|
|
.or().like(VYpzsIoInfo::getKEEP_BOOK_TIME, keywords)//收货方
|
|
|
|
|
.or().like(VYpzsIoInfo::getIO_SORT, keywords)//收货方
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Page<VYpzsIoInfo> page = vYpzsIoInfoMapper.selectGroupedWithPagination( new Page<VYpzsIoInfo>(udiwmsThrOrderRequest.getPage(), udiwmsThrOrderRequest.getLimit()), udiwmsThrOrderRequest);
|
|
|
|
|
|
|
|
|
|
List<VYpzsIoInfo> ioInfos = page.getRecords();
|
|
|
|
|
List<IoCollectOrder> ioCollectOrders = new ArrayList<>();
|
|
|
|
|
if (CollUtil.isNotEmpty(ioInfos)) {
|
|
|
|
|
Map<String, List<VYpzsIoInfo>> groupedByPhysicCode = ioInfos.stream()
|
|
|
|
|
List<String> collect = ioInfos.stream().map(VYpzsIoInfo::getRECEIPT_NUMBER).collect(Collectors.toList());
|
|
|
|
|
LambdaQueryWrapper<VYpzsIoInfo> vYpzsIoInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
vYpzsIoInfoLambdaQueryWrapper.in(VYpzsIoInfo::getRECEIPT_NUMBER,collect);
|
|
|
|
|
List<VYpzsIoInfo> vYpzsIoInfos = vYpzsIoInfoMapper.selectList(vYpzsIoInfoLambdaQueryWrapper);
|
|
|
|
|
|
|
|
|
|
Map<String, List<VYpzsIoInfo>> groupedByPhysicCode = vYpzsIoInfos.stream()
|
|
|
|
|
.collect(Collectors.groupingBy(VYpzsIoInfo::getRECEIPT_NUMBER));
|
|
|
|
|
groupedByPhysicCode.forEach((key, value) -> {
|
|
|
|
|
VYpzsIoInfo info = value.get(0);
|
|
|
|
|