if (dywLeaderAssessment.getAssessmentYear() != null && "true".equals(dywLeaderAssessment.getIsEmpty())) { if (dywLeaderAssessment.getAssessmentYear().equals(assessmentVO.getAssessmentYearOne())) { assessmentQueryWrapper.isNull("t.assessmentYearOne"); } else if (dywLeaderAssessment.getAssessmentYear().equals(assessmentVO.getAssessmentYearTwo())) { assessmentQueryWrapper.isNull("t.assessmentYearTwo"); } else if (dywLeaderAssessment.getAssessmentYear().equals(assessmentVO.getAssessmentYearThree())) { assessmentQueryWrapper.isNull("t.assessmentYearThree"); } else if (dywLeaderAssessment.getAssessmentYear().equals(assessmentVO.getAssessmentYearFour())) { assessmentQueryWrapper.isNull("t.assessmentYearFour"); } else if (dywLeaderAssessment.getAssessmentYear().equals(assessmentVO.getAssessmentYearFive())) { assessmentQueryWrapper.isNull("t.assessmentYearFive"); }
时间: 2024-04-29 15:20:24 浏览: 36
这是一段 Java 代码,主要是根据不同的条件设置 SQL 查询语句中的过滤条件。具体来说:
- 如果 dywLeaderAssessment 对象的 assessmentYear 不为 null,且 isEmpty 属性为 "true",则进行下一步操作;
- 根据 dywLeaderAssessment 对象的 assessmentYear 属性值,分别判断是否和 assessmentVO 对象中的五个属性中的任意一个相等;
- 如果相等,则在 SQL 查询中添加过滤条件,过滤条件为 t.assessmentYearOne / t.assessmentYearTwo / t.assessmentYearThree / t.assessmentYearFour / t.assessmentYearFive 中有 null 值的记录。
这段代码的目的可能是为了根据一些条件查询数据库中的记录,但是不足够完整,不能确定其完整的功能和用途。
阅读全文