瀏覽代碼

fix for backgroud black (cross team report)

tags/Baseline_30082024_BACKEND_UAT
cyril.tsui 1 年之前
父節點
當前提交
164e387b69
共有 1 個文件被更改,包括 27 次插入10 次删除
  1. +27
    -10
      src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt

+ 27
- 10
src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt 查看文件

@@ -2921,8 +2921,12 @@ open class ReportService(


createCell(1).apply { createCell(1).apply {
setCellValue(team.code) setCellValue(team.code)
cellStyle = normalFontWithBorderStyle
CellUtil.setAlignment(this, HorizontalAlignment.CENTER)

val cloneStyle = workbook.createCellStyle()
cloneStyle.cloneStyleFrom(normalFontWithBorderStyle)
cellStyle = cloneStyle.apply {
alignment = HorizontalAlignment.CENTER
}
} }


} }
@@ -2939,8 +2943,11 @@ open class ReportService(
sortedGrades.forEach { grade: Grade -> sortedGrades.forEach { grade: Grade ->
createCell(columnIndex++).apply { createCell(columnIndex++).apply {
setCellValue(grade.name) setCellValue(grade.name)
cellStyle = boldFontWithBorderStyle
CellUtil.setAlignment(this, HorizontalAlignment.CENTER)
val cloneStyle = workbook.createCellStyle()
cloneStyle.cloneStyleFrom(boldFontWithBorderStyle)
cellStyle = cloneStyle.apply {
alignment = HorizontalAlignment.CENTER
}
} }
} }


@@ -2965,8 +2972,11 @@ open class ReportService(
columnIndex = 0 columnIndex = 0
createCell(columnIndex++).apply { createCell(columnIndex++).apply {
setCellValue(chargedTeam.code) setCellValue(chargedTeam.code)
cellStyle = normalFontWithBorderStyle
CellUtil.setAlignment(this, HorizontalAlignment.CENTER)
val cloneStyle = workbook.createCellStyle()
cloneStyle.cloneStyleFrom(normalFontWithBorderStyle)
cellStyle = cloneStyle.apply {
alignment = HorizontalAlignment.CENTER
}
} }


var totalSalary = 0.0 var totalSalary = 0.0
@@ -2993,14 +3003,21 @@ open class ReportService(
createCell(columnIndex++).apply { createCell(columnIndex++).apply {
val lastCellLetter = CellReference.convertNumToColString(this.columnIndex - 1) val lastCellLetter = CellReference.convertNumToColString(this.columnIndex - 1)
cellFormula = "sum(B${this.rowIndex + 1}:${lastCellLetter}${this.rowIndex + 1})" cellFormula = "sum(B${this.rowIndex + 1}:${lastCellLetter}${this.rowIndex + 1})"
cellStyle = boldFontWithBorderStyle
cellStyle.dataFormat = accountingStyle

val cloneStyle = workbook.createCellStyle()
cloneStyle.cloneStyleFrom(boldFontWithBorderStyle)
cellStyle = cloneStyle.apply {
dataFormat = accountingStyle
}
} }


createCell(columnIndex).apply { createCell(columnIndex).apply {
setCellValue(totalSalary) setCellValue(totalSalary)
cellStyle = boldFontWithBorderStyle
cellStyle.dataFormat = accountingStyle
val cloneStyle = workbook.createCellStyle()
cloneStyle.cloneStyleFrom(boldFontWithBorderStyle)
cellStyle = cloneStyle.apply {
dataFormat = accountingStyle
}
} }
} }
} }


Loading…
取消
儲存