Commit 05c0f4559369c5a206ddf9d8e1ca7c82341a56e6
1 parent
11e7e889
班组翻译
Showing
17 changed files
with
65 additions
and
28 deletions
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/mechanicalcost/MechanicalCostController.java
| 1 | package com.zteits.urbanops.module.garden.controller.admin.mechanicalcost; | 1 | package com.zteits.urbanops.module.garden.controller.admin.mechanicalcost; |
| 2 | 2 | ||
| 3 | +import com.fhs.core.trans.anno.TransMethodResult; | ||
| 3 | import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | 4 | import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; |
| 4 | import com.zteits.urbanops.framework.common.pojo.CommonResult; | 5 | import com.zteits.urbanops.framework.common.pojo.CommonResult; |
| 5 | import com.zteits.urbanops.framework.common.pojo.PageParam; | 6 | import com.zteits.urbanops.framework.common.pojo.PageParam; |
| @@ -82,6 +83,7 @@ public class MechanicalCostController { | @@ -82,6 +83,7 @@ public class MechanicalCostController { | ||
| 82 | @GetMapping("/page") | 83 | @GetMapping("/page") |
| 83 | @Operation(summary = "获得自有机械费用录入分页") | 84 | @Operation(summary = "获得自有机械费用录入分页") |
| 84 | @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:query')") | 85 | @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:query')") |
| 86 | + @TransMethodResult | ||
| 85 | public CommonResult<PageResult<MechanicalCostRespVO>> getMechanicalCostPage(@Valid MechanicalCostPageReqVO pageReqVO) { | 87 | public CommonResult<PageResult<MechanicalCostRespVO>> getMechanicalCostPage(@Valid MechanicalCostPageReqVO pageReqVO) { |
| 86 | PageResult<MechanicalCostDO> pageResult = mechanicalCostService.getMechanicalCostPage(pageReqVO); | 88 | PageResult<MechanicalCostDO> pageResult = mechanicalCostService.getMechanicalCostPage(pageReqVO); |
| 87 | return success(BeanUtils.toBean(pageResult, MechanicalCostRespVO.class)); | 89 | return success(BeanUtils.toBean(pageResult, MechanicalCostRespVO.class)); |
| @@ -90,6 +92,7 @@ public class MechanicalCostController { | @@ -90,6 +92,7 @@ public class MechanicalCostController { | ||
| 90 | @GetMapping("/list") | 92 | @GetMapping("/list") |
| 91 | @Operation(summary = "自有机械费用录入-列表(兼容旧路径)") | 93 | @Operation(summary = "自有机械费用录入-列表(兼容旧路径)") |
| 92 | @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:query')") | 94 | @PreAuthorize("@ss.hasPermission('garden:mechanical-cost:query')") |
| 95 | + @TransMethodResult | ||
| 93 | public CommonResult<PageResult<MechanicalCostRespVO>> list(@Valid MechanicalCostPageReqVO pageReqVO) { | 96 | public CommonResult<PageResult<MechanicalCostRespVO>> list(@Valid MechanicalCostPageReqVO pageReqVO) { |
| 94 | PageResult<MechanicalCostDO> pageResult = mechanicalCostService.getMechanicalCostPage(pageReqVO); | 97 | PageResult<MechanicalCostDO> pageResult = mechanicalCostService.getMechanicalCostPage(pageReqVO); |
| 95 | return success(BeanUtils.toBean(pageResult, MechanicalCostRespVO.class)); | 98 | return success(BeanUtils.toBean(pageResult, MechanicalCostRespVO.class)); |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/mechanicalcost/vo/MechanicalCostRespVO.java
| @@ -3,6 +3,8 @@ package com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo; | @@ -3,6 +3,8 @@ package com.zteits.urbanops.module.garden.controller.admin.mechanicalcost.vo; | ||
| 3 | import cn.hutool.core.annotation.Alias; | 3 | import cn.hutool.core.annotation.Alias; |
| 4 | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | 4 | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
| 5 | import cn.idev.excel.annotation.ExcelProperty; | 5 | import cn.idev.excel.annotation.ExcelProperty; |
| 6 | +import com.fhs.core.trans.anno.Trans; | ||
| 7 | +import com.fhs.core.trans.constant.TransType; | ||
| 6 | import io.swagger.v3.oas.annotations.media.Schema; | 8 | import io.swagger.v3.oas.annotations.media.Schema; |
| 7 | import lombok.Data; | 9 | import lombok.Data; |
| 8 | 10 | ||
| @@ -85,8 +87,10 @@ public class MechanicalCostRespVO { | @@ -85,8 +87,10 @@ public class MechanicalCostRespVO { | ||
| 85 | private LocalDateTime createTime; | 87 | private LocalDateTime createTime; |
| 86 | 88 | ||
| 87 | @Schema(description = "班组", example = "班组") | 89 | @Schema(description = "班组", example = "班组") |
| 88 | - @ExcelProperty("班组") | ||
| 89 | - @Alias("deptId") | ||
| 90 | - private List<String> teamIdList; | 90 | + @Trans(type = TransType.SIMPLE, targetClassName = "com.zteits.urbanops.module.system.dal.dataobject.dept.DeptDO", |
| 91 | + key = "id", fields = "name", ref = "deptNames") | ||
| 92 | + private List<Long> deptId; | ||
| 93 | + | ||
| 94 | + private String deptNames; | ||
| 91 | 95 | ||
| 92 | } | 96 | } |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/personalcost/PersonalCostController.java
| @@ -20,7 +20,7 @@ import jakarta.validation.Valid; | @@ -20,7 +20,7 @@ import jakarta.validation.Valid; | ||
| 20 | import org.springframework.security.access.prepost.PreAuthorize; | 20 | import org.springframework.security.access.prepost.PreAuthorize; |
| 21 | import org.springframework.validation.annotation.Validated; | 21 | import org.springframework.validation.annotation.Validated; |
| 22 | import org.springframework.web.bind.annotation.*; | 22 | import org.springframework.web.bind.annotation.*; |
| 23 | - | 23 | +import com.fhs.core.trans.anno.TransMethodResult; |
| 24 | import java.io.IOException; | 24 | import java.io.IOException; |
| 25 | import java.util.List; | 25 | import java.util.List; |
| 26 | 26 | ||
| @@ -81,6 +81,7 @@ public class PersonalCostController { | @@ -81,6 +81,7 @@ public class PersonalCostController { | ||
| 81 | @GetMapping("/page") | 81 | @GetMapping("/page") |
| 82 | @Operation(summary = "获得人员费用录入 - 个人费用分页") | 82 | @Operation(summary = "获得人员费用录入 - 个人费用分页") |
| 83 | @PreAuthorize("@ss.hasPermission('garden:personal-cost:query')") | 83 | @PreAuthorize("@ss.hasPermission('garden:personal-cost:query')") |
| 84 | + @TransMethodResult | ||
| 84 | public CommonResult<PageResult<PersonalCostRespVO>> getPersonalCostPage(@Valid PersonalCostPageReqVO pageReqVO) { | 85 | public CommonResult<PageResult<PersonalCostRespVO>> getPersonalCostPage(@Valid PersonalCostPageReqVO pageReqVO) { |
| 85 | PageResult<PersonalCostDO> pageResult = personalCostService.getPersonalCostPage(pageReqVO); | 86 | PageResult<PersonalCostDO> pageResult = personalCostService.getPersonalCostPage(pageReqVO); |
| 86 | return success(BeanUtils.toBean(pageResult, PersonalCostRespVO.class)); | 87 | return success(BeanUtils.toBean(pageResult, PersonalCostRespVO.class)); |
| @@ -89,6 +90,7 @@ public class PersonalCostController { | @@ -89,6 +90,7 @@ public class PersonalCostController { | ||
| 89 | @GetMapping("/list") | 90 | @GetMapping("/list") |
| 90 | @Operation(summary = "获得人员费用录入 - 个人费用分页") | 91 | @Operation(summary = "获得人员费用录入 - 个人费用分页") |
| 91 | @PreAuthorize("@ss.hasPermission('garden:personal-cost:query')") | 92 | @PreAuthorize("@ss.hasPermission('garden:personal-cost:query')") |
| 93 | + @TransMethodResult | ||
| 92 | public CommonResult<PageResult<PersonalCostRespVO>> list(@Valid PersonalCostPageReqVO pageReqVO) { | 94 | public CommonResult<PageResult<PersonalCostRespVO>> list(@Valid PersonalCostPageReqVO pageReqVO) { |
| 93 | PageResult<PersonalCostDO> pageResult = personalCostService.getPersonalCostPage(pageReqVO); | 95 | PageResult<PersonalCostDO> pageResult = personalCostService.getPersonalCostPage(pageReqVO); |
| 94 | return success(BeanUtils.toBean(pageResult, PersonalCostRespVO.class)); | 96 | return success(BeanUtils.toBean(pageResult, PersonalCostRespVO.class)); |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/personalcost/vo/PersonalCostRespVO.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.hutool.core.annotation.Alias; | ||
| 4 | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | 3 | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
| 5 | import cn.idev.excel.annotation.ExcelProperty; | 4 | import cn.idev.excel.annotation.ExcelProperty; |
| 5 | +import com.fhs.core.trans.anno.Trans; | ||
| 6 | +import com.fhs.core.trans.constant.TransType; | ||
| 7 | +import com.fhs.core.trans.vo.VO; | ||
| 6 | import io.swagger.v3.oas.annotations.media.Schema; | 8 | import io.swagger.v3.oas.annotations.media.Schema; |
| 7 | import lombok.Data; | 9 | import lombok.Data; |
| 8 | 10 | ||
| @@ -13,7 +15,7 @@ import java.util.List; | @@ -13,7 +15,7 @@ import java.util.List; | ||
| 13 | @Schema(description = "管理后台 - 人员费用录入 - 个人费用 Response VO") | 15 | @Schema(description = "管理后台 - 人员费用录入 - 个人费用 Response VO") |
| 14 | @Data | 16 | @Data |
| 15 | @ExcelIgnoreUnannotated | 17 | @ExcelIgnoreUnannotated |
| 16 | -public class PersonalCostRespVO { | 18 | +public class PersonalCostRespVO implements VO { |
| 17 | 19 | ||
| 18 | @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14090") | 20 | @Schema(description = "记录ID,自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14090") |
| 19 | @ExcelProperty("记录ID,自增主键") | 21 | @ExcelProperty("记录ID,自增主键") |
| @@ -56,7 +58,9 @@ public class PersonalCostRespVO { | @@ -56,7 +58,9 @@ public class PersonalCostRespVO { | ||
| 56 | private LocalDateTime createTime; | 58 | private LocalDateTime createTime; |
| 57 | 59 | ||
| 58 | @Schema(description = "班组", example = "班组") | 60 | @Schema(description = "班组", example = "班组") |
| 59 | - @ExcelProperty("班组") | ||
| 60 | - @Alias("deptId") | ||
| 61 | - private List<String> teamIdList; | 61 | + @Trans(type = TransType.SIMPLE, targetClassName = "com.zteits.urbanops.module.system.dal.dataobject.dept.DeptDO", |
| 62 | + key = "id", fields = "name", ref = "deptNames") | ||
| 63 | + private List<Long> deptId; | ||
| 64 | + | ||
| 65 | + private String deptNames; | ||
| 62 | } | 66 | } |
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.fhs.core.trans.anno.TransMethodResult; | ||
| 3 | import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; | 4 | import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; |
| 4 | import com.zteits.urbanops.framework.common.pojo.CommonResult; | 5 | import com.zteits.urbanops.framework.common.pojo.CommonResult; |
| 5 | import com.zteits.urbanops.framework.common.pojo.PageParam; | 6 | import com.zteits.urbanops.framework.common.pojo.PageParam; |
| @@ -81,6 +82,7 @@ public class RentalMechanicalCostController { | @@ -81,6 +82,7 @@ public class RentalMechanicalCostController { | ||
| 81 | @GetMapping("/page") | 82 | @GetMapping("/page") |
| 82 | @Operation(summary = "获得租赁机械费用录入分页") | 83 | @Operation(summary = "获得租赁机械费用录入分页") |
| 83 | @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:query')") | 84 | @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:query')") |
| 85 | + @TransMethodResult | ||
| 84 | public CommonResult<PageResult<RentalMechanicalCostRespVO>> getRentalMechanicalCostPage(@Valid RentalMechanicalCostPageReqVO pageReqVO) { | 86 | public CommonResult<PageResult<RentalMechanicalCostRespVO>> getRentalMechanicalCostPage(@Valid RentalMechanicalCostPageReqVO pageReqVO) { |
| 85 | PageResult<RentalMechanicalCostDO> pageResult = rentalMechanicalCostService.getRentalMechanicalCostPage(pageReqVO); | 87 | PageResult<RentalMechanicalCostDO> pageResult = rentalMechanicalCostService.getRentalMechanicalCostPage(pageReqVO); |
| 86 | return success(BeanUtils.toBean(pageResult, RentalMechanicalCostRespVO.class)); | 88 | return success(BeanUtils.toBean(pageResult, RentalMechanicalCostRespVO.class)); |
| @@ -89,6 +91,7 @@ public class RentalMechanicalCostController { | @@ -89,6 +91,7 @@ public class RentalMechanicalCostController { | ||
| 89 | @GetMapping("/list") | 91 | @GetMapping("/list") |
| 90 | @Operation(summary = "租赁机械费用录入-列表(兼容旧路径)") | 92 | @Operation(summary = "租赁机械费用录入-列表(兼容旧路径)") |
| 91 | @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:query')") | 93 | @PreAuthorize("@ss.hasPermission('garden:rental-mechanical-cost:query')") |
| 94 | + @TransMethodResult | ||
| 92 | public CommonResult<PageResult<RentalMechanicalCostRespVO>> list(@Valid RentalMechanicalCostPageReqVO pageReqVO) { | 95 | public CommonResult<PageResult<RentalMechanicalCostRespVO>> list(@Valid RentalMechanicalCostPageReqVO pageReqVO) { |
| 93 | PageResult<RentalMechanicalCostDO> pageResult = rentalMechanicalCostService.getRentalMechanicalCostPage(pageReqVO); | 96 | PageResult<RentalMechanicalCostDO> pageResult = rentalMechanicalCostService.getRentalMechanicalCostPage(pageReqVO); |
| 94 | return success(BeanUtils.toBean(pageResult, RentalMechanicalCostRespVO.class)); | 97 | return success(BeanUtils.toBean(pageResult, RentalMechanicalCostRespVO.class)); |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/rentalmechanicalcost/vo/RentalMechanicalCostRespVO.java
| @@ -2,6 +2,8 @@ package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost. | @@ -2,6 +2,8 @@ package com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost. | ||
| 2 | 2 | ||
| 3 | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | 3 | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
| 4 | import cn.idev.excel.annotation.ExcelProperty; | 4 | import cn.idev.excel.annotation.ExcelProperty; |
| 5 | +import com.fhs.core.trans.anno.Trans; | ||
| 6 | +import com.fhs.core.trans.constant.TransType; | ||
| 5 | import com.zteits.urbanops.module.garden.controller.admin.costfee.vo.TeamBizdomainRelVo; | 7 | import com.zteits.urbanops.module.garden.controller.admin.costfee.vo.TeamBizdomainRelVo; |
| 6 | import io.swagger.v3.oas.annotations.media.Schema; | 8 | import io.swagger.v3.oas.annotations.media.Schema; |
| 7 | import lombok.Data; | 9 | import lombok.Data; |
| @@ -71,10 +73,6 @@ public class RentalMechanicalCostRespVO { | @@ -71,10 +73,6 @@ public class RentalMechanicalCostRespVO { | ||
| 71 | @ExcelProperty("归属公司ID") | 73 | @ExcelProperty("归属公司ID") |
| 72 | private String companyId; | 74 | private String companyId; |
| 73 | 75 | ||
| 74 | - @Schema(description = "部门id", example = "25446") | ||
| 75 | - @ExcelProperty("部门id") | ||
| 76 | - private Long deptId; | ||
| 77 | - | ||
| 78 | @Schema(description = "道路ID数组(多选)") | 76 | @Schema(description = "道路ID数组(多选)") |
| 79 | @ExcelProperty("道路ID数组(多选)") | 77 | @ExcelProperty("道路ID数组(多选)") |
| 80 | private String roadIds; | 78 | private String roadIds; |
| @@ -89,5 +87,10 @@ public class RentalMechanicalCostRespVO { | @@ -89,5 +87,10 @@ public class RentalMechanicalCostRespVO { | ||
| 89 | 87 | ||
| 90 | @ExcelProperty("班组") | 88 | @ExcelProperty("班组") |
| 91 | private List<TeamBizdomainRelVo> teamIds; | 89 | private List<TeamBizdomainRelVo> teamIds; |
| 90 | + @Schema(description = "班组", example = "班组") | ||
| 91 | + @Trans(type = TransType.SIMPLE, targetClassName = "com.zteits.urbanops.module.system.dal.dataobject.dept.DeptDO", | ||
| 92 | + key = "id", fields = "name", ref = "deptNames") | ||
| 93 | + private List<Long> deptId; | ||
| 92 | 94 | ||
| 95 | + private String deptNames; | ||
| 93 | } | 96 | } |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/wasterecord/WasteRecordController.java
| 1 | package com.zteits.urbanops.module.garden.controller.admin.wasterecord; | 1 | package com.zteits.urbanops.module.garden.controller.admin.wasterecord; |
| 2 | 2 | ||
| 3 | +import com.fhs.core.trans.anno.TransMethodResult; | ||
| 3 | import org.springframework.web.bind.annotation.*; | 4 | import org.springframework.web.bind.annotation.*; |
| 4 | import jakarta.annotation.Resource; | 5 | import jakarta.annotation.Resource; |
| 5 | import org.springframework.validation.annotation.Validated; | 6 | import org.springframework.validation.annotation.Validated; |
| @@ -83,6 +84,7 @@ public class WasteRecordController { | @@ -83,6 +84,7 @@ public class WasteRecordController { | ||
| 83 | @GetMapping("/page") | 84 | @GetMapping("/page") |
| 84 | @Operation(summary = "获得园林废弃物录入分页") | 85 | @Operation(summary = "获得园林废弃物录入分页") |
| 85 | @PreAuthorize("@ss.hasPermission('garden:waste-record:query')") | 86 | @PreAuthorize("@ss.hasPermission('garden:waste-record:query')") |
| 87 | + @TransMethodResult | ||
| 86 | public CommonResult<PageResult<WasteRecordRespVO>> getWasteRecordPage(@Valid WasteRecordPageReqVO pageReqVO) { | 88 | public CommonResult<PageResult<WasteRecordRespVO>> getWasteRecordPage(@Valid WasteRecordPageReqVO pageReqVO) { |
| 87 | PageResult<WasteRecordDO> pageResult = wasteRecordService.getWasteRecordPage(pageReqVO); | 89 | PageResult<WasteRecordDO> pageResult = wasteRecordService.getWasteRecordPage(pageReqVO); |
| 88 | return success(BeanUtils.toBean(pageResult, WasteRecordRespVO.class)); | 90 | return success(BeanUtils.toBean(pageResult, WasteRecordRespVO.class)); |
| @@ -91,6 +93,7 @@ public class WasteRecordController { | @@ -91,6 +93,7 @@ public class WasteRecordController { | ||
| 91 | @GetMapping("/list") | 93 | @GetMapping("/list") |
| 92 | @Operation(summary = "园林废弃物录入-列表(兼容旧路径)") | 94 | @Operation(summary = "园林废弃物录入-列表(兼容旧路径)") |
| 93 | @PreAuthorize("@ss.hasPermission('garden:waste-record:query')") | 95 | @PreAuthorize("@ss.hasPermission('garden:waste-record:query')") |
| 96 | + @TransMethodResult | ||
| 94 | public CommonResult<PageResult<WasteRecordRespVO>> list(@Valid WasteRecordPageReqVO pageReqVO) { | 97 | public CommonResult<PageResult<WasteRecordRespVO>> list(@Valid WasteRecordPageReqVO pageReqVO) { |
| 95 | PageResult<WasteRecordDO> pageResult = wasteRecordService.getWasteRecordPage(pageReqVO); | 98 | PageResult<WasteRecordDO> pageResult = wasteRecordService.getWasteRecordPage(pageReqVO); |
| 96 | return success(BeanUtils.toBean(pageResult, WasteRecordRespVO.class)); | 99 | return success(BeanUtils.toBean(pageResult, WasteRecordRespVO.class)); |
| @@ -109,4 +112,4 @@ public class WasteRecordController { | @@ -109,4 +112,4 @@ public class WasteRecordController { | ||
| 109 | BeanUtils.toBean(list, WasteRecordRespVO.class)); | 112 | BeanUtils.toBean(list, WasteRecordRespVO.class)); |
| 110 | } | 113 | } |
| 111 | 114 | ||
| 112 | -} | ||
| 113 | \ No newline at end of file | 115 | \ No newline at end of file |
| 116 | +} |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/wasterecord/vo/WasteRecordRespVO.java
| @@ -3,6 +3,8 @@ package com.zteits.urbanops.module.garden.controller.admin.wasterecord.vo; | @@ -3,6 +3,8 @@ package com.zteits.urbanops.module.garden.controller.admin.wasterecord.vo; | ||
| 3 | import cn.hutool.core.annotation.Alias; | 3 | import cn.hutool.core.annotation.Alias; |
| 4 | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; | 4 | import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
| 5 | import cn.idev.excel.annotation.ExcelProperty; | 5 | import cn.idev.excel.annotation.ExcelProperty; |
| 6 | +import com.fhs.core.trans.anno.Trans; | ||
| 7 | +import com.fhs.core.trans.constant.TransType; | ||
| 6 | import io.swagger.v3.oas.annotations.media.Schema; | 8 | import io.swagger.v3.oas.annotations.media.Schema; |
| 7 | import lombok.Data; | 9 | import lombok.Data; |
| 8 | 10 | ||
| @@ -65,8 +67,10 @@ public class WasteRecordRespVO { | @@ -65,8 +67,10 @@ public class WasteRecordRespVO { | ||
| 65 | private LocalDateTime createTime; | 67 | private LocalDateTime createTime; |
| 66 | 68 | ||
| 67 | @Schema(description = "班组", example = "班组") | 69 | @Schema(description = "班组", example = "班组") |
| 68 | - @ExcelProperty("班组") | ||
| 69 | - @Alias("deptId") | ||
| 70 | - private List<String> teamIdList; | 70 | + @Trans(type = TransType.SIMPLE, targetClassName = "com.zteits.urbanops.module.system.dal.dataobject.dept.DeptDO", |
| 71 | + key = "id", fields = "name", ref = "deptNames") | ||
| 72 | + private List<Long> deptId; | ||
| 73 | + | ||
| 74 | + private String deptNames; | ||
| 71 | 75 | ||
| 72 | } | 76 | } |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/mechanicalcost/MechanicalCostDO.java
| @@ -92,7 +92,7 @@ public class MechanicalCostDO extends BaseDO { | @@ -92,7 +92,7 @@ public class MechanicalCostDO extends BaseDO { | ||
| 92 | * 部门id | 92 | * 部门id |
| 93 | */ | 93 | */ |
| 94 | @TableField(typeHandler = JacksonTypeHandler.class) | 94 | @TableField(typeHandler = JacksonTypeHandler.class) |
| 95 | - private List<String> deptId; | 95 | + private List<Long> deptId; |
| 96 | /** | 96 | /** |
| 97 | * 备注 | 97 | * 备注 |
| 98 | */ | 98 | */ |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/personalcost/PersonalCostDO.java
| @@ -63,7 +63,7 @@ public class PersonalCostDO extends BaseDO { | @@ -63,7 +63,7 @@ public class PersonalCostDO extends BaseDO { | ||
| 63 | * 部门id | 63 | * 部门id |
| 64 | */ | 64 | */ |
| 65 | @TableField(typeHandler = JacksonTypeHandler.class) | 65 | @TableField(typeHandler = JacksonTypeHandler.class) |
| 66 | - private List<String> deptId; | 66 | + private List<Long> deptId; |
| 67 | /** | 67 | /** |
| 68 | * 备注 | 68 | * 备注 |
| 69 | */ | 69 | */ |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/rentalmechanicalcost/RentalMechanicalCostDO.java
| @@ -84,7 +84,8 @@ public class RentalMechanicalCostDO extends BaseDO { | @@ -84,7 +84,8 @@ public class RentalMechanicalCostDO extends BaseDO { | ||
| 84 | /** | 84 | /** |
| 85 | * 部门id | 85 | * 部门id |
| 86 | */ | 86 | */ |
| 87 | - private Long deptId; | 87 | + @TableField(typeHandler = JacksonTypeHandler.class) |
| 88 | + private List<Long> deptId; | ||
| 88 | /** | 89 | /** |
| 89 | * 班组ID数组(多选) | 90 | * 班组ID数组(多选) |
| 90 | */ | 91 | */ |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/wasterecord/WasteRecordDO.java
| @@ -72,7 +72,7 @@ public class WasteRecordDO extends BaseDO { | @@ -72,7 +72,7 @@ public class WasteRecordDO extends BaseDO { | ||
| 72 | * 部门id | 72 | * 部门id |
| 73 | */ | 73 | */ |
| 74 | @TableField(typeHandler = JacksonTypeHandler.class) | 74 | @TableField(typeHandler = JacksonTypeHandler.class) |
| 75 | - private List<String> deptId; | 75 | + private List<Long> deptId; |
| 76 | /** | 76 | /** |
| 77 | * 状态(0正常 1停用) | 77 | * 状态(0正常 1停用) |
| 78 | */ | 78 | */ |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/mechanicalcost/MechanicalCostServiceImpl.java
| @@ -40,7 +40,7 @@ public class MechanicalCostServiceImpl implements MechanicalCostService { | @@ -40,7 +40,7 @@ public class MechanicalCostServiceImpl implements MechanicalCostService { | ||
| 40 | // 插入 | 40 | // 插入 |
| 41 | MechanicalCostDO mechanicalCost = BeanUtils.toBean(createReqVO, MechanicalCostDO.class); | 41 | MechanicalCostDO mechanicalCost = BeanUtils.toBean(createReqVO, MechanicalCostDO.class); |
| 42 | 42 | ||
| 43 | - List<String> deptIds = createReqVO.getTeamIds().stream() | 43 | + List<Long> deptIds = createReqVO.getTeamIds().stream() |
| 44 | .map(TeamBizdomainRelVo::getTeamId) | 44 | .map(TeamBizdomainRelVo::getTeamId) |
| 45 | .collect(Collectors.toList()); | 45 | .collect(Collectors.toList()); |
| 46 | mechanicalCost.setDeptId(deptIds); | 46 | mechanicalCost.setDeptId(deptIds); |
| @@ -57,7 +57,7 @@ public class MechanicalCostServiceImpl implements MechanicalCostService { | @@ -57,7 +57,7 @@ public class MechanicalCostServiceImpl implements MechanicalCostService { | ||
| 57 | // 更新 | 57 | // 更新 |
| 58 | MechanicalCostDO updateObj = BeanUtils.toBean(updateReqVO, MechanicalCostDO.class); | 58 | MechanicalCostDO updateObj = BeanUtils.toBean(updateReqVO, MechanicalCostDO.class); |
| 59 | 59 | ||
| 60 | - List<String> deptIds = updateReqVO.getTeamIds().stream() | 60 | + List<Long> deptIds = updateReqVO.getTeamIds().stream() |
| 61 | .map(TeamBizdomainRelVo::getTeamId) | 61 | .map(TeamBizdomainRelVo::getTeamId) |
| 62 | .collect(Collectors.toList()); | 62 | .collect(Collectors.toList()); |
| 63 | updateObj.setDeptId(deptIds); | 63 | updateObj.setDeptId(deptIds); |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/personalcost/PersonalCostServiceImpl.java
| @@ -40,7 +40,7 @@ public class PersonalCostServiceImpl implements PersonalCostService { | @@ -40,7 +40,7 @@ public class PersonalCostServiceImpl implements PersonalCostService { | ||
| 40 | public Long createPersonalCost(PersonalCostSaveReqVO createReqVO) { | 40 | public Long createPersonalCost(PersonalCostSaveReqVO createReqVO) { |
| 41 | // 插入 | 41 | // 插入 |
| 42 | PersonalCostDO personalCost = BeanUtils.toBean(createReqVO, PersonalCostDO.class); | 42 | PersonalCostDO personalCost = BeanUtils.toBean(createReqVO, PersonalCostDO.class); |
| 43 | - List<String> deptIds = createReqVO.getTeamIds().stream() | 43 | + List<Long> deptIds = createReqVO.getTeamIds().stream() |
| 44 | .map(TeamBizdomainRelVo::getTeamId) | 44 | .map(TeamBizdomainRelVo::getTeamId) |
| 45 | .collect(Collectors.toList()); | 45 | .collect(Collectors.toList()); |
| 46 | personalCost.setDeptId(deptIds); | 46 | personalCost.setDeptId(deptIds); |
| @@ -56,7 +56,7 @@ public class PersonalCostServiceImpl implements PersonalCostService { | @@ -56,7 +56,7 @@ public class PersonalCostServiceImpl implements PersonalCostService { | ||
| 56 | validatePersonalCostExists(updateReqVO.getId()); | 56 | validatePersonalCostExists(updateReqVO.getId()); |
| 57 | // 更新 | 57 | // 更新 |
| 58 | PersonalCostDO updateObj = BeanUtils.toBean(updateReqVO, PersonalCostDO.class); | 58 | PersonalCostDO updateObj = BeanUtils.toBean(updateReqVO, PersonalCostDO.class); |
| 59 | - List<String> deptIds = updateReqVO.getTeamIds().stream() | 59 | + List<Long> deptIds = updateReqVO.getTeamIds().stream() |
| 60 | .map(TeamBizdomainRelVo::getTeamId) | 60 | .map(TeamBizdomainRelVo::getTeamId) |
| 61 | .collect(Collectors.toList()); | 61 | .collect(Collectors.toList()); |
| 62 | updateObj.setDeptId(deptIds); | 62 | updateObj.setDeptId(deptIds); |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/rentalmechanicalcost/RentalMechanicalCostServiceImpl.java
| @@ -2,6 +2,7 @@ package com.zteits.urbanops.module.garden.service.rentalmechanicalcost; | @@ -2,6 +2,7 @@ package com.zteits.urbanops.module.garden.service.rentalmechanicalcost; | ||
| 2 | 2 | ||
| 3 | import com.zteits.urbanops.framework.common.pojo.PageResult; | 3 | 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.costfee.vo.TeamBizdomainRelVo; | ||
| 5 | import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.RentalMechanicalCostPageReqVO; | 6 | import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.RentalMechanicalCostPageReqVO; |
| 6 | import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.RentalMechanicalCostSaveReqVO; | 7 | import com.zteits.urbanops.module.garden.controller.admin.rentalmechanicalcost.vo.RentalMechanicalCostSaveReqVO; |
| 7 | import com.zteits.urbanops.module.garden.dal.dataobject.rentalmechanicalcost.RentalMechanicalCostDO; | 8 | import com.zteits.urbanops.module.garden.dal.dataobject.rentalmechanicalcost.RentalMechanicalCostDO; |
| @@ -11,6 +12,7 @@ import org.springframework.stereotype.Service; | @@ -11,6 +12,7 @@ import org.springframework.stereotype.Service; | ||
| 11 | import org.springframework.validation.annotation.Validated; | 12 | import org.springframework.validation.annotation.Validated; |
| 12 | 13 | ||
| 13 | import java.util.List; | 14 | import java.util.List; |
| 15 | +import java.util.stream.Collectors; | ||
| 14 | 16 | ||
| 15 | import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; | 17 | import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; |
| 16 | import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.RENTAL_MECHANICAL_COST_NOT_EXISTS; | 18 | import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.RENTAL_MECHANICAL_COST_NOT_EXISTS; |
| @@ -31,6 +33,10 @@ public class RentalMechanicalCostServiceImpl implements RentalMechanicalCostServ | @@ -31,6 +33,10 @@ public class RentalMechanicalCostServiceImpl implements RentalMechanicalCostServ | ||
| 31 | public Long createRentalMechanicalCost(RentalMechanicalCostSaveReqVO createReqVO) { | 33 | public Long createRentalMechanicalCost(RentalMechanicalCostSaveReqVO createReqVO) { |
| 32 | // 插入 | 34 | // 插入 |
| 33 | RentalMechanicalCostDO rentalMechanicalCost = BeanUtils.toBean(createReqVO, RentalMechanicalCostDO.class); | 35 | RentalMechanicalCostDO rentalMechanicalCost = BeanUtils.toBean(createReqVO, RentalMechanicalCostDO.class); |
| 36 | + List<Long> deptIds = createReqVO.getTeamIds().stream() | ||
| 37 | + .map(TeamBizdomainRelVo::getTeamId) | ||
| 38 | + .collect(Collectors.toList()); | ||
| 39 | + rentalMechanicalCost.setDeptId(deptIds); | ||
| 34 | rentalMechanicalCostMapper.insert(rentalMechanicalCost); | 40 | rentalMechanicalCostMapper.insert(rentalMechanicalCost); |
| 35 | // 返回 | 41 | // 返回 |
| 36 | return rentalMechanicalCost.getId(); | 42 | return rentalMechanicalCost.getId(); |
| @@ -42,6 +48,10 @@ public class RentalMechanicalCostServiceImpl implements RentalMechanicalCostServ | @@ -42,6 +48,10 @@ public class RentalMechanicalCostServiceImpl implements RentalMechanicalCostServ | ||
| 42 | validateRentalMechanicalCostExists(updateReqVO.getId()); | 48 | validateRentalMechanicalCostExists(updateReqVO.getId()); |
| 43 | // 更新 | 49 | // 更新 |
| 44 | RentalMechanicalCostDO updateObj = BeanUtils.toBean(updateReqVO, RentalMechanicalCostDO.class); | 50 | RentalMechanicalCostDO updateObj = BeanUtils.toBean(updateReqVO, RentalMechanicalCostDO.class); |
| 51 | + List<Long> deptIds = updateReqVO.getTeamIds().stream() | ||
| 52 | + .map(TeamBizdomainRelVo::getTeamId) | ||
| 53 | + .collect(Collectors.toList()); | ||
| 54 | + updateObj.setDeptId(deptIds); | ||
| 45 | rentalMechanicalCostMapper.updateById(updateObj); | 55 | rentalMechanicalCostMapper.updateById(updateObj); |
| 46 | } | 56 | } |
| 47 | 57 |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/wasterecord/WasteRecordServiceImpl.java
| @@ -35,7 +35,7 @@ public class WasteRecordServiceImpl implements WasteRecordService { | @@ -35,7 +35,7 @@ public class WasteRecordServiceImpl implements WasteRecordService { | ||
| 35 | public Long createWasteRecord(WasteRecordSaveReqVO createReqVO) { | 35 | public Long createWasteRecord(WasteRecordSaveReqVO createReqVO) { |
| 36 | // 插入 | 36 | // 插入 |
| 37 | WasteRecordDO wasteRecord = BeanUtils.toBean(createReqVO, WasteRecordDO.class); | 37 | WasteRecordDO wasteRecord = BeanUtils.toBean(createReqVO, WasteRecordDO.class); |
| 38 | - List<String> deptIds = createReqVO.getTeamIds().stream() | 38 | + List<Long> deptIds = createReqVO.getTeamIds().stream() |
| 39 | .map(TeamBizdomainRelVo::getTeamId) | 39 | .map(TeamBizdomainRelVo::getTeamId) |
| 40 | .collect(Collectors.toList()); | 40 | .collect(Collectors.toList()); |
| 41 | wasteRecord.setDeptId(deptIds); | 41 | wasteRecord.setDeptId(deptIds); |
| @@ -52,7 +52,7 @@ public class WasteRecordServiceImpl implements WasteRecordService { | @@ -52,7 +52,7 @@ public class WasteRecordServiceImpl implements WasteRecordService { | ||
| 52 | // 更新 | 52 | // 更新 |
| 53 | WasteRecordDO updateObj = BeanUtils.toBean(updateReqVO, WasteRecordDO.class); | 53 | WasteRecordDO updateObj = BeanUtils.toBean(updateReqVO, WasteRecordDO.class); |
| 54 | 54 | ||
| 55 | - List<String> deptIds = updateReqVO.getTeamIds().stream() | 55 | + List<Long> deptIds = updateReqVO.getTeamIds().stream() |
| 56 | .map(TeamBizdomainRelVo::getTeamId) | 56 | .map(TeamBizdomainRelVo::getTeamId) |
| 57 | .collect(Collectors.toList()); | 57 | .collect(Collectors.toList()); |
| 58 | updateObj.setDeptId(deptIds); | 58 | updateObj.setDeptId(deptIds); |