Forráskód Böngészése

update:订单列表增加分部

yonge 4 éve
szülő
commit
814730675a

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

@@ -268,7 +268,7 @@ public interface StudentPaymentOrderDao extends BaseDAO<Long, StudentPaymentOrde
 
     StudentPaymentOrder getOrderMoneyAmount(Map<String, Object> params);
 
-    List<StudentPaymentOrder> queryPageOrder(Map<String, Object> params);
+    List<StudentPaymentOrderDto> queryPageOrder(Map<String, Object> params);
 
     /**
      * 统计收款金额

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentOrderDto.java

@@ -15,6 +15,8 @@ public class StudentPaymentOrderDto extends StudentPaymentOrder {
     private Integer autoAffirmReceiveTime;
 
     private BigDecimal goodsAmount = BigDecimal.ZERO;
+    
+    private String organName;
 
     public BigDecimal getGoodsAmount() {
         return goodsAmount;
@@ -55,4 +57,12 @@ public class StudentPaymentOrderDto extends StudentPaymentOrder {
     public void setGoodsNum(Integer goodsNum) {
         this.goodsNum = goodsNum;
     }
+
+	public String getOrganName() {
+		return organName;
+	}
+
+	public void setOrganName(String organName) {
+		this.organName = organName;
+	}
 }

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

@@ -1,9 +1,12 @@
 package com.ym.mec.biz.service;
 
-import java.util.*;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 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.entity.Goods;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
@@ -14,10 +17,7 @@ import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 import com.ym.mec.biz.dal.page.SporadicOrderQueryInfo;
 import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
 import com.ym.mec.common.page.PageInfo;
-import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.BaseService;
-import com.ym.mec.util.collection.MapUtil;
-import org.apache.poi.ss.formula.functions.T;
 
 public interface StudentPaymentOrderService extends BaseService<Long, StudentPaymentOrder> {
 
@@ -105,7 +105,7 @@ public interface StudentPaymentOrderService extends BaseService<Long, StudentPay
 	StudentPaymentOrder getOrderMoneyAmount(StudentPaymentOrderQueryInfo queryInfo);
 
 
-	PageInfoOrder<StudentPaymentOrder> OrderQueryPage(StudentPaymentOrderQueryInfo queryInfo);
+	PageInfoOrder<StudentPaymentOrderDto> OrderQueryPage(StudentPaymentOrderQueryInfo queryInfo);
 
 
 	/**

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

@@ -1,5 +1,22 @@
 package com.ym.mec.biz.service.impl;
 
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
 import com.alibaba.fastjson.JSON;
 import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
 import com.ym.mec.biz.dal.dao.StudentPaymentRouteOrderDao;
@@ -7,14 +24,29 @@ import com.ym.mec.biz.dal.dao.SysConfigDao;
 import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
 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.entity.Goods;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.entity.StudentPaymentRouteOrder;
-import com.ym.mec.biz.dal.enums.*;
+import com.ym.mec.biz.dal.enums.DealStatusEnum;
+import com.ym.mec.biz.dal.enums.GroupType;
+import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
+import com.ym.mec.biz.dal.enums.PlatformCashAccountDetailTypeEnum;
+import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
 import com.ym.mec.biz.dal.page.SporadicOrderQueryInfo;
 import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
-import com.ym.mec.biz.service.*;
+import com.ym.mec.biz.service.DegreeRegistrationService;
+import com.ym.mec.biz.service.MusicGroupService;
+import com.ym.mec.biz.service.PracticeGroupService;
+import com.ym.mec.biz.service.SporadicChargeInfoService;
+import com.ym.mec.biz.service.StudentPaymentOrderService;
+import com.ym.mec.biz.service.StudentRegistrationService;
+import com.ym.mec.biz.service.StudentRepairService;
+import com.ym.mec.biz.service.SubjectChangeService;
+import com.ym.mec.biz.service.SysUserCashAccountService;
+import com.ym.mec.biz.service.VipGroupService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
@@ -27,18 +59,7 @@ import com.ym.mec.thirdparty.yqpay.RsqMsg;
 import com.ym.mec.thirdparty.yqpay.YqPayFeignService;
 import com.ym.mec.thirdparty.yqpay.YqPayUtil;
 import com.ym.mec.util.collection.MapUtil;
-
 import com.ym.mec.util.date.DateUtil;
-import org.apache.commons.lang3.StringUtils;
-import org.snaker.engine.entity.Order;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.math.BigDecimal;
-import java.util.*;
-import java.util.stream.Collectors;
 
 @Service
 public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, StudentPaymentOrder> implements StudentPaymentOrderService {
@@ -416,12 +437,12 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
     }
 
     @Override
-    public PageInfoOrder<StudentPaymentOrder> OrderQueryPage(StudentPaymentOrderQueryInfo queryInfo) {
-        PageInfoOrder<StudentPaymentOrder> pageInfo = new PageInfoOrder<>(queryInfo.getPage(), queryInfo.getRows());
+    public PageInfoOrder<StudentPaymentOrderDto> OrderQueryPage(StudentPaymentOrderQueryInfo queryInfo) {
+        PageInfoOrder<StudentPaymentOrderDto> pageInfo = new PageInfoOrder<>(queryInfo.getPage(), queryInfo.getRows());
         Map<String, Object> params = new HashMap<String, Object>();
         MapUtil.populateMap(params, queryInfo);
 
-        List<StudentPaymentOrder> dataList = new ArrayList<>();
+        List<StudentPaymentOrderDto> dataList = new ArrayList<>();
         int count = this.findCount(params);
 
         BigDecimal totalUserBalance = sysUserCashAccountDao.getTotalUserBalance(params);

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

@@ -36,10 +36,11 @@
         <result column="receive_status_" property="receiveStatus"/>
     </resultMap>
 
-    <resultMap type="com.ym.mec.biz.dal.entity.StudentPaymentOrder" extends="StudentPaymentOrder"
+    <resultMap type="com.ym.mec.biz.dal.dto.StudentPaymentOrderDto" extends="StudentPaymentOrder"
                id="PaymentOrderAndStudentInfo">
         <result column="username_" property="user.username"/>
         <result column="phone_" property="user.phone"/>
+        <result column="organ_name_" property="organName"/>
     </resultMap>
 
     <resultMap type="com.ym.mec.biz.dal.entity.Goods" id="Goods">
@@ -202,8 +203,9 @@
 
     <!-- 分页查询 -->
     <select id="queryPage" resultMap="PaymentOrderAndStudentInfo" parameterType="map">
-        SELECT spo.*,u.username_,u.phone_ FROM student_payment_order spo
+        SELECT spo.*,u.username_,u.phone_,o.name_ organ_name_ FROM student_payment_order spo
         left join sys_user u on spo.user_id_ = u.id_
+        left join organization o on o.id_ = spo.organ_id_
         <include refid="queryPaymentOrder"/>
         ORDER BY spo.id_ DESC
         <include refid="global.limit"/>
@@ -638,8 +640,9 @@
 
     <!-- 分页查询 -->
     <select id="queryPageOrder" resultMap="PaymentOrderAndStudentInfo" parameterType="map">
-        SELECT spo.*,u.username_,u.phone_ FROM student_payment_order spo
+        SELECT spo.*,u.username_,u.phone_,o.name_ organ_name_ FROM student_payment_order spo
         left join sys_user u on spo.user_id_ = u.id_
+        left join organization o on o.id_ = spo.organ_id_
         <include refid="queryPaymentOrder"/>
         ORDER BY spo.id_ DESC
         <include refid="global.limit"/>

+ 22 - 20
mec-web/src/main/java/com/ym/mec/web/controller/StudentPaymentOrderController.java

@@ -1,11 +1,29 @@
 package com.ym.mec.web.controller;
 
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.EmployeeDao;
 import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
 import com.ym.mec.biz.dal.dao.SysConfigDao;
 import com.ym.mec.biz.dal.dto.BasicUserDto;
+import com.ym.mec.biz.dal.dto.StudentPaymentOrderDto;
 import com.ym.mec.biz.dal.entity.Employee;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.page.SporadicOrderQueryInfo;
@@ -15,22 +33,6 @@ import com.ym.mec.biz.service.StudentPaymentOrderService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.page.PageInfo;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.math.BigDecimal;
-import java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
 
 @RequestMapping("order")
 @Api(tags = "订单服务")
@@ -80,7 +82,7 @@ public class StudentPaymentOrderController extends BaseController {
             queryInfo.setUserIds(userIds);
         }
 
-        PageInfo<StudentPaymentOrder> studentPaymentOrderPageInfo = studentPaymentOrderService.OrderQueryPage(queryInfo);
+        PageInfo<StudentPaymentOrderDto> studentPaymentOrderPageInfo = studentPaymentOrderService.OrderQueryPage(queryInfo);
 
         int openHideMode = Integer.parseInt(sysConfigDao.findConfigValue("open_hide_mode"));
         if (openHideMode == 1) {
@@ -143,7 +145,7 @@ public class StudentPaymentOrderController extends BaseController {
         }
         queryInfo.setOrderType("1");
 
-        PageInfo<StudentPaymentOrder> studentPaymentOrderPageInfo = studentPaymentOrderService.OrderQueryPage(queryInfo);
+        PageInfo<StudentPaymentOrderDto> studentPaymentOrderPageInfo = studentPaymentOrderService.OrderQueryPage(queryInfo);
 
         for (StudentPaymentOrder row : studentPaymentOrderPageInfo.getRows()) {
             BigDecimal balancePaymentAmount = row.getBalancePaymentAmount() == null ? BigDecimal.ZERO : row.getBalancePaymentAmount();
@@ -179,7 +181,7 @@ public class StudentPaymentOrderController extends BaseController {
         }
         queryInfo.setOrderType("2");
 
-        PageInfo<StudentPaymentOrder> studentPaymentOrderPageInfo = studentPaymentOrderService.OrderQueryPage(queryInfo);
+        PageInfo<StudentPaymentOrderDto> studentPaymentOrderPageInfo = studentPaymentOrderService.OrderQueryPage(queryInfo);
 
         for (StudentPaymentOrder row : studentPaymentOrderPageInfo.getRows()) {
             BigDecimal balancePaymentAmount = row.getBalancePaymentAmount() == null ? BigDecimal.ZERO : row.getBalancePaymentAmount();
@@ -230,7 +232,7 @@ public class StudentPaymentOrderController extends BaseController {
             }
         }
 
-        PageInfo<StudentPaymentOrder> studentPaymentOrderPageInfo = studentPaymentOrderService.OrderQueryPage(queryInfo);
+        PageInfo<StudentPaymentOrderDto> studentPaymentOrderPageInfo = studentPaymentOrderService.OrderQueryPage(queryInfo);
         return succeed(studentPaymentOrderPageInfo);
     }