From 68f38e84709329d3ef428961eff1b8f21af5717f Mon Sep 17 00:00:00 2001 From: nixj Date: Fri, 28 Jun 2024 13:13:09 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90update=E3=80=91=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=8F=B3=E6=A8=A1?= =?UTF-8?q?=E7=B3=8A=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/impl/JdbcConsumptionDetailRepositoryImpl.java | 4 ++-- .../com/chint/manage/service/impl/ManageServiceImpl.java | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) 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());