From 0fd777e6de7c058accfba355ec419959927e0cb2 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期三, 27 十二月 2023 16:39:36 +0800
Subject: [PATCH] 2023-12-27 朱宝民 根据条件查询交易汇总记录

---
 pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java |  111 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 106 insertions(+), 5 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java
index 1dce9cb..46cae34 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java
@@ -40,6 +40,11 @@
 public class ClientCtrl {
     private final ClientSv clientSv;
 
+    /**
+     * 鑾峰彇鍐滄埛鍒楄〃
+     * @param vo
+     * @return
+     */
     @Operation(summary = "鑾峰緱涓�椤靛啘鎴�", description = "杩斿洖涓�椤靛啘鎴锋暟鎹�")
     @ApiResponses(value = {
             @ApiResponse(
@@ -61,6 +66,63 @@
         }
     }
 
+    /**
+     * 鑾峰彇浜ゆ槗璁板綍
+     * @param vo
+     * @return
+     */
+    @Operation(summary = "鑾峰緱涓�椤典氦鏄撹褰�", description = "杩斿洖涓�椤典氦鏄撹褰�")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "杩斿洖涓�椤靛啘鎴锋暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = BaClient.class))}
+            )
+    })
+    @GetMapping(path = "getOperates")
+    @SsoAop()
+    public BaseResponse<Map> getOperates(QueryOperate vo){
+        try {
+           Map res = clientSv.getOperates(vo);
+            return BaseResponseUtils.buildSuccess(res);
+        } catch (Exception e) {
+            log.error("鏌ヨ浜ゆ槗璁板綍寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鑾峰彇浜ゆ槗姹囨�昏褰�
+     * @param vo
+     * @return
+     */
+    @Operation(summary = "鑾峰緱涓�椤典氦鏄撴眹鎬昏褰�", description = "杩斿洖涓�椤典氦鏄撴眹鎬昏褰�")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "杩斿洖涓�椤靛啘鎴锋暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = BaClient.class))}
+            )
+    })
+    @GetMapping(path = "getStatistics")
+    @SsoAop()
+    public BaseResponse<Map> getStatistics(QueryStatistic vo){
+        try {
+            Map res = clientSv.getStatistics(vo);
+            return BaseResponseUtils.buildSuccess(res);
+        } catch (Exception e) {
+            log.error("鏌ヨ浜ゆ槗姹囨�昏褰曞紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鏍规嵁涓婚敭鑾峰彇涓�涓啘鎴峰璞�
+     * @param id
+     * @return
+     */
     @Operation(summary = "鑾峰緱涓�涓啘鎴�", description = "杩斿洖涓�涓啘鎴锋暟鎹�")
     @ApiResponses(value = {
             @ApiResponse(
@@ -83,6 +145,12 @@
     }
 
 
+    /**
+     * 娣诲姞涓�涓啘鎴峰璞�
+     * @param po
+     * @param bindingResult
+     * @return
+     */
     @Operation(summary = "娣诲姞鍐滄埛璁板綍", description = "娣诲姞鍐滄埛璁板綍")
     @ApiResponses(value = {
             @ApiResponse(
@@ -130,9 +198,21 @@
         Long districtNum = Long.parseLong(provinceNum + cityNum + district8);
         String districtTitle = countryName + townName + villageName;
 
+        // 鐢熸垚铏氭嫙鍗″彿
+        Long virtualId = Optional.ofNullable(clientSv.getMa1xVirtualId()).orElse(0L);
+        if(virtualId == 0) {
+            virtualId = 1000000000L;
+        }else {
+            virtualId = virtualId + 1;
+            if(virtualId > 10000000000L) {
+                return BaseResponseUtils.buildFail("铏氭嫙鍗″彿瓒呴檺");
+            }
+        }
+
         SeClient seClient = DtoClientToSeClient.INSTANCT.po2vo(po);
         seClient.setCountyid(countryId);
         seClient.setTownid(townId);
+        seClient.setVirtualid(virtualId);
         seClient.setClientnum(clientNum);
         seClient.setDistrictnum(districtNum);
         seClient.setDistricttitle(districtTitle);
@@ -176,7 +256,7 @@
     }
 
     /**
-     * 淇敼鍐滄埛瀵硅薄
+     * 淇敼鍐滄埛瀵硅薄锛堣櫄鎷熷崱鍙枫�佺姝㈡爣蹇椼�侀�昏緫鍒犻櫎鏍囪瘑涓嶅弬涓庝慨鏀癸級
      * @param po 鍐滄埛瀵硅薄
      * @param bindingResult
      * @return
@@ -236,13 +316,10 @@
         seClient.setDistricttitle(districtTitle);
         Date operateTime = new Date();
         seClient.setOperatedt(operateTime);
-        //
-        //seClient.setDisabled((byte)0);
-        //seClient.setDeleted((byte)0);
 
         Integer rec = Optional.ofNullable(clientSv.updateByPrimaryKey(seClient)).orElse(0);
         if(rec == 0) {
-            return BaseResponseUtils.buildFail("娣诲姞鍐滄埛澶辫触");
+            return BaseResponseUtils.buildFail("鍐滄埛淇敼澶辫触");
         }
         return BaseResponseUtils.buildSuccess(true) ;
     }
@@ -276,4 +353,28 @@
             return BaseResponseUtils.buildException(e.getMessage()) ;
         }
     }
+
+    /**
+     * 鑾峰彇鐢ㄦ按鏂瑰紡鍒楄〃
+     * @param
+     * @return
+     */
+    @Operation(summary = "鑾峰緱鐢ㄦ按鏂瑰紡鍒楄〃", description = "杩斿洖鐢ㄦ按鏂瑰紡鍒楄〃")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "杩斿洖涓�椤靛啘鎴锋暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = BaClient.class))}
+            )
+    })
+    @GetMapping(path = "/watertypes")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<Map<String, Object>>>> getWaterTypes(){
+        List<Map<String, Object>> map_WaterTypes = Optional.ofNullable(clientSv.getWaterTypes()).orElse(new ArrayList<>());
+        if(map_WaterTypes == null || map_WaterTypes.size() == 0) {
+            return BaseResponseUtils.buildFail("娌℃湁鐢ㄦ按鏂瑰紡") ;
+        }
+        return BaseResponseUtils.buildSuccess(map_WaterTypes);
+    }
 }

--
Gitblit v1.8.0