|
@@ -51,11 +51,11 @@ public class AbnormalInfoServiceImpl extends ServiceImpl<AbnormalInfoMapper, Abn
|
|
|
.like("ai", AbnormalInfo::getTitle, dto.getKeyword()).or()
|
|
|
.like("ai", AbnormalInfo::getLinkCode, 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 pd.del_flag=0 and ( pi.`name` LIKE CONCAT( '%', {0}, '%' ) OR pi.custom_code LIKE CONCAT( '%', {0}, '%' ))", dto.getKeyword()).or()
|
|
|
+ .inSql("p.id","select pd.purchase_id from bytesailing_purchase.purchase_detail pd LEFT JOIN bytesailing_item.product_info pi ON pd.bussiness_id = pi.id where pd.del_flag=0 and ( pi.`name` LIKE CONCAT( '%', '"+dto.getKeyword()+"', '%' ) OR pi.custom_code LIKE CONCAT( '%', '"+dto.getKeyword()+"', '%' ))").or()
|
|
|
//京东
|
|
|
- .exists("select std.stock_transfer_id from stock_transfer_details std LEFT JOIN bytesailing_item.product_info pi ON std.product_id = pi.id where ( pi.`name` LIKE CONCAT( '%', {0}, '%' ) OR pi.custom_code LIKE CONCAT( '%', {0}, '%' ))", dto.getKeyword()).or()
|
|
|
+ .inSql("ai.link_id","select std.stock_transfer_id from stock_transfer_details std LEFT JOIN bytesailing_item.product_info pi ON std.product_id = pi.id where ( pi.`name` LIKE CONCAT( '%', '"+dto.getKeyword()+"', '%' ) OR pi.custom_code LIKE CONCAT( '%', '"+dto.getKeyword()+"', '%' ))").or()
|
|
|
//待入库
|
|
|
- .exists("select arrd.arrival_id from bytesailing_purchase.arrival_detail arrd LEFT JOIN bytesailing_item.product_info pi ON arrd.bussiness_id = pi.id where arrd.del_flag=0 and ( pi.`name` LIKE CONCAT( '%', {0}, '%' ) OR pi.custom_code LIKE CONCAT( '%', {0}, '%' ))", dto.getKeyword()).or()
|
|
|
+ .inSql("ai.link_id","select arrd.arrival_id from bytesailing_purchase.arrival_detail arrd LEFT JOIN bytesailing_item.product_info pi ON arrd.bussiness_id = pi.id where arrd.del_flag=0 and ( pi.`name` LIKE CONCAT( '%', '"+dto.getKeyword()+"', '%' ) OR pi.custom_code LIKE CONCAT( '%', '"+dto.getKeyword()+"', '%' ))").or()
|
|
|
);
|
|
|
}
|
|
|
|