From 11a7f9174d77eae87e45c43668e9746139dca036 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期三, 01 十一月 2023 17:24:34 +0800 Subject: [PATCH] zjh 2023/11/01--2 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTollCollectorController.java | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTollCollectorController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTollCollectorController.java index 55bdca0..c6a95b3 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTollCollectorController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTollCollectorController.java @@ -14,7 +14,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ltkj.common.core.domain.entity.SysDictData; import com.ltkj.common.utils.SecurityUtils; +import com.ltkj.common.utils.StringUtils; import com.ltkj.framework.config.MatchUtils; +import com.ltkj.framework.config.UserHoder; import com.ltkj.hosp.domain.*; import com.ltkj.hosp.service.*; import com.ltkj.hosp.vodomain.ChargeStatisticsVo; @@ -62,7 +64,7 @@ /** * 鏌ヨ鏀惰垂鍛樻棩缁撳垪琛� */ - @PreAuthorize("@ss.hasPermi('hosp:collector:list')") + //@PreAuthorize("@ss.hasPermi('hosp:collector:list')") @GetMapping("/list") @ApiOperation(value = "鏌ヨ鏀惰垂鍛樻棩缁撳垪琛�") public AjaxResult list(@RequestParam(required = false) @ApiParam(value = "鏀惰垂鍛榠d") String tollCollectorId, @@ -80,7 +82,6 @@ if (null != accountBeginTime && null != accountEndTime) { wqq.between(TjTollCollector::getCreateTime, accountBeginTime, accountEndTime); } else { - DateTime dateTime = DateUtil.lastWeek(); wqq.between(TjTollCollector::getCreateTime, DateUtil.lastWeek(),DateUtil.date()); } wqq.orderByDesc(TjTollCollector::getCreateTime); @@ -103,7 +104,7 @@ /** * 瀵煎嚭鏀惰垂鍛樻棩缁撳垪琛� */ - @PreAuthorize("@ss.hasPermi('hosp:collector:export')") + //@PreAuthorize("@ss.hasPermi('hosp:collector:export')") @Log(title = "鏀惰垂鍛樻棩缁�", businessType = BusinessType.EXPORT) @PostMapping("/export") @ApiOperation(value = "瀵煎嚭鏀惰垂鍛樻棩缁撳垪琛�") @@ -116,7 +117,7 @@ /** * 鑾峰彇鏀惰垂鍛樻棩缁撹缁嗕俊鎭� */ - @PreAuthorize("@ss.hasPermi('hosp:collector:query')") + // @PreAuthorize("@ss.hasPermi('hosp:collector:query')") @GetMapping(value = "/{id}") @ApiOperation(value = "鑾峰彇鏀惰垂鍛樻棩缁撹缁嗕俊鎭�") public AjaxResult getInfo(@PathVariable("id") String id) { @@ -126,7 +127,7 @@ /** * 鐐瑰嚮缁撶畻 鏂板鏀惰垂鍛樻棩缁� */ - @PreAuthorize("@ss.hasPermi('hosp:collector:add')") + //@PreAuthorize("@ss.hasPermi('hosp:collector:add')") @Log(title = "鏀惰垂鍛樻棩缁�", businessType = BusinessType.INSERT) @PostMapping @ApiOperation(value = "鐐瑰嚮缁撶畻 鏂板鏀惰垂鍛樻棩缁�") @@ -150,7 +151,7 @@ } - @PreAuthorize("@ss.hasPermi('hosp:collector:remove')") + //@PreAuthorize("@ss.hasPermi('hosp:collector:remove')") @DeleteMapping("/removeTjTollCollectorById") @ApiOperation(value = "鏀惰垂鍛樻挙閿�璐﹀崟鎿嶄綔鎺ュ彛") public AjaxResult removeTjTollCollectorById(@RequestParam @ApiParam(value = "缁撹处id") String id, @@ -175,6 +176,9 @@ // TjTollCollector collector = tjTollCollectorService.getById(id); TjTollCollector collector = tjTollCollectorService.getTjTollCollectorById(id); if (null != collector) { + if("Y".equals(collector.getIsHz())){ + return AjaxResult.error("璇ヨ处鍗曞凡姹囨�讳笉鍙挙閿�"); + } LambdaQueryWrapper<TjTollCollectorDetail> wq = new LambdaQueryWrapper<>(); wq.eq(TjTollCollectorDetail::getAccountId, collector.getAccountId()); collectorDetailService.remove(wq); @@ -207,7 +211,9 @@ wq.orderByDesc(TjTollCollector::getAccountEndTime); List<TjTollCollector> list = tjTollCollectorService.list(wq); if (null != list && list.size() > 0) return success(list.get(0).getAccountEndTime()); - return AjaxResult.success("1970-01-01 00:00:00"); + String dateStr = "2023-10-01 00:00:00"; + Date date = DateUtil.parse(dateStr, "yyyy-MM-dd HH:mm:ss"); + return AjaxResult.success(date); } @@ -243,7 +249,7 @@ List<Map<String, Object>> cc = new ArrayList<>(); //缁熻鎬婚泦鍚� //浠樻鏂瑰紡 - Map<Long, List<TjFlowingWater>> m = list.stream().collect(Collectors.groupingBy(TjFlowingWater::getPayType)); + Map<Long, List<TjFlowingWater>> m = list.stream().filter(item-> StringUtils.isNotNull(item.getPayType())).collect(Collectors.groupingBy(TjFlowingWater::getPayType)); BigDecimal zshoukuan = new BigDecimal("0.00"); BigDecimal ztuikuan = new BigDecimal("0.00"); BigDecimal zyingjiao = new BigDecimal("0.00"); -- Gitblit v1.8.0