• R/O
  • SSH
  • HTTPS

pal: Commit


Commit MetaInfo

Revision1492 (tree)
Zeit2008-12-01 23:26:07
Autorshinsuke

Log Message

skipped update sql.

Ändern Zusammenfassung

Diff

--- timecard/trunk/src/main/java/jp/sf/pal/timecard/service/ReportService.java (revision 1491)
+++ timecard/trunk/src/main/java/jp/sf/pal/timecard/service/ReportService.java (revision 1492)
@@ -189,17 +189,28 @@
189189 && dailyReport.getDayOfWeek() != 6
190190 && !TimecardUtil.checkHoliday(year, month, dailyReport
191191 .getDate())) {
192- dailyReport
193- .setDateType(TimecardConstants.DATE_TYPE_WORKING);
194- dailyReport
195- .setWorkingType(TimecardConstants.WORKING_TYPE_WORK);
192+ if (TimecardConstants.DATE_TYPE_WORKING != dailyReport
193+ .getDateType()
194+ || TimecardConstants.WORKING_TYPE_WORK != dailyReport
195+ .getWorkingType()) {
196+ dailyReport
197+ .setDateType(TimecardConstants.DATE_TYPE_WORKING);
198+ dailyReport
199+ .setWorkingType(TimecardConstants.WORKING_TYPE_WORK);
200+ dailyReportBhv.update(dailyReport);
201+ }
196202 } else {
197- dailyReport
198- .setDateType(TimecardConstants.DATE_TYPE_HOLIDAY);
199- dailyReport
200- .setWorkingType(TimecardConstants.WORKING_TYPE_HOLIDAY);
203+ if (TimecardConstants.DATE_TYPE_HOLIDAY != dailyReport
204+ .getDateType()
205+ || TimecardConstants.WORKING_TYPE_HOLIDAY != dailyReport
206+ .getWorkingType()) {
207+ dailyReport
208+ .setDateType(TimecardConstants.DATE_TYPE_HOLIDAY);
209+ dailyReport
210+ .setWorkingType(TimecardConstants.WORKING_TYPE_HOLIDAY);
211+ dailyReportBhv.update(dailyReport);
212+ }
201213 }
202- dailyReportBhv.update(dailyReport);
203214 }
204215 }
205216 monthlyReport.setDailyReportList(dailyReportList);
Show on old repository browser