mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-06 15:08:05 +08:00
站点日报按日期查询
This commit is contained in:
@@ -35,9 +35,9 @@ public class SettleOrderReportController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('order:report:list')")
|
@PreAuthorize("@ss.hasPermi('order:report:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SettleOrderReport settleOrderReport) {
|
public TableDataInfo list(SettleOrderReportDTO dto) {
|
||||||
startPage();
|
startPage();
|
||||||
List<SettleOrderReport> list = settleOrderReportService.selectSettleOrderReportList(settleOrderReport);
|
List<SettleOrderReport> list = settleOrderReportService.selectSettleOrderReportList(dto);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,4 +30,14 @@ public class SettleOrderReportDTO {
|
|||||||
* 页面容量
|
* 页面容量
|
||||||
*/
|
*/
|
||||||
private Integer pageSize;
|
private Integer pageSize;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间 yyyy-MM-dd
|
||||||
|
*/
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间 yyyy-MM-dd
|
||||||
|
*/
|
||||||
|
private String endTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.jsowell.pile.mapper;
|
|||||||
|
|
||||||
import com.jsowell.pile.domain.SettleOrderReport;
|
import com.jsowell.pile.domain.SettleOrderReport;
|
||||||
import com.jsowell.pile.dto.MerchantOrderReportDTO;
|
import com.jsowell.pile.dto.MerchantOrderReportDTO;
|
||||||
|
import com.jsowell.pile.dto.SettleOrderReportDTO;
|
||||||
import com.jsowell.pile.vo.web.SettleOrderReportVO;
|
import com.jsowell.pile.vo.web.SettleOrderReportVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
@@ -84,6 +85,8 @@ public interface SettleOrderReportMapper {
|
|||||||
*/
|
*/
|
||||||
List<SettleOrderReport> selectSettleOrderReportList(SettleOrderReport settleOrderReport);
|
List<SettleOrderReport> selectSettleOrderReportList(SettleOrderReport settleOrderReport);
|
||||||
|
|
||||||
|
List<SettleOrderReport> selectListBySettleOrderReportDTO(@Param("dto") SettleOrderReportDTO dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增结算订单报
|
* 新增结算订单报
|
||||||
*
|
*
|
||||||
@@ -149,4 +152,4 @@ public interface SettleOrderReportMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SettleOrderReport> queryOrderReport(@Param("stationIdList") List<String> stationIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
List<SettleOrderReport> queryOrderReport(@Param("stationIdList") List<String> stationIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ public interface SettleOrderReportService {
|
|||||||
*/
|
*/
|
||||||
public List<SettleOrderReport> selectSettleOrderReportList(SettleOrderReport settleOrderReport);
|
public List<SettleOrderReport> selectSettleOrderReportList(SettleOrderReport settleOrderReport);
|
||||||
|
|
||||||
|
List<SettleOrderReport> selectSettleOrderReportList(SettleOrderReportDTO dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增结算订单报
|
* 新增结算订单报
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -93,8 +93,6 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
|||||||
return settleOrderReportMapper.selectByStationIdAndDate(stationId, date);
|
return settleOrderReportMapper.selectByStationIdAndDate(stationId, date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询站点订单日报明细
|
* 查询站点订单日报明细
|
||||||
* 分页查询
|
* 分页查询
|
||||||
@@ -221,6 +219,11 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
|||||||
return settleOrderReportMapper.selectSettleOrderReportList(settleOrderReport);
|
return settleOrderReportMapper.selectSettleOrderReportList(settleOrderReport);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SettleOrderReport> selectSettleOrderReportList(SettleOrderReportDTO dto) {
|
||||||
|
return settleOrderReportMapper.selectListBySettleOrderReportDTO(dto);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增结算订单报
|
* 新增结算订单报
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -26,13 +26,13 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, settle_code, merchant_id, station_id, order_codes, use_electricity, charge_num,
|
id, settle_code, merchant_id, station_id, order_codes, use_electricity, charge_num,
|
||||||
charge_time, electricity_amount, service_amount, total_amount, virtual_amount, settle_amount, trade_date,
|
charge_time, electricity_amount, service_amount, total_amount, virtual_amount, settle_amount, trade_date,
|
||||||
trade_amount, trade_fee, create_time, update_time, del_flag
|
trade_amount, trade_fee, create_time, update_time, del_flag
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
from settle_order_report
|
from settle_order_report
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
@@ -44,18 +44,18 @@
|
|||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.SettleOrderReport" useGeneratedKeys="true">
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.SettleOrderReport" useGeneratedKeys="true">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
insert into settle_order_report (settle_code, merchant_id, station_id,
|
insert into settle_order_report (settle_code, merchant_id, station_id,
|
||||||
order_codes, use_electricity, charge_num,
|
order_codes, use_electricity, charge_num,
|
||||||
charge_time, electricity_amount, service_amount,
|
charge_time, electricity_amount, service_amount,
|
||||||
total_amount, virtual_amount, settle_amount, trade_date,
|
total_amount, virtual_amount, settle_amount, trade_date,
|
||||||
trade_amount, trade_fee, create_time,
|
trade_amount, trade_fee, create_time,
|
||||||
update_time, del_flag)
|
update_time, del_flag)
|
||||||
values (#{settleCode,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{stationId,jdbcType=VARCHAR},
|
values (#{settleCode,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{stationId,jdbcType=VARCHAR},
|
||||||
#{orderCodes,jdbcType=LONGVARCHAR}, #{useElectricity,jdbcType=DECIMAL}, #{chargeNum,jdbcType=VARCHAR},
|
#{orderCodes,jdbcType=LONGVARCHAR}, #{useElectricity,jdbcType=DECIMAL}, #{chargeNum,jdbcType=VARCHAR},
|
||||||
#{chargeTime,jdbcType=VARCHAR}, #{electricityAmount,jdbcType=DECIMAL}, #{serviceAmount,jdbcType=DECIMAL},
|
#{chargeTime,jdbcType=VARCHAR}, #{electricityAmount,jdbcType=DECIMAL}, #{serviceAmount,jdbcType=DECIMAL},
|
||||||
#{totalAmount,jdbcType=DECIMAL}, #{virtualAmount,jdbcType=DECIMAL}, #{settleAmount,jdbcType=DECIMAL},
|
#{totalAmount,jdbcType=DECIMAL}, #{virtualAmount,jdbcType=DECIMAL}, #{settleAmount,jdbcType=DECIMAL},
|
||||||
#{tradeDate,jdbcType=VARCHAR},
|
#{tradeDate,jdbcType=VARCHAR},
|
||||||
#{tradeAmount,jdbcType=DECIMAL}, #{tradeFee,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP},
|
#{tradeAmount,jdbcType=DECIMAL}, #{tradeFee,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP},
|
||||||
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR})
|
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.SettleOrderReport" useGeneratedKeys="true">
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.SettleOrderReport" useGeneratedKeys="true">
|
||||||
@@ -361,15 +361,15 @@
|
|||||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
insert into settle_order_report
|
insert into settle_order_report
|
||||||
(settle_code, merchant_id, station_id, order_codes, use_electricity, charge_num,
|
(settle_code, merchant_id, station_id, order_codes, use_electricity, charge_num,
|
||||||
charge_time, electricity_amount, service_amount, total_amount, virtual_amount, settle_amount,
|
charge_time, electricity_amount, service_amount, total_amount, virtual_amount, settle_amount,
|
||||||
trade_date, trade_amount, trade_fee, create_time, update_time, del_flag)
|
trade_date, trade_amount, trade_fee, create_time, update_time, del_flag)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.settleCode,jdbcType=VARCHAR}, #{item.merchantId,jdbcType=VARCHAR}, #{item.stationId,jdbcType=VARCHAR},
|
(#{item.settleCode,jdbcType=VARCHAR}, #{item.merchantId,jdbcType=VARCHAR}, #{item.stationId,jdbcType=VARCHAR},
|
||||||
#{item.orderCodes,jdbcType=LONGVARCHAR}, #{item.useElectricity,jdbcType=DECIMAL},
|
#{item.orderCodes,jdbcType=LONGVARCHAR}, #{item.useElectricity,jdbcType=DECIMAL},
|
||||||
#{item.chargeNum,jdbcType=VARCHAR}, #{item.chargeTime,jdbcType=VARCHAR}, #{item.electricityAmount,jdbcType=DECIMAL},
|
#{item.chargeNum,jdbcType=VARCHAR}, #{item.chargeTime,jdbcType=VARCHAR}, #{item.electricityAmount,jdbcType=DECIMAL},
|
||||||
#{item.serviceAmount,jdbcType=DECIMAL}, #{item.totalAmount,jdbcType=DECIMAL}, #{item.virtualAmount,jdbcType=DECIMAL},
|
#{item.serviceAmount,jdbcType=DECIMAL}, #{item.totalAmount,jdbcType=DECIMAL}, #{item.virtualAmount,jdbcType=DECIMAL},
|
||||||
#{item.settleAmount,jdbcType=DECIMAL}, #{item.tradeDate,jdbcType=VARCHAR}, #{item.tradeAmount,jdbcType=DECIMAL}, #{item.tradeFee,jdbcType=DECIMAL},
|
#{item.settleAmount,jdbcType=DECIMAL}, #{item.tradeDate,jdbcType=VARCHAR}, #{item.tradeAmount,jdbcType=DECIMAL}, #{item.tradeFee,jdbcType=DECIMAL},
|
||||||
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=VARCHAR}
|
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=VARCHAR}
|
||||||
)
|
)
|
||||||
@@ -425,7 +425,7 @@
|
|||||||
<!--#{updateTime,jdbcType=TIMESTAMP},-->
|
<!--#{updateTime,jdbcType=TIMESTAMP},-->
|
||||||
#{delFlag,jdbcType=VARCHAR},
|
#{delFlag,jdbcType=VARCHAR},
|
||||||
</trim>
|
</trim>
|
||||||
on duplicate key update
|
on duplicate key update
|
||||||
<trim suffixOverrides=",">
|
<trim suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
id = #{id,jdbcType=INTEGER},
|
id = #{id,jdbcType=INTEGER},
|
||||||
@@ -572,7 +572,7 @@
|
|||||||
#{delFlag,jdbcType=VARCHAR},
|
#{delFlag,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
on duplicate key update
|
on duplicate key update
|
||||||
<trim suffixOverrides=",">
|
<trim suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
id = #{id,jdbcType=INTEGER},
|
id = #{id,jdbcType=INTEGER},
|
||||||
@@ -939,4 +939,23 @@
|
|||||||
</if>
|
</if>
|
||||||
and trade_date between #{startDate,jdbcType=VARCHAR} and #{endDate,jdbcType=VARCHAR}
|
and trade_date between #{startDate,jdbcType=VARCHAR} and #{endDate,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
|
||||||
|
<select id="selectListBySettleOrderReportDTO" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from settle_order_report
|
||||||
|
where del_flag = '0'
|
||||||
|
<if test="dto.merchantId != null and dto.merchantId != ''">
|
||||||
|
and merchant_id = #{dto.merchantId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="dto.stationId != null and dto.stationId != ''">
|
||||||
|
and station_id = #{dto.stationId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="dto.startTime != null and dto.startTime != ''">
|
||||||
|
and trade_date <![CDATA[ >= ]]> #{dto.startTime,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="dto.endTime != null and dto.endTime != ''">
|
||||||
|
and trade_date <![CDATA[ <= ]]> #{dto.endTime,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user