From 97a2cd43e3c8137ec896215062efe50bea3c82f5 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 19 十一月 2024 16:40:38 +0800
Subject: [PATCH] 最新版本541200007

---
 server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/RegionTopPowerResponse.java |    2 
 server/visits/dmvisit_service/src/main/resources/application-dev.yml                                                |   12 ++--
 server/visits/dmvisit_admin/src/main/resources/bootstrap.yml                                                        |    2 
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java            |   16 ++--
 server/system_gateway/src/main/resources/application-dev.yml                                                        |   12 ++--
 server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractRoomCloudController.java                 |   91 ++++++++++++++++++++++++++++++
 6 files changed, 113 insertions(+), 22 deletions(-)

diff --git a/server/system_gateway/src/main/resources/application-dev.yml b/server/system_gateway/src/main/resources/application-dev.yml
index e702b3b..413edec 100644
--- a/server/system_gateway/src/main/resources/application-dev.yml
+++ b/server/system_gateway/src/main/resources/application-dev.yml
@@ -1,12 +1,12 @@
 spring:
   # 鏁版嵁婧愰厤缃�
   datasource:
-    url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
-    username: doumee
-    password: rtjgfEr@&0c0m
-#    url: jdbc:mysql://10.50.250.253:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
-#    username: root
-#    password: Atwl@2024
+#    url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+#    username: doumee
+#    password: rtjgfEr@&0c0m
+    url: jdbc:mysql://10.50.250.253:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+    username: root
+    password: Atwl@2024
     driver-class-name: com.mysql.cj.jdbc.Driver
     type: com.alibaba.druid.pool.DruidDataSource
 
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractRoomCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractRoomCloudController.java
new file mode 100644
index 0000000..76aa46d
--- /dev/null
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractRoomCloudController.java
@@ -0,0 +1,91 @@
+package com.doumee.cloud.admin;
+
+import com.doumee.api.BaseController;
+import com.doumee.core.annotation.excel.ExcelExporter;
+import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
+import com.doumee.dao.business.model.YwContractRoom;
+import com.doumee.service.business.YwContractRoomService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2024/11/19 16:07
+ */
+@Api(tags = "杩愮淮鍚堝悓鎴挎簮鍏宠仈淇℃伅琛�")
+@RestController
+@RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ywContractRoom")
+public class YwContractRoomCloudController extends BaseController {
+
+    @Autowired
+    private YwContractRoomService ywContractRoomService;
+
+    @PreventRepeat
+    @ApiOperation("鏂板缓")
+    @PostMapping("/create")
+    @RequiresPermissions("business:ywcontractroom:create")
+    public ApiResponse create(@RequestBody YwContractRoom ywContractRoom) {
+        return ApiResponse.success(ywContractRoomService.create(ywContractRoom));
+    }
+
+    @ApiOperation("鏍规嵁ID鍒犻櫎")
+    @GetMapping("/delete/{id}")
+    @RequiresPermissions("business:ywcontractroom:delete")
+    public ApiResponse deleteById(@PathVariable Integer id) {
+        ywContractRoomService.deleteById(id);
+        return ApiResponse.success(null);
+    }
+
+    @ApiOperation("鎵归噺鍒犻櫎")
+    @GetMapping("/delete/batch")
+    @RequiresPermissions("business:ywcontractroom:delete")
+    public ApiResponse deleteByIdInBatch(@RequestParam String ids) {
+        String [] idArray = ids.split(",");
+        List<Integer> idList = new ArrayList<>();
+        for (String id : idArray) {
+            idList.add(Integer.valueOf(id));
+        }
+        ywContractRoomService.deleteByIdInBatch(idList);
+        return ApiResponse.success(null);
+    }
+
+    @ApiOperation("鏍规嵁ID淇敼")
+    @PostMapping("/updateById")
+    @RequiresPermissions("business:ywcontractroom:update")
+    public ApiResponse updateById(@RequestBody YwContractRoom ywContractRoom) {
+        ywContractRoomService.updateById(ywContractRoom);
+        return ApiResponse.success(null);
+    }
+
+    @ApiOperation("鍒嗛〉鏌ヨ")
+    @PostMapping("/page")
+    @RequiresPermissions("business:ywcontractroom:query")
+    public ApiResponse<PageData<YwContractRoom>> findPage (@RequestBody PageWrap<YwContractRoom> pageWrap) {
+        return ApiResponse.success(ywContractRoomService.findPage(pageWrap));
+    }
+
+    @ApiOperation("瀵煎嚭Excel")
+    @PostMapping("/exportExcel")
+    @RequiresPermissions("business:ywcontractroom:exportExcel")
+    public void exportExcel (@RequestBody PageWrap<YwContractRoom> pageWrap, HttpServletResponse response) {
+        ExcelExporter.build(YwContractRoom.class).export(ywContractRoomService.findPage(pageWrap).getRecords(), "杩愮淮鍚堝悓鎴挎簮鍏宠仈淇℃伅琛�", response);
+    }
+
+    @ApiOperation("鏍规嵁ID鏌ヨ")
+    @GetMapping("/{id}")
+    @RequiresPermissions("business:ywcontractroom:query")
+    public ApiResponse findById(@PathVariable Integer id) {
+        return ApiResponse.success(ywContractRoomService.findById(id));
+    }
+}
diff --git a/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml b/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
index 9dc10e9..2df12af 100644
--- a/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
+++ b/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
 spring:
   profiles:
-    active: dev
+    active: pro
   application:
     name: visitsAdmin
     # 瀹夊叏閰嶇疆
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/RegionTopPowerResponse.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/RegionTopPowerResponse.java
index b3ab95d..56005b9 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/RegionTopPowerResponse.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/RegionTopPowerResponse.java
@@ -12,5 +12,5 @@
     @ApiModelProperty(value = "鍊�")
       private BigDecimal value	;//Number	false	鍊�
     @ApiModelProperty(value = "鍗犳瘮")
-      private BigDecimal percent	;//Number	false	鍗犳瘮
+    private BigDecimal percent	;//Number	false	鍗犳瘮
 }
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
index dcabfe6..c5a47a3 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -401,11 +401,11 @@
         List<EnergyDataVO> loadCurveList = new ArrayList<>();
         try {
             BaseResponse<List<EnergyTodayLoadDataResponse>>  response = HKService.energyTodayLoadData();
-            if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) || response.getData()==null ){
+            if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null ){
                 for (EnergyTodayLoadDataResponse model :response.getData()) {
                     EnergyDataVO data = new EnergyDataVO();
                     data.setTimeData(model.getName());
-                    data.setEnergy(new BigDecimal(model.getName()));
+                    data.setEnergy(new BigDecimal(StringUtils.defaultString(model.getValue(),"0")));
                     loadCurveList.add(data);
                 }
             }
@@ -473,7 +473,7 @@
         Date month0 = DateUtil.getDateFromString(firstDate);
         Date month1 = DateUtil.increaseMonth(month0,-1);//涓婃湀
         Date month2 = DateUtil.increaseMonth(month0,-2);//涓婁笂鏈�
-        Date month3 = DateUtil.increaseMonth(month0,-12);//鍘诲勾鍚屾湀
+        Date month3 = DateUtil.increaseMonth(month0,-13);//鍘诲勾鍚屾湀
 
         List<PlatformWaterGas> list =  platformWaterGasMapper.selectList(new QueryWrapper<PlatformWaterGas>()
                 .lambda()
@@ -494,10 +494,10 @@
                         data.getGasQuantity().setTotal(Constants.formatBigdecimal(model.getNum())+"");
                     }
                     if(model.getTimeInfo().getTime() == month2.getTime()){
-                        data.getGasQuantity().setSameNum(Constants.formatBigdecimal(model.getNum()) );
+                        data.getGasQuantity().setRingNum(Constants.formatBigdecimal(model.getNum()) );
                     }
                     if(model.getTimeInfo().getTime() == month3.getTime()){
-                        data.getGasQuantity().setRingNum(Constants.formatBigdecimal(model.getNum()) );
+                        data.getGasQuantity().setSameNum(Constants.formatBigdecimal(model.getNum()) );
                     }
 
                 }else if(Constants.equalsInteger(model.getType(),Constants.ZERO)){
@@ -509,10 +509,10 @@
                         data.getWaterQuantity().setTotal(Constants.formatBigdecimal(model.getNum())+"");
                     }
                     if(model.getTimeInfo().getTime() == month2.getTime()){
-                        data.getWaterQuantity().setSameNum(Constants.formatBigdecimal(model.getNum()) );
+                        data.getWaterQuantity().setRingNum(Constants.formatBigdecimal(model.getNum()) );
                     }
                     if(model.getTimeInfo().getTime() == month3.getTime()){
-                        data.getWaterQuantity().setRingNum(Constants.formatBigdecimal(model.getNum()) );
+                        data.getWaterQuantity().setSameNum(Constants.formatBigdecimal(model.getNum()) );
                     }
                 }
             }
@@ -557,7 +557,7 @@
      * @param data
      */
     private void getLastMonthElectricityData(EnergyModelDataVO data) {
-        BaseResponse<LastMonthFeeByMeterTypeResponse> response = HKService.lastMonthFeeByMeterType("1");
+         BaseResponse<LastMonthFeeByMeterTypeResponse> response = HKService.lastMonthFeeByMeterType("1");
         if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null ){
            data.setRingRate(StringUtils.defaultString(response.getData().getRingPercent(),"0"));
            data.setSameRate(StringUtils.defaultString(response.getData().getSamePercent(),"0"));
diff --git a/server/visits/dmvisit_service/src/main/resources/application-dev.yml b/server/visits/dmvisit_service/src/main/resources/application-dev.yml
index 98d9c9a..0221f4a 100644
--- a/server/visits/dmvisit_service/src/main/resources/application-dev.yml
+++ b/server/visits/dmvisit_service/src/main/resources/application-dev.yml
@@ -1,12 +1,12 @@
 spring:
   # 鏁版嵁婧愰厤缃�
   datasource:
-    url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
-    username: doumee
-    password: rtjgfEr@&0c0m
-#    url: jdbc:mysql://10.50.250.253:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
-#    username: root
-#    password: Atwl@2024
+#    url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+#    username: doumee
+#    password: rtjgfEr@&0c0m
+    url: jdbc:mysql://10.50.250.253:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
+    username: root
+    password: Atwl@2024
     driver-class-name: com.mysql.cj.jdbc.Driver
     type: com.alibaba.druid.pool.DruidDataSource
   redis:

--
Gitblit v1.9.3