|
@@ -41,7 +41,6 @@ import com.fjhx.wms.service.warehouse.WarehouseService;
|
|
|
import com.fjhx.wms.utils.CodeEnum;
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
-import com.ruoyi.common.utils.wrapper.SqlField;
|
|
|
import com.ruoyi.system.utils.UserUtil;
|
|
|
import lombok.Getter;
|
|
|
import lombok.Setter;
|
|
@@ -127,12 +126,13 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
|
|
|
wrapper.eq("sw", StockWait::getBusinessType, dto.getBusinessType());
|
|
|
|
|
|
//关键字搜索
|
|
|
- wrapper.keyword(dto.getKeyword(),
|
|
|
- new SqlField("sw", StockWait::getBusinessCode),
|
|
|
- new SqlField("lis.code"),
|
|
|
- new SqlField("pi.custom_code"),
|
|
|
- new SqlField("pi.name")
|
|
|
- );
|
|
|
+ if(ObjectUtil.isNotEmpty(dto.getKeyword())){
|
|
|
+ wrapper.and(q->q
|
|
|
+ .like("sw", StockWait::getBusinessCode,dto.getKeyword())
|
|
|
+ .or().like("lis.code",dto.getKeyword())
|
|
|
+ .or().exists("SELECT swd.stock_wait_id FROM stock_wait_details swd LEFT JOIN bytesailing_item.product_info pi ON swd.product_id = pi.id where ( pi.`name` LIKE CONCAT( '%', {0}, '%' ) OR pi.custom_code LIKE CONCAT( '%', {0}, '%' ))",dto.getKeyword())
|
|
|
+ );
|
|
|
+ }
|
|
|
|
|
|
//过滤掉待出入库 已完成/手动结束 的数据
|
|
|
wrapper.notIn("sw", StockWait::getStatus, 2, 3);
|