Преглед на файлове

[Report] Re-write sub-sql (project fee) for financial status report

master
cyril.tsui преди 1 ден
родител
ревизия
f024f4926c
променени са 1 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. +6
    -2
      src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt

+ 6
- 2
src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt Целия файл

@@ -2252,7 +2252,7 @@ open class ReportService(
+ " and pe.issueDate >= :startMonth and pe.issueDate <= :endMonth "
+ " group by projectId "
+ " ), "
+ " cte_fee as ( "
/* + " cte_fee as ( "
+ " select IFNULL(sum(mp.amount),0) as expectedTotalFee, p.id as projectId "
+ " from milestone_payment mp "
+ " left join milestone m on mp.milestoneId = m.id "
@@ -2263,7 +2263,11 @@ open class ReportService(
+ " and mp.`date` >= :startMonth and mp.`date` <= :endMonth "
+ " and p.teamLead = :teamLeadId"
+ " group by p.id"
+ " ) "
+ " ) "*/
+ " cte_fee as ( "
+ " select ifnull(p.expectedTotalFee, 0) as expectedTotalFee, p.id as projectId "
+ " from project p "
+ ")"
+ " select p.code, p.name, p.description, c.name as client, IFNULL(s2.name, \"N/A\") as subsidiary, concat(t.code, \' - \', t.name) as teamLead, "
+ " concat(t.code, \' - \', s.staffId, \' - \', s.name) as subTeamLead,"
+ " p.planStart , p.planEnd ,"


Зареждане…
Отказ
Запис