diff --git a/src/main/java/com/qs/serve/modules/vtb/service/impl/VtbVerificationServiceImpl.java b/src/main/java/com/qs/serve/modules/vtb/service/impl/VtbVerificationServiceImpl.java index 53d1ffc7..a423226e 100644 --- a/src/main/java/com/qs/serve/modules/vtb/service/impl/VtbVerificationServiceImpl.java +++ b/src/main/java/com/qs/serve/modules/vtb/service/impl/VtbVerificationServiceImpl.java @@ -7,20 +7,24 @@ import com.qs.serve.common.util.Assert; import com.qs.serve.common.util.AuthContextUtils; import com.qs.serve.common.util.CollectionUtil; import com.qs.serve.common.util.CopierUtil; +import com.qs.serve.modules.bms.entity.BmsChannel; +import com.qs.serve.modules.bms.entity.BmsChannelPoint; import com.qs.serve.modules.bms.entity.BmsSubject; +import com.qs.serve.modules.bms.service.BmsChannelPointService; +import com.qs.serve.modules.bms.service.BmsChannelService; import com.qs.serve.modules.bms.service.BmsSubjectService; import com.qs.serve.modules.sys.entity.SysUser; import com.qs.serve.modules.sys.service.SysUserService; import com.qs.serve.modules.tbs.common.TbsActivityState; import com.qs.serve.modules.tbs.common.TbsCostApplyState; import com.qs.serve.modules.tbs.entity.*; +import com.qs.serve.modules.tbs.entity.bo.TbsActivityChannelBo; +import com.qs.serve.modules.tbs.entity.bo.TbsActivityChannelPointBo; import com.qs.serve.modules.tbs.entity.bo.TbsActivityReopenBo; import com.qs.serve.modules.tbs.service.*; import com.qs.serve.modules.vtb.common.VtbFundFlowType; import com.qs.serve.modules.vtb.common.VtbVerificationState; -import com.qs.serve.modules.vtb.entity.VtbFundFlow; -import com.qs.serve.modules.vtb.entity.VtbVerification; -import com.qs.serve.modules.vtb.entity.VtbVerificationSubject; +import com.qs.serve.modules.vtb.entity.*; import com.qs.serve.modules.vtb.entity.bo.VtbVerificationBo; import com.qs.serve.modules.vtb.entity.bo.VtbVerificationChannelBo; import com.qs.serve.modules.vtb.entity.bo.VtbVerificationChannelPointBo; @@ -56,6 +60,8 @@ public class VtbVerificationServiceImpl extends ServiceImpl channelBoList = verificationBo.getChannelList(); List pointBoList = verificationBo.getPointList(); if(CollectionUtil.isNotEmpty(channelBoList)){ - + List vtbVerificationChannelList = new ArrayList<>(); + for (VtbVerificationChannelBo channelBo : channelBoList) { + BmsChannel channel = channelService.getById(channelBo.getChannelId()); + VtbVerificationChannel verificationChannel = new VtbVerificationChannel(); + verificationChannel.setActivityId(activity.getId()); + verificationChannel.setCostApplyId(costApply.getId()); + verificationChannel.setChannelId(channel.getId()); + verificationChannel.setChannelCode(channel.getChannelCode()); + verificationChannel.setChannelName(channel.getChannelName()); + verificationChannel.setChannelRate(channelBo.getChannelRate()); + verificationChannel.setPreCountPoint(channelBo.getPreCountPoint()); + verificationChannel.setRemark(channelBo.getRemark()); + vtbVerificationChannelList.add(verificationChannel); + } + verificationChannelService.saveBatch(vtbVerificationChannelList); }else if (CollectionUtil.isNotEmpty(pointBoList)){ - + List activityChannelPointList = new ArrayList<>(); + for (VtbVerificationChannelPointBo channelPointBo : pointBoList) { + BmsChannelPoint channelPoint = channelPointService.getById(channelPointBo.getPointId()); + BmsChannel channel = channelService.getById(channelPoint.getChannelId()); + VtbVerificationChannelPoint channelPoint1 = new VtbVerificationChannelPoint(); + channelPoint1.setCostApplyId(costApply.getId()); + channelPoint1.setActivityId(activity.getId()); + channelPoint1.setChannelId(channel.getId()); + channelPoint1.setChannelCode(channel.getChannelCode()); + channelPoint1.setChannelName(channel.getChannelName()); + channelPoint1.setPointId(channelPoint.getId()); + channelPoint1.setPointCode(channelPoint.getPointCode()); + channelPoint1.setPointName(channelPoint.getPointName()); + channelPoint1.setPointRate(channelPointBo.getPointRate()); + channelPoint1.setRemark(channelPointBo.getRemark()); + activityChannelPointList.add(channelPoint1); + } + verificationChannelPointService.saveBatch(activityChannelPointList); } List verificationSubjects = validCreateVeriSubject(verificationBo, activity, costApply); //保存