|  | @@ -16,6 +16,8 @@ import java.util.stream.Collectors;
 | 
											
												
													
														|  |  import javax.annotation.Resource;
 |  |  import javax.annotation.Resource;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  import org.apache.commons.lang3.StringUtils;
 |  |  import org.apache.commons.lang3.StringUtils;
 | 
											
												
													
														|  | 
 |  | +import org.slf4j.Logger;
 | 
											
												
													
														|  | 
 |  | +import org.slf4j.LoggerFactory;
 | 
											
												
													
														|  |  import org.springframework.beans.factory.annotation.Autowired;
 |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
											
												
													
														|  |  import org.springframework.stereotype.Service;
 |  |  import org.springframework.stereotype.Service;
 | 
											
												
													
														|  |  import org.springframework.transaction.annotation.Transactional;
 |  |  import org.springframework.transaction.annotation.Transactional;
 | 
											
										
											
												
													
														|  | @@ -96,6 +98,8 @@ import com.ym.mec.util.http.HttpUtil;
 | 
											
												
													
														|  |  @Service
 |  |  @Service
 | 
											
												
													
														|  |  public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, StudentRegistration> implements StudentRegistrationService {
 |  |  public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, StudentRegistration> implements StudentRegistrationService {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +	private static final Logger LOGGER = LoggerFactory.getLogger(StudentRegistrationServiceImpl.class);
 | 
											
												
													
														|  | 
 |  | +	
 | 
											
												
													
														|  |      @Resource
 |  |      @Resource
 | 
											
												
													
														|  |      private StudentRegistrationDao studentRegistrationDao;
 |  |      private StudentRegistrationDao studentRegistrationDao;
 | 
											
												
													
														|  |      @Autowired
 |  |      @Autowired
 | 
											
										
											
												
													
														|  | @@ -851,14 +855,19 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 | 
											
												
													
														|  |                      studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
 |  |                      studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  //            //生成课程协议
 |  |  //            //生成课程协议
 | 
											
												
													
														|  | -            contractService.transferMusicGroupCoursesContract(studentRegistration.getUserId(),studentRegistration.getMusicGroupId());
 |  | 
 | 
											
												
													
														|  | -            //商品协议(租赁时候有)
 |  | 
 | 
											
												
													
														|  | -            if(musicOneSubjectClassPlan.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)){
 |  | 
 | 
											
												
													
														|  | -                StudentPaymentOrderDetail applyOrderMusical = studentPaymentOrderDetailService.findApplyOrderMusical(studentPaymentOrder.getId());
 |  | 
 | 
											
												
													
														|  | -                if(applyOrderMusical != null && applyOrderMusical.getGoodsIdList() != null && !applyOrderMusical.getGoodsIdList().equals("")){
 |  | 
 | 
											
												
													
														|  | -                    contractService.transferGoodsContract(studentPaymentOrder.getUserId(),studentPaymentOrder.getMusicGroupId(),applyOrderMusical.getGoodsIdList(),musicOneSubjectClassPlan.getKitGroupPurchaseType());
 |  | 
 | 
											
												
													
														|  | -                }
 |  | 
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | 
 |  | +			try {
 | 
											
												
													
														|  | 
 |  | +				contractService.transferMusicGroupCoursesContract(studentRegistration.getUserId(), studentRegistration.getMusicGroupId());
 | 
											
												
													
														|  | 
 |  | +				// 商品协议(租赁时候有)
 | 
											
												
													
														|  | 
 |  | +				if (musicOneSubjectClassPlan.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)) {
 | 
											
												
													
														|  | 
 |  | +					StudentPaymentOrderDetail applyOrderMusical = studentPaymentOrderDetailService.findApplyOrderMusical(studentPaymentOrder.getId());
 | 
											
												
													
														|  | 
 |  | +					if (applyOrderMusical != null && applyOrderMusical.getGoodsIdList() != null && !applyOrderMusical.getGoodsIdList().equals("")) {
 | 
											
												
													
														|  | 
 |  | +						contractService.transferGoodsContract(studentPaymentOrder.getUserId(), studentPaymentOrder.getMusicGroupId(),
 | 
											
												
													
														|  | 
 |  | +								applyOrderMusical.getGoodsIdList(), musicOneSubjectClassPlan.getKitGroupPurchaseType());
 | 
											
												
													
														|  | 
 |  | +					}
 | 
											
												
													
														|  | 
 |  | +				}
 | 
											
												
													
														|  | 
 |  | +			} catch (Exception e) {
 | 
											
												
													
														|  | 
 |  | +				LOGGER.error("协议生成失败",e);
 | 
											
												
													
														|  | 
 |  | +			}
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 |