Joburgess hace 4 años
padre
commit
2a3a7556b9

+ 31 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SellOrder.java

@@ -137,6 +137,8 @@ public class SellOrder {
     @ApiModelProperty(value="交易方式")
     private String paymentChannel;
 
+    private String paymentChannelStr;
+
     /**
     * 收款账户
     */
@@ -161,6 +163,8 @@ public class SellOrder {
     @ApiModelProperty(value = "账户类型")
     private AccountType accountType;
 
+    private String accountTypeStr;
+
     /**
      * 状态
      */
@@ -195,6 +199,8 @@ public class SellOrder {
     @ApiModelProperty(value = "收货状态,NO_RECEIVE 未确认,MANUAL_RECEIVE 手动确认,AUTO_RECEIVE 自动确认",required = true)
     private String receiveStatus;
 
+    private String receiveStatusStr;
+
     private Boolean hasRoute = false;
 
     public String getReceiveStatus() {
@@ -476,4 +482,28 @@ public class SellOrder {
     public void setHasRoute(Boolean hasRoute) {
         this.hasRoute = hasRoute;
     }
-}
+
+    public String getPaymentChannelStr() {
+        return paymentChannelStr;
+    }
+
+    public void setPaymentChannelStr(String paymentChannelStr) {
+        this.paymentChannelStr = paymentChannelStr;
+    }
+
+    public String getAccountTypeStr() {
+        return accountTypeStr;
+    }
+
+    public void setAccountTypeStr(String accountTypeStr) {
+        this.accountTypeStr = accountTypeStr;
+    }
+
+    public String getReceiveStatusStr() {
+        return receiveStatusStr;
+    }
+
+    public void setReceiveStatusStr(String receiveStatusStr) {
+        this.receiveStatusStr = receiveStatusStr;
+    }
+}

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

@@ -2429,15 +2429,32 @@ public class ExportController extends BaseController {
         queryInfo.setPage(1);
         queryInfo.setRows(49999);
         List<SellOrder> rows = sellOrderService.queryPage(queryInfo).getRows();
+        for (SellOrder row : rows) {
+            if(StringUtils.isNoneBlank(row.getPaymentChannel())){
+                row.setPaymentChannelStr(PaymentChannelEnum.valueOf(row.getPaymentChannel()).getDesc());
+            }
+            row.setAccountTypeStr(AccountType.INTERNAL.equals(row.getAccountType())?"对内":"对外");
+            switch (row.getReceiveStatus()){
+                case "NO_RECEIVE":
+                    row.setReceiveStatusStr("未确认");
+                    break;
+                case "MANUAL_RECEIVE":
+                    row.setReceiveStatusStr("手动确认");
+                    break;
+                case "AUTO_RECEIVE":
+                    row.setReceiveStatusStr("自动确认");
+                    break;
+            }
+        }
         OutputStream outputStream = response.getOutputStream();
         try {
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{
                     "交易流水号", "订单号", "销售日期", "销售类型", "商品名称", "数量","应付金额(元)", "余额支付(元)",
                     "现金支付(元)", "销售成本(元)", "学员姓名","交易方式", "收款账户", "账户类型", "扣减库存", "所属分部",
                     "所属学校", "教务老师", "确认收货", "状态"}, new String[]{
-                    "transNo", "orderId", "sellTime", "type.desc", "goodsName", "num", "expectAmount", "balanceAmount",
-                    "actualAmount", "sellCost", "userName", "paymentChannel", "merNo", "accountType.msg", "stockType.msg", "organName",
-                    "schoolName", "eduTeacher", "receiveStatus", "status.msg"}, rows);
+                    "transNo", "orderNo", "sellTime", "type.desc", "goodsName", "num", "expectAmount", "balanceAmount",
+                    "actualAmount", "sellCost", "userName", "paymentChannelStr", "merNo", "accountTypeStr", "stockType.msg", "organName",
+                    "schoolName", "eduTeacher", "receiveStatusStr", "status.msg"}, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
             response.flushBuffer();