Просмотр исходного кода

Merge branch 'mall_order_export' of http://git.dayaedu.com/yonge/mec into master_saas

zouxuan 2 лет назад
Родитель
Сommit
cfc5e09535
37 измененных файлов с 928 добавлено и 314 удалено
  1. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SellOrderDao.java
  2. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentOrderDao.java
  3. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentRouteOrderDao.java
  4. 143 239
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderExportDto.java
  5. 195 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderMallExportDto.java
  6. 103 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderRouteDto.java
  7. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ExportEnum.java
  8. 3 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ExportTypeEnum.java
  9. 12 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/OrderTypeEnum.java
  10. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/vo/StudentPaymentOrderVo.java
  11. 7 6
      mec-biz/src/main/java/com/ym/mec/biz/service/ContractService.java
  12. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/service/ExportService.java
  13. 1 4
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentPaymentOrderService.java
  14. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ChildrenDayReserveServiceImpl.java
  15. 21 31
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ContractServiceImpl.java
  16. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/EduPracticeGroupServiceImpl.java
  17. 189 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java
  18. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MemberRankSettingServiceImpl.java
  19. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  20. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/PracticeGroupServiceImpl.java
  21. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ReplacementInstrumentActivityServiceImpl.java
  22. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SporadicChargeInfoImpl.java
  23. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentInstrumentServiceImpl.java
  24. 5 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java
  25. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java
  26. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRepairServiceImpl.java
  27. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectChangeServiceImpl.java
  28. 16 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupActivityServiceImpl.java
  29. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  30. 12 0
      mec-biz/src/main/resources/config/mybatis/SellOrderMapper.xml
  31. 111 2
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  32. 24 0
      mec-biz/src/main/resources/config/mybatis/StudentPaymentRouteOrderMapper.xml
  33. 4 2
      mec-student/src/main/java/com/ym/mec/student/controller/ContractsController.java
  34. 5 2
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/EduContractsController.java
  35. 2 1
      mec-web/src/main/java/com/ym/mec/web/config/ResourceServerConfig.java
  36. 5 2
      mec-web/src/main/java/com/ym/mec/web/controller/education/EduContractsController.java
  37. 8 0
      mec-web/src/main/resources/exportColumnMapper.ini

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SellOrderDao.java

@@ -230,4 +230,15 @@ public interface SellOrderDao extends BaseDAO<Integer, SellOrder> {
     List<Map<Long, String>> sumOutOrderAmount(@Param("outOrderList") List<Long> outOrderList);
 
     List<SellOrder> querySellOrderByOrderIds(@Param("orderIds") Set<Long> paymentOrderIds);
+
+    /**
+    * @description: 获取商城商品分类
+     * @param productIdList
+    * @return java.util.Map<java.lang.Integer,java.lang.String>
+    * @author zx
+    * @date 2022/11/7 11:15
+    */
+    List<Map<Long, String>> getMallProductMap(@Param("productIdList") Set<String> productIdList, @Param("database") String database);
+
+    List<String> getMallProductCategory(@Param("database") String database);
 }

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

@@ -183,6 +183,8 @@ public interface StudentPaymentOrderDao extends BaseDAO<Long, StudentPaymentOrde
      */
     List<StudentPaymentOrderExportDto> ExportQueryPage(Map<String, Object> params);
 
+    List<StudentPaymentOrderMallExportDto> exportMallQueryPage(Map<String, Object> params);
+
     /**
      * 获取零星收费订单列表
      *

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentRouteOrderDao.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.dal.dao;
 
 import com.ym.mec.biz.dal.dto.FeeFlagNumDto;
 import com.ym.mec.biz.dal.dto.StudentPaymentOrderExportDto;
+import com.ym.mec.biz.dal.dto.StudentPaymentOrderMallExportDto;
 import com.ym.mec.biz.dal.dto.StudentPaymentRouteOrderDto;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.entity.StudentPaymentRouteOrder;
@@ -49,6 +50,7 @@ public interface StudentPaymentRouteOrderDao extends BaseDAO<Long, StudentPaymen
     List<StudentPaymentOrderExportDto> ExportQueryPage(Map<String, Object> params);
 
     List<StudentPaymentOrderExportDto> ExportQueryPage1(Map<String, Object> params);
+    List<StudentPaymentOrderMallExportDto> exportMallQueryPage(Map<String, Object> params);
 
     /**
      * 根据订单号删除

+ 143 - 239
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderExportDto.java

@@ -1,7 +1,6 @@
 package com.ym.mec.biz.dal.dto;
 
 import com.ym.mec.biz.dal.entity.Goods;
-import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
 import com.ym.mec.common.enums.BaseEnum;
 import io.swagger.annotations.ApiModelProperty;
@@ -9,7 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
 import java.math.BigDecimal;
 import java.util.List;
 
-public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
+public class StudentPaymentOrderExportDto extends StudentPaymentOrderRouteDto {
     @ApiModelProperty(value = "分部",required = true)
     private String organName;
 
@@ -39,14 +38,6 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
     @ApiModelProperty(value = "维修费用",required = true)
     private BigDecimal repairFee = BigDecimal.ZERO;
 
-    //汇付手续费
-    @ApiModelProperty(value = "汇付手续费",required = true)
-    private BigDecimal transferFee = BigDecimal.ZERO;
-    
-    //平台手续费
-    @ApiModelProperty(value = "平台手续费",required = true)
-    private BigDecimal platformFee = BigDecimal.ZERO;
-
     //乐团家长采买课程费用
     @ApiModelProperty(value = "乐团课程费用",required = true)
     private BigDecimal musicGroupCourseFee = BigDecimal.ZERO;
@@ -124,29 +115,6 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
     @ApiModelProperty(value = "商品列表",required = true)
     private List<Goods> goodsList;
 
-    //收款账户
-    @ApiModelProperty(value = "收款账户",required = true)
-    private String routeMerNo;
-
-    //分润金额
-    @ApiModelProperty(value = "分润金额",required = true)
-    private BigDecimal routeAmount;
-
-    //分润余额
-    @ApiModelProperty(value = "分润余额",required = true)
-    private BigDecimal routeBalance;
-
-    //分润中的销售费用
-    @ApiModelProperty(value = "分润中的销售费用",required = true)
-    private BigDecimal saleAmount = BigDecimal.ZERO;
-
-    //分润中的服务费用
-    @ApiModelProperty(value = "分润中的服务费用",required = true)
-    private BigDecimal serviceAmount = BigDecimal.ZERO;
-
-    @ApiModelProperty(value = "服务费",required = true)
-    private BigDecimal serviceFee = BigDecimal.ZERO;
-
     @ApiModelProperty(value = "分部",required = true)
     private String feeFlag;
 
@@ -228,76 +196,20 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
     @ApiModelProperty(value = "教学点",required = true)
     private String schoolName;
 
-    public String getUserOrganName() {
-        return userOrganName;
-    }
-
-    public void setUserOrganName(String userOrganName) {
-        this.userOrganName = userOrganName;
-    }
-
-    public BigDecimal getCourseSchoolBuyAmount() {
-        return courseSchoolBuyAmount;
-    }
-
-    public void setCourseSchoolBuyAmount(BigDecimal courseSchoolBuyAmount) {
-        this.courseSchoolBuyAmount = courseSchoolBuyAmount;
-    }
-
-    public BigDecimal getRetailGoodsFee() {
-        return retailGoodsFee;
-    }
-
-    public void setRetailGoodsFee(BigDecimal retailGoodsFee) {
-        this.retailGoodsFee = retailGoodsFee;
-    }
-
-    public BigDecimal getLargeMusicalFee() {
-        return largeMusicalFee;
-    }
-
-    public void setLargeMusicalFee(BigDecimal largeMusicalFee) {
-        this.largeMusicalFee = largeMusicalFee;
-    }
-
-    public String getSchoolName() {
-        return schoolName;
-    }
-
-    public void setSchoolName(String schoolName) {
-        this.schoolName = schoolName;
-    }
-
-    public String getFeeMusicGroupName() {
-        return feeMusicGroupName;
-    }
-
-    public void setFeeMusicGroupName(String feeMusicGroupName) {
-        this.feeMusicGroupName = feeMusicGroupName;
-    }
-
-    public String getFeeMusicGroupId() {
-        return feeMusicGroupId;
-    }
-
-    public void setFeeMusicGroupId(String feeMusicGroupId) {
-        this.feeMusicGroupId = feeMusicGroupId;
-    }
-
-    public String getTypeDesc() {
-        return typeDesc;
+    public String getOrganName() {
+        return organName;
     }
 
-    public void setTypeDesc(String typeDesc) {
-        this.typeDesc = typeDesc;
+    public void setOrganName(String organName) {
+        this.organName = organName;
     }
 
-    public BigDecimal getOrderAmount() {
-        return orderAmount;
+    public String getUserOrganName() {
+        return userOrganName;
     }
 
-    public void setOrderAmount(BigDecimal orderAmount) {
-        this.orderAmount = orderAmount;
+    public void setUserOrganName(String userOrganName) {
+        this.userOrganName = userOrganName;
     }
 
     public BigDecimal getSporadicAmount() {
@@ -308,54 +220,6 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
         this.sporadicAmount = sporadicAmount;
     }
 
-    public BigDecimal getMusicalFee() {
-        return musicalFee;
-    }
-
-    public void setMusicalFee(BigDecimal musicalFee) {
-        this.musicalFee = musicalFee;
-    }
-
-    public BigDecimal getTeachingFee() {
-        return teachingFee;
-    }
-
-    public void setTeachingFee(BigDecimal teachingFee) {
-        this.teachingFee = teachingFee;
-    }
-
-    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 getOrganName() {
-        return organName;
-    }
-
-    public void setOrganName(String organName) {
-        this.organName = organName;
-    }
-
-    public String getSubjectName() {
-        return subjectName;
-    }
-
-    public void setSubjectName(String subjectName) {
-        this.subjectName = subjectName;
-    }
-
     public String getSporadicType() {
         return sporadicType;
     }
@@ -364,68 +228,28 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
         this.sporadicType = sporadicType;
     }
 
-    public BigDecimal getLeaseFee() {
-        return leaseFee;
-    }
-
-    public void setLeaseFee(BigDecimal leaseFee) {
-        this.leaseFee = leaseFee;
-    }
-
-    public List<StudentPaymentOrderDetail> getOrderDetailList() {
-        return orderDetailList;
-    }
-
-    public void setOrderDetailList(List<StudentPaymentOrderDetail> orderDetailList) {
-        this.orderDetailList = orderDetailList;
-    }
-
-    public Integer getChargeType() {
-        return chargeType;
-    }
-
-    public void setChargeType(Integer chargeType) {
-        this.chargeType = chargeType;
-    }
-
-    public List<Goods> getGoodsList() {
-        return goodsList;
-    }
-
-    public void setGoodsList(List<Goods> goodsList) {
-        this.goodsList = goodsList;
-    }
-
-    public String getCooperationOrganName() {
-        return cooperationOrganName;
-    }
-
-    public void setCooperationOrganName(String cooperationOrganName) {
-        this.cooperationOrganName = cooperationOrganName;
-    }
-
-    public String getRouteMerNo() {
-        return routeMerNo;
+    public BigDecimal getMusicalFee() {
+        return musicalFee;
     }
 
-    public void setRouteMerNo(String routeMerNo) {
-        this.routeMerNo = routeMerNo;
+    public void setMusicalFee(BigDecimal musicalFee) {
+        this.musicalFee = musicalFee;
     }
 
-    public BigDecimal getRouteAmount() {
-        return routeAmount;
+    public BigDecimal getLeaseFee() {
+        return leaseFee;
     }
 
-    public void setRouteAmount(BigDecimal routeAmount) {
-        this.routeAmount = routeAmount;
+    public void setLeaseFee(BigDecimal leaseFee) {
+        this.leaseFee = leaseFee;
     }
 
-    public BigDecimal getRouteBalance() {
-        return routeBalance;
+    public BigDecimal getTeachingFee() {
+        return teachingFee;
     }
 
-    public void setRouteBalance(BigDecimal routeBalance) {
-        this.routeBalance = routeBalance;
+    public void setTeachingFee(BigDecimal teachingFee) {
+        this.teachingFee = teachingFee;
     }
 
     public BigDecimal getRepairFee() {
@@ -444,6 +268,14 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
         this.musicGroupCourseFee = musicGroupCourseFee;
     }
 
+    public BigDecimal getCourseSchoolBuyAmount() {
+        return courseSchoolBuyAmount;
+    }
+
+    public void setCourseSchoolBuyAmount(BigDecimal courseSchoolBuyAmount) {
+        this.courseSchoolBuyAmount = courseSchoolBuyAmount;
+    }
+
     public BigDecimal getHighCourseFee() {
         return highCourseFee;
     }
@@ -492,44 +324,28 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
         this.otherFee = otherFee;
     }
 
-    public String getFeeFlag() {
-        return feeFlag;
-    }
-
-    public void setFeeFlag(String feeFlag) {
-        this.feeFlag = feeFlag;
-    }
-
-    public BigDecimal getSaleAmount() {
-        return saleAmount;
+    public BigDecimal getMaintenanceFee() {
+        return maintenanceFee;
     }
 
-    public void setSaleAmount(BigDecimal saleAmount) {
-        this.saleAmount = saleAmount;
+    public void setMaintenanceFee(BigDecimal maintenanceFee) {
+        this.maintenanceFee = maintenanceFee;
     }
 
-    public BigDecimal getServiceAmount() {
-        return serviceAmount;
+    public BigDecimal getRetailGoodsFee() {
+        return retailGoodsFee;
     }
 
-    public void setServiceAmount(BigDecimal serviceAmount) {
-        this.serviceAmount = serviceAmount;
+    public void setRetailGoodsFee(BigDecimal retailGoodsFee) {
+        this.retailGoodsFee = retailGoodsFee;
     }
 
-    public BigDecimal getServiceFee() {
-		return serviceFee;
-	}
-
-	public void setServiceFee(BigDecimal serviceFee) {
-		this.serviceFee = serviceFee;
-	}
-
-	public BigDecimal getMaintenanceFee() {
-        return maintenanceFee;
+    public BigDecimal getLargeMusicalFee() {
+        return largeMusicalFee;
     }
 
-    public void setMaintenanceFee(BigDecimal maintenanceFee) {
-        this.maintenanceFee = maintenanceFee;
+    public void setLargeMusicalFee(BigDecimal largeMusicalFee) {
+        this.largeMusicalFee = largeMusicalFee;
     }
 
     public BigDecimal getMaintenanceProductFee() {
@@ -540,14 +356,6 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
         this.maintenanceProductFee = maintenanceProductFee;
     }
 
-    public String getEduTeacher() {
-        return eduTeacher;
-    }
-
-    public void setEduTeacher(String eduTeacher) {
-        this.eduTeacher = eduTeacher;
-    }
-
     public BigDecimal getCloudTeacherFee() {
         return cloudTeacherFee;
     }
@@ -572,6 +380,62 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
         this.rechargeFee = rechargeFee;
     }
 
+    public String getSubjectName() {
+        return subjectName;
+    }
+
+    public void setSubjectName(String subjectName) {
+        this.subjectName = subjectName;
+    }
+
+    public String getCooperationOrganName() {
+        return cooperationOrganName;
+    }
+
+    public void setCooperationOrganName(String cooperationOrganName) {
+        this.cooperationOrganName = cooperationOrganName;
+    }
+
+    public String getEduTeacher() {
+        return eduTeacher;
+    }
+
+    public void setEduTeacher(String eduTeacher) {
+        this.eduTeacher = eduTeacher;
+    }
+
+    public Integer getChargeType() {
+        return chargeType;
+    }
+
+    public void setChargeType(Integer chargeType) {
+        this.chargeType = chargeType;
+    }
+
+    public List<StudentPaymentOrderDetail> getOrderDetailList() {
+        return orderDetailList;
+    }
+
+    public void setOrderDetailList(List<StudentPaymentOrderDetail> orderDetailList) {
+        this.orderDetailList = orderDetailList;
+    }
+
+    public List<Goods> getGoodsList() {
+        return goodsList;
+    }
+
+    public void setGoodsList(List<Goods> goodsList) {
+        this.goodsList = goodsList;
+    }
+
+    public String getFeeFlag() {
+        return feeFlag;
+    }
+
+    public void setFeeFlag(String feeFlag) {
+        this.feeFlag = feeFlag;
+    }
+
     public Integer getPayingStatus() {
         return payingStatus;
     }
@@ -580,11 +444,51 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
         this.payingStatus = payingStatus;
     }
 
-	public BigDecimal getTranslatedIncome() {
-		return translatedIncome;
-	}
+    public BigDecimal getOrderAmount() {
+        return orderAmount;
+    }
+
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = orderAmount;
+    }
+
+    public BigDecimal getTranslatedIncome() {
+        return translatedIncome;
+    }
+
+    public void setTranslatedIncome(BigDecimal translatedIncome) {
+        this.translatedIncome = translatedIncome;
+    }
+
+    public String getTypeDesc() {
+        return typeDesc;
+    }
+
+    public void setTypeDesc(String typeDesc) {
+        this.typeDesc = typeDesc;
+    }
+
+    public String getFeeMusicGroupId() {
+        return feeMusicGroupId;
+    }
 
-	public void setTranslatedIncome(BigDecimal translatedIncome) {
-		this.translatedIncome = translatedIncome;
-	}
+    public void setFeeMusicGroupId(String feeMusicGroupId) {
+        this.feeMusicGroupId = feeMusicGroupId;
+    }
+
+    public String getFeeMusicGroupName() {
+        return feeMusicGroupName;
+    }
+
+    public void setFeeMusicGroupName(String feeMusicGroupName) {
+        this.feeMusicGroupName = feeMusicGroupName;
+    }
+
+    public String getSchoolName() {
+        return schoolName;
+    }
+
+    public void setSchoolName(String schoolName) {
+        this.schoolName = schoolName;
+    }
 }

+ 195 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderMallExportDto.java

@@ -0,0 +1,195 @@
+package com.ym.mec.biz.dal.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+public class StudentPaymentOrderMallExportDto extends StudentPaymentOrderRouteDto {
+    @ApiModelProperty(value = "分部",required = true)
+    private String organName;
+
+    @ApiModelProperty(value = "业务分部",required = true)
+    private String userOrganName;
+
+    @ApiModelProperty(value = "支付状态",required = true)
+    private Integer payingStatus;
+
+    @ApiModelProperty(value = "订单金额",required = true)
+    private BigDecimal orderAmount = BigDecimal.ZERO;
+
+    @ApiModelProperty(value = "购买商品名称列表",required = true)
+    private String goodsNames;
+
+    @ApiModelProperty(value = "购买商品列表",required = true)
+    private String goodsJson;
+
+    @ApiModelProperty(value = "购买的商品汇总金额",required = true)
+    private Map<String, BigDecimal> categoryAmount;
+
+    @ApiModelProperty(value = "商品分类1",required = true)
+    private BigDecimal category1 = BigDecimal.ZERO;
+
+    @ApiModelProperty(value = "商品分类2",required = true)
+    private BigDecimal category2 = BigDecimal.ZERO;
+
+    @ApiModelProperty(value = "商品分类3",required = true)
+    private BigDecimal category3 = BigDecimal.ZERO;
+
+    @ApiModelProperty(value = "商品分类4",required = true)
+    private BigDecimal category4 = BigDecimal.ZERO;
+
+    @ApiModelProperty(value = "商品分类5",required = true)
+    private BigDecimal category5 = BigDecimal.ZERO;
+
+    @ApiModelProperty(value = "商品分类6",required = true)
+    private BigDecimal category6 = BigDecimal.ZERO;
+
+    @ApiModelProperty(value = "商品分类7",required = true)
+    private BigDecimal category7 = BigDecimal.ZERO;
+
+    @ApiModelProperty(value = "商品分类8",required = true)
+    private BigDecimal category8 = BigDecimal.ZERO;
+
+    @ApiModelProperty(value = "商品分类9",required = true)
+    private BigDecimal category9 = BigDecimal.ZERO;
+
+    @ApiModelProperty(value = "商品分类10",required = true)
+    private BigDecimal category10 = BigDecimal.ZERO;
+
+    public Map<String, BigDecimal> getCategoryAmount() {
+        return categoryAmount;
+    }
+
+    public void setCategoryAmount(Map<String, BigDecimal> categoryAmount) {
+        this.categoryAmount = categoryAmount;
+    }
+
+    public BigDecimal getCategory1() {
+        return category1;
+    }
+
+    public void setCategory1(BigDecimal category1) {
+        this.category1 = category1;
+    }
+
+    public BigDecimal getCategory2() {
+        return category2;
+    }
+
+    public void setCategory2(BigDecimal category2) {
+        this.category2 = category2;
+    }
+
+    public BigDecimal getCategory3() {
+        return category3;
+    }
+
+    public void setCategory3(BigDecimal category3) {
+        this.category3 = category3;
+    }
+
+    public BigDecimal getCategory4() {
+        return category4;
+    }
+
+    public void setCategory4(BigDecimal category4) {
+        this.category4 = category4;
+    }
+
+    public BigDecimal getCategory5() {
+        return category5;
+    }
+
+    public void setCategory5(BigDecimal category5) {
+        this.category5 = category5;
+    }
+
+    public BigDecimal getCategory6() {
+        return category6;
+    }
+
+    public void setCategory6(BigDecimal category6) {
+        this.category6 = category6;
+    }
+
+    public BigDecimal getCategory7() {
+        return category7;
+    }
+
+    public void setCategory7(BigDecimal category7) {
+        this.category7 = category7;
+    }
+
+    public BigDecimal getCategory8() {
+        return category8;
+    }
+
+    public void setCategory8(BigDecimal category8) {
+        this.category8 = category8;
+    }
+
+    public BigDecimal getCategory9() {
+        return category9;
+    }
+
+    public void setCategory9(BigDecimal category9) {
+        this.category9 = category9;
+    }
+
+    public BigDecimal getCategory10() {
+        return category10;
+    }
+
+    public void setCategory10(BigDecimal category10) {
+        this.category10 = category10;
+    }
+
+    public String getOrganName() {
+        return organName;
+    }
+
+    public void setOrganName(String organName) {
+        this.organName = organName;
+    }
+
+    public String getUserOrganName() {
+        return userOrganName;
+    }
+
+    public void setUserOrganName(String userOrganName) {
+        this.userOrganName = userOrganName;
+    }
+
+    public Integer getPayingStatus() {
+        return payingStatus;
+    }
+
+    public void setPayingStatus(Integer payingStatus) {
+        this.payingStatus = payingStatus;
+    }
+
+    public BigDecimal getOrderAmount() {
+        return orderAmount;
+    }
+
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = orderAmount;
+    }
+
+    public String getGoodsNames() {
+        return goodsNames;
+    }
+
+    public void setGoodsNames(String goodsNames) {
+        this.goodsNames = goodsNames;
+    }
+
+    public String getGoodsJson() {
+        return goodsJson;
+    }
+
+    public void setGoodsJson(String goodsJson) {
+        this.goodsJson = goodsJson;
+    }
+}

+ 103 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderRouteDto.java

@@ -0,0 +1,103 @@
+package com.ym.mec.biz.dal.dto;
+
+import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+public class StudentPaymentOrderRouteDto extends StudentPaymentOrder {
+    //汇付手续费
+    @ApiModelProperty(value = "汇付手续费",required = true)
+    private BigDecimal transferFee = BigDecimal.ZERO;
+
+    //平台手续费
+    @ApiModelProperty(value = "平台手续费",required = true)
+    private BigDecimal platformFee = BigDecimal.ZERO;
+
+    //收款账户
+    @ApiModelProperty(value = "收款账户",required = true)
+    private String routeMerNo;
+
+    //分润金额
+    @ApiModelProperty(value = "分润金额",required = true)
+    private BigDecimal routeAmount;
+
+    //分润余额
+    @ApiModelProperty(value = "分润余额",required = true)
+    private BigDecimal routeBalance;
+
+    //分润中的销售费用
+    @ApiModelProperty(value = "分润中的销售费用",required = true)
+    private BigDecimal saleAmount = BigDecimal.ZERO;
+
+    //分润中的服务费用
+    @ApiModelProperty(value = "分润中的服务费用",required = true)
+    private BigDecimal serviceAmount = BigDecimal.ZERO;
+
+    @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;
+    }
+}

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ExportEnum.java

@@ -31,6 +31,7 @@ public enum ExportEnum implements BaseEnum<String, ExportEnum> {
     MUSICAL_LIST_DETAIL_EXPORT("MUSICAL_LIST_DETAIL_EXPORT", "导出学员采购清单明细"),
     QUERY_STUDENT_APPLY_DETAIL_EXPORT("QUERY_STUDENT_APPLY_DETAIL_EXPORT", "学生详情列表导出"),
     COURSE_SCHEDULE_TEACHER_SALARY("COURSE_SCHEDULE_TEACHER_SALARY", "分页导出教师薪酬列表"),
+    MALL_ORDER_LIST("ORDER_LIST", "商城订单列表导出"),
     ORDER_LIST1("ORDER_LIST1", "订单列表导出1"),
     ORDER_LIST2("ORDER_LIST2", "订单列表导出2"),
     ORDER_LIST_SUM("ORDER_LIST_SUM", "订单列表汇总导出"),
@@ -46,6 +47,7 @@ public enum ExportEnum implements BaseEnum<String, ExportEnum> {
     VIP_COURSE_REVIEWS("VIP_COURSE_REVIEWS", "VIP评论列表导出"),
     DEGREE_REGISTRATION("DEGREE_REGISTRATION", "考级报名导出"),
     COOPERATION_ORGAN("COOPERATION_ORGAN", "合作单位导出"),
+    MALL_ROUTE_ORDER_LIST("ROUTE_ORDER_LIST", "商城财务管理导出"),
     ROUTE_ORDER_LIST1("ROUTE_ORDER_LIST1", "财务管理导出1"),
     ROUTE_ORDER_LIST2("ROUTE_ORDER_LIST2", "财务管理导出2"),
     TEACHER_DEFAULT_SALARY("TEACHER_DEFAULT_SALARY", "老师默认课酬导出"),

+ 3 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ExportTypeEnum.java

@@ -15,7 +15,9 @@ public enum ExportTypeEnum implements BaseEnum<Integer, ExportTypeEnum> {
 	MUSIC_GROUP_COURSE_LIST(9, "乐团课表详情导出"),
 	MUSIC_GROUP_DATA_EXPORT(10, "乐团数据导出"),
 	EXPORT_STUDENT_SUBCOURSE(11, "活动资格导出"),
-	EXPORT_TRAINING_STATISTICS(12, "训练统计导出");
+	EXPORT_TRAINING_STATISTICS(12, "训练统计导出"),
+	MALL_ORDER(13, "商城订单列表"),
+	MALL_ROUTE_ORDER(14, "商城财务管理");
 	;
 
 	private Integer code;

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/OrderTypeEnum.java

@@ -1,5 +1,7 @@
 package com.ym.mec.biz.dal.enums;
 
+import org.apache.commons.lang3.StringUtils;
+
 import com.ym.mec.common.enums.BaseEnum;
 
 /**
@@ -63,4 +65,14 @@ public enum OrderTypeEnum implements BaseEnum<String, OrderTypeEnum> {
     public String getCode() {
         return this.code;
     }
+    
+    public static OrderTypeEnum get(String code){
+    	for(OrderTypeEnum e : values()){
+    		if(StringUtils.equals(code, e.code)){
+    			return e;
+    		}
+    	}
+    	
+    	return null;
+    }
 }

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/vo/StudentPaymentOrderVo.java

@@ -1,8 +1,10 @@
 package com.ym.mec.biz.dal.vo;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
 import com.ym.mec.biz.dal.enums.OrderTypeEnum;
+
 import org.apache.commons.lang3.StringUtils;
 
 import java.math.BigDecimal;
@@ -21,6 +23,11 @@ public class StudentPaymentOrderVo {
      * 订单编号
      */
     private String orderNo;
+    
+    private DealStatusEnum status;
+    
+    private String memo;
+    
     /**
      * 订单类型
      */
@@ -179,4 +186,20 @@ public class StudentPaymentOrderVo {
     public void setTransNo(String transNo) {
         this.transNo = transNo;
     }
+
+	public DealStatusEnum getStatus() {
+		return status;
+	}
+
+	public void setStatus(DealStatusEnum status) {
+		this.status = status;
+	}
+
+	public String getMemo() {
+		return memo;
+	}
+
+	public void setMemo(String memo) {
+		this.memo = memo;
+	}
 }

+ 7 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/ContractService.java

@@ -8,6 +8,7 @@ import com.ym.mec.biz.dal.dto.OAFinancialDto;
 import com.ym.mec.biz.dal.entity.SysUserTsign;
 import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 
 public interface ContractService {
 
@@ -43,7 +44,7 @@ public interface ContractService {
 	 * @param musicGroupId
 	 * @return
 	 */
-	boolean transferMusicGroupCoursesContract(Integer userId, String musicGroupId);
+	boolean transferMusicGroupCoursesContract(Integer userId, String musicGroupId, OrderTypeEnum orderType);
 
 	/**
 	 * 查询乐团课程协议
@@ -59,7 +60,7 @@ public interface ContractService {
 	 * @param vipGroupId
 	 * @return
 	 */
-	boolean transferVipGroupCoursesContract(Integer userId, Long vipGroupId);
+	boolean transferVipGroupCoursesContract(Integer userId, Long vipGroupId, OrderTypeEnum orderType);
 
 	/**
 	 * 查询VIP课程协议
@@ -77,7 +78,7 @@ public interface ContractService {
 	 * @param kitGroupPurchaseTypeEnum
 	 * @return
 	 */
-	boolean transferGoodsContract(Integer userId, String musicGroupId, String goodsIds, KitGroupPurchaseTypeEnum kitGroupPurchaseTypeEnum);
+	boolean transferGoodsContract(Integer userId, String musicGroupId, String goodsIds, OrderTypeEnum orderType);
 
 	/**
 	 * 查询商品协议
@@ -109,21 +110,21 @@ public interface ContractService {
 	 * @param fee
 	 * @return
 	 */
-	boolean transferPracticeCoursesContract(Integer userId, int courseSectionNum, Date startDate, Date endDate, BigDecimal fee);
+	boolean transferPracticeCoursesContract(Integer userId, int courseSectionNum, Date startDate, Date endDate, BigDecimal fee, OrderTypeEnum orderType);
 
 	/**
 	 * 传递产品协议
 	 * @param userId
 	 * @return
 	 */
-	void transferProduceContract(Integer userId, String musicGroupId, CourseViewTypeEnum courseViewType);
+	void transferProduceContract(Integer userId, String musicGroupId, OrderTypeEnum orderType);
 
 	/**
 	 * 查询产品协议
 	 * @param userId
 	 * @return
 	 */
-	Map<String, Object> queryProductContract(Integer userId,String musicGroupId, CourseViewTypeEnum courseViewType);
+	Map<String, Object> queryProductContract(Integer userId,String musicGroupId, OrderTypeEnum orderType);
 
 
 	/**

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/ExportService.java

@@ -256,6 +256,7 @@ public interface ExportService {
 
     //财务管理导出
     HttpResponseResult routeOrderList(Map<String, Object> info);
+    HttpResponseResult routeMallOrderList(Map<String, Object> info);
 
     //学员小课记录导出
     HttpResponseResult exportStudentVipPractice(Map<String, Object> info);
@@ -275,17 +276,22 @@ public interface ExportService {
     //订单列表导出
     HttpResponseResult orderList(Map<String, Object> info);
 
+    HttpResponseResult mallOrderList(Map<String, Object> info);
+
     //订单列表汇总导出
     HttpResponseResult orderListSum(Map<String, Object> info);
 
     //保存下载记录
     ManagerDownload saveManagerDownload(ExportTypeEnum exportTypeEnum, Integer userId);
 
+    void mallOrderList(Map<String, Object> params, ManagerDownload managerDownload);
+
     void orderList(Map<String, Object> params, ManagerDownload managerDownload);
 
     void orderListSum(Map<String, Object> params, ManagerDownload managerDownload);
 
     void routeOrderList(Map<String, Object> params, ManagerDownload managerDownload);
+    void mallRouteOrderList(Map<String, Object> params, ManagerDownload managerDownload);
 
     void superFindCourseSchedules(EndCourseScheduleQueryInfo queryInfo, ManagerDownload managerDownload);
 

+ 1 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/StudentPaymentOrderService.java

@@ -1,10 +1,7 @@
 package com.ym.mec.biz.service;
 
 import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
-import com.ym.mec.biz.dal.dto.PageInfoOrder;
-import com.ym.mec.biz.dal.dto.SporadicChargeInfoDto;
-import com.ym.mec.biz.dal.dto.StudentPaymentOrderDto;
-import com.ym.mec.biz.dal.dto.StudentPaymentOrderExportDto;
+import com.ym.mec.biz.dal.dto.*;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ChildrenDayReserveServiceImpl.java

@@ -413,7 +413,7 @@ public class ChildrenDayReserveServiceImpl extends BaseServiceImpl<Integer, Chil
             }
 
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 21 - 31
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ContractServiceImpl.java

@@ -62,6 +62,7 @@ import com.ym.mec.biz.dal.entity.TenantInfo;
 import com.ym.mec.biz.dal.entity.VipGroup;
 import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 import com.ym.mec.biz.service.ContractService;
 import com.ym.mec.biz.service.GoodsService;
 import com.ym.mec.biz.service.MusicGroupService;
@@ -365,9 +366,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
     }
 
     @Override
-    public boolean transferMusicGroupCoursesContract(Integer userId, String musicGroupId) {
+    public boolean transferMusicGroupCoursesContract(Integer userId, String musicGroupId, OrderTypeEnum orderType) {
         if (true) {
-            transferProduceContract(userId, musicGroupId, null);
+            transferProduceContract(userId, musicGroupId, orderType);
             return true;
         }
         SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
@@ -561,9 +562,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
     }
 
     @Override
-    public boolean transferVipGroupCoursesContract(Integer userId, Long vipGroupId) {
+    public boolean transferVipGroupCoursesContract(Integer userId, Long vipGroupId, OrderTypeEnum orderType) {
         if (true) {
-            transferProduceContract(userId, null, null);
+            transferProduceContract(userId, null, orderType);
             return true;
         }
 
@@ -705,9 +706,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
     }
 
     @Override
-    public boolean transferGoodsContract(Integer userId, String musicGroupId, String goodsIds, KitGroupPurchaseTypeEnum kitGroupPurchaseTypeEnum) {
+    public boolean transferGoodsContract(Integer userId, String musicGroupId, String goodsIds, OrderTypeEnum orderType) {
 
-        transferProduceContract(userId, musicGroupId, null);
+        transferProduceContract(userId, musicGroupId, orderType);
         return true;
     }
 
@@ -816,9 +817,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 
     @Override
     @Async
-    public boolean transferPracticeCoursesContract(Integer userId, int courseSectionNum, Date startDate, Date endDate, BigDecimal fee) {
+    public boolean transferPracticeCoursesContract(Integer userId, int courseSectionNum, Date startDate, Date endDate, BigDecimal fee, OrderTypeEnum orderType) {
         if (true) {
-            transferProduceContract(userId, null, null);
+            transferProduceContract(userId, null, orderType);
             return true;
         }
 
@@ -898,7 +899,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
     @Override
     @Async
     @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRES_NEW)
-    public void transferProduceContract(Integer userId, String musicGroupId, CourseViewTypeEnum courseViewType) {
+    public void transferProduceContract(Integer userId, String musicGroupId, OrderTypeEnum orderType) {
         SysUser user = studentDao.lockUserReturnInfo(userId);
 
         if (user == null) {
@@ -943,14 +944,9 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 
         params.put("isShowVisualSeal", false);
 
-        CourseViewTypeEnum ownershipType = CourseViewTypeEnum.COURSE_FEE;
-
         if (StringUtils.isBlank(musicGroupId)) {
             params.put("ownershipType", "OWN");
-            MusicGroup userLastNormalMusicGroup = studentRegistrationDao.getUserLastNormalMusicGroup(userId);
-            if (Objects.nonNull(userLastNormalMusicGroup)) {
-                ownershipType = userLastNormalMusicGroup.getCourseViewType();
-            }
+            //MusicGroup userLastNormalMusicGroup = studentRegistrationDao.getUserLastNormalMusicGroup(userId);
         } else {
             MusicGroup musicGroup = musicGroupService.get(musicGroupId);
             if (musicGroup == null) {
@@ -958,13 +954,8 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
                 return;
             }
             params.put("ownershipType", musicGroup.getOwnershipType().name());
-            ownershipType = musicGroup.getCourseViewType();
         }
 
-        if (Objects.nonNull(courseViewType)) {
-            ownershipType = courseViewType;
-        }
-		
         // 查询最新协议模板
 		TenantContractTemplate tenantContractTemplate = tenantContractTemplateService.queryLatestContractTemplate(user.getTenantId(), null, null);
 		if(tenantContractTemplate == null){
@@ -983,7 +974,10 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
         //如果分部有企业信息,就用分部上的企业信息,否则用机构上的企业信息
         String companyName = null;
         TenantInfo tenantInfo = tenantInfoService.get(studentInfo.getTenantId());;
-        Organization organizationDto = organizationService.get(user.getOrganId());
+        Organization organizationDto = null;
+        if(orderType != OrderTypeEnum.PRACTICE_GROUP_BUY && orderType != OrderTypeEnum.PRACTICE_GROUP_RENEW && orderType != OrderTypeEnum.SMALL_CLASS_TO_BUY){
+        	organizationDto = organizationService.get(studentInfo.getOrganId());
+        }
 		if (organizationDto == null || StringUtils.isBlank(organizationDto.getCorporateName()) || StringUtils.isBlank(organizationDto.getCorporateCode())) {
 			companyName = tenantInfo.getTsignName();
 		} else {
@@ -1011,7 +1005,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
             return;
         }
 
-        String organCode = StringUtils.isEmpty(organizationDto.getCorporateCode()) ? tenantInfo.getTsignCode() : organizationDto.getCorporateCode();
+        String organCode = StringUtils.equals(companyName, tenantInfo.getTsignName()) ? tenantInfo.getTsignCode() : organizationDto.getCorporateCode();
         
 		if (user.getTenantId() == 1) {
 			if (!OwnershipType.OWN.name().equals(params.get("ownershipType"))) {
@@ -1049,7 +1043,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 
     @Override
     @Transactional(isolation = Isolation.READ_COMMITTED)
-    public Map<String, Object> queryProductContract(Integer userId, String musicGroupId, CourseViewTypeEnum courseViewType) {
+    public Map<String, Object> queryProductContract(Integer userId, String musicGroupId, OrderTypeEnum orderType) {
         // 合成freemarker
         String srcPdfPath = contractBaseDir + "/product/" + userId + ".pdf";
 
@@ -1077,14 +1071,12 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
 
         Map<String, Object> result = new HashMap<>();
         result.put("courseViewType", CourseViewTypeEnum.COURSE_FEE);
-        CourseViewTypeEnum ownershipType = CourseViewTypeEnum.COURSE_FEE;
 		
         if (StringUtils.isBlank(musicGroupId)) {
             params.put("ownershipType", "OWN");
             MusicGroup userLastNormalMusicGroup = studentRegistrationDao.getUserLastNormalMusicGroup(userId);
             if (Objects.nonNull(userLastNormalMusicGroup)) {
                 result.put("courseViewType", userLastNormalMusicGroup.getCourseViewType());
-                ownershipType = userLastNormalMusicGroup.getCourseViewType();
             }
         } else {
             MusicGroup musicGroup = musicGroupService.get(musicGroupId);
@@ -1093,17 +1085,15 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
             }
             params.put("ownershipType", musicGroup.getOwnershipType().name());
             result.put("courseViewType", musicGroup.getCourseViewType());
-            ownershipType = musicGroup.getCourseViewType();
         }
 
-        if (Objects.nonNull(courseViewType)) {
-            ownershipType = courseViewType;
-        }
-        
         //如果分部有企业信息,就用分部上的企业信息,否则用机构上的企业信息
         String companyName = null, sealPicture = null;
         TenantInfo tenantInfo = null;
-        Organization organizationDto = organizationService.get(studentInfo.getOrganId());
+        Organization organizationDto = null;
+        if(orderType != OrderTypeEnum.PRACTICE_GROUP_BUY && orderType != OrderTypeEnum.PRACTICE_GROUP_RENEW && orderType != OrderTypeEnum.SMALL_CLASS_TO_BUY){
+        	organizationDto = organizationService.get(studentInfo.getOrganId());
+        }
 		if (organizationDto == null || StringUtils.isBlank(organizationDto.getCorporateName()) || StringUtils.isBlank(organizationDto.getCorporateCode())) {
 
 			tenantInfo = tenantInfoService.get(studentInfo.getTenantId());

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/EduPracticeGroupServiceImpl.java

@@ -944,7 +944,7 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
         practiceGroupDao.update(practiceGroup);
 
         try {
-            contractService.transferPracticeCoursesContract(order.getUserId(),classGroup.getTotalClassTimes(),practiceGroup.getCoursesStartDate(),practiceGroup.getCoursesExpireDate(),order.getExpectAmount());
+            contractService.transferPracticeCoursesContract(order.getUserId(),classGroup.getTotalClassTimes(),practiceGroup.getCoursesStartDate(),practiceGroup.getCoursesExpireDate(),order.getExpectAmount(),order.getType());
         } catch (Exception e) {
             LOGGER.error(MessageFormatter.arrayFormat("网管课[{}]购买协议错误:{}",order.getMusicGroupId(),e.getMessage()),e);
         }

+ 189 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

@@ -38,6 +38,7 @@ import org.springframework.util.CollectionUtils;
 import javax.annotation.PostConstruct;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
+import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.util.*;
 import java.util.concurrent.CompletableFuture;
@@ -354,8 +355,10 @@ public class ExportServiceImpl implements ExportService {
         //导出到报表中心
 //        exportManageFuncMap.put(ExportEnum.SUPER_FIND_COURSE_SCHEDULES, (info,headColumns) -> this.superFindCourseSchedules(info,headColumns));
         //针对不同的用户有不同的模板
+        exportManageFuncMap.put(ExportEnum.MALL_ROUTE_ORDER_LIST, (info) -> routeMallOrderList(info));
         exportManageFuncMap.put(ExportEnum.ROUTE_ORDER_LIST1, (info) -> routeOrderList(info));
         exportManageFuncMap.put(ExportEnum.ROUTE_ORDER_LIST2, (info) -> routeOrderList(info));
+        exportManageFuncMap.put(ExportEnum.MALL_ORDER_LIST, (info) -> mallOrderList(info));
         exportManageFuncMap.put(ExportEnum.ORDER_LIST1, (info) -> orderList(info));
         exportManageFuncMap.put(ExportEnum.ORDER_LIST2, (info) -> orderList(info));
         exportManageFuncMap.put(ExportEnum.ORDER_LIST_SUM, (info) -> orderListSum(info));
@@ -1425,6 +1428,7 @@ public class ExportServiceImpl implements ExportService {
         queryInfo.setOrderType("3");
         Map<String, Object> params = new HashMap<>();
         MapUtil.populateMap(params, queryInfo);
+        params.put("noGroupType","MALL_SELL");
         int count = studentPaymentRouteOrderDao.queryCount(params);
         if (count <= 0) {
             return BaseController.failed("没有可导出的数据");
@@ -1437,6 +1441,36 @@ public class ExportServiceImpl implements ExportService {
                 managerDownload.getName());
     }
 
+    //财务管理导出
+    @Override
+    public HttpResponseResult routeMallOrderList(Map<String, Object> info) {
+        StudentPaymentOrderQueryInfo queryInfo = JSONObject.parseObject(JSONObject.toJSONString(info), StudentPaymentOrderQueryInfo.class);
+        SysUser sysUser = sysUserService.getUser();
+        queryInfo.setRoutingOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getRoutingOrganId(), sysUser.getIsSuperAdmin()));
+        if (StringUtils.isNotBlank(queryInfo.getSearch())) {
+            List<BasicUserDto> users = studentPaymentOrderDao.getUsers(queryInfo.getSearch());
+            List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());
+            if (userIds.size() <= 0) {
+                userIds.add(0);
+            }
+            queryInfo.setUserIds(userIds);
+        }
+        queryInfo.setOrderType("3");
+        Map<String, Object> params = new HashMap<>();
+        MapUtil.populateMap(params, queryInfo);
+        params.put("paymentType","MALL_BUY");
+        int count = studentPaymentRouteOrderDao.queryCount(params);
+        if (count <= 0) {
+            return BaseController.failed("没有可导出的数据");
+        }
+        if (count > 50000) {
+            return BaseController.failed("数据集太大,不能导出.最大数据集不能超过50000");
+        }
+        ManagerDownload managerDownload = saveManagerDownload(ExportTypeEnum.MALL_ROUTE_ORDER, sysUser.getId());
+        return this.asyncExport(() -> this.mallRouteOrderList(params, managerDownload),
+                managerDownload.getName());
+    }
+
     //学员小课记录导出
     @Override
     public HttpResponseResult exportStudentVipPractice(Map<String, Object> info) {
@@ -1567,6 +1601,34 @@ public class ExportServiceImpl implements ExportService {
         return this.asyncExport(() -> this.orderList(params, managerDownload),
                 managerDownload.getName());
     }
+    //订单列表导出
+    @Override
+    public HttpResponseResult mallOrderList(Map<String, Object> info) {
+        StudentPaymentOrderQueryInfo queryInfo = JSONObject.parseObject(JSONObject.toJSONString(info), StudentPaymentOrderQueryInfo.class);
+        SysUser sysUser = sysUserService.getUser();
+        queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(), queryInfo.getOrganId(), sysUser.getIsSuperAdmin()));
+        if (StringUtils.isNotBlank(queryInfo.getSearch())) {
+            List<BasicUserDto> users = studentPaymentOrderDao.getUsers(queryInfo.getSearch());
+            List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());
+            if (userIds.size() <= 0) {
+                userIds.add(0);
+            }
+            queryInfo.setUserIds(userIds);
+        }
+        Map<String, Object> params = new HashMap<>();
+        MapUtil.populateMap(params, queryInfo);
+        params.put("paymentType","MALL_BUY");
+        int count = studentPaymentOrderDao.queryCount(params);
+        if (count <= 0) {
+            return BaseController.failed("没有可导出的数据");
+        }
+        if (count > 50000) {
+            return BaseController.failed("数据集太大,不能导出.最大数据集不能超过50000");
+        }
+        ManagerDownload managerDownload = saveManagerDownload(ExportTypeEnum.MALL_ORDER, sysUser.getId());
+        return this.asyncExport(() -> this.mallOrderList(params, managerDownload),
+                managerDownload.getName());
+    }
 
     //订单列表导出
     @Override
@@ -1624,7 +1686,81 @@ public class ExportServiceImpl implements ExportService {
         return BigDecimal.ZERO;
     }
 
-
+    @Override
+    public void mallOrderList(Map<String, Object> params, ManagerDownload managerDownload){
+        List<StudentPaymentOrderMallExportDto> studentPaymentOrderExportDtos = studentPaymentOrderDao.exportMallQueryPage(params);
+        long i = 1;
+        //获取机构费率
+        Integer tenantId = (Integer) params.get("tenantId");
+        TenantConfig tenantConfig = tenantConfigService.queryByTenantId(tenantId);
+        //获取商城订单商品信息
+        List<String> goodsJsonList = studentPaymentOrderExportDtos.stream().map(e -> e.getGoodsJson()).collect(Collectors.toList());
+        goodsJsonList.removeAll(Collections.singleton(null));
+        Set<String> productIdList = new HashSet<>();
+        for (String goodsJson : goodsJsonList) {
+            List<JSONObject> orderItemList = JSONObject.parseArray(JSONObject.parseObject(goodsJson).getString("orderItemList"), JSONObject.class);
+            productIdList.addAll(orderItemList.stream().map(e -> e.get("productId").toString()).collect(Collectors.toSet()));
+        }
+        List<String> categoryNames = sellOrderDao.getMallProductCategory("mall_dev");
+        Map<Long,String> productCategoryMap = MapUtil.convertMybatisMap(sellOrderDao.getMallProductMap(productIdList,"mall_dev"));
+        for (StudentPaymentOrderMallExportDto row : studentPaymentOrderExportDtos) {
+            if (row.getActualAmount() == null) {
+                row.setActualAmount(BigDecimal.ZERO);
+            }
+            if (row.getBalancePaymentAmount() == null) {
+                row.setBalancePaymentAmount(BigDecimal.ZERO);
+            }
+            BigDecimal transferFee = BigDecimal.ZERO;
+            if (row.getPaymentChannel() != null && row.getPaymentChannel().equals("ADAPAY")) {
+                transferFee = row.getActualAmount().multiply(new BigDecimal("0.28")).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP);
+            }
+            row.setTransferFee(transferFee);
+            row.setPlatformFee(row.getActualAmount().multiply(tenantConfig.getChargeRate()).divide(new BigDecimal(1000), 2, BigDecimal.ROUND_HALF_UP));
+            if(StringUtils.isNotEmpty(row.getGoodsJson())){
+                List<JSONObject> orderItemList = JSONObject.parseArray(JSONObject.parseObject(row.getGoodsJson()).getString("orderItemList"), JSONObject.class);
+                for (JSONObject json : orderItemList) {
+                    try {
+                        String category = productCategoryMap.get(Long.parseLong(json.get("productId").toString()));
+                        BigDecimal realAmount = new BigDecimal(json.get("realAmount").toString());
+                        int index = categoryNames.indexOf(category) + 1;
+                        if(index == 0){
+                            continue;
+                        }
+                        Method method = row.getClass().getMethod("getCategory" + index, null);
+                        BigDecimal invoke = (BigDecimal)method.invoke(row);
+                        invoke = invoke.add(realAmount);
+                        Method method1 = row.getClass().getMethod("setCategory" + index, BigDecimal.class);
+                        method1.invoke(row,invoke);
+                    }catch (Exception e){
+                        e.printStackTrace();
+                    }
+                }
+            }
+            //活动购买的商品列表
+            String paymentChannel = "";
+            if (row.getPaymentChannel() == null) {
+            } else if (row.getPaymentChannel().equals("YQPAY")) {
+                paymentChannel = "双乾";
+            } else if (row.getPaymentChannel().equals("ADAPAY")) {
+                paymentChannel = "汇付";
+            } else if (row.getPaymentChannel().equals("BALANCE")) {
+                paymentChannel = "余额";
+            }
+            row.setPaymentChannel(paymentChannel);
+            row.setId(i);
+            row.setOrderAmount(row.getExpectAmount().add(row.getCouponRemitFee()));
+            i++;
+        }
+        Map<String, String> headMap = getExportMap(new ExportDto(ExportEnum.MALL_ORDER_LIST));
+        for (int j = 0; j < categoryNames.size(); j++) {
+            int num = j + 1;
+            headMap.put(categoryNames.get(j),"category"+ num);
+        }
+        String[] header = headMap.keySet().toArray(new String[headMap.keySet().size()]);
+        String[] body = headMap.values().toArray(new String[headMap.keySet().size()]);
+        HSSFWorkbook workbook = POIUtil.exportExcel(header, body, studentPaymentOrderExportDtos);
+        exportManagerDownload(workbook, managerDownload);
+    }
     @Override
     public void orderList(Map<String, Object> params, ManagerDownload managerDownload) {
         List<StudentPaymentOrderExportDto> studentPaymentOrderExportDtos = studentPaymentOrderService.ExportQueryPage(params);
@@ -2321,6 +2457,57 @@ public class ExportServiceImpl implements ExportService {
         return subtract;
     }
 
+    public void mallRouteOrderList(Map<String, Object> params, ManagerDownload managerDownload) {
+        //获取分润订单(不包含订单详情)(纯余额支付不处理)
+        List<StudentPaymentOrderMallExportDto> studentPaymentOrderExportDtos = studentPaymentRouteOrderDao.exportMallQueryPage(params);
+        if (CollectionUtils.isEmpty(studentPaymentOrderExportDtos)) {
+            return;
+        }
+        //计算手续费
+        Map<String, BigDecimal> serviceChargeMap = new HashMap<>();
+        Map<String, Integer> orderCountMap = new HashMap<>();
+        Integer tenantId = (Integer) params.get("tenantId");
+        TenantConfig tenantConfig = tenantConfigService.queryByTenantId(tenantId);
+        Map<Integer, String> studentNameMap = new HashMap<>();
+        List<Integer> organIds = studentPaymentOrderExportDtos.stream().map(e -> e.getOrganId()).distinct().collect(Collectors.toList());
+        Map<Integer, String> userOrganNameMap = organizationService.getMap("organization","id_","name_",organIds,tenantId,Integer.class,String.class);
+        if (studentPaymentOrderExportDtos.stream().anyMatch(e -> e.getUserId() != null)) {
+            List<Integer> studentIds = studentPaymentOrderExportDtos.stream().filter(e -> e.getUserId() != null).map(e -> e.getUserId()).distinct().collect(Collectors.toList());
+            //获取学员名称
+            studentNameMap = studentService.getMap("sys_user", "id_", "username_", studentIds, tenantId, Integer.class, String.class);
+        }
+
+        //用于计算手续费
+        Map<String, FeeFlagNumDto> feeFlagMap = new HashMap<>();
+        if (studentPaymentOrderExportDtos.stream().anyMatch(e -> Objects.equals(e.getPaymentChannel(), "ADAPAY"))) {
+            List<String> orderNoList = studentPaymentOrderExportDtos.stream().filter(e -> Objects.equals(e.getPaymentChannel(), "ADAPAY")).map(e -> e.getOrderNo()).distinct().collect(Collectors.toList());
+            List<FeeFlagNumDto> feeFlagNumDtos = studentPaymentRouteOrderDao.queryCountFeeFlagNum(orderNoList);
+            feeFlagMap = feeFlagNumDtos.stream().collect(Collectors.toMap(FeeFlagNumDto::getOrderNo, Function.identity()));
+        }
+        for (StudentPaymentOrderMallExportDto basicOrder : studentPaymentOrderExportDtos) {
+            basicOrder.getUser().setUsername(studentNameMap.get(basicOrder.getUserId()));
+            basicOrder.setUserOrganName(userOrganNameMap.get(basicOrder.getOrganId()));
+            //计算手续费
+            this.calcPlatformFee(basicOrder, serviceChargeMap, orderCountMap, tenantConfig, feeFlagMap);
+
+            String paymentChannel = "";
+            if (basicOrder.getPaymentChannel() == null) {
+            } else if (basicOrder.getPaymentChannel().equals("YQPAY")) {
+                paymentChannel = "双乾";
+            } else if (basicOrder.getPaymentChannel().equals("ADAPAY")) {
+                paymentChannel = "汇付";
+            } else if (basicOrder.getPaymentChannel().equals("BALANCE")) {
+                paymentChannel = "余额";
+            }
+            basicOrder.setPaymentChannel(paymentChannel);
+            if (basicOrder.getRouteAmount().compareTo(BigDecimal.ZERO) == 0) {
+                continue;
+            }
+        }
+        HSSFWorkbook workbook = getHSSFWorkbook(studentPaymentOrderExportDtos, ExportEnum.ROUTE_ORDER_LIST1);
+        exportManagerDownload(workbook, managerDownload);
+    }
+
     public void routeOrderList(Map<String, Object> params, ManagerDownload managerDownload) {
         //获取分润订单(不包含订单详情)(纯余额支付不处理)
         List<StudentPaymentOrderExportDto> studentPaymentOrderExportDtos = studentPaymentRouteOrderDao.ExportQueryPage1(params);
@@ -2973,7 +3160,7 @@ public class ExportServiceImpl implements ExportService {
     }
 
     //计算汇付手续费和平台手续费
-    public void calcPlatformFee(StudentPaymentOrderExportDto row, Map<String, BigDecimal> serviceChargeMap,
+    public void calcPlatformFee(StudentPaymentOrderRouteDto row, Map<String, BigDecimal> serviceChargeMap,
                                 Map<String, Integer> orderCountMap, TenantConfig tenantConfig, Map<String, FeeFlagNumDto> feeFlagMap) {
         BigDecimal currentFee = BigDecimal.ZERO;
         if (row.getPaymentChannel() != null && row.getPaymentChannel().equals("ADAPAY")) {

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MemberRankSettingServiceImpl.java

@@ -750,7 +750,7 @@ public class MemberRankSettingServiceImpl extends BaseServiceImpl<Integer, Membe
         // 插入交易明细
         sysUserCashAccountDetailService.saveSysUserCashAccountDetail(studentPaymentOrder, "直播购买云教练");
         try {
-            contractService.transferProduceContract(userId, null,null);
+            contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
         } catch (Exception e) {
             logger.error("产品协议生成失败", e);
         }
@@ -875,7 +875,7 @@ public class MemberRankSettingServiceImpl extends BaseServiceImpl<Integer, Membe
             // 插入交易明细
             sysUserCashAccountDetailService.saveSysUserCashAccountDetail(studentPaymentOrder, "购买会员");
             try {
-                contractService.transferProduceContract(userId, null, CourseViewTypeEnum.MEMBER_FEE);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -3039,7 +3039,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             sysUserCashAccountDetailService.insert(paymentDetail);
 
             try {
-                contractService.transferProduceContract(userId, musicGroupId, null);
+                contractService.transferProduceContract(userId, musicGroupId, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PracticeGroupServiceImpl.java

@@ -3219,7 +3219,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         }
 
         try {
-            contractService.transferPracticeCoursesContract(order.getUserId(), classGroup.getTotalClassTimes(), practiceGroup.getCoursesStartDate(), practiceGroup.getCoursesExpireDate(), order.getExpectAmount());
+            contractService.transferPracticeCoursesContract(order.getUserId(), classGroup.getTotalClassTimes(), practiceGroup.getCoursesStartDate(), practiceGroup.getCoursesExpireDate(), order.getExpectAmount(), order.getType());
         } catch (Exception e) {
             LOGGER.error(MessageFormatter.arrayFormat("网管课[{}]购买协议错误:{}", order.getMusicGroupId(), e.getMessage()), e);
         }
@@ -4383,7 +4383,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
             sysUserCashAccountDetailService.insert(sysUserExpendCashAccountDetail);
 
             try {
-                contractService.transferProduceContract(userId, null, CourseViewTypeEnum.COURSE_FEE);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 LOGGER.error("产品协议生成失败", e);
             }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ReplacementInstrumentActivityServiceImpl.java

@@ -496,7 +496,7 @@ public class ReplacementInstrumentActivityServiceImpl extends BaseServiceImpl<In
             //添加sell_order
             this.addSellOrder(studentPaymentOrder, replacementInstrumentActivity);
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SporadicChargeInfoImpl.java

@@ -79,7 +79,7 @@ public class SporadicChargeInfoImpl extends BaseServiceImpl<Integer, SporadicCha
         map.put(userId, userId.toString());
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentInstrumentServiceImpl.java

@@ -220,7 +220,7 @@ public class StudentInstrumentServiceImpl extends BaseServiceImpl<Long, StudentI
         //支付成功
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 5 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java

@@ -928,12 +928,12 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
         if (payStatus == PayStatus.SUCCESSED) {
             throw new BizException("订单已支付成功,请勿重复支付");
         }
-        if (payStatus == PayStatus.PAYING) {
-            throw new BizException("有一笔支付中的订单,请勿重复支付");
+        if (repeatPay == false && payStatus == PayStatus.PAYING) {
+            return BaseController.failed(HttpStatus.CONTINUE, "您有支付中的订单,是否继续支付");
         }
-        if (!repeatPay) {
+        /*if (!repeatPay) {
             return BaseController.failed(HttpStatus.CONTINUE, "您有待支付的订单,是否继续支付");
-        }
+        }*/
         //处理关闭订单
         order.setStatus(DealStatusEnum.CLOSE);
         order.setMemo("关闭订单");
@@ -1283,7 +1283,7 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
 
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -1386,12 +1386,12 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
             }
             try {
                 //生成课程协议
-                contractService.transferMusicGroupCoursesContract(studentRegistration.getUserId(), studentRegistration.getMusicGroupId());
+                contractService.transferMusicGroupCoursesContract(studentRegistration.getUserId(), studentRegistration.getMusicGroupId(), studentPaymentOrder.getType());
                 // 商品协议(租赁时候有)
                 StudentPaymentOrderDetail applyOrderMusical = studentPaymentOrderDetailService.findApplyOrderMusical(studentPaymentOrder.getId());
                 if (applyOrderMusical != null && applyOrderMusical.getKitGroupPurchaseType() != null && applyOrderMusical.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)) {
                     contractService.transferGoodsContract(studentPaymentOrder.getUserId(), studentPaymentOrder.getMusicGroupId(),
-                            applyOrderMusical.getGoodsIdList(), applyOrderMusical.getKitGroupPurchaseType());
+                            applyOrderMusical.getGoodsIdList(), studentPaymentOrder.getType());
                 }
             } catch (Exception e) {
                 LOGGER.error("协议生成失败", e);

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRepairServiceImpl.java

@@ -1093,7 +1093,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
 
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }
@@ -1462,7 +1462,7 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
 
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             try {
-                contractService.transferProduceContract(userId, null, null);
+                contractService.transferProduceContract(userId, null, studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectChangeServiceImpl.java

@@ -999,7 +999,7 @@ public class SubjectChangeServiceImpl extends BaseServiceImpl<Integer, SubjectCh
 
         if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
             try {
-                contractService.transferProduceContract(userId, subjectChange.getMusicGroupId(), null);
+                contractService.transferProduceContract(userId, subjectChange.getMusicGroupId(), studentPaymentOrder.getType());
             } catch (Exception e) {
                 logger.error("产品协议生成失败", e);
             }

+ 16 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupActivityServiceImpl.java

@@ -22,8 +22,13 @@ import com.ym.mec.common.tenant.TenantContextHolder;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
+import com.ym.mec.util.string.MessageFormatter;
+
 import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
@@ -40,6 +45,8 @@ import static java.math.BigDecimal.ZERO;
 
 @Service
 public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGroupActivity>  implements VipGroupActivityService {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(VipGroupActivityServiceImpl.class);
 	
 	@Autowired
 	private VipGroupActivityDao vipGroupActivityDao;
@@ -85,6 +92,9 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 	private LuckDrawCountService luckDrawCountService;
 	@Autowired
 	private TempBuyDoubleElevenUserLogDao tempBuyDoubleElevenUserLogDao;
+    @Autowired
+    @Lazy
+    private ContractService contractService;
 
 	@Override
 	public BaseDAO<Integer, VipGroupActivity> getDAO() {
@@ -649,6 +659,11 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 			}
 			//保存账户信息
 			sysUserCashAccountDetailService.saveSysUserCashAccountDetail(studentPaymentOrder,studentPaymentOrder.getMemo());
+            try {
+                contractService.transferVipGroupCoursesContract(studentPaymentOrder.getUserId(), null, studentPaymentOrder.getType());
+            } catch (Exception e) {
+                LOGGER.error(MessageFormatter.arrayFormat("小课活动[{}]购买协议错误:{}", studentPaymentOrder.getActivityId(), e.getMessage()), e);
+            }
 			//发送短信
 			this.sendSuccessMsg(studentPaymentOrder);
 		}else {
@@ -792,7 +807,7 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 				studentPaymentOrder.getActualAmount(),
 				studentPaymentOrder.getBalancePaymentAmount(),
 				orderNo,
-				baseApiUrl + "/api-student/studentOrder/notify",
+				baseApiUrl + "/api-student/studentOrder/callback",
 				baseApiUrl + "/api-student/studentOrder/paymentResult?orderNo=" + orderNo,
 				orderSubject,
 				orderSubject,

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -2484,7 +2484,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
                 vipGroup.setOrganIdList(organIdsString);
                 vipGroupDao.update(vipGroup);
                 try {
-                    contractService.transferVipGroupCoursesContract(userId, vipGroup.getId());
+                    contractService.transferVipGroupCoursesContract(userId, vipGroup.getId(), order.getType());
                 } catch (Exception e) {
                     LOGGER.error(MessageFormatter.arrayFormat("小课[{}]购买协议错误:{}", vipGroup.getId(), e.getMessage()), e);
                 }

+ 12 - 0
mec-biz/src/main/resources/config/mybatis/SellOrderMapper.xml

@@ -657,5 +657,17 @@
             #{orderId}
         </foreach>
     </select>
+    <select id="getMallProductMap" resultType="java.util.Map">
+        select pp.id 'key',ppc.name 'value' from mall_dev.pms_product_category ppc
+        left join mall_dev.pms_product_category ppcc ON ppcc.parent_id = ppc.id
+        left join mall_dev.pms_product pp ON pp.product_category_id = ppcc.id
+        where pp.id IN
+        <foreach collection="productIdList" item="id" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+    </select>
+    <select id="getMallProductCategory" resultType="java.lang.String">
+        select name from mall_dev.pms_product_category where parent_id = 0
+    </select>
 
 </mapper>

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

@@ -334,6 +334,75 @@
         <include refid="queryPaymentOrder"/>
     </select>
 
+    <sql id="queryPaymentMallOrder">
+        <where>
+        	spo.tenant_id_ = #{tenantId}
+            <if test="userIds != null">
+                AND spo.user_id_ IN
+                <foreach collection="userIds" item="userId" open="(" close=")" separator=",">
+                    #{userId}
+                </foreach>
+            </if>
+            <if test="organId != null">
+                AND FIND_IN_SET(spo.organ_id_,#{organId})
+            </if>
+            <if test="orderStartDate != null">
+                AND DATE_FORMAT(spo.create_time_,'%Y-%m-%d') &gt;= #{orderStartDate}
+            </if>
+            <if test="orderEndDate != null">
+                AND DATE_FORMAT(spo.create_time_,'%Y-%m-%d') &lt;= #{orderEndDate}
+            </if>
+            <if test="notGroupType != null and notGroupType != ''">
+                AND spo.group_type_ != #{notGroupType}
+            </if>
+            <if test="paymentType != null">
+                AND spo.type_ = #{paymentType}
+            </if>
+            <if test="remark != null">
+                AND spo.memo_ LIKE CONCAT('%',#{remark},'%')
+            </if>
+            <if test="studentId != null">
+                AND spo.user_id_ = #{studentId}
+            </if>
+            <if test="paymentStatus != null">
+                AND spo.status_ = #{paymentStatus}
+            </if>
+            <if test="paymentChannel != null">
+                AND spo.payment_channel_ NOT IN (#{paymentChannel})
+            </if>
+            <if test='orderType != null and orderType.toString()=="1".toString()'>
+                AND spo.com_amount_ > 0
+            </if>
+            <if test='orderType != null and orderType.toString()=="2".toString()'>
+                AND spo.per_amount_ > 0
+            </if>
+            <if test="routingOrganId != null">
+                AND FIND_IN_SET(spo.routing_organ_id_,#{routingOrganId})
+            </if>
+            <if test="actualAmount != null">
+                AND spo.actual_amount_ >= #{actualAmount}
+            </if>
+
+            <if test="balancePaymentAmount != null">
+                AND spo.balance_payment_amount_ >= #{balancePaymentAmount}
+            </if>
+            <if test="lessActualAmount != null">
+                <![CDATA[ AND spo.actual_amount_ <= #{lessActualAmount}]]>
+            </if>
+            <if test="lessBalancePaymentAmount != null">
+                <![CDATA[AND spo.balance_payment_amount_ <= #{lessBalancePaymentAmount}]]>
+            </if>
+            <if test="orderNo != null">
+                AND (spo.id_ = #{orderNo} OR spo.order_no_ = #{orderNo})
+            </if>
+            <if test="merNos != null">
+                AND FIND_IN_SET(#{merNos},spo.mer_nos_)
+            </if>
+            <if test="transNo != null">
+                AND spo.trans_no_ = #{transNo}
+            </if>
+        </where>
+    </sql>
     <sql id="queryPaymentOrder">
         <where>
         	spo.tenant_id_ = #{tenantId}
@@ -582,6 +651,19 @@
         </foreach>
     </select>
 
+    <resultMap type="com.ym.mec.biz.dal.dto.StudentPaymentOrderMallExportDto" id="mallOrderAndDetail"
+               extends="StudentPaymentOrder">
+        <result column="organ_name" property="organName"/>
+        <result column="username_" property="user.username"/>
+        <result column="routeMerNo" property="routeMerNo"/>
+        <result column="routeAmount" property="routeAmount"/>
+        <result column="routeBalance" property="routeBalance"/>
+        <result column="sale_amount_" property="saleAmount"/>
+        <result column="service_amount_" property="serviceAmount"/>
+        <result column="service_fee_" property="serviceFee"/>
+        <result column="routeBalance" property="routeBalance"/>
+        <result column="orderAmount" property="orderAmount"/>
+    </resultMap>
     <resultMap type="com.ym.mec.biz.dal.dto.StudentPaymentOrderExportDto" id="orderAndDetail"
                extends="StudentPaymentOrder">
         <result column="organ_name" property="organName"/>
@@ -611,6 +693,27 @@
     </resultMap>
 
     <!-- 分页查询 -->
+    <select id="exportMallQueryPage" resultMap="mallOrderAndDetail" parameterType="map">
+        SELECT spo.*,u.username_,o.name_ organ_name,sgs.goods_json_
+        FROM student_payment_order spo
+        left join student_goods_sell sgs ON sgs.order_no_ = spo.order_no_
+        LEFT JOIN sys_user u on spo.user_id_ = u.id_
+        <if test='orderType != null and orderType.toString()=="0".toString()'>
+            LEFT JOIN organization o on spo.organ_id_ = o.id_
+        </if>
+        <if test='orderType != null and orderType.toString()=="1".toString()'>
+            LEFT JOIN organization o on spo.organ_id_ = o.id_
+        </if>
+        <if test='orderType != null and orderType.toString()=="2".toString()'>
+            LEFT JOIN organization o on spo.organ_id_ = o.id_
+        </if>
+        <if test='orderType != null and orderType.toString()=="3".toString()'>
+            LEFT JOIN organization o on spo.routing_organ_id_ = o.id_
+        </if>
+        <include refid="queryPaymentMallOrder"/>
+        ORDER BY spo.id_ ASC
+    </select>
+    <!-- 分页查询 -->
     <select id="ExportQueryPage" resultMap="orderAndDetail" parameterType="map">
         SELECT spo.*,u.username_,spod.id_ detail_id_,spod.type_ detail_type_,spod.price_
         detail_price_,spod.kit_group_purchase_type_ detail_kit_group_purchase_type_,
@@ -1005,6 +1108,8 @@
 
     <resultMap type="com.ym.mec.biz.dal.vo.StudentPaymentOrderVo" id="QueryOrderDetail">
         <result column="orderNo" property="orderNo"/>
+        <result column="memo_" property="memo"/>
+        <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="orderType" property="orderType"/>
         <result column="orderTypeCode" property="orderTypeCode"/>
         <result column="totalAmount" property="totalAmount"/>
@@ -1024,20 +1129,24 @@
     <select id="queryStudentOrderPage" resultMap="QueryOrderDetail">
         select
             a.order_no_ as orderNo,
+            a.status_ ,a.memo_,
             a.type_                            as orderType,
             a.type_                            as orderTypeCode,
             ifnull(a.actual_amount_, 0) + ifnull(a.balance_payment_amount_, 0) as totalAmount,
             a.create_time_ as createTime
         from student_payment_order as a
-        where  status_ = 'SUCCESS'
-          and create_time_ >= #{param.startDate}
+        where  create_time_ >= #{param.startDate}
           and create_time_   <![CDATA[ < ]]> #{param.endDate}
           and user_id_ = #{param.userId}
+          <if test="param.status != null">
+          and status_ = #{param.status}
+          </if>
     </select>
 
     <select id="queryOrderDetail" resultMap="QueryOrderDetail">
         select
                a.order_no_ as orderNo,
+               a.status_ ,a.memo_,
                a.type_                            as orderType,
                ifnull(a.actual_amount_, 0) + ifnull(a.balance_payment_amount_, 0) + ifnull(a.remit_fee_, 0) +
                ifnull(a.coupon_remit_fee_, 0)     as totalAmount,

+ 24 - 0
mec-biz/src/main/resources/config/mybatis/StudentPaymentRouteOrderMapper.xml

@@ -211,6 +211,9 @@ calender_id_,create_time_,create_by_,update_time_,update_by_,tenant_id_,type_
             <if test="orderEndDate != null">
                 AND DATE_FORMAT(spo.create_time_,'%Y-%m-%d') &lt;= #{orderEndDate}
             </if>
+            <if test="noGroupType != null and noGroupType != ''">
+                AND spo.group_type_ != #{noGroupType}
+            </if>
             <if test="paymentType != null">
                 AND spo.type_ = #{paymentType}
             </if>
@@ -307,6 +310,27 @@ calender_id_,create_time_,create_by_,update_time_,update_by_,tenant_id_,type_
         GROUP BY spro.order_no_,spro.mer_no_
         ORDER BY spro.id_
     </select>
+    <select id="exportMallQueryPage" resultMap="com.ym.mec.biz.dal.dao.StudentPaymentOrderDao.mallOrderAndDetail"
+            parameterType="map">
+        SELECT spo.*,
+        SUM(spro.route_amount_) routeAmount,
+        SUM(spro.route_balance_amount_) routeBalance,
+        SUM(spro.sale_amount_) sale_amount_,
+        SUM(spro.service_amount_) service_amount_,
+        SUM(spro.service_fee_) service_fee_,
+        spro.mer_no_ routeMerNo,
+        spro.fee_flag_ feeFlag,
+        sci.charge_type_,
+        spo.expect_amount_ + spo.coupon_remit_fee_ orderAmount,
+        o.name_ organ_name
+        FROM student_payment_route_order spro
+        LEFT JOIN student_payment_order spo ON spo.order_no_ = spro.order_no_
+        LEFT JOIN sporadic_charge_info sci ON spo.music_group_id_ = sci.id_
+        LEFT JOIN organization o on spro.route_organ_id_ = o.id_
+        <include refid="queryPaymentOrder"/>
+        GROUP BY spro.order_no_,spro.mer_no_
+        ORDER BY spro.id_
+    </select>
 
 
 

+ 4 - 2
mec-student/src/main/java/com/ym/mec/student/controller/ContractsController.java

@@ -20,6 +20,7 @@ import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.entity.SysUserContracts;
 import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 import com.ym.mec.biz.service.ContractService;
 import com.ym.mec.biz.service.SysUserContractsService;
 import com.ym.mec.common.controller.BaseController;
@@ -91,7 +92,7 @@ public class ContractsController extends BaseController {
 
 	@ApiOperation("查询产品协议")
 	@GetMapping(value = "queryProduceContract")
-	public Object queryProduceContract(Integer userId, String musicGroupId, CourseViewTypeEnum courseViewType) {
+	public Object queryProduceContract(Integer userId, String musicGroupId, String orderType) {
 		if(Objects.isNull(userId)){
 			SysUser sysUser = sysUserFeignService.queryUserInfo();
 			if (sysUser == null) {
@@ -99,7 +100,8 @@ public class ContractsController extends BaseController {
 			}
 			userId = sysUser.getId();
 		}
-		return succeed(contractService.queryProductContract(userId,musicGroupId, courseViewType));
+		OrderTypeEnum type = OrderTypeEnum.get(orderType);
+		return succeed(contractService.queryProductContract(userId,musicGroupId, type));
 	}
 
 	@ApiOperation(value = "查询学生最新协议")

+ 5 - 2
mec-teacher/src/main/java/com/ym/mec/teacher/controller/EduContractsController.java

@@ -3,10 +3,13 @@ package com.ym.mec.teacher.controller;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 import com.ym.mec.biz.service.ContractService;
 import com.ym.mec.common.controller.BaseController;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -30,7 +33,7 @@ public class EduContractsController extends BaseController {
 
     @ApiOperation("查询产品协议")
     @GetMapping(value = "queryProduceContract")
-    public Object queryProduceContract(Integer userId, String musicGroupId, CourseViewTypeEnum courseViewType) {
+    public Object queryProduceContract(Integer userId, String musicGroupId, String orderType) {
         if(Objects.isNull(userId)){
             SysUser sysUser = sysUserFeignService.queryUserInfo();
             if (sysUser == null) {
@@ -38,6 +41,6 @@ public class EduContractsController extends BaseController {
             }
             userId = sysUser.getId();
         }
-        return succeed(contractService.queryProductContract(userId,musicGroupId, courseViewType));
+        return succeed(contractService.queryProductContract(userId,musicGroupId, OrderTypeEnum.get(orderType)));
     }
 }

+ 2 - 1
mec-web/src/main/java/com/ym/mec/web/config/ResourceServerConfig.java

@@ -37,7 +37,8 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
                         "/replacementInstrumentActivity/queryReplacementsStat", "/eduStudentRegistration/queryPreApplyList",
                         "/eduSubject/findSubSubjects", "/eduFinancialExpenditure/batchAdd", "/eduSendNotice/*",
                         "/oaContracts/*", "/eduStudent/organStudentOverView", "/activity/countCloudTeacherActive",
-                        "/activity/organDoubleEleven2021Statis", "/activity/doubleEleven2021Statis", "/activity/organDoubleEleven2022Statis", "/activity/doubleEleven2022Statis",
+                        "/activity/organDoubleEleven2021Statis", "/activity/doubleEleven2021Statis",
+                        "/activity/organDoubleEleven2022Statis", "/activity/doubleEleven2022Statis","/activity/organDoubleEleven2022Statis1", "/activity/doubleEleven2022Statis1",
                         "/questionnaireTopic/getDetail", "/questionnaireUserResult/add",
                         "/tenantInfo/info/*", "/tenantInfo/checkInfo/*", "/tenantInfo/pay/*","/tenantInfo/testCheck", "/tenantInfo/getContract/*",
                         "/tenantPreJoin/add","/imLiveBroadcastRoom/queryRoomInfo","/imLiveBroadcastRoom/test",

+ 5 - 2
mec-web/src/main/java/com/ym/mec/web/controller/education/EduContractsController.java

@@ -3,10 +3,13 @@ package com.ym.mec.web.controller.education;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 import com.ym.mec.biz.service.ContractService;
 import com.ym.mec.common.controller.BaseController;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -30,7 +33,7 @@ public class EduContractsController extends BaseController {
 
     @ApiOperation("查询产品协议")
     @GetMapping(value = "queryProduceContract")
-    public Object queryProduceContract(Integer userId, String musicGroupId, CourseViewTypeEnum courseViewType) {
+    public Object queryProduceContract(Integer userId, String musicGroupId, String orderType) {
         if(Objects.isNull(userId)){
             SysUser sysUser = sysUserFeignService.queryUserInfo();
             if (sysUser == null) {
@@ -38,6 +41,6 @@ public class EduContractsController extends BaseController {
             }
             userId = sysUser.getId();
         }
-        return succeed(contractService.queryProductContract(userId,musicGroupId, courseViewType));
+        return succeed(contractService.queryProductContract(userId,musicGroupId, OrderTypeEnum.get(orderType)));
     }
 }

+ 8 - 0
mec-web/src/main/resources/exportColumnMapper.ini

@@ -110,6 +110,10 @@ fieldColumns = ["studentName", "parentsName", "currentGrade", "currentClass", "g
 headColumns = ["用户编号", "用户名", "手机号", "课程类型", "实际薪水", "补助", "结算时间", "教师角色"]
 fieldColumns = ["userId", "username", "phone", "type.msg", "name", "actualSalary", "subsidy", "settlementTime", "teacherRole.msg"]
 
+[商城订单列表导出]
+headColumns = ["序号", "学生编号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "优惠金额", "汇付手续费","平台手续费", "到账时间", "分部", "商品列表", "备注"]
+fieldColumns = ["id", "userId", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "orderAmount", "expectAmount", "actualAmount","balancePaymentAmount","couponRemitFee", "transferFee", "platformFee", "payTime", "organName", "goodsNames","memo"]
+
 [订单列表导出1]
 headColumns = ["序号", "学生编号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "优惠金额", "课程家长采买","课程学校采买", "VIP课", "网管课", "乐理课", "考级", "维修费用", "乐保费用", "云教练", "押金", "乐器", "教辅费用", "上门费","账户充值", "零售乐器","大件乐器", "其它", "汇付手续费","平台手续费", "到账时间","关联乐团ID/VIP课ID","课程形态","类型","收费乐团编号","收费乐团","零星收款类别", "专业", "分部", "教学点", "合作单位", "乐团主管", "备注"]
 fieldColumns = ["id", "userId", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "orderAmount", "expectAmount", "actualAmount","balancePaymentAmount","couponRemitFee","musicGroupCourseFee","courseSchoolBuyAmount", "vipCourseFee", "practiceCourseFee", "theoryCourseFee", "degreeFee", "repairFee", "maintenanceFee", "cloudTeacherFee","leaseFee", "musicalFee", "teachingFee", "visitFee", "rechargeFee","retailGoodsFee","largeMusicalFee", "otherFee", "transferFee", "platformFee", "payTime", "musicGroupId","groupType.desc","typeDesc","feeMusicGroupId","feeMusicGroupName", "sporadicType", "subjectName", "organName", "schoolName", "cooperationOrganName", "eduTeacher", "memo"]
@@ -170,6 +174,10 @@ fieldColumns = ["name", "gender == 1?'男':'女'", "idcard", "city", "school", "
 headColumns = ["分部", "单位编号", "单位名称", "是否启用","乐团主管","状态栏"]
 fieldColumns = ["organization.name", "id", "name", "isEnable == true ? '是':'否'", "realName", "isEnable == true ? '开启' : '未开启'"]
 
+[商城财务管理导出]
+headColumns = ["序号", "业务分部",  "学生编号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "分润账户", "分润金额", "分配余额", "优惠金额", "汇付手续费", "平台手续费", "到账时间", "分部", "备注"]
+fieldColumns = ["id", "userOrganName", "userId", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "orderAmount", "expectAmount", "actualAmount", "balancePaymentAmount", "routeMerNo", "routeAmount", "routeBalance",  "couponRemitFee", "transferFee", "platformFee", "payTime", "organName", "memo"]
+
 [财务管理导出1]
 headColumns = ["序号", "业务分部",  "学生编号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "分润账户", "分润金额", "分配余额", "优惠金额", "乐团课", "VIP课", "网管课", "乐理课", "考级", "维修费用", "乐保费用", "云教练", "押金", "乐器", "教辅费用", "上门费", "账户充值", "其它", "汇付手续费", "平台手续费", "到账时间", "关联乐团ID/VIP课ID", "课程形态","类型","收费乐团编号","收费乐团", "零星收款类别", "专业", "分部", "教学点", "合作单位", "乐团主管", "备注"]
 fieldColumns = ["id", "userOrganName", "userId", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "orderAmount", "expectAmount", "actualAmount", "balancePaymentAmount", "routeMerNo", "routeAmount", "routeBalance",  "couponRemitFee",     "musicGroupCourseFee", "vipCourseFee", "practiceCourseFee", "theoryCourseFee", "degreeFee", "repairFee", "maintenanceFee", "cloudTeacherFee", "leaseFee", "musicalFee", "teachingFee", "visitFee", "rechargeFee", "otherFee", "transferFee", "platformFee", "payTime", "musicGroupId", "groupType.desc","typeDesc","feeMusicGroupId","feeMusicGroupName", "sporadicType", "subjectName", "organName", "schoolName", "cooperationOrganName", "eduTeacher", "memo"]