I never knew there was a method to get a count of days
worked based on eligible tcodes and hour types. E.g.
wbData.getCountWorkSummaryRange
protected int getAvgMinutes(WBData wbData, Date start, Date
end, ParametersResolved pars) throws SQLException {
int daysWrkd =
wbData.getCountWorkSummaryRange(wbData.getRuleData().getWorkSummary().getWrksId(),
start, end, null, null, pars.avgTcodes, pars.avgTcodesInclusive,
pars.avgHtypes, pars.avgHtypesInclusive, pars.detPrem, 1);
int minsWrkd = wbData.getMinutesWorkDetailPremiumRange(start, end, null, null,
pars.avgTcodes, pars.avgTcodesInclusive, pars.avgHtypes,
pars.avgHtypesInclusive, pars.detPrem);
if (logger.isDebugEnabled()) logger.debug("Days worked : " + daysWrkd
+ ", minsWorked :" + minsWrkd + " from :" + start + "
to end :" + end);
int ret = 0;
if (daysWrkd != 0) {
ret = minsWrkd / daysWrkd;
}
return ret;
}
No comments:
Post a Comment