|
@@ -331,7 +331,8 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
@Override
|
|
@Override
|
|
public boolean transferMusicGroupCoursesContract(Integer userId, String musicGroupId) {
|
|
public boolean transferMusicGroupCoursesContract(Integer userId, String musicGroupId) {
|
|
if(true){
|
|
if(true){
|
|
- return transferProduceContract(userId, musicGroupId, null);
|
|
|
|
|
|
+ transferProduceContract(userId, musicGroupId, null);
|
|
|
|
+ return true;
|
|
}
|
|
}
|
|
SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
|
|
SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
|
|
|
|
|
|
@@ -526,7 +527,8 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
@Override
|
|
@Override
|
|
public boolean transferVipGroupCoursesContract(Integer userId, Long vipGroupId) {
|
|
public boolean transferVipGroupCoursesContract(Integer userId, Long vipGroupId) {
|
|
if(true){
|
|
if(true){
|
|
- return transferProduceContract(userId, null, null);
|
|
|
|
|
|
+ transferProduceContract(userId, null, null);
|
|
|
|
+ return true;
|
|
}
|
|
}
|
|
|
|
|
|
SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
|
|
SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
|
|
@@ -669,7 +671,8 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
@Override
|
|
@Override
|
|
public boolean transferGoodsContract(Integer userId, String musicGroupId, String goodsIds, KitGroupPurchaseTypeEnum kitGroupPurchaseTypeEnum) {
|
|
public boolean transferGoodsContract(Integer userId, String musicGroupId, String goodsIds, KitGroupPurchaseTypeEnum kitGroupPurchaseTypeEnum) {
|
|
|
|
|
|
- return transferProduceContract(userId, musicGroupId,null);
|
|
|
|
|
|
+ transferProduceContract(userId, musicGroupId,null);
|
|
|
|
+ return true;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -778,7 +781,8 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
@Override
|
|
@Override
|
|
public boolean transferPracticeCoursesContract(Integer userId, int courseSectionNum, Date startDate, Date endDate, BigDecimal fee) {
|
|
public boolean transferPracticeCoursesContract(Integer userId, int courseSectionNum, Date startDate, Date endDate, BigDecimal fee) {
|
|
if(true){
|
|
if(true){
|
|
- return transferProduceContract(userId, null, null);
|
|
|
|
|
|
+ transferProduceContract(userId, null, null);
|
|
|
|
+ return true;
|
|
}
|
|
}
|
|
|
|
|
|
SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
|
|
SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
|
|
@@ -857,17 +861,17 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
@Override
|
|
@Override
|
|
@Async
|
|
@Async
|
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRES_NEW)
|
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRES_NEW)
|
|
- public boolean transferProduceContract(Integer userId,String musicGroupId, CourseViewTypeEnum courseViewType) {
|
|
|
|
|
|
+ public void transferProduceContract(Integer userId,String musicGroupId, CourseViewTypeEnum courseViewType) {
|
|
SysUser user = studentDao.lockUserReturnInfo(userId);
|
|
SysUser user = studentDao.lockUserReturnInfo(userId);
|
|
|
|
|
|
if (user == null) {
|
|
if (user == null) {
|
|
logger.error("用户不存在({})", userId);
|
|
logger.error("用户不存在({})", userId);
|
|
- return false;
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
|
|
if(StringUtils.isBlank(user.getRealName())||StringUtils.isBlank(user.getIdCardNo())){
|
|
if(StringUtils.isBlank(user.getRealName())||StringUtils.isBlank(user.getIdCardNo())){
|
|
logger.error("身份信息缺失({})", userId);
|
|
logger.error("身份信息缺失({})", userId);
|
|
- return false;
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
|
|
SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
|
|
SysUserTsign sysUserTsign = sysUserTsignService.get(userId);
|
|
@@ -876,7 +880,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
sysUserTsign = register(userId, user.getRealName(), user.getIdCardNo(), user.getPhone());
|
|
sysUserTsign = register(userId, user.getRealName(), user.getIdCardNo(), user.getPhone());
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
logger.error("用户电子签章注册失败", e);
|
|
logger.error("用户电子签章注册失败", e);
|
|
- return false;
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
@@ -914,7 +918,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
MusicGroup musicGroup = musicGroupService.get(musicGroupId);
|
|
MusicGroup musicGroup = musicGroupService.get(musicGroupId);
|
|
if (musicGroup == null) {
|
|
if (musicGroup == null) {
|
|
logger.error("乐团信息没找到({})", musicGroupId);
|
|
logger.error("乐团信息没找到({})", musicGroupId);
|
|
- return false;
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
params.put("ownershipType", musicGroup.getOwnershipType().name());
|
|
params.put("ownershipType", musicGroup.getOwnershipType().name());
|
|
ownershipType = musicGroup.getCourseViewType();
|
|
ownershipType = musicGroup.getCourseViewType();
|
|
@@ -926,7 +930,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
|
|
|
|
List<SysUserContracts> userContracts = sysUserContractsService.getUserContractWithType(userId, ContractType.PRODUCT, ownershipType.getContractVersion());
|
|
List<SysUserContracts> userContracts = sysUserContractsService.getUserContractWithType(userId, ContractType.PRODUCT, ownershipType.getContractVersion());
|
|
if(!CollectionUtils.isEmpty(userContracts)){
|
|
if(!CollectionUtils.isEmpty(userContracts)){
|
|
- return true;
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
|
|
templateEngine.render(params, "product"+ownershipType.getContractVersion()+".ftl", srcFile);
|
|
templateEngine.render(params, "product"+ownershipType.getContractVersion()+".ftl", srcFile);
|
|
@@ -936,7 +940,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
PDFUtil.renderToPDFByData(ContractServiceImpl.class.getResource("/").getFile(), FileUtils.readFileToString(srcFile), srcPdfPath, "simsun.ttc");
|
|
PDFUtil.renderToPDFByData(ContractServiceImpl.class.getResource("/").getFile(), FileUtils.readFileToString(srcFile), srcPdfPath, "simsun.ttc");
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
logger.error("生成产品协议失败", e);
|
|
logger.error("生成产品协议失败", e);
|
|
- return false;
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -949,7 +953,7 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
SysUserTsign organTsign = sysUserTsignService.queryByCardNo(organCode);
|
|
SysUserTsign organTsign = sysUserTsignService.queryByCardNo(organCode);
|
|
if (organTsign == null) {
|
|
if (organTsign == null) {
|
|
logger.error("甲方未创建签章");
|
|
logger.error("甲方未创建签章");
|
|
- return false;
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
|
|
|
|
eSealPlugin.organSign(organTsign.getSealData(), srcPdfPath, srcPdfPath);
|
|
eSealPlugin.organSign(organTsign.getSealData(), srcPdfPath, srcPdfPath);
|
|
@@ -972,7 +976,6 @@ public class ContractServiceImpl implements ContractService, InitializingBean {
|
|
sysUserContractsService.insert(sysUserContracts);
|
|
sysUserContractsService.insert(sysUserContracts);
|
|
|
|
|
|
FileUtils.deleteQuietly(srcFile);
|
|
FileUtils.deleteQuietly(srcFile);
|
|
- return true;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|