diff --git a/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java b/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java index 57111b14..4d94517e 100644 --- a/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java +++ b/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java @@ -87,7 +87,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai Page data=new PageImpl<>(Collections.emptyList()); //申请单查询 if (!dto.getActualOrderNo().isEmpty()){ - List orderNos=jdbcRouteRepository.findByActualOrderNo("%" + dto.getActualOrderNo() + "%"); + List orderNos=jdbcRouteRepository.findByActualOrderNo(dto.getActualOrderNo() + "%"); if (orderNos.isEmpty()){ return new PageResult(0,new ArrayList<>()); } @@ -167,7 +167,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai private static String getString(ConsumptionDetailQuery dto, String query, Map params, PageRequest pageRequest) { if (!dto.getUserName().isEmpty()) { - dto.setUserName("%"+ dto.getUserName()+"%"); + dto.setUserName(dto.getUserName()+"%"); query +="AND user_name LIKE (:userName)"; } diff --git a/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java b/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java index 874eda08..a057fa04 100644 --- a/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java +++ b/src/main/java/com/chint/manage/service/impl/ManageServiceImpl.java @@ -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 list=jdbcOrderDetailBasicRepository.listByCondition(dto,dto.getPageResult());