浏览代码

update

tags/Baseline_30082024_BACKEND_UAT
Mac\David 1年前
父节点
当前提交
bbb4186568
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. +6
    -3
      src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt

+ 6
- 3
src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt 查看文件

@@ -23,9 +23,7 @@ open class DashboardService(

fun CustomerSubsidiary(args: Map<String, Any>): List<Map<String, Any>> {
val sql = StringBuilder("select"
+ " row_number()OVER ("
+ " ORDER BY c.id"
+ " ) as id,"
+ " ROW_NUMBER() OVER (ORDER BY c.id, c.name, c.code, c.address, c.district, c.brNo, c.typeId, s.id, s.name, s.code, s.address, s.district, s.brNo, s.typeId) AS RowNum,"
+ " c.id as customerId,"
+ " c.name as customerName,"
+ " c.code as customerCode,"
@@ -45,6 +43,7 @@ open class DashboardService(
+ " left join project p on c.id = p.customerId"
+ " left join subsidiary s on p.customerSubsidiaryId = s.id"
+ " where c.deleted = 0"
+ " and p.status not in (\"Pending to Start\",\"Completed\",\"Deleted\")"
)
if (args != null) {
if (args.containsKey("customerName"))
@@ -58,6 +57,7 @@ open class DashboardService(

fun searchCustomerSubsidiaryProject(args: Map<String, Any>): List<Map<String, Any>> {
val sql = StringBuilder("select"
+ " ROW_NUMBER() OVER (ORDER BY p.id, p.code, p.name, te.code, s.name, tg.name, p.totalManhour, milestonePayment.comingPaymentMilestone) AS id,"
+ " p.id as id,"
+ " p.id as projectId,"
+ " p.code as projectCode,"
@@ -91,6 +91,7 @@ open class DashboardService(
+ " ) milestonePayment on 1=1"
+ " where p.customerId = :customerId"
+ " and p.customerSubsidiaryId = :subsidiaryId"
+ " and p.status not in (\"Pending to Start\",\"Completed\",\"Deleted\")"
+ " group by p.id, p.code, p.name, te.code, s.name, tg.name, p.totalManhour, milestonePayment.comingPaymentMilestone"
)

@@ -99,6 +100,7 @@ open class DashboardService(

fun searchCustomerNonSubsidiaryProject(args: Map<String, Any>): List<Map<String, Any>> {
val sql = StringBuilder("select"
+ " ROW_NUMBER() OVER (ORDER BY p.id, p.code, p.name, te.code, s.name, tg.name, p.totalManhour, milestonePayment.comingPaymentMilestone) AS id,"
+ " p.id as id,"
+ " p.id as projectId,"
+ " p.code as projectCode,"
@@ -132,6 +134,7 @@ open class DashboardService(
+ " ) milestonePayment on 1=1"
+ " where p.customerId = :customerId"
+ " and isNull(p.customerSubsidiaryId)"
+ " and p.status not in (\"Pending to Start\",\"Completed\",\"Deleted\")"
+ " group by p.id, p.code, p.name, te.code, s.name, tg.name, p.totalManhour, milestonePayment.comingPaymentMilestone"
)



正在加载...
取消
保存