From bdb635834a1f9ea62bca8039976c0c2844be8139 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期二, 18 二月 2025 17:41:26 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/xiaochen991015/xizang

---
 ruoyi-admin/src/main/resources/application-test.yml                                        |    7 +++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java            |    8 ++--
 ruoyi-admin/pom.xml                                                                        |    5 ++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTenantController.java              |   12 ++---
 ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TFaultRepairMessageController.java |    2 +
 ruoyi-system/src/main/java/com/ruoyi/system/model/TContract.java                           |    3 +
 ruoyi-system/src/main/java/com/ruoyi/system/export/ContractExport.java                     |   14 +++---
 ruoyi-applet/src/main/resources/application-test.yml                                       |    7 +++
 ruoyi-system/src/main/java/com/ruoyi/system/model/TFaultRepairMessage.java                 |    3 -
 9 files changed, 41 insertions(+), 20 deletions(-)

diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index 3aa3a62..109418f 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -26,6 +26,11 @@
             <artifactId>aliyun-sdk-oss</artifactId>
             <version>3.8.0</version>
         </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>31.1-jre</version> <!-- 请根据需要选择合适的版本 -->
+        </dependency>
         <!-- spring-boot-devtools -->
         <dependency>
             <groupId>org.springframework.boot</groupId>
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java
index 69d0364..eb9cd72 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TContractController.java
@@ -276,12 +276,13 @@
             contractExport.setContractName(contract.getContractName());
             contractExport.setPartyOneName(contract.getPartyOneName());
             contractExport.setPartyTwoName(contract.getPartyTwoName());
-            contractExport.setCreate_time(contract.getCreateTime());
-            contractExport.setStartTime(contract.getStartTime());
-            contractExport.setEndTime(contract.getEndTime());
+            contractExport.setCreateTime(DateUtils.localDateTimeToStringYear(contract.getCreateTime()));
+            contractExport.setStartTime(DateUtils.localDateTimeToStringYear(contract.getStartTime()));
+            contractExport.setEndTime(DateUtils.localDateTimeToStringYear(contract.getEndTime()));
             contractExport.setPayType(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CONTRACT_PAY_TYPE,contract.getPayType()));
             contractExport.setDeposit(contract.getDeposit()+"");
             contractExport.setStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CONTRACT_STATUS,contract.getStatus()));
+            contractExports.add(contractExport);
         }
         Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), ContractExport.class, contractExports);
         HttpServletResponse response = WebUtils.response();
@@ -298,7 +299,6 @@
             workbook.write(outputStream);
         } catch (IOException e) {
             e.printStackTrace();
-            System.err.println("合同列表信息导出失败");
         } finally {
             try {
                 outputStream.close();
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTenantController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTenantController.java
index a9fdcb3..ad65a32 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTenantController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTenantController.java
@@ -9,10 +9,7 @@
 import com.ruoyi.common.constant.DictConstants;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.common.utils.DictUtils;
-import com.ruoyi.common.utils.SecurityUtils;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.common.utils.WebUtils;
+import com.ruoyi.common.utils.*;
 import com.ruoyi.system.dto.TTenantDTO;
 import com.ruoyi.system.export.ContractExport;
 import com.ruoyi.system.model.TContract;
@@ -155,12 +152,13 @@
             contractExport.setContractName(contract.getContractName());
             contractExport.setPartyOneName(contract.getPartyOneName());
             contractExport.setPartyTwoName(contract.getPartyTwoName());
-            contractExport.setCreate_time(contract.getCreateTime());
-            contractExport.setStartTime(contract.getStartTime());
-            contractExport.setEndTime(contract.getEndTime());
+            contractExport.setCreateTime(DateUtils.localDateTimeToStringYear(contract.getCreateTime()));
+            contractExport.setStartTime(DateUtils.localDateTimeToStringYear(contract.getStartTime()));
+            contractExport.setEndTime(DateUtils.localDateTimeToStringYear(contract.getEndTime()));
             contractExport.setPayType(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CONTRACT_PAY_TYPE,contract.getPayType()));
             contractExport.setDeposit(contract.getDeposit()+"");
             contractExport.setStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CONTRACT_STATUS,contract.getStatus()));
+            contractExports.add(contractExport);
         }
         Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), ContractExport.class, contractExports);
         HttpServletResponse response = WebUtils.response();
diff --git a/ruoyi-admin/src/main/resources/application-test.yml b/ruoyi-admin/src/main/resources/application-test.yml
index 93fd2c2..0c6013b 100644
--- a/ruoyi-admin/src/main/resources/application-test.yml
+++ b/ruoyi-admin/src/main/resources/application-test.yml
@@ -70,6 +70,13 @@
   # redis 配置
   redis:
     # 地址
+#    host: 127.0.0.1
+#    # 端口,默认为6379
+#    port: 6379
+#    # 数据库索引
+#    database: 0
+#    # 密码
+#    password: 123456
     host: xzgt.test.591taxi.cn
     # 端口,默认为6379
     port: 16379
diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TFaultRepairMessageController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TFaultRepairMessageController.java
index 3936e87..0ab1013 100644
--- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TFaultRepairMessageController.java
+++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TFaultRepairMessageController.java
@@ -104,6 +104,7 @@
                 .in(THouse::getId, houseIds));
         list.forEach(item -> {
             item.setHouseName(houseList.stream().filter(house -> house.getId().equals(item.getHouseId())).findFirst().orElse(new THouse()).getHouseName());
+            item.setHouseAddress(houseList.stream().filter(house -> house.getId().equals(item.getHouseId())).findFirst().orElse(new THouse()).getHouseAddress());
         });
         return R.ok(list);
     }
@@ -114,6 +115,7 @@
     @ApiOperation(value = "添加报修信息")
     @PostMapping(value = "/addFault")
     public R<String> addFault(@RequestBody TFaultRepairMessageDTO dto) {
+        dto.setTenantId(tokenService.getLoginUserApplet().getUserId());
         tFaultRepairMessageService.save(dto);
         return R.ok();
     }
diff --git a/ruoyi-applet/src/main/resources/application-test.yml b/ruoyi-applet/src/main/resources/application-test.yml
index a0e94e7..14afafa 100644
--- a/ruoyi-applet/src/main/resources/application-test.yml
+++ b/ruoyi-applet/src/main/resources/application-test.yml
@@ -70,6 +70,13 @@
   # redis 配置
   redis:
     # 地址
+#    host: 127.0.0.1
+#    # 端口,默认为6379
+#    port: 6379
+#    # 数据库索引
+#    database: 0
+#    # 密码
+#    password: 123456
     host: xzgt.test.591taxi.cn
     # 端口,默认为6379
     port: 16379
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/export/ContractExport.java b/ruoyi-system/src/main/java/com/ruoyi/system/export/ContractExport.java
index b5f25f7..ac9c72f 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/export/ContractExport.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/export/ContractExport.java
@@ -9,7 +9,7 @@
 import java.util.Date;
 
 @Data
-@ApiModel(value = "光缆巡检导出excel")
+@ApiModel(value = "合同导出excel")
 public class ContractExport implements Serializable {
 
     @Excel(name = "合同编号",width = 30)
@@ -24,15 +24,15 @@
     @Excel(name = "乙方名称",width = 30)
     private String partyTwoName;
 
-    @Excel(name = "创建时间",width = 30,exportFormat = "yyyy-MM-dd")
-    private LocalDateTime create_time;
+    @Excel(name = "创建时间",width = 30)
+    private String createTime;
 
 
-    @Excel(name = "生效日期",width = 30,exportFormat = "yyyy-MM-dd")
-    private LocalDateTime startTime;
+    @Excel(name = "生效日期",width = 30)
+    private String startTime;
 
-    @Excel(name = "终止日期",width = 30,exportFormat = "yyyy-MM-dd")
-    private LocalDateTime endTime;
+    @Excel(name = "终止日期",width = 30)
+    private String endTime;
 
     @Excel(name = "租金支付方式",width = 30)
     private String payType;
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/model/TContract.java b/ruoyi-system/src/main/java/com/ruoyi/system/model/TContract.java
index 396fe85..12c8605 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/model/TContract.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/model/TContract.java
@@ -164,5 +164,8 @@
     @ApiModelProperty(value = "房屋名称")
     @TableField(exist = false)
     private String houseName;
+    @ApiModelProperty(value = "房屋地址")
+    @TableField(exist = false)
+    private String houseAddress;
 
 }
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/model/TFaultRepairMessage.java b/ruoyi-system/src/main/java/com/ruoyi/system/model/TFaultRepairMessage.java
index c1dec51..72aad19 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/model/TFaultRepairMessage.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/model/TFaultRepairMessage.java
@@ -74,9 +74,8 @@
     private Integer repairType;
 
     @ApiModelProperty(value = "上门时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @TableField("visit_time")
-    private LocalDateTime visitTime;
+    private String visitTime;
 
     @ApiModelProperty(value = "联系电话")
     @TableField("contact_number")

--
Gitblit v1.7.1