From 099ea14bba367fd86f0dde37d908f07cc04c3d39 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 10 四月 2025 15:38:01 +0800 Subject: [PATCH] Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/java/xizang --- ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/IndexController.java | 68 ++++++++++++++++++++++++++++----- 1 files changed, 57 insertions(+), 11 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 989234b..6e8189f 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; @@ -15,23 +14,53 @@ 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.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.util.StringUtils; 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; @@ -202,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) { @@ -257,6 +287,8 @@ @ApiOperation(value = "管理员-房屋验收单列表") @PostMapping(value = "/admin/houseCheck") public R<PageInfo<TCheckAcceptRecordVO>> houseCheck(@RequestBody TCheckAcceptRecordAppletQuery query) { + LoginUserApplet loginUserApplet = tokenService.getLoginUserApplet(); + query.setSysUserId(loginUserApplet.getUserId()); return R.ok(checkAcceptRecordService.pageListApplet(query)); } @@ -295,6 +327,20 @@ // 添加验收记录 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(); } /** -- Gitblit v1.7.1