mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-06 06:57:59 +08:00
update
This commit is contained in:
@@ -1,213 +1,182 @@
|
|||||||
package com.jsowell.pile.domain;
|
package com.jsowell.pile.domain;
|
||||||
|
|
||||||
import com.jsowell.common.annotation.Excel;
|
|
||||||
import com.jsowell.common.core.domain.BaseEntity;
|
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单详情对象 order_detail
|
* 订单详情
|
||||||
*
|
|
||||||
* @author jsowell
|
|
||||||
* @date 2022-09-30
|
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Builder
|
@Builder
|
||||||
public class OrderDetail extends BaseEntity {
|
@AllArgsConstructor
|
||||||
private static final long serialVersionUID = 1L;
|
@NoArgsConstructor
|
||||||
|
public class OrderDetail {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 订单编号
|
||||||
*/
|
*/
|
||||||
private Integer id;
|
private String orderCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单编号
|
* 总用电量
|
||||||
*/
|
*/
|
||||||
@Excel(name = "订单编号")
|
private BigDecimal totalUsedElectricity;
|
||||||
private String orderCode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总用电量
|
* 订单总金额(电费总额+服务费总额)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "总用电量")
|
private BigDecimal totalOrderAmount;
|
||||||
private BigDecimal totalUsedElectricity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单总金额(电费总额+服务费总额)
|
* 电费总金额(各时段消耗电费总金额)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "订单总金额", readConverterExp = "电=费总额+服务费总额")
|
private BigDecimal totalElectricityAmount;
|
||||||
private BigDecimal totalOrderAmount;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电费总金额(各时段消耗电费总金额)
|
* 电费折扣金额
|
||||||
*/
|
*/
|
||||||
@Excel(name = "电费总金额", readConverterExp = "各=时段消耗电费总金额")
|
private BigDecimal discountElectricityAmount;
|
||||||
private BigDecimal totalElectricityAmount;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务费总金额(各时段服务费总金额)
|
* 服务费总金额(各时段服务费总金额)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "服务费总金额", readConverterExp = "各=时段服务费总金额")
|
private BigDecimal totalServiceAmount;
|
||||||
private BigDecimal totalServiceAmount;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 尖单价
|
* 服务费折扣金额
|
||||||
*/
|
*/
|
||||||
@Excel(name = "尖单价")
|
private BigDecimal discountServiceAmount;
|
||||||
private BigDecimal sharpPrice;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 尖时段用电量
|
* 尖单价(尖电费+尖服务费)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "尖时段用电量")
|
private BigDecimal sharpPrice;
|
||||||
private BigDecimal sharpUsedElectricity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 尖时段电费单价
|
* 尖时段用电量
|
||||||
*/
|
*/
|
||||||
@Excel(name = "尖时段电费单价")
|
private BigDecimal sharpUsedElectricity;
|
||||||
private BigDecimal sharpElectricityPrice;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 尖时段服务费单价
|
* 尖时段电费单价
|
||||||
*/
|
*/
|
||||||
@Excel(name = "尖时段服务费单价")
|
private BigDecimal sharpElectricityPrice;
|
||||||
private BigDecimal sharpServicePrice;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 尖金额
|
* 尖时段服务费单价
|
||||||
*/
|
*/
|
||||||
@Excel(name = "尖金额")
|
private BigDecimal sharpServicePrice;
|
||||||
private BigDecimal sharpAmount;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 峰单价
|
* 尖金额
|
||||||
*/
|
*/
|
||||||
@Excel(name = "峰单价")
|
private BigDecimal sharpAmount;
|
||||||
private BigDecimal peakPrice;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 峰时段用电量
|
* 峰单价
|
||||||
*/
|
*/
|
||||||
@Excel(name = "峰时段用电量")
|
private BigDecimal peakPrice;
|
||||||
private BigDecimal peakUsedElectricity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 峰时段电费单价
|
* 峰时段用电量
|
||||||
*/
|
*/
|
||||||
@Excel(name = "峰时段电费单价")
|
private BigDecimal peakUsedElectricity;
|
||||||
private BigDecimal peakElectricityPrice;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 峰时段服务费单价
|
* 峰时段电费单价
|
||||||
*/
|
*/
|
||||||
@Excel(name = "峰时段服务费单价")
|
private BigDecimal peakElectricityPrice;
|
||||||
private BigDecimal peakServicePrice;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 峰金额
|
* 峰时段服务费单价
|
||||||
*/
|
*/
|
||||||
@Excel(name = "峰金额")
|
private BigDecimal peakServicePrice;
|
||||||
private BigDecimal peakAmount;
|
|
||||||
|
|
||||||
/***
|
/**
|
||||||
* 平单价
|
* 峰金额
|
||||||
*/
|
*/
|
||||||
@Excel(name = "平单价")
|
private BigDecimal peakAmount;
|
||||||
private BigDecimal flatPrice;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 平时段用电量
|
* 平单价
|
||||||
*/
|
*/
|
||||||
@Excel(name = "平时段用电量")
|
private BigDecimal flatPrice;
|
||||||
private BigDecimal flatUsedElectricity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 平时段电费单价
|
* 平时段用电量
|
||||||
*/
|
*/
|
||||||
@Excel(name = "平时段电费单价")
|
private BigDecimal flatUsedElectricity;
|
||||||
private BigDecimal flatElectricityPrice;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 平时段服务费单价
|
* 平时段电费单价
|
||||||
*/
|
*/
|
||||||
@Excel(name = "平时段服务费单价")
|
private BigDecimal flatElectricityPrice;
|
||||||
private BigDecimal flatServicePrice;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 平金额
|
* 平时段服务费单价
|
||||||
*/
|
*/
|
||||||
@Excel(name = "平金额")
|
private BigDecimal flatServicePrice;
|
||||||
private BigDecimal flatAmount;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 谷单价
|
* 平金额
|
||||||
*/
|
*/
|
||||||
@Excel(name = "谷单价")
|
private BigDecimal flatAmount;
|
||||||
private BigDecimal valleyPrice;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 谷时段用电量
|
* 谷单价
|
||||||
*/
|
*/
|
||||||
@Excel(name = "谷时段用电量")
|
private BigDecimal valleyPrice;
|
||||||
private BigDecimal valleyUsedElectricity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 谷时段电费单价
|
* 谷时段用电量
|
||||||
*/
|
*/
|
||||||
@Excel(name = "谷时段电费单价")
|
private BigDecimal valleyUsedElectricity;
|
||||||
private BigDecimal valleyElectricityPrice;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 谷时段服务费单价
|
* 谷时段电费单价
|
||||||
*/
|
*/
|
||||||
@Excel(name = "谷时段服务费单价")
|
private BigDecimal valleyElectricityPrice;
|
||||||
private BigDecimal valleyServicePrice;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 谷金额
|
* 谷时段服务费单价
|
||||||
*/
|
*/
|
||||||
@Excel(name = "谷金额")
|
private BigDecimal valleyServicePrice;
|
||||||
private BigDecimal valleyAmount;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除标识(0-正常;1-删除)
|
* 谷金额
|
||||||
*/
|
*/
|
||||||
private String delFlag;
|
private BigDecimal valleyAmount;
|
||||||
|
|
||||||
@Override
|
/**
|
||||||
public String toString() {
|
* 创建人
|
||||||
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
*/
|
||||||
.append("id", getId())
|
private String createBy;
|
||||||
.append("orderCode", getOrderCode())
|
|
||||||
.append("totalUsedElectricity", getTotalUsedElectricity())
|
/**
|
||||||
.append("totalOrderAmount", getTotalOrderAmount())
|
* 创建时间
|
||||||
.append("totalElectricityAmount", getTotalElectricityAmount())
|
*/
|
||||||
.append("totalServiceAmount", getTotalServiceAmount())
|
private Date createTime;
|
||||||
.append("sharpUsedElectricity", getSharpUsedElectricity())
|
|
||||||
.append("sharpElectricityPrice", getSharpElectricityPrice())
|
/**
|
||||||
.append("sharpServicePrice", getSharpServicePrice())
|
* 更新人
|
||||||
.append("peakUsedElectricity", getPeakUsedElectricity())
|
*/
|
||||||
.append("peakElectricityPrice", getPeakElectricityPrice())
|
private String updateBy;
|
||||||
.append("peakServicePrice", getPeakServicePrice())
|
|
||||||
.append("flatUsedElectricity", getFlatUsedElectricity())
|
/**
|
||||||
.append("flatElectricityPrice", getFlatElectricityPrice())
|
* 更新时间
|
||||||
.append("flatServicePrice", getFlatServicePrice())
|
*/
|
||||||
.append("valleyUsedElectricity", getValleyUsedElectricity())
|
private Date updateTime;
|
||||||
.append("valleyElectricityPrice", getValleyElectricityPrice())
|
|
||||||
.append("valleyServicePrice", getValleyServicePrice())
|
/**
|
||||||
.append("createBy", getCreateBy())
|
* 删除标识(0-正常;1-删除)
|
||||||
.append("createTime", getCreateTime())
|
*/
|
||||||
.append("updateBy", getUpdateBy())
|
private String delFlag;
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("delFlag", getDelFlag())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.jsowell.pile.mapper;
|
||||||
|
|
||||||
|
import com.jsowell.pile.domain.OrderDetail;
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
public interface OrderDetailMapper {
|
||||||
|
/**
|
||||||
|
* delete by primary key
|
||||||
|
* @param id primaryKey
|
||||||
|
* @return deleteCount
|
||||||
|
*/
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* insert record to table
|
||||||
|
* @param record the record
|
||||||
|
* @return insert count
|
||||||
|
*/
|
||||||
|
int insert(OrderDetail record);
|
||||||
|
|
||||||
|
int insertOrUpdate(OrderDetail record);
|
||||||
|
|
||||||
|
int insertOrUpdateSelective(OrderDetail record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* insert record to table selective
|
||||||
|
* @param record the record
|
||||||
|
* @return insert count
|
||||||
|
*/
|
||||||
|
int insertSelective(OrderDetail record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* select by primary key
|
||||||
|
* @param id primary key
|
||||||
|
* @return object by primary key
|
||||||
|
*/
|
||||||
|
OrderDetail selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update record selective
|
||||||
|
* @param record the updated record
|
||||||
|
* @return update count
|
||||||
|
*/
|
||||||
|
int updateByPrimaryKeySelective(OrderDetail record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update record
|
||||||
|
* @param record the updated record
|
||||||
|
* @return update count
|
||||||
|
*/
|
||||||
|
int updateByPrimaryKey(OrderDetail record);
|
||||||
|
|
||||||
|
int updateBatch(List<OrderDetail> list);
|
||||||
|
|
||||||
|
int updateBatchSelective(List<OrderDetail> list);
|
||||||
|
|
||||||
|
int batchInsert(@Param("list") List<OrderDetail> list);
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.jsowell.pile.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.jsowell.pile.domain.OrderDetail;
|
||||||
|
public interface OrderDetailService{
|
||||||
|
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int insert(OrderDetail record);
|
||||||
|
|
||||||
|
int insertOrUpdate(OrderDetail record);
|
||||||
|
|
||||||
|
int insertOrUpdateSelective(OrderDetail record);
|
||||||
|
|
||||||
|
int insertSelective(OrderDetail record);
|
||||||
|
|
||||||
|
OrderDetail selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(OrderDetail record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(OrderDetail record);
|
||||||
|
|
||||||
|
int updateBatch(List<OrderDetail> list);
|
||||||
|
|
||||||
|
int updateBatchSelective(List<OrderDetail> list);
|
||||||
|
|
||||||
|
int batchInsert(List<OrderDetail> list);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.jsowell.pile.service.impl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import com.jsowell.pile.mapper.OrderDetailMapper;
|
||||||
|
import com.jsowell.pile.domain.OrderDetail;
|
||||||
|
import com.jsowell.pile.service.OrderDetailService;
|
||||||
|
@Service
|
||||||
|
public class OrderDetailServiceImpl implements OrderDetailService{
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OrderDetailMapper orderDetailMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteByPrimaryKey(Integer id) {
|
||||||
|
return orderDetailMapper.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insert(OrderDetail record) {
|
||||||
|
return orderDetailMapper.insert(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertOrUpdate(OrderDetail record) {
|
||||||
|
return orderDetailMapper.insertOrUpdate(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertOrUpdateSelective(OrderDetail record) {
|
||||||
|
return orderDetailMapper.insertOrUpdateSelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertSelective(OrderDetail record) {
|
||||||
|
return orderDetailMapper.insertSelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrderDetail selectByPrimaryKey(Integer id) {
|
||||||
|
return orderDetailMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateByPrimaryKeySelective(OrderDetail record) {
|
||||||
|
return orderDetailMapper.updateByPrimaryKeySelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateByPrimaryKey(OrderDetail record) {
|
||||||
|
return orderDetailMapper.updateByPrimaryKey(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateBatch(List<OrderDetail> list) {
|
||||||
|
return orderDetailMapper.updateBatch(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateBatchSelective(List<OrderDetail> list) {
|
||||||
|
return orderDetailMapper.updateBatchSelective(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int batchInsert(List<OrderDetail> list) {
|
||||||
|
return orderDetailMapper.batchInsert(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
1293
jsowell-pile/src/main/resources/mapper/pile/OrderDetailMapper.xml
Normal file
1293
jsowell-pile/src/main/resources/mapper/pile/OrderDetailMapper.xml
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user