From a40eed2a4d81d27d252823a18529f072af56579c Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期二, 26 十二月 2023 18:31:05 +0800
Subject: [PATCH] 2023-12-26 朱宝民 分水房单个查询、单个删除、修改

---
 pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java |   43 ++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 38 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..2a064e4 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
@@ -130,9 +130,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 +188,7 @@
     }
 
     /**
-     * 淇敼鍐滄埛瀵硅薄
+     * 淇敼鍐滄埛瀵硅薄 铏氭嫙鍗″彿銆佺姝㈡爣蹇椼�侀�昏緫鍒犻櫎鏍囪瘑涓嶅弬涓庝慨鏀�
      * @param po 鍐滄埛瀵硅薄
      * @param bindingResult
      * @return
@@ -236,13 +248,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 +285,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