bug修复
This commit is contained in:
@ -204,16 +204,20 @@ public class ZcCarServiceImpl implements IZcCarService
|
||||
|
||||
// 只有当所有唯一性校验都通过时才插入数据
|
||||
if (StringUtils.isNull(u) && StringUtils.isNull(u2) && StringUtils.isNull(u3)) {
|
||||
// 车辆归属字典转换
|
||||
car.setBelongType(DictUtils.getDictValue("key_car_belong_type", car.getBelongType(), car.getBelongType()));
|
||||
// 设置运营商ID
|
||||
if (StringUtils.isNotEmpty(car.getOperatorName()) && companyMap.containsKey(car.getOperatorName())) {
|
||||
car.setOperatorId(companyMap.get(car.getOperatorName()));
|
||||
}else{
|
||||
// 没有匹配时置空
|
||||
car.setOperatorName("");
|
||||
}
|
||||
|
||||
// 设置门店ID
|
||||
if (StringUtils.isNotEmpty(car.getStoreName()) && storeMap.containsKey(car.getStoreName())) {
|
||||
car.setStoreId(storeMap.get(car.getStoreName()));
|
||||
}else{
|
||||
// 没有匹配时置空
|
||||
car.setStoreName("");
|
||||
}
|
||||
car.setCreateBy(user.getLoginName());
|
||||
|
||||
|
||||
@ -127,6 +127,9 @@ public class ZcOrderMain extends BaseEntity
|
||||
@Excel(name = "实际还车时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date actEndRentTime;
|
||||
|
||||
/** 租赁时长(小时/天) */
|
||||
@Excel(name = "租赁时长(小时/天)")
|
||||
private Long rentalDuration;
|
||||
/** 逾期天数 */
|
||||
@Excel(name = "逾期天数")
|
||||
private Long overdueDays;
|
||||
@ -335,6 +338,15 @@ public class ZcOrderMain extends BaseEntity
|
||||
{
|
||||
return startRentTime;
|
||||
}
|
||||
|
||||
public Long getRentalDuration() {
|
||||
return rentalDuration;
|
||||
}
|
||||
|
||||
public void setRentalDuration(Long rentalDuration) {
|
||||
this.rentalDuration = rentalDuration;
|
||||
}
|
||||
|
||||
public void setOverdueDays(Long overdueDays)
|
||||
{
|
||||
this.overdueDays = overdueDays;
|
||||
|
||||
@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="endRentTime" column="main_end_rent_time" />
|
||||
<result property="reqEndRentTime" column="main_req_end_rent_time" />
|
||||
<result property="actEndRentTime" column="main_act_end_rent_time" />
|
||||
<result property="rentalDuration" column="main_rental_duration" />
|
||||
<result property="overdueDays" column="main_overdue_days" />
|
||||
<result property="renewalTimes" column="main_renewal_times" />
|
||||
<result property="chargeTimes" column="main_charge_times" />
|
||||
@ -68,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
b.order_status as main_order_status, b.vehicle_id as main_vehicle_id, b.car_model_id as main_car_model_id, b.customer_id as main_customer_id, b.customer_name as main_customer_name, b.customer_phone as main_customer_phone,
|
||||
b.battery_type as main_battery_type, b.rental_type as main_rental_type, b.rental_days as main_rental_days, b.rental_price as main_rental_price, b.deposit_price as main_deposit_price, b.overdue_fee as main_overdue_fee,
|
||||
b.overdue_type as main_overdue_type, b.is_deposit_free as main_is_deposit_free, b.is_auto_deduct as main_is_auto_deduct, b.first_order_time as main_first_order_time, b.pick_car_time as main_pick_car_time, b.start_rent_time as main_start_rent_time,
|
||||
b.end_rent_time as main_end_rent_time, b.req_end_rent_time as main_req_end_rent_time, b.act_end_rent_time as main_act_end_rent_time, b.overdue_days as main_overdue_days, b.renewal_times as main_renewal_times, b.charge_times as main_charge_times,
|
||||
b.end_rent_time as main_end_rent_time, b.req_end_rent_time as main_req_end_rent_time, b.act_end_rent_time as main_act_end_rent_time, b.overdue_days as main_overdue_days, b.rental_duration as main_rental_duration, b.renewal_times as main_renewal_times, b.charge_times as main_charge_times,
|
||||
b.rent_car_rule_id as main_rent_car_rule_id, b.rent_battey_rule_id as main_rent_battey_rule_id, b.damage_amount as main_damage_amount,b.damage_desc as main_damage_desc, b.order_amount as main_order_amount, b.overdue_amount as main_overdue_amount,
|
||||
b.end_order_time as main_end_order_time, b.create_time as main_create_time, b.update_time as main_update_time ,
|
||||
c.company_name as main_operator_name,
|
||||
|
||||
@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="endRentTime" column="end_rent_time" />
|
||||
<result property="reqEndRentTime" column="req_end_rent_time" />
|
||||
<result property="actEndRentTime" column="act_end_rent_time" />
|
||||
<result property="rentalDuration" column="rental_duration" />
|
||||
<result property="overdueDays" column="overdue_days" />
|
||||
<result property="renewalTimes" column="renewal_times" />
|
||||
<result property="chargeTimes" column="charge_times" />
|
||||
@ -88,11 +89,11 @@ 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, damage_amount,damage_desc, order_amount, overdue_amount, end_order_time, distribed, 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, rental_duration, overdue_days, renewal_times, charge_times, rent_car_rule_id, rent_battey_rule_id, damage_amount,damage_desc, order_amount, overdue_amount, end_order_time, distribed, 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.damage_amount,a.damage_desc, a.order_amount, a.overdue_amount, a.end_order_time,a.distribed, 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.rental_duration, 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.overdue_amount, a.end_order_time,a.distribed, 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
|
||||
@ -134,7 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</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.damage_amount,a.damage_desc,a.order_amount, a.overdue_amount, a.end_order_time, a.distribed, 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.rental_duration, 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.overdue_amount, a.end_order_time, a.distribed, 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.pay_status as sub_pay_status,b.transaction_id as sub_transaction_id, 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,
|
||||
i.id as sub_id, i.order_id as sub_order_id, i.order_no as sub_order_no, i.img_type as sub_img_type, i.img_url as sub_img_url, i.create_time as sub_create_time, i.update_time as sub_update_time
|
||||
@ -148,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectZcOrderMainImgByOrderId" parameterType="Long" resultMap="ZcOrderMainZcOrderCarImgResult">
|
||||
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.overdue_amount, a.end_order_time, a.distribed, 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.rental_duration, 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.overdue_amount, a.end_order_time, a.distribed, 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,
|
||||
i.id as sub_id, i.order_id as sub_order_id, i.order_no as sub_order_no, i.img_type as sub_img_type, i.img_url as sub_img_url, i.create_time as sub_create_time, i.update_time as sub_update_time
|
||||
from zc_order_main a
|
||||
|
||||
@ -191,7 +191,7 @@
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
field: 'customerPhone',
|
||||
field: 'zcOrderMain.customerPhone',
|
||||
title: '联系电话',
|
||||
width: '120px'
|
||||
},
|
||||
@ -215,9 +215,18 @@
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
field: 'zcOrderMain.rentalDays',
|
||||
title: '租赁天数',
|
||||
width: '120px'
|
||||
field: 'zcOrderMain.rentalDuration',
|
||||
title: '租赁时长',
|
||||
width: '120px',
|
||||
formatter: function(value, row, index) {
|
||||
if (value != null) {
|
||||
var str = "天";
|
||||
if(row.zcOrderMain.rentalType == "1"){
|
||||
str = "小时";
|
||||
}
|
||||
return value + str;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'zcOrderMain.orderAmount',
|
||||
|
||||
@ -184,9 +184,18 @@
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
field: 'rentalDays',
|
||||
title: '租赁天数',
|
||||
width: '120px'
|
||||
field: 'rentalDuration',
|
||||
title: '租赁时长',
|
||||
width: '120px',
|
||||
formatter: function(value, row, index) {
|
||||
if (value != null) {
|
||||
var str = "天";
|
||||
if(row.rentalType == "1"){
|
||||
str = "小时";
|
||||
}
|
||||
return value + str;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'orderAmount',
|
||||
|
||||
Reference in New Issue
Block a user