|
@@ -60,9 +60,17 @@ public class WaterTagServiceImpl extends ServiceImpl<WaterTagMapper, WaterTag> i
|
|
|
public Page<Map<String, Object>> getPage(Condition condition) {
|
|
|
|
|
|
Long waterBatchId = condition.getLong("waterBatchId");
|
|
|
+ Integer hadPrinter = condition.getInt("hadPrinter");
|
|
|
+ String keyword = condition.getKeyword();
|
|
|
|
|
|
QueryWrapper<WaterTag> wrapper = Wrappers.<WaterTag>query()
|
|
|
- .eq(waterBatchId != null, "wt.water_batch_id", waterBatchId);
|
|
|
+ .eq(waterBatchId != null, "wt.water_batch_id", waterBatchId)
|
|
|
+ .eq(hadPrinter != null, "wt.had_printer", hadPrinter)
|
|
|
+ .and(keyword != null, q -> q
|
|
|
+ .like("m.name", keyword).or()
|
|
|
+ .like("m.code", keyword).or()
|
|
|
+ .like("wt.rfid_code", keyword)
|
|
|
+ );
|
|
|
|
|
|
return baseMapper.getPage(condition.getPage(), wrapper);
|
|
|
}
|