@Override
public Integer selectCount(ProcessHistorySearchForm processHistorySearchForm) {
return queryFactory.select(qProcessVersion.processVersionSequence.count())
.from(qProcessVersion)
.where(
qProcessVersion.processSequence.eq(JPAExpressions.select(qProcessVersion.processSequence)
.from(qProcessVersion)
.where(qProcessVersion.processVersionSequence.eq(processHistorySearchForm.getProcessVersionSequence()))),
qProcessVersion.removeYn.eq("N"),
BooleanExpressionCreator.stringEqualsIfExist(qProcessVersion.registerId, processHistorySearchForm.getRegistorId()),
BooleanExpressionCreator.dateBetweenIfStartEndExist(qProcessVersion.registerDateTime, processHistorySearchForm.getStartDate(), processHistorySearchForm.getEndDate())
)
.orderBy(qProcessVersion.majorVersion.desc(), qProcessVersion.minorVersion.desc())
.fetchOne()
.intValue();
}
댓글남기기