Commit bc33240e0d1fd129e8f3fa230dcb5a15a0025d34
1 parent
8f9f56ae
提交
Showing
2 changed files
with
10 additions
and
5 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/planrate/PlanRateDetailController.java
| ... | ... | @@ -11,6 +11,7 @@ import io.swagger.v3.oas.annotations.Operation; |
| 11 | 11 | import jakarta.validation.constraints.*; |
| 12 | 12 | import jakarta.validation.*; |
| 13 | 13 | import jakarta.servlet.http.*; |
| 14 | + | |
| 14 | 15 | import java.util.*; |
| 15 | 16 | import java.io.IOException; |
| 16 | 17 | |
| ... | ... | @@ -18,11 +19,13 @@ import com.zteits.urbanops.framework.common.pojo.PageParam; |
| 18 | 19 | import com.zteits.urbanops.framework.common.pojo.PageResult; |
| 19 | 20 | import com.zteits.urbanops.framework.common.pojo.CommonResult; |
| 20 | 21 | import com.zteits.urbanops.framework.common.util.object.BeanUtils; |
| 22 | + | |
| 21 | 23 | import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; |
| 22 | 24 | |
| 23 | 25 | import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; |
| 24 | 26 | |
| 25 | 27 | import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; |
| 28 | + | |
| 26 | 29 | import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; |
| 27 | 30 | |
| 28 | 31 | import com.zteits.urbanops.module.garden.controller.admin.planrate.vo.*; |
| ... | ... | @@ -65,7 +68,7 @@ public class PlanRateDetailController { |
| 65 | 68 | @DeleteMapping("/delete-list") |
| 66 | 69 | @Parameter(name = "ids", description = "编号", required = true) |
| 67 | 70 | @Operation(summary = "批量删除计划频次明细") |
| 68 | - @PreAuthorize("@ss.hasPermission('garden:plan-rate-detail:delete')") | |
| 71 | + @PreAuthorize("@ss.hasPermission('garden:plan-rate-detail:delete')") | |
| 69 | 72 | public CommonResult<Boolean> deletePlanRateDetailList(@RequestParam("ids") List<Long> ids) { |
| 70 | 73 | planRateDetailService.deletePlanRateDetailListByIds(ids); |
| 71 | 74 | return success(true); |
| ... | ... | @@ -80,7 +83,7 @@ public class PlanRateDetailController { |
| 80 | 83 | public CommonResult<PlanRateDetailRespVO> getPlanRateValue(@RequestParam("busi_Line") @NotBlank String busiLine, |
| 81 | 84 | @RequestParam("plan_type_id") @NotNull Integer planTypeId, |
| 82 | 85 | @RequestParam("level_id") @NotNull Integer levelId) { |
| 83 | - return success(planRateDetailService.getPlanRateValue(busiLine, planTypeId, levelId )); | |
| 86 | + return success(planRateDetailService.getPlanRateValue(busiLine, planTypeId, levelId)); | |
| 84 | 87 | } |
| 85 | 88 | |
| 86 | 89 | @GetMapping("/page") |
| ... | ... | @@ -96,12 +99,12 @@ public class PlanRateDetailController { |
| 96 | 99 | @PreAuthorize("@ss.hasPermission('garden:plan-rate-detail:export')") |
| 97 | 100 | @ApiAccessLog(operateType = EXPORT) |
| 98 | 101 | public void exportPlanRateDetailExcel(@Valid PlanRateDetailPageReqVO pageReqVO, |
| 99 | - HttpServletResponse response) throws IOException { | |
| 102 | + HttpServletResponse response) throws IOException { | |
| 100 | 103 | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
| 101 | 104 | List<PlanRateDetailDO> list = planRateDetailService.getPlanRateDetailPage(pageReqVO).getList(); |
| 102 | 105 | // 导出 Excel |
| 103 | 106 | ExcelUtils.write(response, "计划频次明细.xls", "数据", PlanRateDetailRespVO.class, |
| 104 | - BeanUtils.toBean(list, PlanRateDetailRespVO.class)); | |
| 107 | + BeanUtils.toBean(list, PlanRateDetailRespVO.class)); | |
| 105 | 108 | } |
| 106 | 109 | |
| 107 | 110 | } |
| 108 | 111 | \ No newline at end of file | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/planrate/PlanRateDetailServiceImpl.java
| ... | ... | @@ -94,7 +94,9 @@ public class PlanRateDetailServiceImpl implements PlanRateDetailService { |
| 94 | 94 | @Override |
| 95 | 95 | public PlanRateDetailRespVO getPlanRateValue(String busiLine, Integer planTypeId, Integer levelId) { |
| 96 | 96 | QueryWrapper<PlanRateDetailDO> sql = new QueryWrapper<>(); |
| 97 | - sql.lambda().eq(PlanRateDetailDO::getBusiLine, busiLine).eq(PlanRateDetailDO::getPlanTypeId, planTypeId).eq(PlanRateDetailDO::getLevelId, levelId); | |
| 97 | + sql.lambda().eq(PlanRateDetailDO::getBusiLine, busiLine) | |
| 98 | + .eq(PlanRateDetailDO::getPlanTypeId, planTypeId) | |
| 99 | + .eq(PlanRateDetailDO::getLevelId, levelId); | |
| 98 | 100 | PlanRateDetailDO planRateDetailDO = planRateDetailMapper.selectOne(sql); |
| 99 | 101 | if (planRateDetailDO == null) { |
| 100 | 102 | throw exception(PLAN_RATE_NOT_EXISTS); | ... | ... |