Commit 60ebb332b4634cb505d56e56bcb3ae06e8d45974
1 parent
a0e7fda1
人机材排序
Showing
5 changed files
with
22 additions
and
7 deletions
urbanops-framework/urbanops-common/src/main/java/com/zteits/urbanops/framework/common/pojo/PageParam.java
| ... | ... | @@ -72,7 +72,6 @@ public class PageParam implements Serializable { |
| 72 | 72 | public void setOrderByColumn(String orderByColumn) { |
| 73 | 73 | if (!StringUtils.hasText(orderByColumn)) { |
| 74 | 74 | this.orderByColumn = "id"; |
| 75 | - return; | |
| 76 | 75 | } else { |
| 77 | 76 | this.orderByColumn = orderByColumn; |
| 78 | 77 | } | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/mechanicalcost/vo/MechanicalCostPageReqVO.java
| 1 | 1 | package com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo; |
| 2 | 2 | |
| 3 | +import com.baomidou.mybatisplus.core.toolkit.support.SFunction; | |
| 3 | 4 | import com.zteits.urbanops.framework.common.pojo.PageParam; |
| 5 | +import com.zteits.urbanops.module.garden.dal.dataobject.mechanicalcost.MechanicalCostDO; | |
| 4 | 6 | import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | 7 | import lombok.Data; |
| 6 | 8 | import org.springframework.format.annotation.DateTimeFormat; |
| ... | ... | @@ -9,6 +11,7 @@ import java.math.BigDecimal; |
| 9 | 11 | import java.time.LocalDate; |
| 10 | 12 | import java.time.LocalDateTime; |
| 11 | 13 | import java.util.List; |
| 14 | +import java.util.Map; | |
| 12 | 15 | |
| 13 | 16 | import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 14 | 17 | |
| ... | ... | @@ -69,4 +72,14 @@ public class MechanicalCostPageReqVO extends PageParam { |
| 69 | 72 | @Schema(description = "创建时间") |
| 70 | 73 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 71 | 74 | private LocalDateTime[] createTime; |
| 75 | + | |
| 76 | + //对应前端排序字段 | |
| 77 | + public static final Map<String, SFunction<MechanicalCostDO, ?>> SORT_FIELD_MAP = Map.of( | |
| 78 | + "id", MechanicalCostDO::getId, | |
| 79 | + "unitPrice", MechanicalCostDO::getUnitPrice, | |
| 80 | + "quantity", MechanicalCostDO::getQuantity, | |
| 81 | + "serviceLife", MechanicalCostDO::getServiceLife, | |
| 82 | + "startUseTime", MechanicalCostDO::getStartUseTime, | |
| 83 | + "endUseTime" , MechanicalCostDO::getEndUseTime | |
| 84 | + ); | |
| 72 | 85 | } | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/mechanicaldepreciation/vo/MechanicalDepreciationPageReqVO.java
| 1 | 1 | package com.zteits.urbanops.module.garden.controller.admin.mechanicaldepreciation.vo; |
| 2 | 2 | |
| 3 | -import lombok.*; | |
| 4 | -import java.util.*; | |
| 5 | -import io.swagger.v3.oas.annotations.media.Schema; | |
| 6 | 3 | import com.zteits.urbanops.framework.common.pojo.PageParam; |
| 7 | -import java.math.BigDecimal; | |
| 4 | +import io.swagger.v3.oas.annotations.media.Schema; | |
| 5 | +import lombok.Data; | |
| 8 | 6 | import org.springframework.format.annotation.DateTimeFormat; |
| 7 | + | |
| 8 | +import java.math.BigDecimal; | |
| 9 | 9 | import java.time.LocalDateTime; |
| 10 | 10 | |
| 11 | 11 | import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| ... | ... | @@ -51,4 +51,4 @@ public class MechanicalDepreciationPageReqVO extends PageParam { |
| 51 | 51 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 52 | 52 | private LocalDateTime[] createTime; |
| 53 | 53 | |
| 54 | -} | |
| 55 | 54 | \ No newline at end of file |
| 55 | +} | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/personalcost/vo/PersonalCostPageReqVO.java
| ... | ... | @@ -51,7 +51,9 @@ public class PersonalCostPageReqVO extends PageParam { |
| 51 | 51 | |
| 52 | 52 | public static final Map<String, SFunction<PersonalCostDO, ?>> SORT_FIELD_MAP = Map.of( |
| 53 | 53 | "id", PersonalCostDO::getId, |
| 54 | - "salaryAmount", PersonalCostDO::getSalaryAmount | |
| 54 | + "salaryMonth", PersonalCostDO::getSalaryMonth, | |
| 55 | + "salaryAmount", PersonalCostDO::getSalaryAmount, | |
| 56 | + "createTime", PersonalCostDO::getCreateTime | |
| 55 | 57 | ); |
| 56 | 58 | |
| 57 | 59 | } | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/rentalmechanicalcost/vo/RentalMechanicalCostPageReqVO.java
| ... | ... | @@ -42,6 +42,7 @@ public class RentalMechanicalCostPageReqVO extends PageParam { |
| 42 | 42 | |
| 43 | 43 | public static final Map<String, SFunction<RentalMechanicalCostDO, ?>> SORT_FIELD_MAP = Map.of( |
| 44 | 44 | "id", RentalMechanicalCostDO::getId, |
| 45 | + "rentalTotalPrice",RentalMechanicalCostDO::getRentalTotalPrice, | |
| 45 | 46 | "quantity", RentalMechanicalCostDO::getQuantity, |
| 46 | 47 | "useDuration", RentalMechanicalCostDO::getUseDuration, |
| 47 | 48 | "startUseTime", RentalMechanicalCostDO::getStartUseTime, | ... | ... |