From de6cdb60a8ad4f21b585b824efc7f117c3729ec1 Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Wed, 18 Dec 2024 15:20:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=9F=A5=E8=AF=A2-=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ComprehensiveController.java | 12 +++++ .../comprehensive/entity/RentDetailDto.java | 48 +++++++++++++++++++ .../material/order/mapper/OrderMapper.java | 4 ++ .../material/order/service/OrderService.java | 4 ++ .../order/service/impl/OrderServiceImpl.java | 7 +++ .../mapper/material/device/DevInfoMapper.xml | 2 +- .../mapper/material/order/OrderInfoMapper.xml | 26 ++++++++++ 7 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/comprehensive/entity/RentDetailDto.java diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/comprehensive/controller/ComprehensiveController.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/comprehensive/controller/ComprehensiveController.java index 0096ce2..4059af1 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/comprehensive/controller/ComprehensiveController.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/comprehensive/controller/ComprehensiveController.java @@ -2,9 +2,11 @@ package com.bonus.material.comprehensive.controller; import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.material.comprehensive.entity.RentDetailDto; import com.bonus.material.device.domain.DevInfo; import com.bonus.material.device.domain.vo.DevInfoVo; import com.bonus.material.device.service.DevInfoService; +import com.bonus.material.order.service.OrderService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.GetMapping; @@ -25,6 +27,8 @@ import java.util.List; public class ComprehensiveController extends BaseController { @Resource private DevInfoService devInfoService; + @Resource + private OrderService orderService; @ApiOperation(value = "综合查询-装备信息") @GetMapping("/devList") public AjaxResult getDevList(DevInfoVo devInfo) { @@ -32,4 +36,12 @@ public class ComprehensiveController extends BaseController { List list = devInfoService.getDevList(devInfo); return AjaxResult.success(getDataTable(list)); } + + @ApiOperation(value = "综合查询-设备租赁明细") + @GetMapping("/rentDetails") + public AjaxResult getRentDetails(DevInfoVo devInfo) { + startPage(); + List list = orderService.getRentDetails(devInfo); + return AjaxResult.success(getDataTable(list)); + } } diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/comprehensive/entity/RentDetailDto.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/comprehensive/entity/RentDetailDto.java new file mode 100644 index 0000000..b3861b3 --- /dev/null +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/comprehensive/entity/RentDetailDto.java @@ -0,0 +1,48 @@ +package com.bonus.material.comprehensive.entity; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @Author:liang.chao + * @Date:2024/12/18 - 14:21 + */ +@Data +public class RentDetailDto { + + @ApiModelProperty("订单编号") + private String orderCode; + + @ApiModelProperty("租赁周期") + private String rentTime; + + @ApiModelProperty("订单状态") + private String orderStatus; + + @ApiModelProperty("租赁费用") + private BigDecimal rentCost; + + @ApiModelProperty("退租检修费用") + private BigDecimal repairCost; + + @ApiModelProperty("丢失费用") + private BigDecimal lossCost; + + @ApiModelProperty("总费用") + private BigDecimal cost; + + @ApiModelProperty("承租公司") + private String rentCompany; + + @ApiModelProperty("承租人") + private String rentPerson; + + @ApiModelProperty("承租人电话") + private String phone; + + @ApiModelProperty("下单时间") + private String orderTime; + +} diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/mapper/OrderMapper.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/mapper/OrderMapper.java index e9dd9cd..ee1312f 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/mapper/OrderMapper.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/mapper/OrderMapper.java @@ -1,6 +1,8 @@ package com.bonus.material.order.mapper; +import com.bonus.material.comprehensive.entity.RentDetailDto; import com.bonus.material.device.domain.DevInfo; +import com.bonus.material.device.domain.vo.DevInfoVo; import com.bonus.material.lease.domain.LeaseRepairRecord; import com.bonus.material.order.domain.OrderDetailCostReliefDto; import com.bonus.material.order.domain.OrderDetailDto; @@ -45,4 +47,6 @@ public interface OrderMapper { int insertCostReliefs(@Param("list") List reliefList); OrderInfoDto getAgreementByOrderId(String orderId); + + List getRentDetails(DevInfoVo devInfo); } diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/OrderService.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/OrderService.java index 6778895..1cdb37c 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/OrderService.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/OrderService.java @@ -1,5 +1,7 @@ package com.bonus.material.order.service; +import com.bonus.material.comprehensive.entity.RentDetailDto; +import com.bonus.material.device.domain.vo.DevInfoVo; import com.bonus.material.order.domain.OrderDetailCostReliefDto; import com.bonus.material.order.domain.OrderDetailDto; import com.bonus.material.order.domain.OrderInfoDto; @@ -21,4 +23,6 @@ public interface OrderService { Integer submitCostRelief(OrderInfoDto orderInfoDto); OrderInfoDto getAgreementByOrderId(String orderId); + + List getRentDetails(DevInfoVo devInfo); } diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/impl/OrderServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/impl/OrderServiceImpl.java index 6e17a89..011e96d 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/impl/OrderServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/impl/OrderServiceImpl.java @@ -5,7 +5,9 @@ import com.bonus.common.biz.enums.OrderStatusEnum; import com.bonus.common.core.utils.DateUtils; import com.bonus.common.core.utils.encryption.Sm4Utils; import com.bonus.common.security.utils.SecurityUtils; +import com.bonus.material.comprehensive.entity.RentDetailDto; import com.bonus.material.device.domain.DevInfo; +import com.bonus.material.device.domain.vo.DevInfoVo; import com.bonus.material.lease.domain.LeaseRepair; import com.bonus.material.lease.domain.LeaseRepairRecord; import com.bonus.material.lease.mapper.LeaseRepairRecordMapper; @@ -189,4 +191,9 @@ public class OrderServiceImpl implements OrderService { public OrderInfoDto getAgreementByOrderId(String orderId) { return orderMapper.getAgreementByOrderId(orderId); } + + @Override + public List getRentDetails(DevInfoVo devInfo) { + return orderMapper.getRentDetails(devInfo); + } } diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml index 841a5b8..0d7ed19 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml @@ -850,7 +850,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND d.type_id = #{typeId} - AND d.update_time between #{startTime} and #{endTime} + AND d.update_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') ORDER BY d.create_time DESC diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/order/OrderInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/order/OrderInfoMapper.xml index fc69813..70a431b 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/order/OrderInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/order/OrderInfoMapper.xml @@ -302,6 +302,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt.del_flag = '0' AND hh.order_id = #{orderId} + delete from ma_order_details_relief