diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/domain/OrderDetail.java b/jsowell-pile/src/main/java/com/jsowell/pile/domain/OrderDetail.java index 598ee8476..c44079dc1 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/domain/OrderDetail.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/domain/OrderDetail.java @@ -1,213 +1,182 @@ package com.jsowell.pile.domain; -import com.jsowell.common.annotation.Excel; -import com.jsowell.common.core.domain.BaseEntity; import lombok.*; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; import java.math.BigDecimal; +import java.util.Date; /** - * 订单详情对象 order_detail - * - * @author jsowell - * @date 2022-09-30 + * 订单详情 */ @Getter @Setter -@NoArgsConstructor -@AllArgsConstructor @Builder -public class OrderDetail extends BaseEntity { - private static final long serialVersionUID = 1L; +@AllArgsConstructor +@NoArgsConstructor +public class OrderDetail { + private static final long serialVersionUID = 1L; + /** + * 主键 + */ + private Integer id; - /** - * 主键 - */ - private Integer id; + /** + * 订单编号 + */ + private String orderCode; - /** - * 订单编号 - */ - @Excel(name = "订单编号") - private String orderCode; + /** + * 总用电量 + */ + private BigDecimal totalUsedElectricity; - /** - * 总用电量 - */ - @Excel(name = "总用电量") - private BigDecimal totalUsedElectricity; + /** + * 订单总金额(电费总额+服务费总额) + */ + private BigDecimal totalOrderAmount; - /** - * 订单总金额(电费总额+服务费总额) - */ - @Excel(name = "订单总金额", readConverterExp = "电=费总额+服务费总额") - private BigDecimal totalOrderAmount; + /** + * 电费总金额(各时段消耗电费总金额) + */ + private BigDecimal totalElectricityAmount; - /** - * 电费总金额(各时段消耗电费总金额) - */ - @Excel(name = "电费总金额", readConverterExp = "各=时段消耗电费总金额") - private BigDecimal totalElectricityAmount; + /** + * 电费折扣金额 + */ + private BigDecimal discountElectricityAmount; - /** - * 服务费总金额(各时段服务费总金额) - */ - @Excel(name = "服务费总金额", readConverterExp = "各=时段服务费总金额") - private BigDecimal totalServiceAmount; + /** + * 服务费总金额(各时段服务费总金额) + */ + private BigDecimal totalServiceAmount; - /** - * 尖单价 - */ - @Excel(name = "尖单价") - private BigDecimal sharpPrice; + /** + * 服务费折扣金额 + */ + private BigDecimal discountServiceAmount; - /** - * 尖时段用电量 - */ - @Excel(name = "尖时段用电量") - private BigDecimal sharpUsedElectricity; + /** + * 尖单价(尖电费+尖服务费) + */ + private BigDecimal sharpPrice; - /** - * 尖时段电费单价 - */ - @Excel(name = "尖时段电费单价") - private BigDecimal sharpElectricityPrice; + /** + * 尖时段用电量 + */ + private BigDecimal sharpUsedElectricity; - /** - * 尖时段服务费单价 - */ - @Excel(name = "尖时段服务费单价") - private BigDecimal sharpServicePrice; + /** + * 尖时段电费单价 + */ + private BigDecimal sharpElectricityPrice; - /** - * 尖金额 - */ - @Excel(name = "尖金额") - private BigDecimal sharpAmount; + /** + * 尖时段服务费单价 + */ + private BigDecimal sharpServicePrice; - /** - * 峰单价 - */ - @Excel(name = "峰单价") - private BigDecimal peakPrice; + /** + * 尖金额 + */ + private BigDecimal sharpAmount; - /** - * 峰时段用电量 - */ - @Excel(name = "峰时段用电量") - private BigDecimal peakUsedElectricity; + /** + * 峰单价 + */ + private BigDecimal peakPrice; - /** - * 峰时段电费单价 - */ - @Excel(name = "峰时段电费单价") - private BigDecimal peakElectricityPrice; + /** + * 峰时段用电量 + */ + private BigDecimal peakUsedElectricity; - /** - * 峰时段服务费单价 - */ - @Excel(name = "峰时段服务费单价") - private BigDecimal peakServicePrice; + /** + * 峰时段电费单价 + */ + private BigDecimal peakElectricityPrice; - /** - * 峰金额 - */ - @Excel(name = "峰金额") - private BigDecimal peakAmount; + /** + * 峰时段服务费单价 + */ + private BigDecimal peakServicePrice; - /*** - * 平单价 - */ - @Excel(name = "平单价") - private BigDecimal flatPrice; + /** + * 峰金额 + */ + private BigDecimal peakAmount; - /** - * 平时段用电量 - */ - @Excel(name = "平时段用电量") - private BigDecimal flatUsedElectricity; + /** + * 平单价 + */ + private BigDecimal flatPrice; - /** - * 平时段电费单价 - */ - @Excel(name = "平时段电费单价") - private BigDecimal flatElectricityPrice; + /** + * 平时段用电量 + */ + private BigDecimal flatUsedElectricity; - /** - * 平时段服务费单价 - */ - @Excel(name = "平时段服务费单价") - private BigDecimal flatServicePrice; + /** + * 平时段电费单价 + */ + private BigDecimal flatElectricityPrice; - /** - * 平金额 - */ - @Excel(name = "平金额") - private BigDecimal flatAmount; + /** + * 平时段服务费单价 + */ + private BigDecimal flatServicePrice; - /** - * 谷单价 - */ - @Excel(name = "谷单价") - private BigDecimal valleyPrice; + /** + * 平金额 + */ + private BigDecimal flatAmount; - /** - * 谷时段用电量 - */ - @Excel(name = "谷时段用电量") - private BigDecimal valleyUsedElectricity; + /** + * 谷单价 + */ + private BigDecimal valleyPrice; - /** - * 谷时段电费单价 - */ - @Excel(name = "谷时段电费单价") - private BigDecimal valleyElectricityPrice; + /** + * 谷时段用电量 + */ + private BigDecimal valleyUsedElectricity; - /** - * 谷时段服务费单价 - */ - @Excel(name = "谷时段服务费单价") - private BigDecimal valleyServicePrice; + /** + * 谷时段电费单价 + */ + private BigDecimal valleyElectricityPrice; - /** - * 谷金额 - */ - @Excel(name = "谷金额") - private BigDecimal valleyAmount; + /** + * 谷时段服务费单价 + */ + private BigDecimal valleyServicePrice; - /** - * 删除标识(0-正常;1-删除) - */ - private String delFlag; + /** + * 谷金额 + */ + private BigDecimal valleyAmount; - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.JSON_STYLE) - .append("id", getId()) - .append("orderCode", getOrderCode()) - .append("totalUsedElectricity", getTotalUsedElectricity()) - .append("totalOrderAmount", getTotalOrderAmount()) - .append("totalElectricityAmount", getTotalElectricityAmount()) - .append("totalServiceAmount", getTotalServiceAmount()) - .append("sharpUsedElectricity", getSharpUsedElectricity()) - .append("sharpElectricityPrice", getSharpElectricityPrice()) - .append("sharpServicePrice", getSharpServicePrice()) - .append("peakUsedElectricity", getPeakUsedElectricity()) - .append("peakElectricityPrice", getPeakElectricityPrice()) - .append("peakServicePrice", getPeakServicePrice()) - .append("flatUsedElectricity", getFlatUsedElectricity()) - .append("flatElectricityPrice", getFlatElectricityPrice()) - .append("flatServicePrice", getFlatServicePrice()) - .append("valleyUsedElectricity", getValleyUsedElectricity()) - .append("valleyElectricityPrice", getValleyElectricityPrice()) - .append("valleyServicePrice", getValleyServicePrice()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("delFlag", getDelFlag()) - .toString(); - } -} + /** + * 创建人 + */ + private String createBy; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新人 + */ + private String updateBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 删除标识(0-正常;1-删除) + */ + private String delFlag; +} \ No newline at end of file diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/OrderDetailMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/OrderDetailMapper.java new file mode 100644 index 000000000..c245934a1 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/OrderDetailMapper.java @@ -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 list); + + int updateBatchSelective(List list); + + int batchInsert(@Param("list") List list); +} \ No newline at end of file diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/OrderDetailService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/OrderDetailService.java new file mode 100644 index 000000000..bce876d5f --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/OrderDetailService.java @@ -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 list); + + int updateBatchSelective(List list); + + int batchInsert(List list); + +} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderDetailServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderDetailServiceImpl.java new file mode 100644 index 000000000..8614265d3 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderDetailServiceImpl.java @@ -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 list) { + return orderDetailMapper.updateBatch(list); + } + + @Override + public int updateBatchSelective(List list) { + return orderDetailMapper.updateBatchSelective(list); + } + + @Override + public int batchInsert(List list) { + return orderDetailMapper.batchInsert(list); + } + +} diff --git a/jsowell-pile/src/main/resources/mapper/pile/OrderDetailMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/OrderDetailMapper.xml new file mode 100644 index 000000000..649a426ac --- /dev/null +++ b/jsowell-pile/src/main/resources/mapper/pile/OrderDetailMapper.xml @@ -0,0 +1,1293 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id, order_code, total_used_electricity, total_order_amount, total_electricity_amount, + discount_electricity_amount, total_service_amount, discount_service_amount, sharp_price, + sharp_used_electricity, sharp_electricity_price, sharp_service_price, sharp_amount, + peak_price, peak_used_electricity, peak_electricity_price, peak_service_price, peak_amount, + flat_price, flat_used_electricity, flat_electricity_price, flat_service_price, flat_amount, + valley_price, valley_used_electricity, valley_electricity_price, valley_service_price, + valley_amount, create_by, create_time, update_by, update_time, del_flag + + + + + delete from order_detail + where id = #{id,jdbcType=INTEGER} + + + + insert into order_detail (order_code, total_used_electricity, + total_order_amount, total_electricity_amount, + discount_electricity_amount, total_service_amount, + discount_service_amount, sharp_price, sharp_used_electricity, + sharp_electricity_price, sharp_service_price, + sharp_amount, peak_price, peak_used_electricity, + peak_electricity_price, peak_service_price, + peak_amount, flat_price, flat_used_electricity, + flat_electricity_price, flat_service_price, + flat_amount, valley_price, valley_used_electricity, + valley_electricity_price, valley_service_price, + valley_amount, create_by, create_time, + update_by, update_time, del_flag + ) + values (#{orderCode,jdbcType=VARCHAR}, #{totalUsedElectricity,jdbcType=DECIMAL}, + #{totalOrderAmount,jdbcType=DECIMAL}, #{totalElectricityAmount,jdbcType=DECIMAL}, + #{discountElectricityAmount,jdbcType=DECIMAL}, #{totalServiceAmount,jdbcType=DECIMAL}, + #{discountServiceAmount,jdbcType=DECIMAL}, #{sharpPrice,jdbcType=DECIMAL}, #{sharpUsedElectricity,jdbcType=DECIMAL}, + #{sharpElectricityPrice,jdbcType=DECIMAL}, #{sharpServicePrice,jdbcType=DECIMAL}, + #{sharpAmount,jdbcType=DECIMAL}, #{peakPrice,jdbcType=DECIMAL}, #{peakUsedElectricity,jdbcType=DECIMAL}, + #{peakElectricityPrice,jdbcType=DECIMAL}, #{peakServicePrice,jdbcType=DECIMAL}, + #{peakAmount,jdbcType=DECIMAL}, #{flatPrice,jdbcType=DECIMAL}, #{flatUsedElectricity,jdbcType=DECIMAL}, + #{flatElectricityPrice,jdbcType=DECIMAL}, #{flatServicePrice,jdbcType=DECIMAL}, + #{flatAmount,jdbcType=DECIMAL}, #{valleyPrice,jdbcType=DECIMAL}, #{valleyUsedElectricity,jdbcType=DECIMAL}, + #{valleyElectricityPrice,jdbcType=DECIMAL}, #{valleyServicePrice,jdbcType=DECIMAL}, + #{valleyAmount,jdbcType=DECIMAL}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=CHAR} + ) + + + + insert into order_detail + + + order_code, + + + total_used_electricity, + + + total_order_amount, + + + total_electricity_amount, + + + discount_electricity_amount, + + + total_service_amount, + + + discount_service_amount, + + + sharp_price, + + + sharp_used_electricity, + + + sharp_electricity_price, + + + sharp_service_price, + + + sharp_amount, + + + peak_price, + + + peak_used_electricity, + + + peak_electricity_price, + + + peak_service_price, + + + peak_amount, + + + flat_price, + + + flat_used_electricity, + + + flat_electricity_price, + + + flat_service_price, + + + flat_amount, + + + valley_price, + + + valley_used_electricity, + + + valley_electricity_price, + + + valley_service_price, + + + valley_amount, + + + create_by, + + + create_time, + + + update_by, + + + update_time, + + + del_flag, + + + + + #{orderCode,jdbcType=VARCHAR}, + + + #{totalUsedElectricity,jdbcType=DECIMAL}, + + + #{totalOrderAmount,jdbcType=DECIMAL}, + + + #{totalElectricityAmount,jdbcType=DECIMAL}, + + + #{discountElectricityAmount,jdbcType=DECIMAL}, + + + #{totalServiceAmount,jdbcType=DECIMAL}, + + + #{discountServiceAmount,jdbcType=DECIMAL}, + + + #{sharpPrice,jdbcType=DECIMAL}, + + + #{sharpUsedElectricity,jdbcType=DECIMAL}, + + + #{sharpElectricityPrice,jdbcType=DECIMAL}, + + + #{sharpServicePrice,jdbcType=DECIMAL}, + + + #{sharpAmount,jdbcType=DECIMAL}, + + + #{peakPrice,jdbcType=DECIMAL}, + + + #{peakUsedElectricity,jdbcType=DECIMAL}, + + + #{peakElectricityPrice,jdbcType=DECIMAL}, + + + #{peakServicePrice,jdbcType=DECIMAL}, + + + #{peakAmount,jdbcType=DECIMAL}, + + + #{flatPrice,jdbcType=DECIMAL}, + + + #{flatUsedElectricity,jdbcType=DECIMAL}, + + + #{flatElectricityPrice,jdbcType=DECIMAL}, + + + #{flatServicePrice,jdbcType=DECIMAL}, + + + #{flatAmount,jdbcType=DECIMAL}, + + + #{valleyPrice,jdbcType=DECIMAL}, + + + #{valleyUsedElectricity,jdbcType=DECIMAL}, + + + #{valleyElectricityPrice,jdbcType=DECIMAL}, + + + #{valleyServicePrice,jdbcType=DECIMAL}, + + + #{valleyAmount,jdbcType=DECIMAL}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{delFlag,jdbcType=CHAR}, + + + + + + update order_detail + + + order_code = #{orderCode,jdbcType=VARCHAR}, + + + total_used_electricity = #{totalUsedElectricity,jdbcType=DECIMAL}, + + + total_order_amount = #{totalOrderAmount,jdbcType=DECIMAL}, + + + total_electricity_amount = #{totalElectricityAmount,jdbcType=DECIMAL}, + + + discount_electricity_amount = #{discountElectricityAmount,jdbcType=DECIMAL}, + + + total_service_amount = #{totalServiceAmount,jdbcType=DECIMAL}, + + + discount_service_amount = #{discountServiceAmount,jdbcType=DECIMAL}, + + + sharp_price = #{sharpPrice,jdbcType=DECIMAL}, + + + sharp_used_electricity = #{sharpUsedElectricity,jdbcType=DECIMAL}, + + + sharp_electricity_price = #{sharpElectricityPrice,jdbcType=DECIMAL}, + + + sharp_service_price = #{sharpServicePrice,jdbcType=DECIMAL}, + + + sharp_amount = #{sharpAmount,jdbcType=DECIMAL}, + + + peak_price = #{peakPrice,jdbcType=DECIMAL}, + + + peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL}, + + + peak_electricity_price = #{peakElectricityPrice,jdbcType=DECIMAL}, + + + peak_service_price = #{peakServicePrice,jdbcType=DECIMAL}, + + + peak_amount = #{peakAmount,jdbcType=DECIMAL}, + + + flat_price = #{flatPrice,jdbcType=DECIMAL}, + + + flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL}, + + + flat_electricity_price = #{flatElectricityPrice,jdbcType=DECIMAL}, + + + flat_service_price = #{flatServicePrice,jdbcType=DECIMAL}, + + + flat_amount = #{flatAmount,jdbcType=DECIMAL}, + + + valley_price = #{valleyPrice,jdbcType=DECIMAL}, + + + valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL}, + + + valley_electricity_price = #{valleyElectricityPrice,jdbcType=DECIMAL}, + + + valley_service_price = #{valleyServicePrice,jdbcType=DECIMAL}, + + + valley_amount = #{valleyAmount,jdbcType=DECIMAL}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=CHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + update order_detail + set order_code = #{orderCode,jdbcType=VARCHAR}, + total_used_electricity = #{totalUsedElectricity,jdbcType=DECIMAL}, + total_order_amount = #{totalOrderAmount,jdbcType=DECIMAL}, + total_electricity_amount = #{totalElectricityAmount,jdbcType=DECIMAL}, + discount_electricity_amount = #{discountElectricityAmount,jdbcType=DECIMAL}, + total_service_amount = #{totalServiceAmount,jdbcType=DECIMAL}, + discount_service_amount = #{discountServiceAmount,jdbcType=DECIMAL}, + sharp_price = #{sharpPrice,jdbcType=DECIMAL}, + sharp_used_electricity = #{sharpUsedElectricity,jdbcType=DECIMAL}, + sharp_electricity_price = #{sharpElectricityPrice,jdbcType=DECIMAL}, + sharp_service_price = #{sharpServicePrice,jdbcType=DECIMAL}, + sharp_amount = #{sharpAmount,jdbcType=DECIMAL}, + peak_price = #{peakPrice,jdbcType=DECIMAL}, + peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL}, + peak_electricity_price = #{peakElectricityPrice,jdbcType=DECIMAL}, + peak_service_price = #{peakServicePrice,jdbcType=DECIMAL}, + peak_amount = #{peakAmount,jdbcType=DECIMAL}, + flat_price = #{flatPrice,jdbcType=DECIMAL}, + flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL}, + flat_electricity_price = #{flatElectricityPrice,jdbcType=DECIMAL}, + flat_service_price = #{flatServicePrice,jdbcType=DECIMAL}, + flat_amount = #{flatAmount,jdbcType=DECIMAL}, + valley_price = #{valleyPrice,jdbcType=DECIMAL}, + valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL}, + valley_electricity_price = #{valleyElectricityPrice,jdbcType=DECIMAL}, + valley_service_price = #{valleyServicePrice,jdbcType=DECIMAL}, + valley_amount = #{valleyAmount,jdbcType=DECIMAL}, + create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=CHAR} + where id = #{id,jdbcType=INTEGER} + + + + update order_detail + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.totalUsedElectricity,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.totalOrderAmount,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.totalElectricityAmount,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.discountElectricityAmount,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.totalServiceAmount,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.discountServiceAmount,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.sharpPrice,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.sharpUsedElectricity,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.sharpElectricityPrice,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.sharpServicePrice,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.sharpAmount,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.peakPrice,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.peakUsedElectricity,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.peakElectricityPrice,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.peakServicePrice,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.peakAmount,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.flatPrice,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.flatUsedElectricity,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.flatElectricityPrice,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.flatServicePrice,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.flatAmount,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.valleyPrice,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.valleyUsedElectricity,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.valleyElectricityPrice,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.valleyServicePrice,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.valleyAmount,jdbcType=DECIMAL} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP} + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=CHAR} + + + + where id in + + #{item.id,jdbcType=INTEGER} + + + + + update order_detail + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,jdbcType=VARCHAR} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.totalUsedElectricity,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.totalOrderAmount,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.totalElectricityAmount,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.discountElectricityAmount,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.totalServiceAmount,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.discountServiceAmount,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.sharpPrice,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.sharpUsedElectricity,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.sharpElectricityPrice,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.sharpServicePrice,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.sharpAmount,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.peakPrice,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.peakUsedElectricity,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.peakElectricityPrice,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.peakServicePrice,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.peakAmount,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.flatPrice,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.flatUsedElectricity,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.flatElectricityPrice,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.flatServicePrice,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.flatAmount,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.valleyPrice,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.valleyUsedElectricity,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.valleyElectricityPrice,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.valleyServicePrice,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.valleyAmount,jdbcType=DECIMAL} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,jdbcType=VARCHAR} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP} + + + + + + + when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=CHAR} + + + + + where id in + + #{item.id,jdbcType=INTEGER} + + + + + insert into order_detail + (order_code, total_used_electricity, total_order_amount, total_electricity_amount, + discount_electricity_amount, total_service_amount, discount_service_amount, sharp_price, + sharp_used_electricity, sharp_electricity_price, sharp_service_price, sharp_amount, + peak_price, peak_used_electricity, peak_electricity_price, peak_service_price, + peak_amount, flat_price, flat_used_electricity, flat_electricity_price, flat_service_price, + flat_amount, valley_price, valley_used_electricity, valley_electricity_price, valley_service_price, + valley_amount, create_by, create_time, update_by, update_time, del_flag) + values + + (#{item.orderCode,jdbcType=VARCHAR}, #{item.totalUsedElectricity,jdbcType=DECIMAL}, + #{item.totalOrderAmount,jdbcType=DECIMAL}, #{item.totalElectricityAmount,jdbcType=DECIMAL}, + #{item.discountElectricityAmount,jdbcType=DECIMAL}, #{item.totalServiceAmount,jdbcType=DECIMAL}, + #{item.discountServiceAmount,jdbcType=DECIMAL}, #{item.sharpPrice,jdbcType=DECIMAL}, + #{item.sharpUsedElectricity,jdbcType=DECIMAL}, #{item.sharpElectricityPrice,jdbcType=DECIMAL}, + #{item.sharpServicePrice,jdbcType=DECIMAL}, #{item.sharpAmount,jdbcType=DECIMAL}, + #{item.peakPrice,jdbcType=DECIMAL}, #{item.peakUsedElectricity,jdbcType=DECIMAL}, + #{item.peakElectricityPrice,jdbcType=DECIMAL}, #{item.peakServicePrice,jdbcType=DECIMAL}, + #{item.peakAmount,jdbcType=DECIMAL}, #{item.flatPrice,jdbcType=DECIMAL}, #{item.flatUsedElectricity,jdbcType=DECIMAL}, + #{item.flatElectricityPrice,jdbcType=DECIMAL}, #{item.flatServicePrice,jdbcType=DECIMAL}, + #{item.flatAmount,jdbcType=DECIMAL}, #{item.valleyPrice,jdbcType=DECIMAL}, #{item.valleyUsedElectricity,jdbcType=DECIMAL}, + #{item.valleyElectricityPrice,jdbcType=DECIMAL}, #{item.valleyServicePrice,jdbcType=DECIMAL}, + #{item.valleyAmount,jdbcType=DECIMAL}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, + #{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=CHAR} + ) + + + + + insert into order_detail + + + id, + + order_code, + total_used_electricity, + total_order_amount, + total_electricity_amount, + discount_electricity_amount, + total_service_amount, + discount_service_amount, + sharp_price, + sharp_used_electricity, + sharp_electricity_price, + sharp_service_price, + sharp_amount, + peak_price, + peak_used_electricity, + peak_electricity_price, + peak_service_price, + peak_amount, + flat_price, + flat_used_electricity, + flat_electricity_price, + flat_service_price, + flat_amount, + valley_price, + valley_used_electricity, + valley_electricity_price, + valley_service_price, + valley_amount, + create_by, + create_time, + update_by, + update_time, + del_flag, + + values + + + #{id,jdbcType=INTEGER}, + + #{orderCode,jdbcType=VARCHAR}, + #{totalUsedElectricity,jdbcType=DECIMAL}, + #{totalOrderAmount,jdbcType=DECIMAL}, + #{totalElectricityAmount,jdbcType=DECIMAL}, + #{discountElectricityAmount,jdbcType=DECIMAL}, + #{totalServiceAmount,jdbcType=DECIMAL}, + #{discountServiceAmount,jdbcType=DECIMAL}, + #{sharpPrice,jdbcType=DECIMAL}, + #{sharpUsedElectricity,jdbcType=DECIMAL}, + #{sharpElectricityPrice,jdbcType=DECIMAL}, + #{sharpServicePrice,jdbcType=DECIMAL}, + #{sharpAmount,jdbcType=DECIMAL}, + #{peakPrice,jdbcType=DECIMAL}, + #{peakUsedElectricity,jdbcType=DECIMAL}, + #{peakElectricityPrice,jdbcType=DECIMAL}, + #{peakServicePrice,jdbcType=DECIMAL}, + #{peakAmount,jdbcType=DECIMAL}, + #{flatPrice,jdbcType=DECIMAL}, + #{flatUsedElectricity,jdbcType=DECIMAL}, + #{flatElectricityPrice,jdbcType=DECIMAL}, + #{flatServicePrice,jdbcType=DECIMAL}, + #{flatAmount,jdbcType=DECIMAL}, + #{valleyPrice,jdbcType=DECIMAL}, + #{valleyUsedElectricity,jdbcType=DECIMAL}, + #{valleyElectricityPrice,jdbcType=DECIMAL}, + #{valleyServicePrice,jdbcType=DECIMAL}, + #{valleyAmount,jdbcType=DECIMAL}, + #{createBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, + #{updateTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=CHAR}, + + on duplicate key update + + + id = #{id,jdbcType=INTEGER}, + + order_code = #{orderCode,jdbcType=VARCHAR}, + total_used_electricity = #{totalUsedElectricity,jdbcType=DECIMAL}, + total_order_amount = #{totalOrderAmount,jdbcType=DECIMAL}, + total_electricity_amount = #{totalElectricityAmount,jdbcType=DECIMAL}, + discount_electricity_amount = #{discountElectricityAmount,jdbcType=DECIMAL}, + total_service_amount = #{totalServiceAmount,jdbcType=DECIMAL}, + discount_service_amount = #{discountServiceAmount,jdbcType=DECIMAL}, + sharp_price = #{sharpPrice,jdbcType=DECIMAL}, + sharp_used_electricity = #{sharpUsedElectricity,jdbcType=DECIMAL}, + sharp_electricity_price = #{sharpElectricityPrice,jdbcType=DECIMAL}, + sharp_service_price = #{sharpServicePrice,jdbcType=DECIMAL}, + sharp_amount = #{sharpAmount,jdbcType=DECIMAL}, + peak_price = #{peakPrice,jdbcType=DECIMAL}, + peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL}, + peak_electricity_price = #{peakElectricityPrice,jdbcType=DECIMAL}, + peak_service_price = #{peakServicePrice,jdbcType=DECIMAL}, + peak_amount = #{peakAmount,jdbcType=DECIMAL}, + flat_price = #{flatPrice,jdbcType=DECIMAL}, + flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL}, + flat_electricity_price = #{flatElectricityPrice,jdbcType=DECIMAL}, + flat_service_price = #{flatServicePrice,jdbcType=DECIMAL}, + flat_amount = #{flatAmount,jdbcType=DECIMAL}, + valley_price = #{valleyPrice,jdbcType=DECIMAL}, + valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL}, + valley_electricity_price = #{valleyElectricityPrice,jdbcType=DECIMAL}, + valley_service_price = #{valleyServicePrice,jdbcType=DECIMAL}, + valley_amount = #{valleyAmount,jdbcType=DECIMAL}, + create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=CHAR}, + + + + + insert into order_detail + + + id, + + + order_code, + + + total_used_electricity, + + + total_order_amount, + + + total_electricity_amount, + + + discount_electricity_amount, + + + total_service_amount, + + + discount_service_amount, + + + sharp_price, + + + sharp_used_electricity, + + + sharp_electricity_price, + + + sharp_service_price, + + + sharp_amount, + + + peak_price, + + + peak_used_electricity, + + + peak_electricity_price, + + + peak_service_price, + + + peak_amount, + + + flat_price, + + + flat_used_electricity, + + + flat_electricity_price, + + + flat_service_price, + + + flat_amount, + + + valley_price, + + + valley_used_electricity, + + + valley_electricity_price, + + + valley_service_price, + + + valley_amount, + + + create_by, + + + create_time, + + + update_by, + + + update_time, + + + del_flag, + + + values + + + #{id,jdbcType=INTEGER}, + + + #{orderCode,jdbcType=VARCHAR}, + + + #{totalUsedElectricity,jdbcType=DECIMAL}, + + + #{totalOrderAmount,jdbcType=DECIMAL}, + + + #{totalElectricityAmount,jdbcType=DECIMAL}, + + + #{discountElectricityAmount,jdbcType=DECIMAL}, + + + #{totalServiceAmount,jdbcType=DECIMAL}, + + + #{discountServiceAmount,jdbcType=DECIMAL}, + + + #{sharpPrice,jdbcType=DECIMAL}, + + + #{sharpUsedElectricity,jdbcType=DECIMAL}, + + + #{sharpElectricityPrice,jdbcType=DECIMAL}, + + + #{sharpServicePrice,jdbcType=DECIMAL}, + + + #{sharpAmount,jdbcType=DECIMAL}, + + + #{peakPrice,jdbcType=DECIMAL}, + + + #{peakUsedElectricity,jdbcType=DECIMAL}, + + + #{peakElectricityPrice,jdbcType=DECIMAL}, + + + #{peakServicePrice,jdbcType=DECIMAL}, + + + #{peakAmount,jdbcType=DECIMAL}, + + + #{flatPrice,jdbcType=DECIMAL}, + + + #{flatUsedElectricity,jdbcType=DECIMAL}, + + + #{flatElectricityPrice,jdbcType=DECIMAL}, + + + #{flatServicePrice,jdbcType=DECIMAL}, + + + #{flatAmount,jdbcType=DECIMAL}, + + + #{valleyPrice,jdbcType=DECIMAL}, + + + #{valleyUsedElectricity,jdbcType=DECIMAL}, + + + #{valleyElectricityPrice,jdbcType=DECIMAL}, + + + #{valleyServicePrice,jdbcType=DECIMAL}, + + + #{valleyAmount,jdbcType=DECIMAL}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{delFlag,jdbcType=CHAR}, + + + on duplicate key update + + + id = #{id,jdbcType=INTEGER}, + + + order_code = #{orderCode,jdbcType=VARCHAR}, + + + total_used_electricity = #{totalUsedElectricity,jdbcType=DECIMAL}, + + + total_order_amount = #{totalOrderAmount,jdbcType=DECIMAL}, + + + total_electricity_amount = #{totalElectricityAmount,jdbcType=DECIMAL}, + + + discount_electricity_amount = #{discountElectricityAmount,jdbcType=DECIMAL}, + + + total_service_amount = #{totalServiceAmount,jdbcType=DECIMAL}, + + + discount_service_amount = #{discountServiceAmount,jdbcType=DECIMAL}, + + + sharp_price = #{sharpPrice,jdbcType=DECIMAL}, + + + sharp_used_electricity = #{sharpUsedElectricity,jdbcType=DECIMAL}, + + + sharp_electricity_price = #{sharpElectricityPrice,jdbcType=DECIMAL}, + + + sharp_service_price = #{sharpServicePrice,jdbcType=DECIMAL}, + + + sharp_amount = #{sharpAmount,jdbcType=DECIMAL}, + + + peak_price = #{peakPrice,jdbcType=DECIMAL}, + + + peak_used_electricity = #{peakUsedElectricity,jdbcType=DECIMAL}, + + + peak_electricity_price = #{peakElectricityPrice,jdbcType=DECIMAL}, + + + peak_service_price = #{peakServicePrice,jdbcType=DECIMAL}, + + + peak_amount = #{peakAmount,jdbcType=DECIMAL}, + + + flat_price = #{flatPrice,jdbcType=DECIMAL}, + + + flat_used_electricity = #{flatUsedElectricity,jdbcType=DECIMAL}, + + + flat_electricity_price = #{flatElectricityPrice,jdbcType=DECIMAL}, + + + flat_service_price = #{flatServicePrice,jdbcType=DECIMAL}, + + + flat_amount = #{flatAmount,jdbcType=DECIMAL}, + + + valley_price = #{valleyPrice,jdbcType=DECIMAL}, + + + valley_used_electricity = #{valleyUsedElectricity,jdbcType=DECIMAL}, + + + valley_electricity_price = #{valleyElectricityPrice,jdbcType=DECIMAL}, + + + valley_service_price = #{valleyServicePrice,jdbcType=DECIMAL}, + + + valley_amount = #{valleyAmount,jdbcType=DECIMAL}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=CHAR}, + + + + \ No newline at end of file