|
|
@@ -654,6 +654,10 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
return R.error("用户已确认");
|
|
|
}
|
|
|
}
|
|
|
+ if (collection.getStatus() == 2 ){
|
|
|
+ if (collection.getUserConfirm2() == 1)
|
|
|
+ return R.error("用户已二次确认");
|
|
|
+ }
|
|
|
logger.info("采集信息id:{},采集信息用户id{},当前登录用户id{}",param.getId(),collection.getUserId(),param.getUserId());
|
|
|
if (!Objects.equals(collection.getUserId(), param.getUserId())) {
|
|
|
return R.error("用户信息不匹配,无法确认");
|
|
|
@@ -984,6 +988,54 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
return R.error("终止失败");
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @Transactional
|
|
|
+ public R salesHelpConfirm(Long collectionId) {
|
|
|
+ if (collectionId == null) {
|
|
|
+ return R.error("参数错误");
|
|
|
+ }
|
|
|
+ FsUserInformationCollection collection = fsUserInformationCollectionMapper.selectFsUserInformationCollectionById(collectionId);
|
|
|
+ if (collection == null) {
|
|
|
+ return R.error("未找到采集信息");
|
|
|
+ }
|
|
|
+ if (collection.getStatus() == 2 && collection.getUserConfirm2() == 1) {
|
|
|
+ return R.error("采集信息已二次确认");
|
|
|
+ }
|
|
|
+ FsUserInformationCollectionSchedule schedule = scheduleMapper.selectSecondConfirmScheduleByCollectionId(collectionId);
|
|
|
+ if (schedule == null) {
|
|
|
+ return R.error("没有二次确认进度任务");
|
|
|
+ }
|
|
|
+ //第二次确认
|
|
|
+ FsUserInformationCollection editCollection = new FsUserInformationCollection();
|
|
|
+ editCollection.setId(collectionId);
|
|
|
+ editCollection.setUserConfirm2(1);
|
|
|
+ if (collection.getUserConfirm2() == 0 && collection.getIsPackage() == 1) {
|
|
|
+ FsStoreOrder fsStoreOrder = storeOrderService.selectFsStoreOrderByOrderCode(collection.getPackageOrderCode());
|
|
|
+ if (fsStoreOrder != null) {
|
|
|
+ FsStoreOrder editOrder = new FsStoreOrder();
|
|
|
+ editOrder.setOrderId(fsStoreOrder.getOrderId());
|
|
|
+ editOrder.setIsConfirm(1);
|
|
|
+ storeOrderService.updateFsStoreOrder(editOrder);
|
|
|
+ } else {
|
|
|
+ return R.error("没有找到订单");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ FsUserInformationCollectionSchedule editSchedule = new FsUserInformationCollectionSchedule();
|
|
|
+ //----------同步修改用户信息采集进度----------
|
|
|
+ editSchedule.setId(schedule.getId());
|
|
|
+ //"已完成"任务节点
|
|
|
+ editSchedule.setCurrentStep(PrescriptionTaskStepEnum.WAITING_COMPLETED.getCode());
|
|
|
+ //"完成"任务状态
|
|
|
+ editSchedule.setStatus(CollectionTaskStatusEnum.COMPLETED.getCode());
|
|
|
+ editSchedule.setCompletedTime(DateUtils.getNowDate());
|
|
|
+ log.info("同步用户信息采集进度节点为:{},信息采集表id:{}",PrescriptionTaskStepEnum.WAITING_COMPLETED.getDesc(),schedule.getCollectionId());
|
|
|
+ if (fsUserInformationCollectionMapper.updateFsUserInformationCollection(editCollection) > 0 && scheduleMapper.updateFsUserInformationCollectionSchedule(editSchedule) > 0) {
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
+ return R.error("确认失败");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
private List<AnswerVO> getAnswerVOs(List<AnswerVO> target,List<AnswerVO> source) {
|
|
|
target.addAll(source);
|
|
|
return target.stream()
|