JPAQuery<TSscPlanDayExecutePO> jpaQuery = jpaQueryFactory.selectFrom(planDayExecutePO) .leftJoin(tSscPlanDayPO).on(tSscPlanDayPO.id.eq(planDayExecutePO.objDayplan)) .leftJoin(tSscListPlanPwExtendPO).on(tSscPlanDayPO.id.eq(tSscListPlanPwExtendPO.planId)) .leftJoin(pwEngBasePO).on(tSscListPlanPwExtendPO.engId.eq(pwEngBasePO.engId)); if(!StringUtils.isListEmpty(vo.getExcStatusList())){ eq = eq.and(planDayExecutePO.excStatus.in(vo.getExcStatusList())); } if(StringUtils.isNotEmpty(vo.getKeyWord())){ BooleanExpression contains = tSscPlanDayPO.code.contains(vo.getKeyWord()); contains=contains.or(pwEngBasePO.engName.contains(vo.getKeyWord())); eq = eq.and(contains); } if (pwProDeptPO != null && "02".equals(pwProDeptPO.getProDeptType())) { eq = eq.and(tSscPlanDayPO.leadCode.eq(String.valueOf(loginSysStaffDto.getStaffId()))); } if (StringUtils.isNotEmpty(vo.getWorkBeginDateStar())) { eq = eq.and(tSscPlanDayPO.workBeginDate.goe(vo.getWorkBeginDateStar())); } if (StringUtils.isNotEmpty(vo.getWorkBeginDateEnd())) { eq = eq.and(tSscPlanDayPO.workBeginDate.loe(vo.getWorkBeginDateEnd())); }
标签:jpa,contains,vo,连表,tSscPlanDayPO,pwEngBasePO,查询,eq,StringUtils From: https://www.cnblogs.com/qq376324789/p/17055840.html