订单增加车损字段

This commit is contained in:
19173159168
2025-08-14 00:00:46 +08:00
parent f9b019f37a
commit ba173dcac8
4 changed files with 81 additions and 25 deletions

View File

@ -145,6 +145,12 @@ public class ZcOrderMain extends BaseEntity
/** 租电套餐id */
private Long rentBatteyRuleId;
/** 车损金额(元) */
private BigDecimal damageAmount;
/** 车损描述 */
private String damageDesc;
/** 订单总金额 */
private BigDecimal orderAmount;
/** 订单结束时间 */
@ -482,6 +488,22 @@ public class ZcOrderMain extends BaseEntity
this.overdueType = overdueType;
}
public BigDecimal getDamageAmount() {
return damageAmount;
}
public void setDamageAmount(BigDecimal damageAmount) {
this.damageAmount = damageAmount;
}
public String getDamageDesc() {
return damageDesc;
}
public void setDamageDesc(String damageDesc) {
this.damageDesc = damageDesc;
}
@Override
public String toString() {
return new ToStringBuilder(this)

View File

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.orders.mapper.ZcOrderMainMapper">
<resultMap type="ZcOrderMain" id="ZcOrderMainResult">
<result property="orderId" column="order_id" />
<result property="orderNo" column="order_no" />
@ -35,6 +35,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="chargeTimes" column="charge_times" />
<result property="rentCarRuleId" column="rent_car_rule_id" />
<result property="rentBatteyRuleId" column="rent_battey_rule_id" />
<result property="damageAmount" column="damage_amount" />
<result property="damageDesc" column="damage_desc" />
<result property="orderAmount" column="order_amount" />
<result property="endOrderTime" column="end_order_time" />
<result property="delFlag" column="del_flag" />
@ -67,17 +69,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectZcOrderMainVo">
select order_id, order_no, order_status, operator_id, store_id, vehicle_id, car_model_id, customer_id, customer_name, customer_phone, battery_type, rental_type, rental_days, rental_price, deposit_price, overdue_fee, overdue_type, is_deposit_free, is_auto_deduct, first_order_time, pick_car_time, start_rent_time, end_rent_time, req_end_rent_time, act_end_rent_time, overdue_days, renewal_times, charge_times, rent_car_rule_id, rent_battey_rule_id, order_amount, end_order_time, del_flag, create_time, update_time from zc_order_main
select order_id, order_no, order_status, operator_id, store_id, vehicle_id, car_model_id, customer_id, customer_name, customer_phone, battery_type, rental_type, rental_days, rental_price, deposit_price, overdue_fee, overdue_type, is_deposit_free, is_auto_deduct, first_order_time, pick_car_time, start_rent_time, end_rent_time, req_end_rent_time, act_end_rent_time, overdue_days, renewal_times, charge_times, rent_car_rule_id, rent_battey_rule_id, damage_amount,damage_desc, order_amount, end_order_time, del_flag, create_time, update_time from zc_order_main
</sql>
<select id="selectZcOrderMainList" parameterType="ZcOrderMain" resultMap="ZcOrderMainResult">
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.order_amount, a.end_order_time, a.del_flag, a.create_time, a.update_time,
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.damage_amount,a.damage_desc, a.order_amount, a.end_order_time, a.del_flag, a.create_time, a.update_time,
c.company_name as operator_name,s.name as store_name,zc.license_plate as license_plate
from zc_order_main a
left join zc_company c on c.id = a.operator_id
left join zc_company_store s on s.id = a.store_id
left join zc_car zc on zc.id = a.vehicle_id
<where>
<where>
<if test="orderNo != null and orderNo != ''"> and a.order_no = #{orderNo}</if>
<if test="orderStatus != null and orderStatus != ''"> and a.order_status = #{orderStatus}</if>
<if test="operatorId != null "> and a.operator_id = #{operatorId}</if>
@ -106,9 +108,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by a.update_time desc
</select>
<select id="selectZcOrderMainByOrderId" parameterType="Long" resultMap="ZcOrderMainZcOrderSubResult">
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.order_amount, a.end_order_time, a.del_flag, a.create_time, a.update_time,
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.car_model_id, a.customer_id, a.customer_name, a.customer_phone, a.battery_type, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.overdue_type, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.pick_car_time, a.start_rent_time, a.end_rent_time, a.req_end_rent_time, a.act_end_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, a.damage_amount,a.damage_desc,a.order_amount, a.end_order_time, a.del_flag, a.create_time, a.update_time,
b.suborder_id as sub_suborder_id, b.order_id as sub_order_id, b.suborder_no as sub_suborder_no, b.suborder_type as sub_suborder_type, b.amount as sub_amount, b.payment_method as sub_payment_method, b.vin_battery_no as sub_vin_battery_no, b.created_at as sub_created_at, b.payment_id as sub_payment_id, b.paid_at as sub_paid_at, b.remark as sub_remark, b.del_flag as sub_del_flag, b.create_time as sub_create_time, b.update_time as sub_update_time,
c.company_name as operator_name,s.name as store_name,zc.license_plate as license_plate
from zc_order_main a
@ -118,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join zc_order_sub b on b.order_id = a.order_id
where a.order_id = #{orderId}
</select>
<insert id="insertZcOrderMain" parameterType="ZcOrderMain" useGeneratedKeys="true" keyProperty="orderId">
insert into zc_order_main
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -214,14 +216,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteZcOrderMainByOrderIds" parameterType="String">
delete from zc_order_main where order_id in
delete from zc_order_main where order_id in
<foreach item="orderId" collection="array" open="(" separator="," close=")">
#{orderId}
</foreach>
</delete>
<delete id="deleteZcOrderSubByOrderIds" parameterType="String">
delete from zc_order_sub where order_id in
delete from zc_order_sub where order_id in
<foreach item="orderId" collection="array" open="(" separator="," close=")">
#{orderId}
</foreach>

View File

@ -2,6 +2,17 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改品牌管理')" />
<style>
.search-collapse, .select-table {
width: 100%;
background: #fff;
border-radius: 6px;
margin-top: 0px;
padding-top: 0px;
padding-bottom: 13px;
box-shadow: 1px 1px 3px rgba(0, 0, 0, .2);
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">

View File

@ -3,6 +3,17 @@
<head>
<th:block th:include="include :: header('租车订单')" />
<th:block th:include="include :: datetimepicker-css" />
<style>
.search-collapse, .select-table {
width: 100%;
background: #fff;
border-radius: 6px;
margin-top: 0px;
padding-top: 0px;
padding-bottom: 13px;
box-shadow: 1px 1px 3px rgba(0, 0, 0, .2);
}
</style>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -14,7 +25,7 @@
<div class="col-sm-4">
<div class="form-control-static" th:text="*{orderNo}"></div>
</div>
<label class="col-sm-2 control-label is-required">订单状态:</label>
<label class="col-sm-2 control-label is-required">订单状态</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="${@dict.getLabel('key_order_status', zcOrderMain.orderStatus)}"></div>
</div>
@ -24,7 +35,7 @@
<div class="col-sm-4">
<div class="form-control-static" th:text="*{operatorName}"></div>
</div>
<label class="col-sm-2 control-label is-required">所属门店:</label>
<label class="col-sm-2 control-label is-required">所属门店</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{storeName}"></div>
</div>
@ -34,7 +45,7 @@
<div class="col-sm-4">
<div class="form-control-static" th:text="*{licensePlate}"></div>
</div>
<label class="col-sm-2 control-label is-required">客户姓名:</label>
<label class="col-sm-2 control-label is-required">客户姓名</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{customerName}"></div>
</div>
@ -44,7 +55,7 @@
<div class="col-sm-4">
<div class="form-control-static" th:text="*{customerPhone}"></div>
</div>
<label class="col-sm-2 control-label is-required">租赁类型:</label>
<label class="col-sm-2 control-label is-required">租赁类型</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="${@dict.getLabel('key_order_rental_type', zcOrderMain.rentalType)}"></div>
</div>
@ -54,7 +65,7 @@
<div class="col-sm-4">
<div class="form-control-static" th:text="*{rentalDays}"></div>
</div>
<label class="col-sm-2 control-label is-required">租车价格(元):</label>
<label class="col-sm-2 control-label is-required">租车价格(元)</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{rentalPrice}"></div>
</div>
@ -64,7 +75,7 @@
<div class="col-sm-4">
<div class="form-control-static" th:text="*{depositPrice}"></div>
</div>
<label class="col-sm-2 control-label is-required">逾期金额(元):</label>
<label class="col-sm-2 control-label is-required">逾期金额(元)</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{overdueFee}"></div>
</div>
@ -74,11 +85,11 @@
<div class="col-sm-4">
<div class="form-control-static" th:text="*{orderAmount}"></div>
</div>
<label class="col-sm-2 control-label is-required">租赁周期:</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="${#dates.format(zcOrderMain.startRentTime, 'yyyy-MM-dd HH:mm:ss')}"></div> -
<div class="form-control-static" th:if="*{actEndRentTime} != null" th:text="${#dates.format(zcOrderMain.actEndRentTime, 'yyyy-MM-dd HH:mm:ss')}"></div>
<div class="form-control-static" th:if="*{actEndRentTime} == null" th:text="${#dates.format(zcOrderMain.endRentTime, 'yyyy-MM-dd HH:mm:ss')}"></div>
<label class="col-sm-2 control-label is-required">租赁周期</label>
<div class="col-sm-4" style="padding-top: 7px">
<span class="form-control-static" th:text="${#dates.format(zcOrderMain.startRentTime, 'yyyy-MM-dd HH:mm:ss')}"></span> -
<span class="form-control-static" th:if="*{actEndRentTime} != null" th:text="${#dates.format(zcOrderMain.actEndRentTime, 'yyyy-MM-dd HH:mm:ss')}"></span>
<span class="form-control-static" th:if="*{actEndRentTime} == null" th:text="${#dates.format(zcOrderMain.endRentTime, 'yyyy-MM-dd HH:mm:ss')}"></span>
</div>
</div>
<div class="form-group">
@ -86,7 +97,7 @@
<div class="col-sm-4">
<div class="form-control-static" th:text="*{isDepositFree}"></div>
</div>
<label class="col-sm-2 control-label is-required">是否开通代扣:</label>
<label class="col-sm-2 control-label is-required">是否开通代扣</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{isAutoDeduct}"></div>
</div>
@ -96,7 +107,7 @@
<div class="col-sm-4">
<div class="form-control-static" th:text="${#dates.format(zcOrderMain.firstOrderTime, 'yyyy-MM-dd HH:mm:ss')}"></div>
</div>
<label class="col-sm-2 control-label is-required">开始计费时间:</label>
<label class="col-sm-2 control-label is-required">开始计费时间</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="${#dates.format(zcOrderMain.startRentTime, 'yyyy-MM-dd HH:mm:ss')}"></div>
</div>
@ -106,7 +117,7 @@
<div class="col-sm-4">
<div class="form-control-static" th:text="*{overdueDays}"></div>
</div>
<label class="col-sm-2 control-label is-required">续租次数:</label>
<label class="col-sm-2 control-label is-required">续租次数</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{renewalTimes}"></div>
</div>
@ -118,9 +129,19 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label is-required">车损金额(元)</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{damageAmount}"></div>
</div>
<label class="col-sm-2 control-label is-required">车损说明:</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{damageDesc}"></div>
</div>
</div>
<br/>
<h4 class="form-header h4">租车子订单信息</h4>
<div class="row">
<div class="col-sm-12">