|
@@ -215,6 +215,12 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
public Long insertFsUserInformationCollection(FsUserInformationCollectionParam param)
|
|
public Long insertFsUserInformationCollection(FsUserInformationCollectionParam param)
|
|
|
{
|
|
{
|
|
|
FsUserInformationCollection fsUserInformationCollection = getFsUserInformationCollection(param);
|
|
FsUserInformationCollection fsUserInformationCollection = getFsUserInformationCollection(param);
|
|
|
|
|
+ if (param.getIsPackage() == 1) {
|
|
|
|
|
+ FsPackage fsPackage = packageMapper.selectFsPackageByPackageId(param.getPackageId());
|
|
|
|
|
+ if (fsPackage != null && !(fsPackage.getProductType() == 1 || fsPackage.getProductType() == 2 || fsPackage.getProductType() ==3)) {
|
|
|
|
|
+ throw new CustomException("该套餐不支持用户信息采集");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
fsUserInformationCollection.setCreateTime(DateUtils.getNowDate());
|
|
fsUserInformationCollection.setCreateTime(DateUtils.getNowDate());
|
|
|
baseMapper.insertFsUserInformationCollection(fsUserInformationCollection);
|
|
baseMapper.insertFsUserInformationCollection(fsUserInformationCollection);
|
|
|
//新增用户信息采集表的同时记录用户信息采集进度
|
|
//新增用户信息采集表的同时记录用户信息采集进度
|
|
@@ -252,6 +258,12 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
if (collection.getUserConfirm() == 1 && collection.getUserConfirm2() == 0) {
|
|
if (collection.getUserConfirm() == 1 && collection.getUserConfirm2() == 0) {
|
|
|
throw new CustomException("确认中,暂无法修改");
|
|
throw new CustomException("确认中,暂无法修改");
|
|
|
}
|
|
}
|
|
|
|
|
+ if (param.getIsPackage() == 1) {
|
|
|
|
|
+ FsPackage fsPackage = packageMapper.selectFsPackageByPackageId(param.getPackageId());
|
|
|
|
|
+ if (fsPackage != null && !(fsPackage.getProductType() == 1 || fsPackage.getProductType() == 2 || fsPackage.getProductType() ==3)) {
|
|
|
|
|
+ throw new CustomException("该疗法不支持用户信息采集");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
//编辑用户信息采集信息时,同时新增采集进度数据(先中止再新增)
|
|
//编辑用户信息采集信息时,同时新增采集进度数据(先中止再新增)
|
|
|
//获取当前用户正在运行的信息采集进度
|
|
//获取当前用户正在运行的信息采集进度
|
|
|
FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleRunningByCollectionId(collection.getId());
|
|
FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleRunningByCollectionId(collection.getId());
|
|
@@ -349,6 +361,10 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
} else {
|
|
} else {
|
|
|
vo.setAnswers(JSON.parseArray(fsUserInformationCollection.getJsonInfo(), AnswerVO.class));
|
|
vo.setAnswers(JSON.parseArray(fsUserInformationCollection.getJsonInfo(), AnswerVO.class));
|
|
|
}
|
|
}
|
|
|
|
|
+ FsUserInformationCollectionSchedule schedule = scheduleMapper.selectPendingSchedule(fsUserInformationCollection.getId());
|
|
|
|
|
+ if (schedule != null) {
|
|
|
|
|
+ vo.setIsShare(1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (questionId != null) {
|
|
if (questionId != null) {
|
|
|
vo.setQuestionId(questionId);
|
|
vo.setQuestionId(questionId);
|
|
@@ -663,6 +679,13 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
if (!Objects.equals(collection.getUserId(), param.getUserId())) {
|
|
if (!Objects.equals(collection.getUserId(), param.getUserId())) {
|
|
|
return R.error("用户信息不匹配,无法确认");
|
|
return R.error("用户信息不匹配,无法确认");
|
|
|
}
|
|
}
|
|
|
|
|
+ if (collection.getIsPackage() == 1) {
|
|
|
|
|
+ FsPackage fsPackage = packageMapper.selectFsPackageByPackageId(collection.getPackageId());
|
|
|
|
|
+ if (fsPackage != null && !(fsPackage.getProductType() == 1 || fsPackage.getProductType() == 2 || fsPackage.getProductType() ==3)) {
|
|
|
|
|
+ return R.error("该套餐包不支持用户确认");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
FsUserInformationCollection map = new FsUserInformationCollection();
|
|
FsUserInformationCollection map = new FsUserInformationCollection();
|
|
|
map.setId(param.getId());
|
|
map.setId(param.getId());
|
|
@@ -671,7 +694,9 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
//用户信息采集表id
|
|
//用户信息采集表id
|
|
|
Long collectionId = collection.getId();
|
|
Long collectionId = collection.getId();
|
|
|
FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleByCollectionId(collectionId);
|
|
FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleByCollectionId(collectionId);
|
|
|
- if (schedule != null&&(schedule.getStatus() == 2||schedule.getStatus() == 3)) {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //支付0元的创建订单就是待开方
|
|
|
|
|
+ if (schedule != null&&(schedule.getStatus() == 2||schedule.getStatus() == 3) && collection.getAmount().compareTo(new BigDecimal(0))==1) {
|
|
|
return R.error("用户采集信息已更新,请扫描最新二维码确认");
|
|
return R.error("用户采集信息已更新,请扫描最新二维码确认");
|
|
|
}
|
|
}
|
|
|
if (collection.getStatus() == 1) {
|
|
if (collection.getStatus() == 1) {
|