【update】部分筛选修改为右模糊匹配
This commit is contained in:
parent
50a0813ce1
commit
68f38e8470
|
@ -87,7 +87,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
|
|||
Page<? extends BaseExcel> data=new PageImpl<>(Collections.emptyList());
|
||||
//申请单查询
|
||||
if (!dto.getActualOrderNo().isEmpty()){
|
||||
List<String> orderNos=jdbcRouteRepository.findByActualOrderNo("%" + dto.getActualOrderNo() + "%");
|
||||
List<String> orderNos=jdbcRouteRepository.findByActualOrderNo(dto.getActualOrderNo() + "%");
|
||||
if (orderNos.isEmpty()){
|
||||
return new PageResult<BaseExcel>(0,new ArrayList<>());
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
|
|||
|
||||
private static String getString(ConsumptionDetailQuery dto, String query, Map<String, Object> params, PageRequest pageRequest) {
|
||||
if (!dto.getUserName().isEmpty()) {
|
||||
dto.setUserName("%"+ dto.getUserName()+"%");
|
||||
dto.setUserName(dto.getUserName()+"%");
|
||||
query +="AND user_name LIKE (:userName)";
|
||||
}
|
||||
|
||||
|
|
|
@ -224,12 +224,9 @@ public class ManageServiceImpl implements ManageService {
|
|||
}
|
||||
dto.setRouteIds(updatedRouteIds);
|
||||
}
|
||||
//设置全模糊
|
||||
//设置右模糊
|
||||
if (!dto.getOrderNo().equals("")){
|
||||
dto.setOrderNo("%"+dto.getOrderNo()+"%");
|
||||
}
|
||||
if (!dto.getApplicant().equals("")){
|
||||
dto.setApplicant("%"+dto.getApplicant()+"%");
|
||||
dto.setOrderNo(dto.getOrderNo()+"%");
|
||||
}
|
||||
|
||||
List<OrderDetailBasic> list=jdbcOrderDetailBasicRepository.listByCondition(dto,dto.getPageResult());
|
||||
|
|
Loading…
Reference in New Issue