From 3bca3cbb976aa19d5ea36d3e55be595cf965b221 Mon Sep 17 00:00:00 2001 From: nixj Date: Fri, 12 Jul 2024 13:36:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90add=E3=80=91=E8=A1=8C=E7=A8=8B?= =?UTF-8?q?=E5=8D=95=E3=80=81=E8=B6=85=E6=A0=87=E5=8A=9F=E8=83=BD=E6=96=B0?= =?UTF-8?q?=E5=A2=9ESF=E5=B7=A5=E5=8F=B7=E7=AD=9B=E9=80=89=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/chint/manage/entity/query/ItineraryPageQuery.java | 1 + .../java/com/chint/manage/entity/query/StandardQuery.java | 1 + .../mapper/impl/JdbcConsumptionDetailRepositoryImpl.java | 5 +++++ .../manage/mapper/impl/ManageOrderDetailRepositoryImpl.java | 5 +++++ 4 files changed, 12 insertions(+) diff --git a/src/main/java/com/chint/manage/entity/query/ItineraryPageQuery.java b/src/main/java/com/chint/manage/entity/query/ItineraryPageQuery.java index 7e6b719d..76fe8f7f 100644 --- a/src/main/java/com/chint/manage/entity/query/ItineraryPageQuery.java +++ b/src/main/java/com/chint/manage/entity/query/ItineraryPageQuery.java @@ -11,6 +11,7 @@ import java.util.List; public class ItineraryPageQuery extends BaseQuery { private String applicant="";// 申请人 private String actualOrderNo=""; //申请单号 + private String employeeNo=""; //SF工号 private List userIds=new ArrayList<>(); private List companyCodes=new ArrayList<>(); diff --git a/src/main/java/com/chint/manage/entity/query/StandardQuery.java b/src/main/java/com/chint/manage/entity/query/StandardQuery.java index faa4a418..773d06ea 100644 --- a/src/main/java/com/chint/manage/entity/query/StandardQuery.java +++ b/src/main/java/com/chint/manage/entity/query/StandardQuery.java @@ -10,6 +10,7 @@ import java.util.List; @Data public class StandardQuery extends BaseQuery { private String applicant="";// 申请人 + private String employeeNo=""; //SF工号 private String companyName=""; // 出差公司 private String orderNo=""; //订单号 private String actualOrderNo=""; //申请单号 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 4c5a198b..49bea333 100644 --- a/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java +++ b/src/main/java/com/chint/manage/mapper/impl/JdbcConsumptionDetailRepositoryImpl.java @@ -48,6 +48,10 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai query += "AND roef.company_code IN (:companyCodes) "; } + if (!dto.getEmployeeNo().isEmpty()) { + query += "AND ro.user_id = (:employeeNo) "; + } + if (!dto.getUserIds().isEmpty()) { query += "AND ro.user_id IN (:userIds) "; } @@ -62,6 +66,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai .of(dto.getPageNum() - 1, dto.getPageSize()); params.put("actualOrderNo", dto.getActualOrderNo()); params.put("userIds", dto.getUserIds()); + params.put("employeeNo", dto.getEmployeeNo()); params.put("companyCodes", dto.getCompanyCodes()); params.put("offset", pageRequest.getOffset()); params.put("limit", pageRequest.getPageSize()); diff --git a/src/main/java/com/chint/manage/mapper/impl/ManageOrderDetailRepositoryImpl.java b/src/main/java/com/chint/manage/mapper/impl/ManageOrderDetailRepositoryImpl.java index e4fd9066..6906bbd7 100644 --- a/src/main/java/com/chint/manage/mapper/impl/ManageOrderDetailRepositoryImpl.java +++ b/src/main/java/com/chint/manage/mapper/impl/ManageOrderDetailRepositoryImpl.java @@ -45,6 +45,10 @@ public class ManageOrderDetailRepositoryImpl implements ManageOrderDetailReposit query+="AND oes.applicant LIKE (:applicant) "; } + if (!dto.getEmployeeNo().isEmpty()) { + query+="AND oes.employee_no = (:employeeNo) "; + } + if (!dto.getOrderNo().isEmpty()) { dto.setOrderNo(dto.getOrderNo()+"%"); query+="AND oes.order_no LIKE (:orderNo) "; @@ -69,6 +73,7 @@ public class ManageOrderDetailRepositoryImpl implements ManageOrderDetailReposit .of(dto.getPageNum() - 1, dto.getPageSize()); params.put("actualOrderNo", dto.getActualOrderNo()); params.put("applicant", dto.getApplicant()); + params.put("employeeNo", dto.getEmployeeNo()); params.put("companyName", dto.getCompanyName()); params.put("companyCods", dto.getCompanyCods()); params.put("orderNo", dto.getOrderNo());