站点日报按日期查询

This commit is contained in:
Guoqs
2025-03-24 14:33:07 +08:00
parent 51c0bc731d
commit f2f46b3d45
6 changed files with 60 additions and 23 deletions

View File

@@ -30,4 +30,14 @@ public class SettleOrderReportDTO {
* 页面容量
*/
private Integer pageSize;
/**
* 开始时间 yyyy-MM-dd
*/
private String startTime;
/**
* 结束时间 yyyy-MM-dd
*/
private String endTime;
}

View File

@@ -2,6 +2,7 @@ package com.jsowell.pile.mapper;
import com.jsowell.pile.domain.SettleOrderReport;
import com.jsowell.pile.dto.MerchantOrderReportDTO;
import com.jsowell.pile.dto.SettleOrderReportDTO;
import com.jsowell.pile.vo.web.SettleOrderReportVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@@ -84,6 +85,8 @@ public interface SettleOrderReportMapper {
*/
List<SettleOrderReport> selectSettleOrderReportList(SettleOrderReport settleOrderReport);
List<SettleOrderReport> selectListBySettleOrderReportDTO(@Param("dto") SettleOrderReportDTO dto);
/**
* 新增结算订单报
*
@@ -149,4 +152,4 @@ public interface SettleOrderReportMapper {
* @return
*/
List<SettleOrderReport> queryOrderReport(@Param("stationIdList") List<String> stationIdList, @Param("startDate") String startDate, @Param("endDate") String endDate);
}
}

View File

@@ -40,6 +40,8 @@ public interface SettleOrderReportService {
*/
public List<SettleOrderReport> selectSettleOrderReportList(SettleOrderReport settleOrderReport);
List<SettleOrderReport> selectSettleOrderReportList(SettleOrderReportDTO dto);
/**
* 新增结算订单报
*

View File

@@ -93,8 +93,6 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
return settleOrderReportMapper.selectByStationIdAndDate(stationId, date);
}
/**
* 查询站点订单日报明细
* 分页查询
@@ -221,6 +219,11 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
return settleOrderReportMapper.selectSettleOrderReportList(settleOrderReport);
}
@Override
public List<SettleOrderReport> selectSettleOrderReportList(SettleOrderReportDTO dto) {
return settleOrderReportMapper.selectListBySettleOrderReportDTO(dto);
}
/**
* 新增结算订单报
*

View File

@@ -26,13 +26,13 @@
</resultMap>
<sql id="Base_Column_List">
<!--@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,
trade_amount, trade_fee, create_time, update_time, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
select
<include refid="Base_Column_List" />
from settle_order_report
where id = #{id,jdbcType=INTEGER}
@@ -44,18 +44,18 @@
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.SettleOrderReport" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into settle_order_report (settle_code, merchant_id, station_id,
order_codes, use_electricity, charge_num,
charge_time, electricity_amount, service_amount,
insert into settle_order_report (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,
trade_amount, trade_fee, create_time,
trade_amount, trade_fee, create_time,
update_time, del_flag)
values (#{settleCode,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{stationId,jdbcType=VARCHAR},
#{orderCodes,jdbcType=LONGVARCHAR}, #{useElectricity,jdbcType=DECIMAL}, #{chargeNum,jdbcType=VARCHAR},
#{chargeTime,jdbcType=VARCHAR}, #{electricityAmount,jdbcType=DECIMAL}, #{serviceAmount,jdbcType=DECIMAL},
values (#{settleCode,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{stationId,jdbcType=VARCHAR},
#{orderCodes,jdbcType=LONGVARCHAR}, #{useElectricity,jdbcType=DECIMAL}, #{chargeNum,jdbcType=VARCHAR},
#{chargeTime,jdbcType=VARCHAR}, #{electricityAmount,jdbcType=DECIMAL}, #{serviceAmount,jdbcType=DECIMAL},
#{totalAmount,jdbcType=DECIMAL}, #{virtualAmount,jdbcType=DECIMAL}, #{settleAmount,jdbcType=DECIMAL},
#{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})
</insert>
<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">
<!--@mbg.generated-->
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,
trade_date, trade_amount, trade_fee, create_time, update_time, del_flag)
values
<foreach collection="list" item="item" separator=",">
(#{item.settleCode,jdbcType=VARCHAR}, #{item.merchantId,jdbcType=VARCHAR}, #{item.stationId,jdbcType=VARCHAR},
#{item.orderCodes,jdbcType=LONGVARCHAR}, #{item.useElectricity,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.settleCode,jdbcType=VARCHAR}, #{item.merchantId,jdbcType=VARCHAR}, #{item.stationId,jdbcType=VARCHAR},
#{item.orderCodes,jdbcType=LONGVARCHAR}, #{item.useElectricity,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.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}
)
@@ -425,7 +425,7 @@
<!--#{updateTime,jdbcType=TIMESTAMP},-->
#{delFlag,jdbcType=VARCHAR},
</trim>
on duplicate key update
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
@@ -572,7 +572,7 @@
#{delFlag,jdbcType=VARCHAR},
</if>
</trim>
on duplicate key update
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
@@ -939,4 +939,23 @@
</if>
and trade_date between #{startDate,jdbcType=VARCHAR} and #{endDate,jdbcType=VARCHAR}
</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>