|
@@ -15,8 +15,10 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
import org.dromara.common.redis.utils.SequenceUtils;
|
|
import org.dromara.common.redis.utils.SequenceUtils;
|
|
|
import org.dromara.customer.domain.SalesAnnualFinalization;
|
|
import org.dromara.customer.domain.SalesAnnualFinalization;
|
|
|
import org.dromara.customer.domain.bo.SalesAnnualFinalizationBo;
|
|
import org.dromara.customer.domain.bo.SalesAnnualFinalizationBo;
|
|
|
|
|
+import org.dromara.customer.domain.vo.CustomerInfoVo;
|
|
|
import org.dromara.customer.domain.vo.SalesAnnualFinalizationVo;
|
|
import org.dromara.customer.domain.vo.SalesAnnualFinalizationVo;
|
|
|
import org.dromara.customer.mapper.SalesAnnualFinalizationMapper;
|
|
import org.dromara.customer.mapper.SalesAnnualFinalizationMapper;
|
|
|
|
|
+import org.dromara.customer.service.ICustomerInfoService;
|
|
|
import org.dromara.customer.service.IOperationLogService;
|
|
import org.dromara.customer.service.IOperationLogService;
|
|
|
import org.dromara.customer.domain.bo.TeamMemberBo;
|
|
import org.dromara.customer.domain.bo.TeamMemberBo;
|
|
|
import org.dromara.customer.service.ITeamMemberService;
|
|
import org.dromara.customer.service.ITeamMemberService;
|
|
@@ -48,6 +50,7 @@ public class SalesAnnualFinalizationServiceImpl implements ISalesAnnualFinalizat
|
|
|
private final SalesAnnualFinalizationMapper baseMapper;
|
|
private final SalesAnnualFinalizationMapper baseMapper;
|
|
|
private final IOperationLogService operationLogService;
|
|
private final IOperationLogService operationLogService;
|
|
|
private final ITeamMemberService teamMemberService;
|
|
private final ITeamMemberService teamMemberService;
|
|
|
|
|
+ private final ICustomerInfoService customerInfoService;
|
|
|
|
|
|
|
|
@DubboReference
|
|
@DubboReference
|
|
|
private RemoteUserService remoteUserService;
|
|
private RemoteUserService remoteUserService;
|
|
@@ -106,6 +109,13 @@ public class SalesAnnualFinalizationServiceImpl implements ISalesAnnualFinalizat
|
|
|
add.setProjectNo(SequenceUtils.nextPaddedIdStr(PROJECT_NO_KEY, Duration.ofDays(3650), 6));
|
|
add.setProjectNo(SequenceUtils.nextPaddedIdStr(PROJECT_NO_KEY, Duration.ofDays(3650), 6));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (StrUtil.isBlank(add.getCustomNo()) && StrUtil.isNotBlank(add.getCustomName())) {
|
|
|
|
|
+ CustomerInfoVo customerInfo = customerInfoService.selectCustomerByName(add.getCustomName());
|
|
|
|
|
+ if (customerInfo != null && StrUtil.isNotBlank(customerInfo.getCustomerNo())) {
|
|
|
|
|
+ add.setCustomNo(customerInfo.getCustomerNo());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
boolean flag = baseMapper.insert(add) > 0;
|
|
boolean flag = baseMapper.insert(add) > 0;
|
|
|
if (flag) {
|
|
if (flag) {
|
|
|
bo.setId(add.getId());
|
|
bo.setId(add.getId());
|