|
@@ -1,5 +1,6 @@
|
|
|
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.dto.PageInfoOrder;
|
|
@@ -13,12 +14,10 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
@Service
|
|
|
public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, StudentPaymentRouteOrder> implements StudentPaymentRouteOrderService {
|
|
@@ -27,6 +26,8 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
|
|
|
private StudentPaymentRouteOrderDao studentPaymentRouteOrderDao;
|
|
|
@Autowired
|
|
|
private SysUserCashAccountDao sysUserCashAccountDao;
|
|
|
+ @Autowired
|
|
|
+ private StudentPaymentOrderDao studentPaymentOrderDao;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, StudentPaymentRouteOrder> getDAO() {
|
|
@@ -68,4 +69,22 @@ public class StudentPaymentRouteOrderServiceImpl extends BaseServiceImpl<Long, S
|
|
|
return pageInfo;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public StudentPaymentRouteOrderDto addOrder(StudentPaymentRouteOrderDto studentPaymentRouteOrderDto) {
|
|
|
+ Date nowDate = new Date();
|
|
|
+ studentPaymentRouteOrderDto.setCreateTime(nowDate);
|
|
|
+ studentPaymentRouteOrderDto.setUpdateTime(nowDate);
|
|
|
+ studentPaymentOrderDao.insert(studentPaymentRouteOrderDto);
|
|
|
+ StudentPaymentRouteOrder studentPaymentRouteOrder = new StudentPaymentRouteOrder();
|
|
|
+ studentPaymentRouteOrder.setOrderNo(studentPaymentRouteOrderDto.getOrderNo());
|
|
|
+ studentPaymentRouteOrder.setRoutingOrganId(studentPaymentRouteOrderDto.getOrganId());
|
|
|
+ studentPaymentRouteOrder.setRouteAmount(studentPaymentRouteOrderDto.getActualAmount());
|
|
|
+ studentPaymentRouteOrder.setFeeFlag("N");
|
|
|
+ studentPaymentRouteOrder.setCreateTime(nowDate);
|
|
|
+ studentPaymentRouteOrder.setUpdateTime(nowDate);
|
|
|
+ studentPaymentRouteOrderDao.insert(studentPaymentRouteOrder);
|
|
|
+ return studentPaymentRouteOrderDto;
|
|
|
+ }
|
|
|
+
|
|
|
}
|