|
@@ -41,10 +41,7 @@ import org.springframework.context.event.EventListener;
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.Collections;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
-import java.util.Set;
|
|
|
|
|
|
+import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
@@ -82,12 +79,17 @@ public class LogisticsInfosServiceImpl extends ServiceImpl<LogisticsInfosMapper,
|
|
wrapper.eq("li", LogisticsInfos::getLogisticsStatus, dto.getLogisticsStatus());
|
|
wrapper.eq("li", LogisticsInfos::getLogisticsStatus, dto.getLogisticsStatus());
|
|
wrapper.eq("li", LogisticsInfos::getStatus, dto.getStatus());
|
|
wrapper.eq("li", LogisticsInfos::getStatus, dto.getStatus());
|
|
if (ObjectUtil.isNotEmpty(dto.getKeyword())) {
|
|
if (ObjectUtil.isNotEmpty(dto.getKeyword())) {
|
|
|
|
+ //判断是否是 采购到货 采购退货 来源
|
|
|
|
+ boolean flag = !Objects.equals(dto.getBusinessType(), 1) || !Objects.equals(dto.getBusinessType(), 5);
|
|
|
|
+
|
|
List<String> companyCodes = companyInfoService.listObject(CompanyInfo::getCode, q -> q.like(CompanyInfo::getName, dto.getKeyword()));
|
|
List<String> companyCodes = companyInfoService.listObject(CompanyInfo::getCode, q -> q.like(CompanyInfo::getName, dto.getKeyword()));
|
|
wrapper.and(q -> q.like("li", LogisticsInfos::getCode, dto.getKeyword())
|
|
wrapper.and(q -> q.like("li", LogisticsInfos::getCode, dto.getKeyword())
|
|
.or().like("li", LogisticsInfos::getBusinessCode, dto.getKeyword())
|
|
.or().like("li", LogisticsInfos::getBusinessCode, dto.getKeyword())
|
|
.or().in("li", LogisticsInfos::getLogisticsCompanyCode, companyCodes)
|
|
.or().in("li", LogisticsInfos::getLogisticsCompanyCode, companyCodes)
|
|
- .or().like("pi.custom_code", dto.getKeyword())
|
|
|
|
- .or().like("pi.name", dto.getKeyword())
|
|
|
|
|
|
+ .or(flag).like(flag,"pi.custom_code", dto.getKeyword())
|
|
|
|
+ .or(flag).like(flag,"pi.name", dto.getKeyword())
|
|
|
|
+ //采购到货 采购退货 来源
|
|
|
|
+ .or().exists("select pd.purchase_id from bytesailing_purchase.purchase_detail pd LEFT JOIN bytesailing_item.product_info pi ON pd.bussiness_id = pi.id where ( pi.`name` LIKE CONCAT( '%', {0}, '%' ) OR pi.custom_code LIKE CONCAT( '%', {0}, '%' ))",dto.getKeyword())
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|