11.13
This commit is contained in:
parent
0fbd4fd974
commit
96fd9fe05e
@ -221,6 +221,8 @@ public class RescueInfoSystem extends BaseController {
|
||||
rescueInfoIPage.getRecords().forEach(item -> {
|
||||
item.setSetMoneyYuan(Double.valueOf(Optional.ofNullable(item.getSetMoney()).orElse(0L)) / 100);
|
||||
item.setPayMoneyYuan(Double.valueOf(Optional.ofNullable(item.getPayMoney()).orElse(0L)) / 100);
|
||||
// ⭐ 关键:这里把施救里程数算出来
|
||||
item.calcRescueScale();
|
||||
});
|
||||
list.addAll(rescueInfoIPage.getRecords());
|
||||
pageNo++;
|
||||
|
||||
@ -9,10 +9,13 @@ import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 rescue_info
|
||||
*
|
||||
@ -42,7 +45,7 @@ public class RescueInfo extends TenantBaseDO
|
||||
private String licenseNum;
|
||||
@Excel(name = "司机姓名")
|
||||
private String driverName;
|
||||
@Excel(name = "司机手机号")
|
||||
// @Excel(name = "司机手机号")
|
||||
private String driverPhoneNum;
|
||||
@Excel(name = "司机车牌号")
|
||||
private String driverCarNum;
|
||||
@ -65,9 +68,9 @@ public class RescueInfo extends TenantBaseDO
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone="GMT+8")
|
||||
@Excel(name = "救援时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||
private Date rescueTime;
|
||||
@Excel(name = "救援开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||
// @Excel(name = "救援开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||
private Date rescueStartTime;
|
||||
@Excel(name = "救援结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||
// @Excel(name = "救援结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
|
||||
private Date rescueEndTime;
|
||||
|
||||
/** 救援类型 */
|
||||
@ -108,7 +111,7 @@ public class RescueInfo extends TenantBaseDO
|
||||
private String carBrand;
|
||||
|
||||
/** 目的地详细描述 */
|
||||
@Excel(name = "目的地")
|
||||
// @Excel(name = "目的地")
|
||||
private String destinationInfo;
|
||||
|
||||
/** 目的地经度 */
|
||||
@ -129,12 +132,31 @@ public class RescueInfo extends TenantBaseDO
|
||||
@Excel(name = "路段")
|
||||
private String sectionRoad;
|
||||
//开始的公里数
|
||||
@Excel(name = "出发里程表")
|
||||
private Double startScale;
|
||||
//结束的公里数
|
||||
@Excel(name = "结束里程表")
|
||||
private Double endScale;
|
||||
// 施救里程数(数据库没有)
|
||||
@Excel(name = "施救里程数")
|
||||
@TableField(exist = false)
|
||||
private Double rescueScale;
|
||||
// 可选:写个便捷方法专门算这个字段
|
||||
public void calcRescueScale() {
|
||||
if (startScale == null || endScale == null) {
|
||||
this.rescueScale = null;
|
||||
return;
|
||||
}
|
||||
this.rescueScale = BigDecimal.valueOf(endScale)
|
||||
.subtract(BigDecimal.valueOf(startScale))
|
||||
.setScale(2, RoundingMode.HALF_UP)
|
||||
.doubleValue();
|
||||
}
|
||||
|
||||
//放空公里数
|
||||
private Double emptyNum;
|
||||
//过关费
|
||||
@Excel(name = "过关费")
|
||||
private Double checkpointMoney;
|
||||
private Long deptId;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
@ -299,6 +321,7 @@ public class RescueInfo extends TenantBaseDO
|
||||
/**
|
||||
* 来源
|
||||
*/
|
||||
@Excel(name = "来源")
|
||||
private String source;
|
||||
|
||||
/**
|
||||
@ -412,18 +435,23 @@ public class RescueInfo extends TenantBaseDO
|
||||
private String orderSigningRealName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "是否确认收款", readConverterExp = "0=否,1=是")
|
||||
private String ifConfirmPay;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "收款账号")
|
||||
private String accountNumber;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "确认收款人")
|
||||
private String confirmPaymentPersonName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "确认收款时间")
|
||||
private String confirmPaymentTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "确认收款备注")
|
||||
private String confirmPaymentPersonRemark;
|
||||
|
||||
@TableField(exist = false)
|
||||
|
||||
@ -325,6 +325,7 @@
|
||||
roi.order_signing_charge_name,
|
||||
roi.order_signing_remark,
|
||||
roi.if_confirm_pay,
|
||||
roi.account_number,
|
||||
roi.confirm_payment_person_name,
|
||||
roi.confirm_payment_time,
|
||||
roi.confirm_payment_person_remark
|
||||
@ -2059,7 +2060,7 @@
|
||||
AND ri.rescue_time <= #{endTimeStr}
|
||||
</if>
|
||||
<if test="driverType != null and driverType != ''">
|
||||
AND di.driver_type <= #{driverType}
|
||||
AND di.driver_type = #{driverType}
|
||||
</if>
|
||||
|
||||
GROUP BY di.id, ri.driver_name
|
||||
|
||||
Loading…
Reference in New Issue
Block a user