+ " and t.recordDate BETWEEN :startDate and :endDate "
+ " and t.recordDate >= :startDate and t.recordDate < :endDate "
+ " group by t.recordDate "
+ " group by t.recordDate "
+ " order by t.recordDate; "
+ " order by t.recordDate; "
)
)
@@ -2244,7 +2250,7 @@ open class ReportService(
+ " CAST(DATE_FORMAT(recordDate, '%d') AS SIGNED) AS recordDate "
+ " CAST(DATE_FORMAT(recordDate, '%d') AS SIGNED) AS recordDate "
+ " from `leave` "
+ " from `leave` "
+ " where staffId = :staffId "
+ " where staffId = :staffId "
+ " and recordDate BETWEEN :startDate and :endDate "
+ " and recordDate >= :startDate and recordDate < :endDate "
+ " group by recordDate "
+ " group by recordDate "
+ " order by recordDate "
+ " order by recordDate "
)
)
@@ -2604,10 +2610,15 @@ open class ReportService(
val staffInfoList = mutableListOf<Map<String, Any>>()
val staffInfoList = mutableListOf<Map<String, Any>>()
val staffSalaryLists = salaryEffectiveService.getStaffSalaryDataByProjectId(projectId)
val staffSalaryLists = salaryEffectiveService.getStaffSalaryDataByProjectId(projectId)
// val testing = staffSalaryLists.filter{ it.staffId == "B730"}
// println("-------------testing-------------")
// println(testing)
for (item in manHoursSpent) {
for (item in manHoursSpent) {
updateInfo(info, item)
updateInfo(info, item)
if (item.getValue("staffId") == "B730") {
println("---------item---------")
println(item)
}
val hourlyRate = getSalaryForMonth(item.getValue("recordDate") as String, item.getValue("staffId") as String, staffSalaryLists) ?: (item.getValue("hourlyRate") as BigDecimal).toDouble()
val hourlyRate = getSalaryForMonth(item.getValue("recordDate") as String, item.getValue("staffId") as String, staffSalaryLists) ?: (item.getValue("hourlyRate") as BigDecimal).toDouble()