|
@@ -99,6 +99,9 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
@Autowired
|
|
@Autowired
|
|
private GoodsProcurementDao goodsProcurementDao;
|
|
private GoodsProcurementDao goodsProcurementDao;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private StudentPaymentOrderAddressService studentPaymentOrderAddressService;
|
|
|
|
+
|
|
@Lazy
|
|
@Lazy
|
|
@Autowired
|
|
@Autowired
|
|
private ContractService contractService;
|
|
private ContractService contractService;
|
|
@@ -172,6 +175,14 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
public Map addGoodsSellOrder(StudentGoodsSell studentGoodsSell) throws Exception {
|
|
public Map addGoodsSellOrder(StudentGoodsSell studentGoodsSell) throws Exception {
|
|
//关闭老订单
|
|
//关闭老订单
|
|
|
|
+ StudentPaymentOrderAddress studentPaymentOrderAddress = null;
|
|
|
|
+ if (StringUtils.isNotBlank(studentGoodsSell.getAddress())) {
|
|
|
|
+ studentPaymentOrderAddress = new StudentPaymentOrderAddress();
|
|
|
|
+ studentPaymentOrderAddress.setAddress(studentGoodsSell.getAddress());
|
|
|
|
+ studentPaymentOrderAddress.setContactMobile(studentGoodsSell.getContactMobile());
|
|
|
|
+ studentPaymentOrderAddress.setContactName(studentGoodsSell.getContactName());
|
|
|
|
+ }
|
|
|
|
+
|
|
if (StringUtils.isNotEmpty(studentGoodsSell.getOrderNo())) {
|
|
if (StringUtils.isNotEmpty(studentGoodsSell.getOrderNo())) {
|
|
StudentPaymentOrder orderByOrderNo = studentPaymentOrderService.findOrderByOrderNo(studentGoodsSell.getOrderNo());
|
|
StudentPaymentOrder orderByOrderNo = studentPaymentOrderService.findOrderByOrderNo(studentGoodsSell.getOrderNo());
|
|
if (orderByOrderNo.getBalancePaymentAmount() != null && orderByOrderNo.getBalancePaymentAmount().longValue() != 0l) {
|
|
if (orderByOrderNo.getBalancePaymentAmount() != null && orderByOrderNo.getBalancePaymentAmount().longValue() != 0l) {
|
|
@@ -336,6 +347,10 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
|
|
}
|
|
}
|
|
studentGoodsSell.setTenantId(student.getTenantId());
|
|
studentGoodsSell.setTenantId(student.getTenantId());
|
|
studentGoodsSellDao.insert(studentGoodsSell);
|
|
studentGoodsSellDao.insert(studentGoodsSell);
|
|
|
|
+ if (studentPaymentOrderAddress !=null) {
|
|
|
|
+ studentPaymentOrderAddress.setOrderNo(orderNo);
|
|
|
|
+ studentPaymentOrderAddressService.save(studentPaymentOrderAddress);
|
|
|
|
+ }
|
|
|
|
|
|
if (studentGoodsSell.getType() == 1) {
|
|
if (studentGoodsSell.getType() == 1) {
|
|
Map<String, Object> repairInfoMap = new HashMap<>();
|
|
Map<String, Object> repairInfoMap = new HashMap<>();
|