Browse Source

销售列表导出

zouxuan 3 years ago
parent
commit
45640fad79

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderExportDto.java

@@ -92,6 +92,17 @@ public class StudentPaymentOrderExportDto extends StudentPaymentOrder {
 
     private Integer payingStatus;
 
+    //订单金额
+    private BigDecimal orderAmount = BigDecimal.ZERO;
+
+    public BigDecimal getOrderAmount() {
+        return orderAmount;
+    }
+
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = orderAmount;
+    }
+
     public BigDecimal getSporadicAmount() {
         return sporadicAmount;
     }

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SellOrder.java

@@ -206,6 +206,17 @@ public class SellOrder {
     @ApiModelProperty(value="优惠券减免")
     private BigDecimal couponRemitAmount = BigDecimal.ZERO;
 
+    @ApiModelProperty(value="订单金额")
+    private BigDecimal orderAmount = BigDecimal.ZERO;
+
+    public BigDecimal getOrderAmount() {
+        return orderAmount;
+    }
+
+    public void setOrderAmount(BigDecimal orderAmount) {
+        this.orderAmount = orderAmount;
+    }
+
     public BigDecimal getCouponRemitAmount() {
         return couponRemitAmount;
     }

+ 7 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

@@ -308,6 +308,7 @@ public class ExportServiceImpl implements ExportService {
             row.setPaymentChannel(paymentChannel);
             row.setId(i);
             row.setRepairFee(row.getRepairFee().add(row.getMaintenanceFee()).add(row.getMaintenanceProductFee()));
+            row.setOrderAmount(row.getExpectAmount().add(row.getCouponRemitFee()));
             i++;
         }
 
@@ -317,11 +318,11 @@ public class ExportServiceImpl implements ExportService {
 
         HSSFWorkbook workbook = null;
         try {
-            String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "应付金额", "现金支付", "余额支付", "优惠金额",
+            String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "优惠金额",
                     "乐团课", "VIP课", "网管课", "乐理课", "考级", "维修费用", "云教练", "押金", "乐器", "教辅费用", "上门费",
                     "账户充值", "其它", "手续费", "到账时间",
                     "关联乐团ID/VIP课ID", "课程形态", "零星收款类别", "专业", "分部", "教学点", "合作单位", "乐团主管", "备注"};
-            String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "expectAmount", "actualAmount", "balancePaymentAmount",  "couponRemitFee",
+            String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "orderAmount", "expectAmount", "actualAmount", "balancePaymentAmount",  "couponRemitFee",
                     "musicGroupCourseFee", "vipCourseFee", "practiceCourseFee", "theoryCourseFee", "degreeFee", "repairFee", "cloudTeacherFee",
                     "leaseFee", "musicalFee", "teachingFee", "visitFee", "rechargeFee", "otherFee", "transferFee", "payTime", "musicGroupId",
                     "groupType.desc", "sporadicType", "subjectName", "organName", "schoolName", "cooperationOrganName", "eduTeacher", "memo"};
@@ -635,6 +636,7 @@ public class ExportServiceImpl implements ExportService {
                 paymentChannel = "余额";
             }
             row.setPaymentChannel(paymentChannel);
+            row.setOrderAmount(row.getExpectAmount().add(row.getCouponRemitFee()));
             i++;
         }
 
@@ -790,9 +792,10 @@ public class ExportServiceImpl implements ExportService {
 
         HSSFWorkbook workbook = null;
         try {
-            String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "应付金额", "现金支付", "余额支付", "分润账户", "分润金额", "分配余额", "优惠金额", "乐团课", "VIP课", "网管课", "乐理课", "考级", "维修费用", "云教练", "押金", "乐器", "教辅费用", "上门费", "账户充值", "其它", "手续费", "到账时间",
+            String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "订单金额", "应付金额", "现金支付", "余额支付", "分润账户", "分润金额", "分配余额", "优惠金额", "乐团课", "VIP课", "网管课", "乐理课", "考级", "维修费用", "云教练", "押金", "乐器", "教辅费用", "上门费", "账户充值", "其它", "手续费", "到账时间",
                     "关联乐团ID/VIP课ID", "课程形态", "零星收款类别", "专业", "分部", "教学点", "合作单位", "乐团主管", "备注"};
-            String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "expectAmount", "actualAmount", "balancePaymentAmount", "routeMerNo", "routeAmount", "routeBalance",  "couponRemitFee",
+            String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "orderAmount"
+                    , "expectAmount", "actualAmount", "balancePaymentAmount", "routeMerNo", "routeAmount", "routeBalance",  "couponRemitFee",
                     "musicGroupCourseFee", "vipCourseFee", "practiceCourseFee", "theoryCourseFee", "degreeFee", "repairFee", "cloudTeacherFee", "leaseFee", "musicalFee", "teachingFee", "visitFee",
                     "rechargeFee", "otherFee", "transferFee", "payTime", "musicGroupId",
                     "groupType.desc", "sporadicType", "subjectName", "organName", "schoolName", "cooperationOrganName", "eduTeacher", "memo"};

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

@@ -2655,14 +2655,15 @@ public class ExportController extends BaseController {
                     row.setReceiveStatusStr("自动确认");
                     break;
             }
+            row.setOrderAmount(row.getExpectAmount().add(row.getCouponRemitAmount()));
         }
         OutputStream outputStream = response.getOutputStream();
         try {
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{
-                    "交易流水号", "订单号", "销售日期", "销售类型", "商品名称", "数量", "应付金额(元)", "余额支付(元)",
+                    "交易流水号", "订单号", "销售日期", "销售类型", "商品名称", "数量", "订单金额(元)", "应付金额(元)", "余额支付(元)",
                     "现金支付(元)", "优惠金额(元)", "销售成本(元)", "学员姓名", "交易方式", "收款账户", "账户类型", "扣减库存", "所属分部",
                     "所属学校", "教务老师", "确认收货", "状态"}, new String[]{
-                    "transNo", "orderNo", "sellTime", "type.desc", "goodsName", "num", "expectAmount", "balanceAmount",
+                    "transNo", "orderNo", "sellTime", "type.desc", "goodsName", "num", "orderAmount", "expectAmount", "balanceAmount",
                     "actualAmount", "couponRemitAmount", "sellCost", "userName", "paymentChannelStr", "merNo", "accountTypeStr", "stockType.msg", "organName",
                     "schoolName", "eduTeacher", "receiveStatusStr", "status.msg"}, rows);
             response.setContentType("application/octet-stream");