|  | @@ -1,14 +1,12 @@
 | 
	
		
			
				|  |  |  package com.ym.mec.biz.service.impl;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dao.StudentPaymentRouteOrderDao;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.*;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dto.PageInfoOrder;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dto.StudentPaymentRouteOrderDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.Goods;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.SellOrder;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.StudentPaymentRouteOrder;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.enums.DealStatusEnum;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.enums.GroupType;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.enums.*;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.StudentPaymentRouteOrderService;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.dal.BaseDAO;
 | 
	
	
		
			
				|  | @@ -34,6 +32,10 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
 | 
	
		
			
				|  |  |      private StudentPaymentOrderDao studentPaymentOrderDao;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private IdGeneratorService idGeneratorService;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private SellOrderDao sellOrderDao;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private GoodsDao goodsDao;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public BaseDAO<Long, StudentPaymentRouteOrder> getDAO() {
 | 
	
	
		
			
				|  | @@ -92,6 +94,43 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
 | 
	
		
			
				|  |  |          studentPaymentRouteOrder.setRouteBalanceAmount(BigDecimal.ZERO);
 | 
	
		
			
				|  |  |          studentPaymentRouteOrder.setFeeFlag("N");
 | 
	
		
			
				|  |  |          studentPaymentRouteOrderDao.insert(studentPaymentRouteOrder);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +//        if (studentPaymentRouteOrderDto.getGoodies() != null && studentPaymentRouteOrderDto.getGoodies().size() > 0) {
 | 
	
		
			
				|  |  | +//            List<SellOrder> sellOrders = new ArrayList<>();
 | 
	
		
			
				|  |  | +//            BigDecimal hasRouteAmount = BigDecimal.ZERO;
 | 
	
		
			
				|  |  | +//            studentPaymentRouteOrderDto.getGoodies().forEach((id, num) -> {
 | 
	
		
			
				|  |  | +//                Goods goods = goodsDao.get(id);
 | 
	
		
			
				|  |  | +//
 | 
	
		
			
				|  |  | +//                SellOrder sellOrder = new SellOrder();
 | 
	
		
			
				|  |  | +//                sellOrder.setOrganId(studentPaymentOrder.getOrganId());
 | 
	
		
			
				|  |  | +//                sellOrder.setSchoolId(musicGroup.getSchoolId());
 | 
	
		
			
				|  |  | +//                sellOrder.setTransNo(studentPaymentOrder.getTransNo());
 | 
	
		
			
				|  |  | +//                sellOrder.setOrderId(studentPaymentOrder.getId());
 | 
	
		
			
				|  |  | +//                sellOrder.setOrderNo(studentPaymentOrder.getOrderNo());
 | 
	
		
			
				|  |  | +//                sellOrder.setActualAmount(actualAmount);
 | 
	
		
			
				|  |  | +//                sellOrder.setBalanceAmount(balancePaymentAmount);
 | 
	
		
			
				|  |  | +//                sellOrder.setExpectAmount(actualAmount.add(balance));
 | 
	
		
			
				|  |  | +//                sellOrder.setSellCost(goods.getDiscountPrice());
 | 
	
		
			
				|  |  | +//                sellOrder.setSellCost2(goods.getAgreeCostPrice());
 | 
	
		
			
				|  |  | +//                sellOrder.setNum(1);
 | 
	
		
			
				|  |  | +//                sellOrder.setUserId(studentPaymentOrder.getUserId());
 | 
	
		
			
				|  |  | +//                sellOrder.setPaymentChannel(studentPaymentOrder.getPaymentChannel());
 | 
	
		
			
				|  |  | +//                sellOrder.setMerNo(studentPaymentOrder.getMerNos());
 | 
	
		
			
				|  |  | +//                sellOrder.setSellTime(studentPaymentOrder.getCreateTime());
 | 
	
		
			
				|  |  | +//                sellOrder.setCreateIme(new Date());
 | 
	
		
			
				|  |  | +//                sellOrder.setUpdateTime(new Date());
 | 
	
		
			
				|  |  | +//                if (goods.getType().equals(GoodsType.INSTRUMENT)) {
 | 
	
		
			
				|  |  | +//                    sellOrder.setType(SellTypeEnum.INSTRUMENT);
 | 
	
		
			
				|  |  | +//                } else if (goods.getType().equals(GoodsType.ACCESSORIES)) {
 | 
	
		
			
				|  |  | +//                    sellOrder.setType(SellTypeEnum.ACCESSORIES);
 | 
	
		
			
				|  |  | +//                } else {
 | 
	
		
			
				|  |  | +//                    sellOrder.setType(SellTypeEnum.OTHER);
 | 
	
		
			
				|  |  | +//                }
 | 
	
		
			
				|  |  | +//                sellOrders.add(sellOrder);
 | 
	
		
			
				|  |  | +//            });
 | 
	
		
			
				|  |  | +//
 | 
	
		
			
				|  |  | +//            sellOrderDao.batchInsert(sellOrders);
 | 
	
		
			
				|  |  | +//        }
 | 
	
		
			
				|  |  |          return studentPaymentRouteOrderDto;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |