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());