订单列表完善
This commit is contained in:
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.operation.domain.Company;
|
||||
@ -142,6 +143,18 @@ public class ZcRentCarRuleController extends BaseController
|
||||
|
||||
ZcRentCarRule zcRentCarRule = zcRentCarRuleService.selectZcRentCarRuleById(id);
|
||||
mmap.put("zcRentCarRule", zcRentCarRule);
|
||||
|
||||
Company company = companyList.stream()
|
||||
.filter(c -> c.getId() != null && c.getId().equals(zcRentCarRule.getOperatingCompanyId()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
mmap.put("company", company);
|
||||
// 查询已绑定的电池规则
|
||||
List<String> batteryRules = zcRentCarRuleBatteryService.selectModelRuleByCarRuleId(id);
|
||||
String modelRuleNames = batteryRules.stream()
|
||||
.map(String::valueOf)
|
||||
.collect(Collectors.joining(","));
|
||||
mmap.put("modelRuleNames", modelRuleNames);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
|
||||
@ -29,6 +29,8 @@ public interface ZcRentCarRuleBatteryMapper
|
||||
public List<ZcRentCarRuleBattery> selectZcRentCarRuleBatteryList(ZcRentCarRuleBattery zcRentCarRuleBattery);
|
||||
|
||||
List<Long> selectBatteryRuleIdsByCarRuleId(Long carRuleId);
|
||||
|
||||
List<String> selectModelRuleByCarRuleId(Long carRuleId);
|
||||
/**
|
||||
* 新增租车规则租电规则关联
|
||||
*
|
||||
|
||||
@ -28,6 +28,8 @@ public interface IZcRentCarRuleBatteryService
|
||||
public List<ZcRentCarRuleBattery> selectZcRentCarRuleBatteryList(ZcRentCarRuleBattery zcRentCarRuleBattery);
|
||||
|
||||
List<Long> selectBatteryRuleIdsByCarRuleId(Long carRuleId);
|
||||
|
||||
List<String> selectModelRuleByCarRuleId(Long carRuleId);
|
||||
/**
|
||||
* 新增租车规则租电规则关联
|
||||
*
|
||||
|
||||
@ -50,7 +50,10 @@ public class ZcRentCarRuleBatteryServiceImpl implements IZcRentCarRuleBatterySer
|
||||
public List<Long> selectBatteryRuleIdsByCarRuleId(Long carRuleId) {
|
||||
return zcRentCarRuleBatteryMapper.selectBatteryRuleIdsByCarRuleId(carRuleId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> selectModelRuleByCarRuleId(Long carRuleId) {
|
||||
return zcRentCarRuleBatteryMapper.selectModelRuleByCarRuleId(carRuleId);
|
||||
}
|
||||
/**
|
||||
* 新增租车规则租电规则关联
|
||||
*
|
||||
|
||||
@ -53,6 +53,9 @@ public class ZcOrderMain extends BaseEntity
|
||||
|
||||
private Long vehicleId;
|
||||
|
||||
/** 车辆型号ID */
|
||||
private Long carModelId;
|
||||
|
||||
/** 客户id */
|
||||
private Long customerId;
|
||||
|
||||
@ -64,6 +67,9 @@ public class ZcOrderMain extends BaseEntity
|
||||
@Excel(name = "客户联系电话")
|
||||
private String customerPhone;
|
||||
|
||||
/** 电池类型 */
|
||||
private String batteryType;
|
||||
|
||||
/** 租赁类型(时租/日租/按天数/以租代售) */
|
||||
@Excel(name = "租赁类型",dictType = "key_order_rental_type")
|
||||
private String rentalType;
|
||||
@ -84,6 +90,9 @@ public class ZcOrderMain extends BaseEntity
|
||||
@Excel(name = "逾期金额(元)")
|
||||
private BigDecimal overdueFee;
|
||||
|
||||
@Excel(name = "逾期计费类型")
|
||||
private String overdueType;
|
||||
|
||||
/** 是否开通免押 */
|
||||
@Excel(name = "是否开通免押")
|
||||
private Integer isDepositFree;
|
||||
@ -97,11 +106,27 @@ public class ZcOrderMain extends BaseEntity
|
||||
@Excel(name = "首次下单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date firstOrderTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "取车时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pickCarTime;
|
||||
|
||||
/** 开始计费时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "开始计费时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startRentTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计还车时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endRentTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "申请还车时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date reqEndRentTime;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "实际还车时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date actEndRentTime;
|
||||
|
||||
/** 逾期天数 */
|
||||
@Excel(name = "逾期天数")
|
||||
private Long overdueDays;
|
||||
@ -120,6 +145,14 @@ public class ZcOrderMain extends BaseEntity
|
||||
/** 租电套餐id */
|
||||
private Long rentBatteyRuleId;
|
||||
|
||||
/** 订单总金额 */
|
||||
private BigDecimal orderAmount;
|
||||
/** 订单结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "订单结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endOrderTime;
|
||||
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
@ -377,36 +410,118 @@ public class ZcOrderMain extends BaseEntity
|
||||
this.licensePlate = licensePlate;
|
||||
}
|
||||
|
||||
public Long getCarModelId() {
|
||||
return carModelId;
|
||||
}
|
||||
|
||||
public void setCarModelId(Long carModelId) {
|
||||
this.carModelId = carModelId;
|
||||
}
|
||||
|
||||
public String getBatteryType() {
|
||||
return batteryType;
|
||||
}
|
||||
|
||||
public void setBatteryType(String batteryType) {
|
||||
this.batteryType = batteryType;
|
||||
}
|
||||
|
||||
public Date getPickCarTime() {
|
||||
return pickCarTime;
|
||||
}
|
||||
|
||||
public void setPickCarTime(Date pickCarTime) {
|
||||
this.pickCarTime = pickCarTime;
|
||||
}
|
||||
|
||||
public Date getEndRentTime() {
|
||||
return endRentTime;
|
||||
}
|
||||
|
||||
public void setEndRentTime(Date endRentTime) {
|
||||
this.endRentTime = endRentTime;
|
||||
}
|
||||
|
||||
public Date getReqEndRentTime() {
|
||||
return reqEndRentTime;
|
||||
}
|
||||
|
||||
public void setReqEndRentTime(Date reqEndRentTime) {
|
||||
this.reqEndRentTime = reqEndRentTime;
|
||||
}
|
||||
|
||||
public Date getActEndRentTime() {
|
||||
return actEndRentTime;
|
||||
}
|
||||
|
||||
public void setActEndRentTime(Date actEndRentTime) {
|
||||
this.actEndRentTime = actEndRentTime;
|
||||
}
|
||||
|
||||
public BigDecimal getOrderAmount() {
|
||||
return orderAmount;
|
||||
}
|
||||
|
||||
public void setOrderAmount(BigDecimal orderAmount) {
|
||||
this.orderAmount = orderAmount;
|
||||
}
|
||||
|
||||
public Date getEndOrderTime() {
|
||||
return endOrderTime;
|
||||
}
|
||||
|
||||
public void setEndOrderTime(Date endOrderTime) {
|
||||
this.endOrderTime = endOrderTime;
|
||||
}
|
||||
|
||||
public String getOverdueType() {
|
||||
return overdueType;
|
||||
}
|
||||
|
||||
public void setOverdueType(String overdueType) {
|
||||
this.overdueType = overdueType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("orderId", getOrderId())
|
||||
.append("orderNo", getOrderNo())
|
||||
.append("orderStatus", getOrderStatus())
|
||||
.append("operatorId", getOperatorId())
|
||||
.append("storeId", getStoreId())
|
||||
.append("vehicleId", getVehicleId())
|
||||
.append("customerId", getCustomerId())
|
||||
.append("customerName", getCustomerName())
|
||||
.append("customerPhone", getCustomerPhone())
|
||||
.append("rentalType", getRentalType())
|
||||
.append("rentalDays", getRentalDays())
|
||||
.append("rentalPrice", getRentalPrice())
|
||||
.append("depositPrice", getDepositPrice())
|
||||
.append("overdueFee", getOverdueFee())
|
||||
.append("isDepositFree", getIsDepositFree())
|
||||
.append("isAutoDeduct", getIsAutoDeduct())
|
||||
.append("firstOrderTime", getFirstOrderTime())
|
||||
.append("startRentTime", getStartRentTime())
|
||||
.append("overdueDays", getOverdueDays())
|
||||
.append("renewalTimes", getRenewalTimes())
|
||||
.append("chargeTimes", getChargeTimes())
|
||||
.append("rentCarRuleId", getRentCarRuleId())
|
||||
.append("rentBatteyRuleId", getRentBatteyRuleId())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("zcOrderSubList", getZcOrderSubList())
|
||||
.toString();
|
||||
return new ToStringBuilder(this)
|
||||
.append("orderId", orderId)
|
||||
.append("orderNo", orderNo)
|
||||
.append("orderStatus", orderStatus)
|
||||
.append("operatorId", operatorId)
|
||||
.append("operatorName", operatorName)
|
||||
.append("storeName", storeName)
|
||||
.append("storeId", storeId)
|
||||
.append("licensePlate", licensePlate)
|
||||
.append("vehicleId", vehicleId)
|
||||
.append("carModelId", carModelId)
|
||||
.append("customerId", customerId)
|
||||
.append("customerName", customerName)
|
||||
.append("customerPhone", customerPhone)
|
||||
.append("batteryType", batteryType)
|
||||
.append("rentalType", rentalType)
|
||||
.append("rentalDays", rentalDays)
|
||||
.append("rentalPrice", rentalPrice)
|
||||
.append("depositPrice", depositPrice)
|
||||
.append("overdueFee", overdueFee)
|
||||
.append("overdueType", overdueType)
|
||||
.append("isDepositFree", isDepositFree)
|
||||
.append("isAutoDeduct", isAutoDeduct)
|
||||
.append("firstOrderTime", firstOrderTime)
|
||||
.append("pickCarTime", pickCarTime)
|
||||
.append("startRentTime", startRentTime)
|
||||
.append("endRentTime", endRentTime)
|
||||
.append("reqEndRentTime", reqEndRentTime)
|
||||
.append("actEndRentTime", actEndRentTime)
|
||||
.append("overdueDays", overdueDays)
|
||||
.append("renewalTimes", renewalTimes)
|
||||
.append("chargeTimes", chargeTimes)
|
||||
.append("rentCarRuleId", rentCarRuleId)
|
||||
.append("rentBatteyRuleId", rentBatteyRuleId)
|
||||
.append("orderAmount", orderAmount)
|
||||
.append("endOrderTime", endOrderTime)
|
||||
.append("delFlag", delFlag)
|
||||
.append("zcOrderSubList", zcOrderSubList)
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user