订单详情
This commit is contained in:
@ -8,6 +8,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
||||
/**
|
||||
* 租车订单对象 zc_order_main
|
||||
@ -27,23 +28,32 @@ public class ZcOrderMain extends BaseEntity
|
||||
private String orderNo;
|
||||
|
||||
/** 订单状态:下单未提车、租赁中、已结束-自动、已结束-手动 */
|
||||
@Excel(name = "订单状态:下单未提车、租赁中、已结束-自动、已结束-手动")
|
||||
@Excel(name = "订单状态",dictType = "key_order_status")
|
||||
private String orderStatus;
|
||||
|
||||
/** 所属运营商ID */
|
||||
@Excel(name = "所属运营商ID")
|
||||
private Long operatorId;
|
||||
|
||||
@Transient
|
||||
@Excel(name = "所属运营商")
|
||||
private String operatorName;
|
||||
|
||||
/** 所属门店名称 */
|
||||
@Transient
|
||||
@Excel(name = "所属门店")
|
||||
private String storeName;
|
||||
|
||||
/** 所属门店ID */
|
||||
@Excel(name = "所属门店ID")
|
||||
private Long storeId;
|
||||
|
||||
/** 车辆ID */
|
||||
@Excel(name = "车辆ID")
|
||||
@Transient
|
||||
@Excel(name = "车辆")
|
||||
private String licensePlate;
|
||||
|
||||
private Long vehicleId;
|
||||
|
||||
/** 客户id */
|
||||
@Excel(name = "客户id")
|
||||
private Long customerId;
|
||||
|
||||
/** 客户姓名 */
|
||||
@ -55,7 +65,7 @@ public class ZcOrderMain extends BaseEntity
|
||||
private String customerPhone;
|
||||
|
||||
/** 租赁类型(时租/日租/按天数/以租代售) */
|
||||
@Excel(name = "租赁类型(时租/日租/按天数/以租代售)")
|
||||
@Excel(name = "租赁类型",dictType = "key_order_rental_type")
|
||||
private String rentalType;
|
||||
|
||||
/** 租赁天数(当类型为"按天数"时使用) */
|
||||
@ -105,11 +115,9 @@ public class ZcOrderMain extends BaseEntity
|
||||
private Long chargeTimes;
|
||||
|
||||
/** 租车套餐id */
|
||||
@Excel(name = "租车套餐id")
|
||||
private Long rentCarRuleId;
|
||||
|
||||
/** 租电套餐id */
|
||||
@Excel(name = "租电套餐id")
|
||||
private Long rentBatteyRuleId;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
@ -345,6 +353,30 @@ public class ZcOrderMain extends BaseEntity
|
||||
this.zcOrderSubList = zcOrderSubList;
|
||||
}
|
||||
|
||||
public String getOperatorName() {
|
||||
return operatorName;
|
||||
}
|
||||
|
||||
public void setOperatorName(String operatorName) {
|
||||
this.operatorName = operatorName;
|
||||
}
|
||||
|
||||
public String getStoreName() {
|
||||
return storeName;
|
||||
}
|
||||
|
||||
public void setStoreName(String storeName) {
|
||||
this.storeName = storeName;
|
||||
}
|
||||
|
||||
public String getLicensePlate() {
|
||||
return licensePlate;
|
||||
}
|
||||
|
||||
public void setLicensePlate(String licensePlate) {
|
||||
this.licensePlate = licensePlate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
||||
@ -31,6 +31,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="operatorName" column="operator_name" />
|
||||
<result property="storeName" column="store_name" />
|
||||
<result property="licensePlate" column="license_plate" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ZcOrderMainZcOrderSubResult" type="ZcOrderMain" extends="ZcOrderMainResult">
|
||||
@ -59,37 +62,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</sql>
|
||||
|
||||
<select id="selectZcOrderMainList" parameterType="ZcOrderMain" resultMap="ZcOrderMainResult">
|
||||
<include refid="selectZcOrderMainVo"/>
|
||||
select a.order_id, a.order_no, a.order_status, a.operator_id, a.store_id, a.vehicle_id, a.customer_id, a.customer_name, a.customer_phone, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.start_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, 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>
|
||||
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
|
||||
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
|
||||
<if test="operatorId != null "> and operator_id = #{operatorId}</if>
|
||||
<if test="storeId != null "> and store_id = #{storeId}</if>
|
||||
<if test="vehicleId != null "> and vehicle_id = #{vehicleId}</if>
|
||||
<if test="customerId != null "> and customer_id = #{customerId}</if>
|
||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="customerPhone != null and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
|
||||
<if test="rentalType != null and rentalType != ''"> and rental_type = #{rentalType}</if>
|
||||
<if test="rentalDays != null "> and rental_days = #{rentalDays}</if>
|
||||
<if test="rentalPrice != null "> and rental_price = #{rentalPrice}</if>
|
||||
<if test="depositPrice != null "> and deposit_price = #{depositPrice}</if>
|
||||
<if test="overdueFee != null "> and overdue_fee = #{overdueFee}</if>
|
||||
<if test="isDepositFree != null "> and is_deposit_free = #{isDepositFree}</if>
|
||||
<if test="isAutoDeduct != null "> and is_auto_deduct = #{isAutoDeduct}</if>
|
||||
<if test="firstOrderTime != null "> and first_order_time = #{firstOrderTime}</if>
|
||||
<if test="startRentTime != null "> and start_rent_time = #{startRentTime}</if>
|
||||
<if test="overdueDays != null "> and overdue_days = #{overdueDays}</if>
|
||||
<if test="renewalTimes != null "> and renewal_times = #{renewalTimes}</if>
|
||||
<if test="chargeTimes != null "> and charge_times = #{chargeTimes}</if>
|
||||
<if test="rentCarRuleId != null "> and rent_car_rule_id = #{rentCarRuleId}</if>
|
||||
<if test="rentBatteyRuleId != null "> and rent_battey_rule_id = #{rentBatteyRuleId}</if>
|
||||
<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>
|
||||
<if test="storeId != null "> and a.store_id = #{storeId}</if>
|
||||
<if test="vehicleId != null "> and a.vehicle_id = #{vehicleId}</if>
|
||||
<if test="customerId != null "> and a.customer_id = #{customerId}</if>
|
||||
<if test="customerName != null and customerName != ''"> and a.customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="customerPhone != null and customerPhone != ''"> and a.customer_phone = #{customerPhone}</if>
|
||||
<if test="rentalType != null and rentalType != ''"> and a.rental_type = #{rentalType}</if>
|
||||
<if test="rentalDays != null "> and a.rental_days = #{rentalDays}</if>
|
||||
<if test="rentalPrice != null "> and a.rental_price = #{rentalPrice}</if>
|
||||
<if test="depositPrice != null "> and a.deposit_price = #{depositPrice}</if>
|
||||
<if test="overdueFee != null "> and a.overdue_fee = #{overdueFee}</if>
|
||||
<if test="isDepositFree != null "> and a.is_deposit_free = #{isDepositFree}</if>
|
||||
<if test="isAutoDeduct != null "> and a.is_auto_deduct = #{isAutoDeduct}</if>
|
||||
<if test="firstOrderTime != null "> and a.first_order_time = #{firstOrderTime}</if>
|
||||
<if test="startRentTime != null "> and a.start_rent_time = #{startRentTime}</if>
|
||||
<if test="overdueDays != null "> and a.overdue_days = #{overdueDays}</if>
|
||||
<if test="renewalTimes != null "> and a.renewal_times = #{renewalTimes}</if>
|
||||
<if test="chargeTimes != null "> and a.charge_times = #{chargeTimes}</if>
|
||||
<if test="rentCarRuleId != null "> and a.rent_car_rule_id = #{rentCarRuleId}</if>
|
||||
<if test="rentBatteyRuleId != null "> and a.rent_battey_rule_id = #{rentBatteyRuleId}</if>
|
||||
</where>
|
||||
</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.customer_id, a.customer_name, a.customer_phone, a.rental_type, a.rental_days, a.rental_price, a.deposit_price, a.overdue_fee, a.is_deposit_free, a.is_auto_deduct, a.first_order_time, a.start_rent_time, a.overdue_days, a.renewal_times, a.charge_times, a.rent_car_rule_id, a.rent_battey_rule_id, 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
|
||||
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
|
||||
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
|
||||
left join zc_order_sub b on b.order_id = a.order_id
|
||||
where a.order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
@ -26,17 +26,17 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">所属运营商:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="operatorId" th:field="*{operatorId}" class="form-control" type="text" required>
|
||||
<input name="operatorName" th:field="*{operatorName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">所属门店:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="storeId" th:field="*{storeId}" class="form-control" type="text" required>
|
||||
<input name="storeName" th:field="*{storeName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">车辆ID:</label>
|
||||
<label class="col-sm-3 control-label is-required">车辆:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="vehicleId" th:field="*{vehicleId}" class="form-control" type="text" required>
|
||||
</div>
|
||||
@ -133,18 +133,7 @@
|
||||
<input name="chargeTimes" th:field="*{chargeTimes}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">租车套餐id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rentCarRuleId" th:field="*{rentCarRuleId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">租电套餐id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="rentBatteyRuleId" th:field="*{rentBatteyRuleId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="form-header h4">租车子订单信息</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@ -208,11 +197,7 @@
|
||||
{
|
||||
field: 'suborderNo',
|
||||
align: 'center',
|
||||
title: '子订单编号',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].suborderNo' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
title: '子订单编号'
|
||||
},
|
||||
|
||||
{
|
||||
@ -220,98 +205,61 @@
|
||||
align: 'center',
|
||||
title: '子订单类型',
|
||||
formatter: function(value, row, index) {
|
||||
var name = $.common.sprintf("zcOrderSubList[%s].suborderType", index);
|
||||
return $.common.dictToSelect(suborderTypeDatas, value, name);
|
||||
return $.table.selectDictLabel(suborderTypeDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'amount',
|
||||
align: 'center',
|
||||
title: '订单金额',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].amount' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
title: '订单金额'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'paymentMethod',
|
||||
align: 'center',
|
||||
title: '支付方式',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].paymentMethod' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
title: '支付方式'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'vinBatteryNo',
|
||||
align: 'center',
|
||||
title: '车架/电池编号',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].vinBatteryNo' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
title: '车架/电池编号'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'createdAt',
|
||||
align: 'center',
|
||||
title: '订单产生时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].createdAt' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
title: '订单产生时间'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'paymentId',
|
||||
align: 'center',
|
||||
title: '支付ID',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].paymentId' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
title: '支付'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'paidAt',
|
||||
align: 'center',
|
||||
title: '实际支付时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].paidAt' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
title: '实际支付时间'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'remark',
|
||||
align: 'center',
|
||||
title: '备注',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].remark' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
title: '备注'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'createTime',
|
||||
align: 'center',
|
||||
title: '创建时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].createTime' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
title: '创建时间'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'updateTime',
|
||||
align: 'center',
|
||||
title: '更新时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcOrderSubList[%s].updateTime' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
title: '更新时间'
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
@ -90,6 +90,7 @@
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
detailUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "租车订单",
|
||||
@ -113,15 +114,15 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'operatorId',
|
||||
field: 'operatorName',
|
||||
title: '所属运营商'
|
||||
},
|
||||
{
|
||||
field: 'storeId',
|
||||
field: 'storeName',
|
||||
title: '所属门店'
|
||||
},
|
||||
{
|
||||
field: 'vehicleId',
|
||||
field: 'licensePlate',
|
||||
title: '车辆'
|
||||
},
|
||||
{
|
||||
@ -176,7 +177,7 @@
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editCustomize(\'' + row.orderId + '\',1300,700)"><i class="fa fa-edit"></i>查看</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.orderId + '\',1300,700)"><i class="fa fa-edit"></i>查看</a> ');
|
||||
//actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.orderId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user