浏览代码

经营报表导出

zouxuan 2 年之前
父节点
当前提交
c24146a695

+ 3 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentOrderDao.java

@@ -187,8 +187,6 @@ public interface StudentPaymentOrderDao extends BaseDAO<Long, StudentPaymentOrde
 
     List<StudentPaymentOrderExportDto> ExportQueryPage(Map<String, Object> params);
 
-    List<StudentPaymentOrderExportDto> ExportQueryPage1(Map<String, Object> params);
-
     List<StudentPaymentOrderMallExportDto> exportMallQueryPage(Map<String, Object> params);
 
     /**
@@ -456,5 +454,8 @@ public interface StudentPaymentOrderDao extends BaseDAO<Long, StudentPaymentOrde
     //用户户购买过的活动的次数
     int countByActivityIds(@Param("activityIds") List<String> activityIds, @Param("userId") Integer userId);
 
+
+    List<StudentPaymentOrderExportDto> ExportQueryPage1(Map<String, Object> params);
+
     int queryCount1(Map<String, Object> params);
 }

+ 2 - 64
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderRouteDto.java

@@ -2,9 +2,11 @@ package com.ym.mec.biz.dal.dto;
 
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
 import java.math.BigDecimal;
 
+@Data
 public class StudentPaymentOrderRouteDto extends StudentPaymentOrder {
     //汇付手续费
     @ApiModelProperty(value = "汇付手续费",required = true)
@@ -36,68 +38,4 @@ public class StudentPaymentOrderRouteDto extends StudentPaymentOrder {
 
     @ApiModelProperty(value = "服务费",required = true)
     private BigDecimal serviceFee = BigDecimal.ZERO;
-
-    public BigDecimal getTransferFee() {
-        return transferFee;
-    }
-
-    public void setTransferFee(BigDecimal transferFee) {
-        this.transferFee = transferFee;
-    }
-
-    public BigDecimal getPlatformFee() {
-        return platformFee;
-    }
-
-    public void setPlatformFee(BigDecimal platformFee) {
-        this.platformFee = platformFee;
-    }
-
-    public String getRouteMerNo() {
-        return routeMerNo;
-    }
-
-    public void setRouteMerNo(String routeMerNo) {
-        this.routeMerNo = routeMerNo;
-    }
-
-    public BigDecimal getRouteAmount() {
-        return routeAmount;
-    }
-
-    public void setRouteAmount(BigDecimal routeAmount) {
-        this.routeAmount = routeAmount;
-    }
-
-    public BigDecimal getRouteBalance() {
-        return routeBalance;
-    }
-
-    public void setRouteBalance(BigDecimal routeBalance) {
-        this.routeBalance = routeBalance;
-    }
-
-    public BigDecimal getSaleAmount() {
-        return saleAmount;
-    }
-
-    public void setSaleAmount(BigDecimal saleAmount) {
-        this.saleAmount = saleAmount;
-    }
-
-    public BigDecimal getServiceAmount() {
-        return serviceAmount;
-    }
-
-    public void setServiceAmount(BigDecimal serviceAmount) {
-        this.serviceAmount = serviceAmount;
-    }
-
-    public BigDecimal getServiceFee() {
-        return serviceFee;
-    }
-
-    public void setServiceFee(BigDecimal serviceFee) {
-        this.serviceFee = serviceFee;
-    }
 }

+ 0 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

@@ -409,10 +409,7 @@ public class ExportServiceImpl implements ExportService {
     private HttpResponseResult exportOperatingSummaryIncome(Map<String, Object> info) {
         String month = getParam(info, "month", String.class);
         Map<String, Object> params = new HashMap<>();
-        params.put("notGroupType","MALL_SELL");
         params.put("month",month);
-        params.put("tenantId",TenantContextHolder.getTenantId());
-        params.put("orderType",0);
         int count = studentPaymentOrderDao.queryCount1(params);
         if (count <= 0) {
             return BaseController.failed("没有可导出的数据");

+ 3 - 2
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -337,7 +337,8 @@
     <!-- 查询当前表的总记录数 -->
     <select id="queryCount1" resultType="int" parameterType="map">
         SELECT COUNT(spo.id_) FROM student_payment_order spo
-        <include refid="queryPaymentOrder"/>
+        WHERE spo.tenant_id_ = 1 AND DATE_FORMAT(spo.create_time_,'%Y-%m') = #{month} AND spo.status_ = 'SUCCESS'
+          AND spo.group_type_ != 'MALL_SELL'
     </select>
 
     <sql id="queryPaymentMallOrder">
@@ -764,7 +765,7 @@
         FROM student_payment_order spo
         LEFT JOIN student_payment_order_detail spod on spo.id_ = spod.payment_order_id_
         LEFT JOIN sporadic_charge_info sci on spo.music_group_id_ = sci.id_
-        <include refid="queryPaymentOrder"/>
+        WHERE spo.tenant_id_ = 1 AND DATE_FORMAT(spo.create_time_,'%Y-%m') = #{month} AND spo.status_ = 'SUCCESS'
         ORDER BY spo.id_ ASC
     </select>
     <resultMap id="SporadicChargeInfoDtoMap" type="com.ym.mec.biz.dal.dto.SporadicChargeInfoDto">