From 0ab9dfd8f122195e4e9f09bd50c59e0a47450bec Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期三, 19 三月 2025 15:50:03 +0800
Subject: [PATCH] fix: resolve merge conflicts in .gitignore

---
 ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java |   67 ++++++++++++++++++++++++++-------
 1 files changed, 53 insertions(+), 14 deletions(-)

diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java
index 8a9866e..989234b 100644
--- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java
+++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java
@@ -14,12 +14,14 @@
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.DictUtils;
 import com.ruoyi.framework.web.service.TokenService;
+import com.ruoyi.system.bo.ProcessTaskListBO;
 import com.ruoyi.system.dto.TBillDto;
 import com.ruoyi.system.dto.TInvoiceDTO;
 import com.ruoyi.system.model.*;
 import com.ruoyi.system.query.*;
 import com.ruoyi.system.service.*;
 import com.ruoyi.system.vo.*;
+import com.ruoyi.web.controller.tool.MyFileUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import jdk.nashorn.internal.parser.Token;
@@ -27,9 +29,13 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.io.File;
+import java.io.IOException;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -72,6 +78,13 @@
     private ISysUserService sysUserService;
     @Autowired
     private TContractRentTypeService contractRentTypeService;
+    @Autowired
+    private StateProcessTemplateService processTemplateService;
+
+    public static void main(String[] args) throws IOException {
+        File file = new File("D:\\wechatFiles\\WeChat Files\\wxid_25nztsudcon722\\FileStorage\\File\\2025-03\\2.mp3");
+        MultipartFile multipartFile = MyFileUtil.fileToMultipartFile(file, "3333");
+    }
     /**
      * 获取轮播图管理列表
      */
@@ -109,6 +122,8 @@
         return R.ok(myToDoVO);
     }
 
+
+
     @ApiOperation(value = "租户-当前在租房源")
     @PostMapping(value = "/tenant/myHouse")
     public R<List<MyHouseVO>> myHouse() {
@@ -132,7 +147,7 @@
                     myToDoVO.setHouseAddress(tHouse.getHouseAddress());
                     myToDoVO.setMonthRent(contract.getMonthRent());
                     myToDoVO.setPayType(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CONTRACT_PAY_TYPE, contract.getPayType()));
-                    myToDoVO.setMonth(bill.getPayFeesTime() == null ? bill.getPayableFeesTime().getMonth() + "月" : bill.getPayFeesTime().getMonth() + "月");
+                    myToDoVO.setMonth(bill.getPayFeesTime() == null ? bill.getPayableFeesTime().getMonth().getValue() + "月" : bill.getPayFeesTime().getMonth().getValue() + "月");
                     myToDoVO.setHouseArea(tHouse.getHouseArea());
                     myToDoVO.setHouseType(tHouse.getHouseType());
                     myToDoVO.setEndTime(DateUtils.localDateTimeToStringYear(contract.getEndTime()));
@@ -180,7 +195,7 @@
                 myToDoVO.setHouseAddress(tHouse.getHouseAddress());
                 myToDoVO.setMonthRent(contract.getMonthRent());
                 myToDoVO.setPayType(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CONTRACT_PAY_TYPE, contract.getPayType()));
-                myToDoVO.setMonth(bill.getPayFeesTime() == null ? bill.getPayableFeesTime().getMonth() + "月" : bill.getPayFeesTime().getMonth() + "月");
+                myToDoVO.setMonth(bill.getPayFeesTime() == null ? bill.getPayableFeesTime().getMonth().getValue() + "月" : bill.getPayFeesTime().getMonth().getValue() + "月");
                 myToDoVO.setHouseArea(tHouse.getHouseArea());
                 myToDoVO.setHouseType(tHouse.getHouseType());
                 myToDoVO.setEndTime(DateUtils.localDateTimeToStringYear(contract.getEndTime()));
@@ -211,16 +226,24 @@
     @PostMapping(value = "/admin/myToDo")
     public R<MyToDoVO> adminMyToDo() {
         MyToDoVO myToDoVO = new MyToDoVO();
-        LoginUserApplet loginUserApplet = tokenService.getLoginUserApplet();
-        if (loginUserApplet != null) {
-            long examineCount = contractService.count(new LambdaQueryWrapper<TContract>()
-                    .eq(TContract::getStatus, 2));
-            myToDoVO.setExamineCount((int) examineCount);
+        LoginUser loginUser = tokenService.getLoginUser();
+        if (loginUser != null) {
+//            long examineCount = contractService.count(new LambdaQueryWrapper<TContract>()
+//                    .eq(TContract::getStatus, 2));
+            ProcessTaskListBO processTaskListBO = new ProcessTaskListBO();
+            PageInfo<ProcessTaskListVO> processTaskListVOPageInfo = processTemplateService.waitTaskPage(processTaskListBO);
+            myToDoVO.setExamineCount((int) processTaskListVOPageInfo.getTotal());
             List<String> contractIds = billService.lambdaQuery().eq(TBill::getPayFeesStatus, 4).list()
                     .stream().map(TBill::getContractId).collect(Collectors.toList());
-            int overdueCount = contractService.lambdaQuery().in(TContract::getId, contractIds).list()
-                    .stream().map(TContract::getTenantId).distinct().collect(Collectors.toList()).size();
-            myToDoVO.setOverdueCount(overdueCount);
+            if(contractIds.isEmpty()){
+                myToDoVO.setOverdueCount(0);
+
+            }else{
+                int overdueCount = contractService.lambdaQuery().in(TContract::getId, contractIds).list()
+                        .stream().map(TContract::getTenantId).distinct().collect(Collectors.toList()).size();
+                myToDoVO.setOverdueCount(overdueCount);
+            }
+
         } else {
             myToDoVO.setExamineCount(0);
             myToDoVO.setOverdueCount(0);
@@ -244,10 +267,11 @@
     @GetMapping(value = "/getDetailById")
     public R<TCheckAcceptRecordVO> getDetailById(@RequestParam String id) {
         TCheckAcceptRecord checkAcceptRecord = checkAcceptRecordService.getById(id);
-        checkAcceptRecord.setCleanSituation(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION, checkAcceptRecord.getCleanSituation()));
-        checkAcceptRecord.setOverallSituation(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION, checkAcceptRecord.getOverallSituation()));
-        checkAcceptRecord.setDeviceSituation(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION, checkAcceptRecord.getDeviceSituation()));
-        checkAcceptRecord.setFurnitureSituation(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION, checkAcceptRecord.getFurnitureSituation()));
+//        checkAcceptRecord.setCleanSituation(checkAcceptRecord.getCleanSituation());
+//        checkAcceptRecord.setOverallSituation(StringUtils.hasLength(checkAcceptRecord.getOverallSituation())?(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION,checkAcceptRecord.getOverallSituation())):"");
+//        checkAcceptRecord.setDeviceSituation(StringUtils.hasLength(checkAcceptRecord.getDeviceSituation())?(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION,checkAcceptRecord.getDeviceSituation())):"");
+//        checkAcceptRecord.setFurnitureSituation(StringUtils.hasLength(checkAcceptRecord.getDeviceSituation())?(DictUtils.getDictLabel(DictConstants.DICT_TYPE_CHECK_SITUATION,checkAcceptRecord.getFurnitureSituation())):"");
+
         TCheckAcceptRecordVO checkAcceptRecordVO = new TCheckAcceptRecordVO();
         BeanUtils.copyProperties(checkAcceptRecord, checkAcceptRecordVO);
         // 查询合同信息
@@ -269,6 +293,7 @@
         dto.setCode(replace.substring(2)+String.format("%03d", size+1));
         dto.setStatus(true);
         // 添加验收记录
+        dto.setCheckPerson(tokenService.getLoginUser().getUser().getNickName());
         checkAcceptRecordService.updateById(dto);
         return R.ok();
     }
@@ -310,6 +335,14 @@
         return R.ok(tenantService.pageListApplet(query));
     }
     /**
+     * 获取租户管理列表
+     */
+    @ApiOperation(value = "获取租户详情")
+    @GetMapping(value = "/getTenantDetailById")
+    public R<TTenant> getTenantDetailById(@RequestParam String id) {
+        return R.ok(tenantService.getById(id));
+    }
+    /**
      * 租户详情-租房信息
      */
     @ApiOperation(value = "租户详情-租房信息列表")
@@ -342,6 +375,12 @@
         TContract contract = contractService.getById(bill.getContractId());
         THouse tHouse = houseService.getById(contract.getHouseId());
         res.setHouse(tHouse);
+        res.setConcatStartTime(contract.getStartTime());
+        res.setConcatEndTime(contract.getEndTime());
+        res.setPartyOnePhone(contract.getPartyOnePhone());
+        res.setPartyOnePerson(contract.getPartyTwoPerson());
+        res.setMonthRent(bill.getPayableFeesMoney());
+        res.setPayType(contract.getPayType());
         return R.ok(res);
     }
     @ApiOperation(value = "管理员-我的审批分页列表")

--
Gitblit v1.7.1