From c0bc55a9ea098a512f79a3a619e4a7d0a2dc9c3b Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期四, 10 四月 2025 18:22:58 +0800
Subject: [PATCH] yml修改
---
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java | 119 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 97 insertions(+), 22 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 2b9f010..1a18915 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
@@ -2,7 +2,6 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.constant.DictConstants;
@@ -14,22 +13,58 @@
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DictUtils;
import com.ruoyi.framework.web.service.TokenService;
-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.system.bo.ProcessTaskListBO;
+import com.ruoyi.system.model.TBanner;
+import com.ruoyi.system.model.TBill;
+import com.ruoyi.system.model.TCheckAcceptRecord;
+import com.ruoyi.system.model.TContract;
+import com.ruoyi.system.model.TContractRentType;
+import com.ruoyi.system.model.TFaultRepairMessage;
+import com.ruoyi.system.model.THouse;
+import com.ruoyi.system.model.TTenant;
+import com.ruoyi.system.query.TBannerQuery;
+import com.ruoyi.system.query.TBillAppletQuery;
+import com.ruoyi.system.query.TCheckAcceptRecordAppletQuery;
+import com.ruoyi.system.query.TExamineAppletQuery;
+import com.ruoyi.system.query.TFaultRepairMessageAppletQuery;
+import com.ruoyi.system.query.TTenantAppletQuery;
+import com.ruoyi.system.service.ISysUserService;
+import com.ruoyi.system.service.StateProcessTemplateService;
+import com.ruoyi.system.service.TBannerService;
+import com.ruoyi.system.service.TBillService;
+import com.ruoyi.system.service.TCheckAcceptRecordService;
+import com.ruoyi.system.service.TContractRentTypeService;
+import com.ruoyi.system.service.TContractService;
+import com.ruoyi.system.service.TFaultRepairMessageService;
+import com.ruoyi.system.service.THouseService;
+import com.ruoyi.system.service.TTenantService;
+import com.ruoyi.system.vo.ExamineVO;
+import com.ruoyi.system.vo.MyHouseVO;
+import com.ruoyi.system.vo.MyToDoVO;
+import com.ruoyi.system.vo.PayListVO;
+import com.ruoyi.system.vo.ProcessTaskListVO;
+import com.ruoyi.system.vo.TBillVO;
+import com.ruoyi.system.vo.TCheckAcceptRecordVO;
+import com.ruoyi.system.vo.TContractVO;
+import com.ruoyi.system.vo.TFaultRepairMessageVO;
+import com.ruoyi.system.vo.TenantVO;
+import com.ruoyi.web.controller.tool.MyFileUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
-import jdk.nashorn.internal.parser.Token;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+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 +107,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");
+ }
/**
* 获取轮播图管理列表
*/
@@ -189,6 +231,7 @@
myToDoVO.setStartTime(DateUtils.localDateTimeToStringYear(contract.getStartTime()));
myToDoVO.setPropertyRightPerson(tHouse.getPropertyRightPerson());
myToDoVO.setPhone(tHouse.getPhone());
+ myToDoVO.setRentalReturnStatus(tHouse.getRentalReturnStatus() == null ? "1" : tHouse.getRentalReturnStatus());
List<TBill> billList = bills.stream().filter(e -> e.getContractId().equals(contract.getId())).collect(Collectors.toList());
List<PayListVO> payList = new ArrayList<>();
for (TBill tBill : billList) {
@@ -213,16 +256,23 @@
@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.dealAndWaitTaskPage(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);
@@ -236,6 +286,9 @@
@ApiOperation(value = "管理员-房屋验收单列表")
@PostMapping(value = "/admin/houseCheck")
public R<PageInfo<TCheckAcceptRecordVO>> houseCheck(@RequestBody TCheckAcceptRecordAppletQuery query) {
+ LoginUser loginUser = tokenService.getLoginUser();
+ SysUser sysUser = sysUserService.selectUserById(loginUser.getUserId());
+ query.setBusinessDeptId(sysUser.getBusinessDeptId());
return R.ok(checkAcceptRecordService.pageListApplet(query));
}
@@ -246,10 +299,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);
// 查询合同信息
@@ -271,7 +325,22 @@
dto.setCode(replace.substring(2)+String.format("%03d", size+1));
dto.setStatus(true);
// 添加验收记录
+ dto.setCheckPerson(tokenService.getLoginUser().getUser().getNickName());
checkAcceptRecordService.updateById(dto);
+ TCheckAcceptRecord checkAcceptRecord = checkAcceptRecordService.getById(dto.getId());
+ TContract contract = contractService.getById(checkAcceptRecord.getContractId());
+ // 添加账单
+ TBill tBill = new TBill();
+ tBill.setContractId(checkAcceptRecord.getContractId());
+ tBill.setContractNumber(contract.getContractNumber());
+ tBill.setPayableFeesMoney(dto.getCheckMoney());
+ tBill.setPayableFeesTime(LocalDate.now());
+ tBill.setPayFeesStatus("1");
+ tBill.setBillType("4");
+ tBill.setOverDays(0);
+ tBill.setBusinessDeptId(contract.getBusinessDeptId());
+ tBill.setOutstandingMoney(dto.getCheckMoney());
+ billService.save(tBill);
return R.ok();
}
/**
@@ -352,6 +421,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