Bläddra i källkod

乐器提供方式增加多种提供方式

周箭河 5 år sedan
förälder
incheckning
c04ae7e011

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

@@ -424,6 +424,7 @@
             <result column="detail_id_" property="id"/>
             <result column="detail_type_" property="type"/>
             <result column="detail_price_" property="price"/>
+            <result column="detail_kit_group_purchase_type_" property="kitGroupPurchaseType"/>
         </collection>
         <collection property="goodsList" ofType="com.ym.mec.biz.dal.entity.Goods">
             <result column="goods_id" property="id"/>
@@ -433,8 +434,8 @@
 
     <!-- 分页查询 -->
     <select id="ExportQueryPage" resultMap="orderAndDetail" parameterType="map">
-        SELECT spo.*,u.username_,spod.id_ detail_id_,spod.type_ detail_type_,spod.price_ detail_price_,o.name_ organ_name,
-        sci.charge_type_,g.id_ goods_id, g.name_ goods_name FROM student_payment_order spo
+        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_,
+        o.name_ organ_name,sci.charge_type_,g.id_ goods_id, g.name_ goods_name FROM student_payment_order spo
         LEFT JOIN sys_user u on spo.user_id_ = u.id_
         LEFT JOIN student_payment_order_detail spod on spo.id_ = spod.payment_order_id_
         LEFT JOIN organization o on spo.organ_id_ = o.id_

+ 8 - 2
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -9,6 +9,7 @@ import com.ym.mec.biz.dal.dao.VipGroupDao;
 import com.ym.mec.biz.dal.dto.*;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.GroupType;
+import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
 import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 import com.ym.mec.biz.dal.page.CourseScheduleTeacherSalaryQueryInfo;
@@ -195,12 +196,15 @@ public class ExportController extends BaseController {
             BigDecimal musicalFee = BigDecimal.ZERO;
             BigDecimal teachingFee = BigDecimal.ZERO;
             BigDecimal courseFee = BigDecimal.ZERO;
+            BigDecimal leaseFee = BigDecimal.ZERO;
             String goodsName = "";
             if (row.getOrderDetailList() != null) {
                 for (StudentPaymentOrderDetail orderDetail : row.getOrderDetailList()) {
                     if (orderDetail.getType().equals(OrderDetailTypeEnum.MUSICAL)) {
-                        musicalFee = musicalFee.add(orderDetail.getPrice());
-
+                        musicalFee = orderDetail.getPrice();
+                        if(orderDetail.getKitGroupPurchaseType() != null && orderDetail.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)){
+                            leaseFee = orderDetail.getPrice();
+                        }
                     } else if (orderDetail.getType().equals(OrderDetailTypeEnum.COURSE)) {
                         courseFee = courseFee.add(orderDetail.getPrice());
                     } else if (orderDetail.getType().equals(OrderDetailTypeEnum.ACCESSORIES) || orderDetail.getType().equals(OrderDetailTypeEnum.TEACHING) || orderDetail.getType().equals(OrderDetailTypeEnum.OTHER)) {
@@ -214,6 +218,7 @@ public class ExportController extends BaseController {
             row.setCourseFee(courseFee);
             row.setMusicalFee(musicalFee);
             row.setTeachingFee(teachingFee);
+            row.setLeaseFee(leaseFee);
             row.setMemo(goodsName);
             //专业
             if (row.getGroupType().equals(GroupType.MUSIC)) {
@@ -221,6 +226,7 @@ public class ExportController extends BaseController {
                 if (studentRegistration != null) {
                     row.setSubjectName(studentRegistration.getSubjectName());
                     row.setSchoolName(studentRegistration.getSchoolName());
+                    //更新数据后删除
                     if (row.getType().equals(OrderTypeEnum.APPLY) && studentRegistration.getKitType() != null && studentRegistration.getKitType().equals("LEASE")) {
                         row.setLeaseFee(musicalFee);
                         row.setMusicalFee(BigDecimal.ZERO);