Commit 0f66e518377546a7e08ff0580524c14691c2b7ea
1 parent
2672c24e
派单及人机材功能迁移
Showing
22 changed files
with
104 additions
and
694 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/rentalmechanicalcost/vo/TeamBizdomainRelVo.java renamed to urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/costfee/vo/TeamBizdomainRelVo.java
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/personalcost/PersonalCostController.java
| @@ -10,10 +10,7 @@ import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.Person | @@ -10,10 +10,7 @@ import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.Person | ||
| 10 | import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostRespVO; | 10 | import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostRespVO; |
| 11 | import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostSaveReqVO; | 11 | import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostSaveReqVO; |
| 12 | import com.zteits.urbanops.module.garden.dal.dataobject.personalcost.PersonalCostDO; | 12 | import com.zteits.urbanops.module.garden.dal.dataobject.personalcost.PersonalCostDO; |
| 13 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | ||
| 14 | -import com.zteits.urbanops.module.garden.enums.CostFeeConstants; | ||
| 15 | import com.zteits.urbanops.module.garden.service.personalcost.PersonalCostService; | 13 | import com.zteits.urbanops.module.garden.service.personalcost.PersonalCostService; |
| 16 | -import com.zteits.urbanops.module.garden.service.teambizdomainrel.TeamBizdomainRelService; | ||
| 17 | import io.swagger.v3.oas.annotations.Operation; | 14 | import io.swagger.v3.oas.annotations.Operation; |
| 18 | import io.swagger.v3.oas.annotations.Parameter; | 15 | import io.swagger.v3.oas.annotations.Parameter; |
| 19 | import io.swagger.v3.oas.annotations.tags.Tag; | 16 | import io.swagger.v3.oas.annotations.tags.Tag; |
| @@ -26,8 +23,6 @@ import org.springframework.web.bind.annotation.*; | @@ -26,8 +23,6 @@ import org.springframework.web.bind.annotation.*; | ||
| 26 | 23 | ||
| 27 | import java.io.IOException; | 24 | import java.io.IOException; |
| 28 | import java.util.List; | 25 | import java.util.List; |
| 29 | -import java.util.Objects; | ||
| 30 | -import java.util.stream.Collectors; | ||
| 31 | 26 | ||
| 32 | import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | 27 | import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.EXPORT; |
| 33 | import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | 28 | import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/personalcost/vo/PersonalCostSaveReqVO.java
| 1 | package com.zteits.urbanops.module.garden.controller.admin.personalcost.vo; | 1 | package com.zteits.urbanops.module.garden.controller.admin.personalcost.vo; |
| 2 | 2 | ||
| 3 | import cn.idev.excel.annotation.ExcelProperty; | 3 | import cn.idev.excel.annotation.ExcelProperty; |
| 4 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | 4 | +import com.zteits.urbanops.module.garden.controller.admin.costfee.vo.TeamBizdomainRelVo; |
| 5 | import io.swagger.v3.oas.annotations.media.Schema; | 5 | import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | -import lombok.*; | ||
| 7 | -import java.util.*; | ||
| 8 | -import jakarta.validation.constraints.*; | 6 | +import jakarta.validation.constraints.NotEmpty; |
| 7 | +import jakarta.validation.constraints.NotNull; | ||
| 8 | +import lombok.Data; | ||
| 9 | + | ||
| 9 | import java.math.BigDecimal; | 10 | import java.math.BigDecimal; |
| 11 | +import java.util.List; | ||
| 10 | 12 | ||
| 11 | @Schema(description = "管理后台 - 人员费用录入 - 个人费用新增/修改 Request VO") | 13 | @Schema(description = "管理后台 - 人员费用录入 - 个人费用新增/修改 Request VO") |
| 12 | @Data | 14 | @Data |
| @@ -44,6 +46,6 @@ public class PersonalCostSaveReqVO { | @@ -44,6 +46,6 @@ public class PersonalCostSaveReqVO { | ||
| 44 | @Schema(description = "备注", example = "随便") | 46 | @Schema(description = "备注", example = "随便") |
| 45 | private String remark; | 47 | private String remark; |
| 46 | @ExcelProperty("班组") | 48 | @ExcelProperty("班组") |
| 47 | - private List<TeamBizdomainRelDO> teamIds; | 49 | + private List<TeamBizdomainRelVo> teamIds; |
| 48 | 50 | ||
| 49 | } | 51 | } |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/rentalmechanicalcost/RentalMechanicalCostController.java
| 1 | package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost; | 1 | package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost; |
| 2 | 2 | ||
| 3 | -import com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo.MechanicalCostRespVO; | ||
| 4 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | ||
| 5 | -import com.zteits.urbanops.module.garden.enums.CostFeeConstants; | ||
| 6 | -import com.zteits.urbanops.module.garden.service.teambizdomainrel.TeamBizdomainRelService; | ||
| 7 | -import org.springframework.web.bind.annotation.*; | ||
| 8 | -import jakarta.annotation.Resource; | ||
| 9 | -import org.springframework.validation.annotation.Validated; | ||
| 10 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 11 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 12 | -import io.swagger.v3.oas.annotations.Parameter; | ||
| 13 | -import io.swagger.v3.oas.annotations.Operation; | ||
| 14 | - | ||
| 15 | -import jakarta.validation.constraints.*; | ||
| 16 | -import jakarta.validation.*; | ||
| 17 | -import jakarta.servlet.http.*; | ||
| 18 | -import java.util.*; | ||
| 19 | -import java.io.IOException; | ||
| 20 | -import java.util.stream.Collectors; | ||
| 21 | - | 3 | +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; |
| 4 | +import com.zteits.urbanops.framework.common.pojo.CommonResult; | ||
| 22 | import com.zteits.urbanops.framework.common.pojo.PageParam; | 5 | import com.zteits.urbanops.framework.common.pojo.PageParam; |
| 23 | import com.zteits.urbanops.framework.common.pojo.PageResult; | 6 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 24 | -import com.zteits.urbanops.framework.common.pojo.CommonResult; | ||
| 25 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; | 7 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 26 | -import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | ||
| 27 | - | ||
| 28 | import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | 8 | import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; |
| 29 | - | ||
| 30 | -import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | ||
| 31 | -import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | ||
| 32 | - | ||
| 33 | -import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.*; | 9 | +import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.RentalMechanicalCostPageReqVO; |
| 10 | +import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.RentalMechanicalCostRespVO; | ||
| 11 | +import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.RentalMechanicalCostSaveReqVO; | ||
| 34 | import com.zteits.urbanops.module.garden.dal.dataobject.rentalmechanicalcost.RentalMechanicalCostDO; | 12 | import com.zteits.urbanops.module.garden.dal.dataobject.rentalmechanicalcost.RentalMechanicalCostDO; |
| 35 | import com.zteits.urbanops.module.garden.service.rentalmechanicalcost.RentalMechanicalCostService; | 13 | import com.zteits.urbanops.module.garden.service.rentalmechanicalcost.RentalMechanicalCostService; |
| 14 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 15 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 16 | +import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 17 | +import jakarta.annotation.Resource; | ||
| 18 | +import jakarta.servlet.http.HttpServletResponse; | ||
| 19 | +import jakarta.validation.Valid; | ||
| 20 | +import org.springframework.security.access.prepost.PreAuthorize; | ||
| 21 | +import org.springframework.validation.annotation.Validated; | ||
| 22 | +import org.springframework.web.bind.annotation.*; | ||
| 23 | + | ||
| 24 | +import java.io.IOException; | ||
| 25 | +import java.util.List; | ||
| 26 | + | ||
| 27 | +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.EXPORT; | ||
| 28 | +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | ||
| 36 | 29 | ||
| 37 | @Tag(name = "管理后台 - 租赁机械费用录入") | 30 | @Tag(name = "管理后台 - 租赁机械费用录入") |
| 38 | @RestController | 31 | @RestController |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/rentalmechanicalcost/vo/RentalMechanicalCostPageReqVO.java
| 1 | package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo; | 1 | package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo; |
| 2 | 2 | ||
| 3 | import cn.idev.excel.annotation.ExcelProperty; | 3 | import cn.idev.excel.annotation.ExcelProperty; |
| 4 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | ||
| 5 | -import lombok.*; | ||
| 6 | - | ||
| 7 | -import java.time.LocalDate; | ||
| 8 | -import java.util.*; | ||
| 9 | -import io.swagger.v3.oas.annotations.media.Schema; | 4 | +import com.fasterxml.jackson.annotation.JsonFormat; |
| 10 | import com.zteits.urbanops.framework.common.pojo.PageParam; | 5 | import com.zteits.urbanops.framework.common.pojo.PageParam; |
| 11 | -import java.math.BigDecimal; | 6 | +import com.zteits.urbanops.module.garden.controller.admin.costfee.vo.TeamBizdomainRelVo; |
| 7 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 8 | +import lombok.Data; | ||
| 12 | import org.springframework.format.annotation.DateTimeFormat; | 9 | import org.springframework.format.annotation.DateTimeFormat; |
| 10 | + | ||
| 11 | +import java.math.BigDecimal; | ||
| 12 | +import java.time.LocalDate; | ||
| 13 | import java.time.LocalDateTime; | 13 | import java.time.LocalDateTime; |
| 14 | +import java.util.Date; | ||
| 15 | +import java.util.List; | ||
| 14 | 16 | ||
| 17 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; | ||
| 15 | import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | 18 | import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| 16 | 19 | ||
| 17 | @Schema(description = "管理后台 - 租赁机械费用录入分页 Request VO") | 20 | @Schema(description = "管理后台 - 租赁机械费用录入分页 Request VO") |
| @@ -21,55 +24,14 @@ public class RentalMechanicalCostPageReqVO extends PageParam { | @@ -21,55 +24,14 @@ public class RentalMechanicalCostPageReqVO extends PageParam { | ||
| 21 | @Schema(description = "机械名称", example = "张三") | 24 | @Schema(description = "机械名称", example = "张三") |
| 22 | private String mechName; | 25 | private String mechName; |
| 23 | 26 | ||
| 24 | - @Schema(description = "机械类型", example = "2") | ||
| 25 | - private String mechType; | ||
| 26 | - | ||
| 27 | @Schema(description = "租赁总价格", example = "316") | 27 | @Schema(description = "租赁总价格", example = "316") |
| 28 | - private BigDecimal rentalTotalPrice; | ||
| 29 | - | ||
| 30 | - @Schema(description = "数量") | ||
| 31 | - private Integer quantity; | ||
| 32 | - | ||
| 33 | - @Schema(description = "车牌号") | ||
| 34 | - private String licensePlate; | ||
| 35 | - | ||
| 36 | - @Schema(description = "车辆类别(如汽油、纯电新能源等)") | ||
| 37 | - private String vehicleCategory; | ||
| 38 | - | ||
| 39 | - @Schema(description = "车辆类型(如大型客车、轻型栏板货车等)", example = "2") | ||
| 40 | - private String vehicleType; | 28 | + private BigDecimal[] rentalTotalPrice; |
| 41 | 29 | ||
| 42 | @Schema(description = "开始使用时间") | 30 | @Schema(description = "开始使用时间") |
| 43 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ||
| 44 | - private LocalDate[] startUseTime; | 31 | + @DateTimeFormat(pattern = "yyyy-MM-dd") |
| 32 | + private Date startUseTime; | ||
| 45 | 33 | ||
| 46 | @Schema(description = "使用时长(天)") | 34 | @Schema(description = "使用时长(天)") |
| 47 | private Integer useDuration; | 35 | private Integer useDuration; |
| 48 | 36 | ||
| 49 | - @Schema(description = "结束使用时间") | ||
| 50 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ||
| 51 | - private LocalDate[] endUseTime; | ||
| 52 | - | ||
| 53 | - @Schema(description = "归属公司", example = "李四") | ||
| 54 | - private String companyName; | ||
| 55 | - | ||
| 56 | - @Schema(description = "归属公司ID", example = "25530") | ||
| 57 | - private String companyId; | ||
| 58 | - | ||
| 59 | - @Schema(description = "部门id", example = "25446") | ||
| 60 | - private Long deptId; | ||
| 61 | - | ||
| 62 | - @Schema(description = "道路ID数组(多选)") | ||
| 63 | - private String roadIds; | ||
| 64 | - | ||
| 65 | - @Schema(description = "备注", example = "你说的对") | ||
| 66 | - private String remark; | ||
| 67 | - | ||
| 68 | - @Schema(description = "创建时间") | ||
| 69 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ||
| 70 | - private LocalDateTime[] createTime; | ||
| 71 | - | ||
| 72 | - @ExcelProperty("班组") | ||
| 73 | - private List<TeamBizdomainRelVo> teamIds; | ||
| 74 | - | ||
| 75 | } | 37 | } |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/rentalmechanicalcost/vo/RentalMechanicalCostRespVO.java
| 1 | package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo; | 1 | package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo; |
| 2 | 2 | ||
| 3 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | 3 | +import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
| 4 | +import cn.idev.excel.annotation.ExcelProperty; | ||
| 5 | +import com.zteits.urbanops.module.garden.controller.admin.costfee.vo.TeamBizdomainRelVo; | ||
| 4 | import io.swagger.v3.oas.annotations.media.Schema; | 6 | import io.swagger.v3.oas.annotations.media.Schema; |
| 5 | -import lombok.*; | 7 | +import lombok.Data; |
| 8 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 6 | 9 | ||
| 7 | -import java.time.LocalDate; | ||
| 8 | -import java.util.*; | ||
| 9 | import java.math.BigDecimal; | 10 | import java.math.BigDecimal; |
| 10 | -import org.springframework.format.annotation.DateTimeFormat; | 11 | +import java.time.LocalDate; |
| 11 | import java.time.LocalDateTime; | 12 | import java.time.LocalDateTime; |
| 12 | -import cn.idev.excel.annotation.*; | 13 | +import java.util.List; |
| 14 | + | ||
| 15 | +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; | ||
| 13 | 16 | ||
| 14 | @Schema(description = "管理后台 - 租赁机械费用录入 Response VO") | 17 | @Schema(description = "管理后台 - 租赁机械费用录入 Response VO") |
| 15 | @Data | 18 | @Data |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/rentalmechanicalcost/vo/RentalMechanicalCostSaveReqVO.java
| 1 | package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo; | 1 | package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo; |
| 2 | 2 | ||
| 3 | import cn.idev.excel.annotation.ExcelProperty; | 3 | import cn.idev.excel.annotation.ExcelProperty; |
| 4 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | 4 | +import com.zteits.urbanops.module.garden.controller.admin.costfee.vo.TeamBizdomainRelVo; |
| 5 | import io.swagger.v3.oas.annotations.media.Schema; | 5 | import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | -import lombok.*; | 6 | +import jakarta.validation.constraints.NotEmpty; |
| 7 | +import jakarta.validation.constraints.NotNull; | ||
| 8 | +import lombok.Data; | ||
| 9 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 7 | 10 | ||
| 8 | -import java.time.LocalDate; | ||
| 9 | -import java.util.*; | ||
| 10 | -import jakarta.validation.constraints.*; | ||
| 11 | import java.math.BigDecimal; | 11 | import java.math.BigDecimal; |
| 12 | +import java.time.LocalDate; | ||
| 13 | +import java.util.Date; | ||
| 14 | +import java.util.List; | ||
| 12 | 15 | ||
| 13 | @Schema(description = "管理后台 - 租赁机械费用录入新增/修改 Request VO") | 16 | @Schema(description = "管理后台 - 租赁机械费用录入新增/修改 Request VO") |
| 14 | @Data | 17 | @Data |
| @@ -43,14 +46,16 @@ public class RentalMechanicalCostSaveReqVO { | @@ -43,14 +46,16 @@ public class RentalMechanicalCostSaveReqVO { | ||
| 43 | 46 | ||
| 44 | @Schema(description = "开始使用时间", requiredMode = Schema.RequiredMode.REQUIRED) | 47 | @Schema(description = "开始使用时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 45 | @NotNull(message = "开始使用时间不能为空") | 48 | @NotNull(message = "开始使用时间不能为空") |
| 46 | - private LocalDate startUseTime; | 49 | + @DateTimeFormat(pattern = "yyyy-MM-dd") |
| 50 | + private Date startUseTime; | ||
| 47 | 51 | ||
| 48 | @Schema(description = "使用时长(天)") | 52 | @Schema(description = "使用时长(天)") |
| 49 | private Integer useDuration; | 53 | private Integer useDuration; |
| 50 | 54 | ||
| 51 | @Schema(description = "结束使用时间", requiredMode = Schema.RequiredMode.REQUIRED) | 55 | @Schema(description = "结束使用时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 52 | @NotNull(message = "结束使用时间不能为空") | 56 | @NotNull(message = "结束使用时间不能为空") |
| 53 | - private LocalDate endUseTime; | 57 | + @DateTimeFormat(pattern = "yyyy-MM-dd") |
| 58 | + private Date endUseTime; | ||
| 54 | 59 | ||
| 55 | @Schema(description = "归属公司", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | 60 | @Schema(description = "归属公司", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") |
| 56 | @NotEmpty(message = "归属公司不能为空") | 61 | @NotEmpty(message = "归属公司不能为空") |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/teambizdomainrel/TeamBizdomainRelController.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel; | ||
| 2 | - | ||
| 3 | -import org.springframework.web.bind.annotation.*; | ||
| 4 | -import jakarta.annotation.Resource; | ||
| 5 | -import org.springframework.validation.annotation.Validated; | ||
| 6 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 7 | -import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 8 | -import io.swagger.v3.oas.annotations.Parameter; | ||
| 9 | -import io.swagger.v3.oas.annotations.Operation; | ||
| 10 | - | ||
| 11 | -import jakarta.validation.constraints.*; | ||
| 12 | -import jakarta.validation.*; | ||
| 13 | -import jakarta.servlet.http.*; | ||
| 14 | -import java.util.*; | ||
| 15 | -import java.io.IOException; | ||
| 16 | - | ||
| 17 | -import com.zteits.urbanops.framework.common.pojo.PageParam; | ||
| 18 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | ||
| 19 | -import com.zteits.urbanops.framework.common.pojo.CommonResult; | ||
| 20 | -import com.zteits.urbanops.framework.common.util.object.BeanUtils; | ||
| 21 | -import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; | ||
| 22 | - | ||
| 23 | -import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; | ||
| 24 | - | ||
| 25 | -import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | ||
| 26 | -import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; | ||
| 27 | - | ||
| 28 | -import com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.vo.*; | ||
| 29 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | ||
| 30 | -import com.zteits.urbanops.module.garden.service.teambizdomainrel.TeamBizdomainRelService; | ||
| 31 | - | ||
| 32 | -@Tag(name = "管理后台 - 班组关联") | ||
| 33 | -@RestController | ||
| 34 | -@RequestMapping("/garden/team-bizdomain-rel") | ||
| 35 | -@Validated | ||
| 36 | -public class TeamBizdomainRelController { | ||
| 37 | - | ||
| 38 | - @Resource | ||
| 39 | - private TeamBizdomainRelService teamBizdomainRelService; | ||
| 40 | - | ||
| 41 | - @PostMapping("/create") | ||
| 42 | - @Operation(summary = "创建班组关联") | ||
| 43 | - @PreAuthorize("@ss.hasPermission('garden:team-bizdomain-rel:create')") | ||
| 44 | - public CommonResult<Long> createTeamBizdomainRel(@Valid @RequestBody TeamBizdomainRelSaveReqVO createReqVO) { | ||
| 45 | - return success(teamBizdomainRelService.createTeamBizdomainRel(createReqVO)); | ||
| 46 | - } | ||
| 47 | - | ||
| 48 | - @PutMapping("/update") | ||
| 49 | - @Operation(summary = "更新班组关联") | ||
| 50 | - @PreAuthorize("@ss.hasPermission('garden:team-bizdomain-rel:update')") | ||
| 51 | - public CommonResult<Boolean> updateTeamBizdomainRel(@Valid @RequestBody TeamBizdomainRelSaveReqVO updateReqVO) { | ||
| 52 | - teamBizdomainRelService.updateTeamBizdomainRel(updateReqVO); | ||
| 53 | - return success(true); | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | - @DeleteMapping("/delete") | ||
| 57 | - @Operation(summary = "删除班组关联") | ||
| 58 | - @Parameter(name = "id", description = "编号", required = true) | ||
| 59 | - @PreAuthorize("@ss.hasPermission('garden:team-bizdomain-rel:delete')") | ||
| 60 | - public CommonResult<Boolean> deleteTeamBizdomainRel(@RequestParam("id") Long id) { | ||
| 61 | - teamBizdomainRelService.deleteTeamBizdomainRel(id); | ||
| 62 | - return success(true); | ||
| 63 | - } | ||
| 64 | - | ||
| 65 | - @DeleteMapping("/delete-list") | ||
| 66 | - @Parameter(name = "ids", description = "编号", required = true) | ||
| 67 | - @Operation(summary = "批量删除班组关联") | ||
| 68 | - @PreAuthorize("@ss.hasPermission('garden:team-bizdomain-rel:delete')") | ||
| 69 | - public CommonResult<Boolean> deleteTeamBizdomainRelList(@RequestParam("ids") List<Long> ids) { | ||
| 70 | - teamBizdomainRelService.deleteTeamBizdomainRelListByIds(ids); | ||
| 71 | - return success(true); | ||
| 72 | - } | ||
| 73 | - | ||
| 74 | - @GetMapping("/get") | ||
| 75 | - @Operation(summary = "获得班组关联") | ||
| 76 | - @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 77 | - @PreAuthorize("@ss.hasPermission('garden:team-bizdomain-rel:query')") | ||
| 78 | - public CommonResult<TeamBizdomainRelRespVO> getTeamBizdomainRel(@RequestParam("id") Long id) { | ||
| 79 | - TeamBizdomainRelDO teamBizdomainRel = teamBizdomainRelService.getTeamBizdomainRel(id); | ||
| 80 | - return success(BeanUtils.toBean(teamBizdomainRel, TeamBizdomainRelRespVO.class)); | ||
| 81 | - } | ||
| 82 | - | ||
| 83 | - @GetMapping("/page") | ||
| 84 | - @Operation(summary = "获得班组关联分页") | ||
| 85 | - @PreAuthorize("@ss.hasPermission('garden:team-bizdomain-rel:query')") | ||
| 86 | - public CommonResult<PageResult<TeamBizdomainRelRespVO>> getTeamBizdomainRelPage(@Valid TeamBizdomainRelPageReqVO pageReqVO) { | ||
| 87 | - PageResult<TeamBizdomainRelDO> pageResult = teamBizdomainRelService.getTeamBizdomainRelPage(pageReqVO); | ||
| 88 | - return success(BeanUtils.toBean(pageResult, TeamBizdomainRelRespVO.class)); | ||
| 89 | - } | ||
| 90 | - | ||
| 91 | - @GetMapping("/export-excel") | ||
| 92 | - @Operation(summary = "导出班组关联 Excel") | ||
| 93 | - @PreAuthorize("@ss.hasPermission('garden:team-bizdomain-rel:export')") | ||
| 94 | - @ApiAccessLog(operateType = EXPORT) | ||
| 95 | - public void exportTeamBizdomainRelExcel(@Valid TeamBizdomainRelPageReqVO pageReqVO, | ||
| 96 | - HttpServletResponse response) throws IOException { | ||
| 97 | - pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); | ||
| 98 | - List<TeamBizdomainRelDO> list = teamBizdomainRelService.getTeamBizdomainRelPage(pageReqVO).getList(); | ||
| 99 | - // 导出 Excel | ||
| 100 | - ExcelUtils.write(response, "班组关联.xls", "数据", TeamBizdomainRelRespVO.class, | ||
| 101 | - BeanUtils.toBean(list, TeamBizdomainRelRespVO.class)); | ||
| 102 | - } | ||
| 103 | - | ||
| 104 | -} | ||
| 105 | \ No newline at end of file | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/teambizdomainrel/vo/TeamBizdomainRelPageReqVO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.vo; | ||
| 2 | - | ||
| 3 | -import lombok.*; | ||
| 4 | -import java.util.*; | ||
| 5 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 6 | -import com.zteits.urbanops.framework.common.pojo.PageParam; | ||
| 7 | -import org.springframework.format.annotation.DateTimeFormat; | ||
| 8 | -import java.time.LocalDateTime; | ||
| 9 | - | ||
| 10 | -import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | ||
| 11 | - | ||
| 12 | -@Schema(description = "管理后台 - 班组关联分页 Request VO") | ||
| 13 | -@Data | ||
| 14 | -public class TeamBizdomainRelPageReqVO extends PageParam { | ||
| 15 | - | ||
| 16 | - @Schema(description = "业务表主键", example = "4740") | ||
| 17 | - private String busiId; | ||
| 18 | - | ||
| 19 | - @Schema(description = "班组编码", example = "27533") | ||
| 20 | - private String teamId; | ||
| 21 | - | ||
| 22 | - @Schema(description = "班组名称", example = "王五") | ||
| 23 | - private String teamName; | ||
| 24 | - | ||
| 25 | - @Schema(description = "班组名称") | ||
| 26 | - private Long weight; | ||
| 27 | - | ||
| 28 | - @Schema(description = "归属公司", example = "张三") | ||
| 29 | - private String companyName; | ||
| 30 | - | ||
| 31 | - @Schema(description = "归属公司ID", example = "29798") | ||
| 32 | - private String companyId; | ||
| 33 | - | ||
| 34 | - @Schema(description = "创建时间") | ||
| 35 | - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ||
| 36 | - private LocalDateTime[] createTime; | ||
| 37 | - | ||
| 38 | - @Schema(description = "业务类型", example = "1") | ||
| 39 | - private String busiType; | ||
| 40 | - | ||
| 41 | -} | ||
| 42 | \ No newline at end of file | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/teambizdomainrel/vo/TeamBizdomainRelRespVO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.*; | ||
| 5 | -import java.util.*; | ||
| 6 | -import org.springframework.format.annotation.DateTimeFormat; | ||
| 7 | -import java.time.LocalDateTime; | ||
| 8 | -import cn.idev.excel.annotation.*; | ||
| 9 | - | ||
| 10 | -@Schema(description = "管理后台 - 班组关联 Response VO") | ||
| 11 | -@Data | ||
| 12 | -@ExcelIgnoreUnannotated | ||
| 13 | -public class TeamBizdomainRelRespVO { | ||
| 14 | - | ||
| 15 | - @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14177") | ||
| 16 | - @ExcelProperty("记录ID,自增主键") | ||
| 17 | - private Long id; | ||
| 18 | - | ||
| 19 | - @Schema(description = "业务表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4740") | ||
| 20 | - @ExcelProperty("业务表主键") | ||
| 21 | - private String busiId; | ||
| 22 | - | ||
| 23 | - @Schema(description = "班组编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "27533") | ||
| 24 | - @ExcelProperty("班组编码") | ||
| 25 | - private String teamId; | ||
| 26 | - | ||
| 27 | - @Schema(description = "班组名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | ||
| 28 | - @ExcelProperty("班组名称") | ||
| 29 | - private String teamName; | ||
| 30 | - | ||
| 31 | - @Schema(description = "班组名称") | ||
| 32 | - @ExcelProperty("班组名称") | ||
| 33 | - private Long weight; | ||
| 34 | - | ||
| 35 | - @Schema(description = "归属公司", example = "张三") | ||
| 36 | - @ExcelProperty("归属公司") | ||
| 37 | - private String companyName; | ||
| 38 | - | ||
| 39 | - @Schema(description = "归属公司ID", example = "29798") | ||
| 40 | - @ExcelProperty("归属公司ID") | ||
| 41 | - private String companyId; | ||
| 42 | - | ||
| 43 | - @Schema(description = "创建时间") | ||
| 44 | - @ExcelProperty("创建时间") | ||
| 45 | - private LocalDateTime createTime; | ||
| 46 | - | ||
| 47 | - @Schema(description = "业务类型", example = "1") | ||
| 48 | - @ExcelProperty("业务类型") | ||
| 49 | - private String busiType; | ||
| 50 | - | ||
| 51 | -} | ||
| 52 | \ No newline at end of file | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/teambizdomainrel/vo/TeamBizdomainRelSaveReqVO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.vo; | ||
| 2 | - | ||
| 3 | -import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | -import lombok.*; | ||
| 5 | -import java.util.*; | ||
| 6 | -import jakarta.validation.constraints.*; | ||
| 7 | - | ||
| 8 | -@Schema(description = "管理后台 - 班组关联新增/修改 Request VO") | ||
| 9 | -@Data | ||
| 10 | -public class TeamBizdomainRelSaveReqVO { | ||
| 11 | - | ||
| 12 | - @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14177") | ||
| 13 | - private Long id; | ||
| 14 | - | ||
| 15 | - @Schema(description = "业务表主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4740") | ||
| 16 | - @NotEmpty(message = "业务表主键不能为空") | ||
| 17 | - private String busiId; | ||
| 18 | - | ||
| 19 | - @Schema(description = "班组编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "27533") | ||
| 20 | - @NotEmpty(message = "班组编码不能为空") | ||
| 21 | - private String teamId; | ||
| 22 | - | ||
| 23 | - @Schema(description = "班组名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") | ||
| 24 | - @NotEmpty(message = "班组名称不能为空") | ||
| 25 | - private String teamName; | ||
| 26 | - | ||
| 27 | - @Schema(description = "班组名称") | ||
| 28 | - private Long weight; | ||
| 29 | - | ||
| 30 | - @Schema(description = "归属公司", example = "张三") | ||
| 31 | - private String companyName; | ||
| 32 | - | ||
| 33 | - @Schema(description = "归属公司ID", example = "29798") | ||
| 34 | - private String companyId; | ||
| 35 | - | ||
| 36 | - @Schema(description = "业务类型", example = "1") | ||
| 37 | - private String busiType; | ||
| 38 | - | ||
| 39 | -} | ||
| 40 | \ No newline at end of file | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/wasterecord/vo/WasteRecordSaveReqVO.java
| 1 | package com.zteits.urbanops.module.garden.controller.admin.wasterecord.vo; | 1 | package com.zteits.urbanops.module.garden.controller.admin.wasterecord.vo; |
| 2 | 2 | ||
| 3 | import cn.idev.excel.annotation.ExcelProperty; | 3 | import cn.idev.excel.annotation.ExcelProperty; |
| 4 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | 4 | +import com.zteits.urbanops.module.garden.controller.admin.costfee.vo.TeamBizdomainRelVo; |
| 5 | import io.swagger.v3.oas.annotations.media.Schema; | 5 | import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | -import lombok.*; | 6 | +import jakarta.validation.constraints.NotEmpty; |
| 7 | +import jakarta.validation.constraints.NotNull; | ||
| 8 | +import lombok.Data; | ||
| 7 | 9 | ||
| 8 | -import java.time.LocalDate; | ||
| 9 | -import java.util.*; | ||
| 10 | -import jakarta.validation.constraints.*; | ||
| 11 | import java.math.BigDecimal; | 10 | import java.math.BigDecimal; |
| 11 | +import java.time.LocalDate; | ||
| 12 | +import java.util.List; | ||
| 12 | 13 | ||
| 13 | @Schema(description = "管理后台 - 园林废弃物录入新增/修改 Request VO") | 14 | @Schema(description = "管理后台 - 园林废弃物录入新增/修改 Request VO") |
| 14 | @Data | 15 | @Data |
| @@ -59,5 +60,5 @@ public class WasteRecordSaveReqVO { | @@ -59,5 +60,5 @@ public class WasteRecordSaveReqVO { | ||
| 59 | private String remark; | 60 | private String remark; |
| 60 | 61 | ||
| 61 | @ExcelProperty("班组") | 62 | @ExcelProperty("班组") |
| 62 | - private List<TeamBizdomainRelDO> teamIds; | 63 | + private List<TeamBizdomainRelVo> teamIds; |
| 63 | } | 64 | } |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/rentalmechanicalcost/RentalMechanicalCostDO.java
| @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId; | @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId; | ||
| 6 | import com.baomidou.mybatisplus.annotation.TableName; | 6 | import com.baomidou.mybatisplus.annotation.TableName; |
| 7 | import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | 7 | import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; |
| 8 | import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | 8 | import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; |
| 9 | -import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.TeamBizdomainRelVo; | 9 | +import com.zteits.urbanops.module.garden.controller.admin.costfee.vo.TeamBizdomainRelVo; |
| 10 | import lombok.*; | 10 | import lombok.*; |
| 11 | 11 | ||
| 12 | import java.math.BigDecimal; | 12 | import java.math.BigDecimal; |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/teambizdomainrel/TeamBizdomainRelDO.java deleted
| 1 | -package com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel; | ||
| 2 | - | ||
| 3 | -import lombok.*; | ||
| 4 | -import java.util.*; | ||
| 5 | -import java.time.LocalDateTime; | ||
| 6 | -import java.time.LocalDateTime; | ||
| 7 | -import com.baomidou.mybatisplus.annotation.*; | ||
| 8 | -import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; | ||
| 9 | - | ||
| 10 | -/** | ||
| 11 | - * 班组关联 DO | ||
| 12 | - * | ||
| 13 | - * @author 超级管理员 | ||
| 14 | - */ | ||
| 15 | -@TableName("garden_team_bizdomain_rel") | ||
| 16 | -@KeySequence("garden_team_bizdomain_rel_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | ||
| 17 | -@Data | ||
| 18 | -@EqualsAndHashCode(callSuper = true) | ||
| 19 | -@ToString(callSuper = true) | ||
| 20 | -@Builder | ||
| 21 | -@NoArgsConstructor | ||
| 22 | -@AllArgsConstructor | ||
| 23 | -public class TeamBizdomainRelDO extends BaseDO { | ||
| 24 | - | ||
| 25 | - /** | ||
| 26 | - * 记录ID,自增主键 | ||
| 27 | - */ | ||
| 28 | - @TableId | ||
| 29 | - private Long id; | ||
| 30 | - /** | ||
| 31 | - * 业务表主键 | ||
| 32 | - */ | ||
| 33 | - private String busiId; | ||
| 34 | - /** | ||
| 35 | - * 班组编码 | ||
| 36 | - */ | ||
| 37 | - private String teamId; | ||
| 38 | - /** | ||
| 39 | - * 班组名称 | ||
| 40 | - */ | ||
| 41 | - private String teamName; | ||
| 42 | - /** | ||
| 43 | - * 班组名称 | ||
| 44 | - */ | ||
| 45 | - private Long weight; | ||
| 46 | - /** | ||
| 47 | - * 归属公司 | ||
| 48 | - */ | ||
| 49 | - private String companyName; | ||
| 50 | - /** | ||
| 51 | - * 归属公司ID | ||
| 52 | - */ | ||
| 53 | - private String companyId; | ||
| 54 | - /** | ||
| 55 | - * 业务类型 | ||
| 56 | - */ | ||
| 57 | - private String busiType; | ||
| 58 | - | ||
| 59 | - | ||
| 60 | -} | ||
| 61 | \ No newline at end of file | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/rentalmechanicalcost/RentalMechanicalCostMapper.java
| @@ -20,23 +20,23 @@ public interface RentalMechanicalCostMapper extends BaseMapperX<RentalMechanical | @@ -20,23 +20,23 @@ public interface RentalMechanicalCostMapper extends BaseMapperX<RentalMechanical | ||
| 20 | default PageResult<RentalMechanicalCostDO> selectPage(RentalMechanicalCostPageReqVO reqVO) { | 20 | default PageResult<RentalMechanicalCostDO> selectPage(RentalMechanicalCostPageReqVO reqVO) { |
| 21 | return selectPage(reqVO, new LambdaQueryWrapperX<RentalMechanicalCostDO>() | 21 | return selectPage(reqVO, new LambdaQueryWrapperX<RentalMechanicalCostDO>() |
| 22 | .likeIfPresent(RentalMechanicalCostDO::getMechName, reqVO.getMechName()) | 22 | .likeIfPresent(RentalMechanicalCostDO::getMechName, reqVO.getMechName()) |
| 23 | - .eqIfPresent(RentalMechanicalCostDO::getMechType, reqVO.getMechType()) | ||
| 24 | - .eqIfPresent(RentalMechanicalCostDO::getRentalTotalPrice, reqVO.getRentalTotalPrice()) | ||
| 25 | - .eqIfPresent(RentalMechanicalCostDO::getQuantity, reqVO.getQuantity()) | ||
| 26 | - .eqIfPresent(RentalMechanicalCostDO::getLicensePlate, reqVO.getLicensePlate()) | ||
| 27 | - .eqIfPresent(RentalMechanicalCostDO::getVehicleCategory, reqVO.getVehicleCategory()) | ||
| 28 | - .eqIfPresent(RentalMechanicalCostDO::getVehicleType, reqVO.getVehicleType()) | ||
| 29 | - .betweenIfPresent(RentalMechanicalCostDO::getStartUseTime, reqVO.getStartUseTime()) | 23 | + //.eqIfPresent(RentalMechanicalCostDO::getMechType, reqVO.getMechType()) |
| 24 | + .betweenIfPresent(RentalMechanicalCostDO::getRentalTotalPrice, reqVO.getRentalTotalPrice()) | ||
| 25 | + //.eqIfPresent(RentalMechanicalCostDO::getQuantity, reqVO.getQuantity()) | ||
| 26 | + //.eqIfPresent(RentalMechanicalCostDO::getLicensePlate, reqVO.getLicensePlate()) | ||
| 27 | + //.eqIfPresent(RentalMechanicalCostDO::getVehicleCategory, reqVO.getVehicleCategory()) | ||
| 28 | + // .eqIfPresent(RentalMechanicalCostDO::getVehicleType, reqVO.getVehicleType()) | ||
| 29 | + //.betweenIfPresent(RentalMechanicalCostDO::getStartUseTime, reqVO.getStartUseTime()) | ||
| 30 | + .eqIfPresent(RentalMechanicalCostDO::getStartUseTime, reqVO.getStartUseTime()) | ||
| 30 | .eqIfPresent(RentalMechanicalCostDO::getUseDuration, reqVO.getUseDuration()) | 31 | .eqIfPresent(RentalMechanicalCostDO::getUseDuration, reqVO.getUseDuration()) |
| 31 | - .betweenIfPresent(RentalMechanicalCostDO::getEndUseTime, reqVO.getEndUseTime()) | ||
| 32 | - .likeIfPresent(RentalMechanicalCostDO::getCompanyName, reqVO.getCompanyName()) | ||
| 33 | - .eqIfPresent(RentalMechanicalCostDO::getCompanyId, reqVO.getCompanyId()) | ||
| 34 | - .eqIfPresent(RentalMechanicalCostDO::getDeptId, reqVO.getDeptId()) | ||
| 35 | - .eqIfPresent(RentalMechanicalCostDO::getTeamIds, reqVO.getTeamIds()) | ||
| 36 | - .eqIfPresent(RentalMechanicalCostDO::getRoadIds, reqVO.getRoadIds()) | ||
| 37 | - .eqIfPresent(RentalMechanicalCostDO::getRemark, reqVO.getRemark()) | ||
| 38 | - .betweenIfPresent(RentalMechanicalCostDO::getCreateTime, reqVO.getCreateTime()) | 32 | + //.betweenIfPresent(RentalMechanicalCostDO::getEndUseTime, reqVO.getEndUseTime()) |
| 33 | + //.likeIfPresent(RentalMechanicalCostDO::getCompanyName, reqVO.getCompanyName()) | ||
| 34 | + //.eqIfPresent(RentalMechanicalCostDO::getCompanyId, reqVO.getCompanyId()) | ||
| 35 | + //.eqIfPresent(RentalMechanicalCostDO::getDeptId, reqVO.getDeptId()) | ||
| 36 | + //.eqIfPresent(RentalMechanicalCostDO::getRoadIds, reqVO.getRoadIds()) | ||
| 37 | + ///.//eqIfPresent(RentalMechanicalCostDO::getRemark, reqVO.getRemark()) | ||
| 38 | + //.betweenIfPresent(RentalMechanicalCostDO::getCreateTime, reqVO.getCreateTime()) | ||
| 39 | .orderByDesc(RentalMechanicalCostDO::getId)); | 39 | .orderByDesc(RentalMechanicalCostDO::getId)); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | -} | ||
| 43 | \ No newline at end of file | 42 | \ No newline at end of file |
| 43 | +} |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/teambizdomainrel/TeamBizdomainRelMapper.java deleted
| 1 | -package com.zteits.urbanops.module.garden.dal.mysql.teambizdomainrel; | ||
| 2 | - | ||
| 3 | -import java.util.*; | ||
| 4 | - | ||
| 5 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | ||
| 6 | -import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 7 | -import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; | ||
| 8 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | ||
| 9 | -import org.apache.ibatis.annotations.Mapper; | ||
| 10 | -import com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.vo.*; | ||
| 11 | - | ||
| 12 | -/** | ||
| 13 | - * 班组关联 Mapper | ||
| 14 | - * | ||
| 15 | - * @author 超级管理员 | ||
| 16 | - */ | ||
| 17 | -@Mapper | ||
| 18 | -public interface TeamBizdomainRelMapper extends BaseMapperX<TeamBizdomainRelDO> { | ||
| 19 | - | ||
| 20 | - default PageResult<TeamBizdomainRelDO> selectPage(TeamBizdomainRelPageReqVO reqVO) { | ||
| 21 | - return selectPage(reqVO, new LambdaQueryWrapperX<TeamBizdomainRelDO>() | ||
| 22 | - .eqIfPresent(TeamBizdomainRelDO::getBusiId, reqVO.getBusiId()) | ||
| 23 | - .eqIfPresent(TeamBizdomainRelDO::getTeamId, reqVO.getTeamId()) | ||
| 24 | - .likeIfPresent(TeamBizdomainRelDO::getTeamName, reqVO.getTeamName()) | ||
| 25 | - .eqIfPresent(TeamBizdomainRelDO::getWeight, reqVO.getWeight()) | ||
| 26 | - .likeIfPresent(TeamBizdomainRelDO::getCompanyName, reqVO.getCompanyName()) | ||
| 27 | - .eqIfPresent(TeamBizdomainRelDO::getCompanyId, reqVO.getCompanyId()) | ||
| 28 | - .betweenIfPresent(TeamBizdomainRelDO::getCreateTime, reqVO.getCreateTime()) | ||
| 29 | - .eqIfPresent(TeamBizdomainRelDO::getBusiType, reqVO.getBusiType()) | ||
| 30 | - .orderByDesc(TeamBizdomainRelDO::getId)); | ||
| 31 | - } | ||
| 32 | - | ||
| 33 | -} | ||
| 34 | \ No newline at end of file | 0 | \ No newline at end of file |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/mechanicaldepreciation/MechanicalDepreciationServiceImpl.java
| 1 | package com.zteits.urbanops.module.garden.service.mechanicaldepreciation; | 1 | package com.zteits.urbanops.module.garden.service.mechanicaldepreciation; |
| 2 | 2 | ||
| 3 | -import cn.hutool.core.collection.CollUtil; | ||
| 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 6 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | ||
| 7 | -import org.apache.commons.lang3.StringUtils; | ||
| 8 | -import org.springframework.stereotype.Service; | ||
| 9 | -import jakarta.annotation.Resource; | ||
| 10 | -import org.springframework.validation.annotation.Validated; | ||
| 11 | -import org.springframework.transaction.annotation.Transactional; | ||
| 12 | - | ||
| 13 | -import java.util.*; | ||
| 14 | -import com.zteits.urbanops.module.garden.controller.admin.mechanicaldepreciation.vo.*; | ||
| 15 | -import com.zteits.urbanops.module.garden.dal.dataobject.mechanicaldepreciation.MechanicalDepreciationDO; | ||
| 16 | import com.zteits.urbanops.framework.common.pojo.PageResult; | 5 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 17 | -import com.zteits.urbanops.framework.common.pojo.PageParam; | ||
| 18 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; | 6 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 19 | - | 7 | +import com.zteits.urbanops.module.garden.controller.admin.mechanicaldepreciation.vo.MechanicalDepreciationPageReqVO; |
| 8 | +import com.zteits.urbanops.module.garden.controller.admin.mechanicaldepreciation.vo.MechanicalDepreciationSaveReqVO; | ||
| 9 | +import com.zteits.urbanops.module.garden.dal.dataobject.mechanicaldepreciation.MechanicalDepreciationDO; | ||
| 20 | import com.zteits.urbanops.module.garden.dal.mysql.mechanicaldepreciation.MechanicalDepreciationMapper; | 10 | import com.zteits.urbanops.module.garden.dal.mysql.mechanicaldepreciation.MechanicalDepreciationMapper; |
| 11 | +import jakarta.annotation.Resource; | ||
| 12 | +import org.springframework.stereotype.Service; | ||
| 13 | +import org.springframework.validation.annotation.Validated; | ||
| 14 | + | ||
| 15 | +import java.util.List; | ||
| 21 | 16 | ||
| 22 | import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | 17 | import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 23 | -import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | ||
| 24 | -import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | ||
| 25 | -import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | 18 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.MECHANICAL_DEPRECIATION_NOT_EXISTS; |
| 19 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.MECHANICAL_DEPRECIATION_NOT_EXISTS_001; | ||
| 26 | 20 | ||
| 27 | /** | 21 | /** |
| 28 | * 自有机械折旧子 Service 实现类 | 22 | * 自有机械折旧子 Service 实现类 |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/personalcost/PersonalCostServiceImpl.java
| @@ -5,8 +5,9 @@ import com.zteits.urbanops.framework.common.util.object.BeanUtils; | @@ -5,8 +5,9 @@ import com.zteits.urbanops.framework.common.util.object.BeanUtils; | ||
| 5 | import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostPageReqVO; | 5 | import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostPageReqVO; |
| 6 | import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostSaveReqVO; | 6 | import com.zteits.urbanops.module.garden.controller.admin.personalcost.vo.PersonalCostSaveReqVO; |
| 7 | import com.zteits.urbanops.module.garden.dal.dataobject.personalcost.PersonalCostDO; | 7 | import com.zteits.urbanops.module.garden.dal.dataobject.personalcost.PersonalCostDO; |
| 8 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | ||
| 9 | import com.zteits.urbanops.module.garden.dal.mysql.personalcost.PersonalCostMapper; | 8 | import com.zteits.urbanops.module.garden.dal.mysql.personalcost.PersonalCostMapper; |
| 9 | +import com.zteits.urbanops.module.garden.controller.admin.costfee.vo.TeamBizdomainRelVo; | ||
| 10 | + | ||
| 10 | import com.zteits.urbanops.module.system.api.dept.DeptApi; | 11 | import com.zteits.urbanops.module.system.api.dept.DeptApi; |
| 11 | import jakarta.annotation.Resource; | 12 | import jakarta.annotation.Resource; |
| 12 | import org.springframework.stereotype.Service; | 13 | import org.springframework.stereotype.Service; |
| @@ -40,7 +41,7 @@ public class PersonalCostServiceImpl implements PersonalCostService { | @@ -40,7 +41,7 @@ public class PersonalCostServiceImpl implements PersonalCostService { | ||
| 40 | // 插入 | 41 | // 插入 |
| 41 | PersonalCostDO personalCost = BeanUtils.toBean(createReqVO, PersonalCostDO.class); | 42 | PersonalCostDO personalCost = BeanUtils.toBean(createReqVO, PersonalCostDO.class); |
| 42 | List<String> deptIds = createReqVO.getTeamIds().stream() | 43 | List<String> deptIds = createReqVO.getTeamIds().stream() |
| 43 | - .map(TeamBizdomainRelDO::getTeamId) | 44 | + .map(TeamBizdomainRelVo::getTeamId) |
| 44 | .collect(Collectors.toList()); | 45 | .collect(Collectors.toList()); |
| 45 | personalCost.setDeptId(deptIds); | 46 | personalCost.setDeptId(deptIds); |
| 46 | personalCostMapper.insert(personalCost); | 47 | personalCostMapper.insert(personalCost); |
| @@ -56,7 +57,7 @@ public class PersonalCostServiceImpl implements PersonalCostService { | @@ -56,7 +57,7 @@ public class PersonalCostServiceImpl implements PersonalCostService { | ||
| 56 | // 更新 | 57 | // 更新 |
| 57 | PersonalCostDO updateObj = BeanUtils.toBean(updateReqVO, PersonalCostDO.class); | 58 | PersonalCostDO updateObj = BeanUtils.toBean(updateReqVO, PersonalCostDO.class); |
| 58 | List<String> deptIds = updateReqVO.getTeamIds().stream() | 59 | List<String> deptIds = updateReqVO.getTeamIds().stream() |
| 59 | - .map(TeamBizdomainRelDO::getTeamId) | 60 | + .map(TeamBizdomainRelVo::getTeamId) |
| 60 | .collect(Collectors.toList()); | 61 | .collect(Collectors.toList()); |
| 61 | updateObj.setDeptId(deptIds); | 62 | updateObj.setDeptId(deptIds); |
| 62 | personalCostMapper.updateById(updateObj); | 63 | personalCostMapper.updateById(updateObj); |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/rentalmechanicalcost/RentalMechanicalCostServiceImpl.java
| @@ -6,18 +6,14 @@ import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.v | @@ -6,18 +6,14 @@ import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.v | ||
| 6 | import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.RentalMechanicalCostSaveReqVO; | 6 | import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.RentalMechanicalCostSaveReqVO; |
| 7 | import com.zteits.urbanops.module.garden.dal.dataobject.rentalmechanicalcost.RentalMechanicalCostDO; | 7 | import com.zteits.urbanops.module.garden.dal.dataobject.rentalmechanicalcost.RentalMechanicalCostDO; |
| 8 | import com.zteits.urbanops.module.garden.dal.mysql.rentalmechanicalcost.RentalMechanicalCostMapper; | 8 | import com.zteits.urbanops.module.garden.dal.mysql.rentalmechanicalcost.RentalMechanicalCostMapper; |
| 9 | -import com.zteits.urbanops.module.garden.enums.CostFeeConstants; | ||
| 10 | -import com.zteits.urbanops.module.garden.service.teambizdomainrel.TeamBizdomainRelService; | ||
| 11 | import jakarta.annotation.Resource; | 9 | import jakarta.annotation.Resource; |
| 12 | -import org.apache.commons.collections4.CollectionUtils; | ||
| 13 | import org.springframework.stereotype.Service; | 10 | import org.springframework.stereotype.Service; |
| 14 | import org.springframework.validation.annotation.Validated; | 11 | import org.springframework.validation.annotation.Validated; |
| 15 | 12 | ||
| 16 | import java.util.List; | 13 | import java.util.List; |
| 17 | 14 | ||
| 18 | - | ||
| 19 | import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | 15 | import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 20 | -import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | 16 | +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.RENTAL_MECHANICAL_COST_NOT_EXISTS; |
| 21 | 17 | ||
| 22 | /** | 18 | /** |
| 23 | * 租赁机械费用录入 Service 实现类 | 19 | * 租赁机械费用录入 Service 实现类 |
| @@ -31,15 +27,11 @@ public class RentalMechanicalCostServiceImpl implements RentalMechanicalCostServ | @@ -31,15 +27,11 @@ public class RentalMechanicalCostServiceImpl implements RentalMechanicalCostServ | ||
| 31 | @Resource | 27 | @Resource |
| 32 | private RentalMechanicalCostMapper rentalMechanicalCostMapper; | 28 | private RentalMechanicalCostMapper rentalMechanicalCostMapper; |
| 33 | 29 | ||
| 34 | - @Resource | ||
| 35 | - private TeamBizdomainRelService teamBizdomainRelService; | ||
| 36 | - | ||
| 37 | @Override | 30 | @Override |
| 38 | public Long createRentalMechanicalCost(RentalMechanicalCostSaveReqVO createReqVO) { | 31 | public Long createRentalMechanicalCost(RentalMechanicalCostSaveReqVO createReqVO) { |
| 39 | // 插入 | 32 | // 插入 |
| 40 | RentalMechanicalCostDO rentalMechanicalCost = BeanUtils.toBean(createReqVO, RentalMechanicalCostDO.class); | 33 | RentalMechanicalCostDO rentalMechanicalCost = BeanUtils.toBean(createReqVO, RentalMechanicalCostDO.class); |
| 41 | rentalMechanicalCostMapper.insert(rentalMechanicalCost); | 34 | rentalMechanicalCostMapper.insert(rentalMechanicalCost); |
| 42 | - | ||
| 43 | // 返回 | 35 | // 返回 |
| 44 | return rentalMechanicalCost.getId(); | 36 | return rentalMechanicalCost.getId(); |
| 45 | } | 37 | } |
| @@ -51,10 +43,6 @@ public class RentalMechanicalCostServiceImpl implements RentalMechanicalCostServ | @@ -51,10 +43,6 @@ public class RentalMechanicalCostServiceImpl implements RentalMechanicalCostServ | ||
| 51 | // 更新 | 43 | // 更新 |
| 52 | RentalMechanicalCostDO updateObj = BeanUtils.toBean(updateReqVO, RentalMechanicalCostDO.class); | 44 | RentalMechanicalCostDO updateObj = BeanUtils.toBean(updateReqVO, RentalMechanicalCostDO.class); |
| 53 | rentalMechanicalCostMapper.updateById(updateObj); | 45 | rentalMechanicalCostMapper.updateById(updateObj); |
| 54 | - | ||
| 55 | - //add by wq 保存班组信息关联表 | ||
| 56 | - teamBizdomainRelService.deleteTeamBizdomainRel(updateObj.getId(), CostFeeConstants.COSTFEE_RENTALMECHANICAL); | ||
| 57 | - //add by wq 保存班组信息关联表 | ||
| 58 | } | 46 | } |
| 59 | 47 | ||
| 60 | @Override | 48 | @Override |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/teambizdomainrel/TeamBizdomainRelService.java deleted
| 1 | -package com.zteits.urbanops.module.garden.service.teambizdomainrel; | ||
| 2 | - | ||
| 3 | -import java.util.*; | ||
| 4 | -import jakarta.validation.*; | ||
| 5 | -import com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.vo.*; | ||
| 6 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | ||
| 7 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | ||
| 8 | -import com.zteits.urbanops.framework.common.pojo.PageParam; | ||
| 9 | - | ||
| 10 | -/** | ||
| 11 | - * 班组关联 Service 接口 | ||
| 12 | - * | ||
| 13 | - * @author 超级管理员 | ||
| 14 | - */ | ||
| 15 | -public interface TeamBizdomainRelService { | ||
| 16 | - | ||
| 17 | - /** | ||
| 18 | - * 创建班组关联 | ||
| 19 | - * | ||
| 20 | - * @param createReqVO 创建信息 | ||
| 21 | - * @return 编号 | ||
| 22 | - */ | ||
| 23 | - Long createTeamBizdomainRel(@Valid TeamBizdomainRelSaveReqVO createReqVO); | ||
| 24 | - | ||
| 25 | - /** | ||
| 26 | - * 更新班组关联 | ||
| 27 | - * | ||
| 28 | - * @param updateReqVO 更新信息 | ||
| 29 | - */ | ||
| 30 | - void updateTeamBizdomainRel(@Valid TeamBizdomainRelSaveReqVO updateReqVO); | ||
| 31 | - | ||
| 32 | - /** | ||
| 33 | - * 删除班组关联 | ||
| 34 | - * | ||
| 35 | - * @param id 编号 | ||
| 36 | - */ | ||
| 37 | - void deleteTeamBizdomainRel(Long id); | ||
| 38 | - | ||
| 39 | - /** | ||
| 40 | - * 批量删除班组关联 | ||
| 41 | - * | ||
| 42 | - * @param ids 编号 | ||
| 43 | - */ | ||
| 44 | - void deleteTeamBizdomainRelListByIds(List<Long> ids); | ||
| 45 | - | ||
| 46 | - /** | ||
| 47 | - * 获得班组关联 | ||
| 48 | - * | ||
| 49 | - * @param id 编号 | ||
| 50 | - * @return 班组关联 | ||
| 51 | - */ | ||
| 52 | - TeamBizdomainRelDO getTeamBizdomainRel(Long id); | ||
| 53 | - | ||
| 54 | - /** | ||
| 55 | - * 获得班组关联分页 | ||
| 56 | - * | ||
| 57 | - * @param pageReqVO 分页查询 | ||
| 58 | - * @return 班组关联分页 | ||
| 59 | - */ | ||
| 60 | - PageResult<TeamBizdomainRelDO> getTeamBizdomainRelPage(TeamBizdomainRelPageReqVO pageReqVO); | ||
| 61 | - | ||
| 62 | - /** | ||
| 63 | - * @Author wangqian | ||
| 64 | - * @Description 获取费用关联信息 | ||
| 65 | - * @Date 2025/11/19 20:47 | ||
| 66 | - * @Param busiId | ||
| 67 | - * @param busiType | ||
| 68 | - * @Return java.util.List<com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO> | ||
| 69 | - */ | ||
| 70 | - public List<TeamBizdomainRelDO> getTeamBizdomainRelList(Long busiId, String busiType); | ||
| 71 | - | ||
| 72 | - public void saveTeamBizdomainRel(List<TeamBizdomainRelDO> teamList, Long busiId, String companyId, String companyName ,String busiType) ; | ||
| 73 | - | ||
| 74 | - public void deleteTeamBizdomainRel(Long id, String busiType); | ||
| 75 | - | ||
| 76 | - | ||
| 77 | -} |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/teambizdomainrel/TeamBizdomainRelServiceImpl.java deleted
| 1 | -package com.zteits.urbanops.module.garden.service.teambizdomainrel; | ||
| 2 | - | ||
| 3 | -import cn.hutool.core.collection.CollUtil; | ||
| 4 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
| 5 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
| 6 | -import com.zteits.urbanops.module.garden.enums.CostFeeConstants; | ||
| 7 | -import org.apache.commons.collections4.CollectionUtils; | ||
| 8 | -import org.apache.commons.lang3.StringUtils; | ||
| 9 | -import org.springframework.stereotype.Service; | ||
| 10 | -import jakarta.annotation.Resource; | ||
| 11 | -import org.springframework.validation.annotation.Validated; | ||
| 12 | -import org.springframework.transaction.annotation.Transactional; | ||
| 13 | - | ||
| 14 | -import java.util.*; | ||
| 15 | -import com.zteits.urbanops.module.garden.controller.admin.teambizdomainrel.vo.*; | ||
| 16 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | ||
| 17 | -import com.zteits.urbanops.framework.common.pojo.PageResult; | ||
| 18 | -import com.zteits.urbanops.framework.common.pojo.PageParam; | ||
| 19 | -import com.zteits.urbanops.framework.common.util.object.BeanUtils; | ||
| 20 | - | ||
| 21 | -import com.zteits.urbanops.module.garden.dal.mysql.teambizdomainrel.TeamBizdomainRelMapper; | ||
| 22 | - | ||
| 23 | -import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | ||
| 24 | -import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList; | ||
| 25 | -import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList; | ||
| 26 | -import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*; | ||
| 27 | - | ||
| 28 | -/** | ||
| 29 | - * 班组关联 Service 实现类 | ||
| 30 | - * | ||
| 31 | - * @author 超级管理员 | ||
| 32 | - */ | ||
| 33 | -@Service | ||
| 34 | -@Validated | ||
| 35 | -public class TeamBizdomainRelServiceImpl implements TeamBizdomainRelService { | ||
| 36 | - | ||
| 37 | - @Resource | ||
| 38 | - private TeamBizdomainRelMapper teamBizdomainRelMapper; | ||
| 39 | - | ||
| 40 | - @Override | ||
| 41 | - public Long createTeamBizdomainRel(TeamBizdomainRelSaveReqVO createReqVO) { | ||
| 42 | - // 插入 | ||
| 43 | - TeamBizdomainRelDO teamBizdomainRel = BeanUtils.toBean(createReqVO, TeamBizdomainRelDO.class); | ||
| 44 | - teamBizdomainRelMapper.insert(teamBizdomainRel); | ||
| 45 | - | ||
| 46 | - // 返回 | ||
| 47 | - return teamBizdomainRel.getId(); | ||
| 48 | - } | ||
| 49 | - | ||
| 50 | - @Override | ||
| 51 | - public void updateTeamBizdomainRel(TeamBizdomainRelSaveReqVO updateReqVO) { | ||
| 52 | - // 校验存在 | ||
| 53 | - validateTeamBizdomainRelExists(updateReqVO.getId()); | ||
| 54 | - // 更新 | ||
| 55 | - TeamBizdomainRelDO updateObj = BeanUtils.toBean(updateReqVO, TeamBizdomainRelDO.class); | ||
| 56 | - teamBizdomainRelMapper.updateById(updateObj); | ||
| 57 | - } | ||
| 58 | - | ||
| 59 | - @Override | ||
| 60 | - public void deleteTeamBizdomainRel(Long id) { | ||
| 61 | - // 校验存在 | ||
| 62 | - validateTeamBizdomainRelExists(id); | ||
| 63 | - // 删除 | ||
| 64 | - teamBizdomainRelMapper.deleteById(id); | ||
| 65 | - } | ||
| 66 | - | ||
| 67 | - @Override | ||
| 68 | - public void deleteTeamBizdomainRelListByIds(List<Long> ids) { | ||
| 69 | - // 删除 | ||
| 70 | - teamBizdomainRelMapper.deleteByIds(ids); | ||
| 71 | - } | ||
| 72 | - | ||
| 73 | - | ||
| 74 | - private void validateTeamBizdomainRelExists(Long id) { | ||
| 75 | - if (teamBizdomainRelMapper.selectById(id) == null) { | ||
| 76 | - //throw exception(TEAM_BIZDOMAIN_REL_NOT_EXISTS); | ||
| 77 | - } | ||
| 78 | - } | ||
| 79 | - | ||
| 80 | - @Override | ||
| 81 | - public TeamBizdomainRelDO getTeamBizdomainRel(Long id) { | ||
| 82 | - return teamBizdomainRelMapper.selectById(id); | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | - @Override | ||
| 86 | - public PageResult<TeamBizdomainRelDO> getTeamBizdomainRelPage(TeamBizdomainRelPageReqVO pageReqVO) { | ||
| 87 | - return teamBizdomainRelMapper.selectPage(pageReqVO); | ||
| 88 | - } | ||
| 89 | - | ||
| 90 | - public List<TeamBizdomainRelDO> getTeamBizdomainRelList(Long busiId, String busiType) { | ||
| 91 | - if (busiId == null && StringUtils.isEmpty(busiType)) { | ||
| 92 | - throw exception(MECHANICAL_COST_NOT_EXISTS_001); | ||
| 93 | - } | ||
| 94 | - LambdaQueryWrapper<TeamBizdomainRelDO> queryWrapper = Wrappers.lambdaQuery(); | ||
| 95 | - queryWrapper.eq(TeamBizdomainRelDO::getBusiId, busiId); | ||
| 96 | - queryWrapper.eq(TeamBizdomainRelDO::getBusiType, busiType); | ||
| 97 | - return teamBizdomainRelMapper.selectList(queryWrapper); | ||
| 98 | - } | ||
| 99 | - | ||
| 100 | - @Override | ||
| 101 | - public void saveTeamBizdomainRel(List<TeamBizdomainRelDO> teamList, Long busiId, String companyId, String companyName ,String busiType) { | ||
| 102 | - if (CollectionUtils.isNotEmpty(teamList)) { | ||
| 103 | - for (TeamBizdomainRelDO team : teamList) { | ||
| 104 | - if (team != null && StringUtils.isNotEmpty(team.getTeamId())) { | ||
| 105 | - TeamBizdomainRelDO teamBizdomainRel = new TeamBizdomainRelDO(); | ||
| 106 | - teamBizdomainRel.setBusiId(String.valueOf(busiId)); | ||
| 107 | - teamBizdomainRel.setCompanyId(companyId); | ||
| 108 | - teamBizdomainRel.setCompanyName(companyName); | ||
| 109 | - teamBizdomainRel.setTeamName(team.getTeamName()); | ||
| 110 | - teamBizdomainRel.setTeamId(team.getTeamId()); | ||
| 111 | - teamBizdomainRel.setBusiType(busiType); | ||
| 112 | - teamBizdomainRelMapper.insert(teamBizdomainRel); | ||
| 113 | - } | ||
| 114 | - } | ||
| 115 | - } | ||
| 116 | - } | ||
| 117 | - | ||
| 118 | - @Override | ||
| 119 | - public void deleteTeamBizdomainRel(Long id, String busiType ) { | ||
| 120 | - if (id == null && StringUtils.isEmpty(busiType)) { | ||
| 121 | - throw exception(MECHANICAL_COST_NOT_EXISTS_001); | ||
| 122 | - } | ||
| 123 | - LambdaQueryWrapper<TeamBizdomainRelDO> queryWrapper = Wrappers.lambdaQuery(); | ||
| 124 | - queryWrapper.eq(TeamBizdomainRelDO::getBusiId, String.valueOf(id)); | ||
| 125 | - queryWrapper.eq(TeamBizdomainRelDO::getBusiType, busiType); | ||
| 126 | - teamBizdomainRelMapper.delete(queryWrapper); | ||
| 127 | - } | ||
| 128 | -} |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/wasterecord/WasteRecordServiceImpl.java
| @@ -4,10 +4,9 @@ import com.zteits.urbanops.framework.common.pojo.PageResult; | @@ -4,10 +4,9 @@ import com.zteits.urbanops.framework.common.pojo.PageResult; | ||
| 4 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; | 4 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 5 | import com.zteits.urbanops.module.garden.controller.admin.wasterecord.vo.WasteRecordPageReqVO; | 5 | import com.zteits.urbanops.module.garden.controller.admin.wasterecord.vo.WasteRecordPageReqVO; |
| 6 | import com.zteits.urbanops.module.garden.controller.admin.wasterecord.vo.WasteRecordSaveReqVO; | 6 | import com.zteits.urbanops.module.garden.controller.admin.wasterecord.vo.WasteRecordSaveReqVO; |
| 7 | -import com.zteits.urbanops.module.garden.dal.dataobject.teambizdomainrel.TeamBizdomainRelDO; | 7 | +import com.zteits.urbanops.module.garden.controller.admin.costfee.vo.TeamBizdomainRelVo; |
| 8 | import com.zteits.urbanops.module.garden.dal.dataobject.wasterecord.WasteRecordDO; | 8 | import com.zteits.urbanops.module.garden.dal.dataobject.wasterecord.WasteRecordDO; |
| 9 | import com.zteits.urbanops.module.garden.dal.mysql.wasterecord.WasteRecordMapper; | 9 | import com.zteits.urbanops.module.garden.dal.mysql.wasterecord.WasteRecordMapper; |
| 10 | -import com.zteits.urbanops.module.garden.service.teambizdomainrel.TeamBizdomainRelService; | ||
| 11 | import jakarta.annotation.Resource; | 10 | import jakarta.annotation.Resource; |
| 12 | import org.springframework.stereotype.Service; | 11 | import org.springframework.stereotype.Service; |
| 13 | import org.springframework.transaction.annotation.Transactional; | 12 | import org.springframework.transaction.annotation.Transactional; |
| @@ -37,7 +36,7 @@ public class WasteRecordServiceImpl implements WasteRecordService { | @@ -37,7 +36,7 @@ public class WasteRecordServiceImpl implements WasteRecordService { | ||
| 37 | // 插入 | 36 | // 插入 |
| 38 | WasteRecordDO wasteRecord = BeanUtils.toBean(createReqVO, WasteRecordDO.class); | 37 | WasteRecordDO wasteRecord = BeanUtils.toBean(createReqVO, WasteRecordDO.class); |
| 39 | List<String> deptIds = createReqVO.getTeamIds().stream() | 38 | List<String> deptIds = createReqVO.getTeamIds().stream() |
| 40 | - .map(TeamBizdomainRelDO::getTeamId) | 39 | + .map(TeamBizdomainRelVo::getTeamId) |
| 41 | .collect(Collectors.toList()); | 40 | .collect(Collectors.toList()); |
| 42 | wasteRecord.setDeptId(deptIds); | 41 | wasteRecord.setDeptId(deptIds); |
| 43 | wasteRecordMapper.insert(wasteRecord); | 42 | wasteRecordMapper.insert(wasteRecord); |
| @@ -54,7 +53,7 @@ public class WasteRecordServiceImpl implements WasteRecordService { | @@ -54,7 +53,7 @@ public class WasteRecordServiceImpl implements WasteRecordService { | ||
| 54 | WasteRecordDO updateObj = BeanUtils.toBean(updateReqVO, WasteRecordDO.class); | 53 | WasteRecordDO updateObj = BeanUtils.toBean(updateReqVO, WasteRecordDO.class); |
| 55 | 54 | ||
| 56 | List<String> deptIds = updateReqVO.getTeamIds().stream() | 55 | List<String> deptIds = updateReqVO.getTeamIds().stream() |
| 57 | - .map(TeamBizdomainRelDO::getTeamId) | 56 | + .map(TeamBizdomainRelVo::getTeamId) |
| 58 | .collect(Collectors.toList()); | 57 | .collect(Collectors.toList()); |
| 59 | updateObj.setDeptId(deptIds); | 58 | updateObj.setDeptId(deptIds); |
| 60 | 59 |