|
|
@ -6,11 +6,14 @@ import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTemp; |
|
|
|
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign; |
|
|
|
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo; |
|
|
|
import com.yxt.anrui.crm.api.crmcustomertemp.CustomerSecondSalesDto; |
|
|
|
import com.yxt.anrui.portal.api.sysnotice.SysNoticeDetailsVo; |
|
|
|
import com.yxt.anrui.portal.api.sysnotice.SysNoticeFeign; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.LoanOutboundApply; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.LoanOutboundApplyDto; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanoutboundapply.OutboundVinListDto; |
|
|
|
import com.yxt.anrui.riskcenter.api.loanreturnvehledger.LoanReturnVehLedger; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansecondarysalesapply.LoanSecondarySalesApply; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansecondarysalesbidding.LoanSecondarySalesBidding; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansecondarysalescost.LoanSecondarySalesCost; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansecondarysalescustomer.FileQuery; |
|
|
|
import com.yxt.anrui.riskcenter.api.loansecondarysalescustomer.LoanSecondarySalesCustomer; |
|
|
@ -31,6 +34,9 @@ import com.yxt.common.core.result.ResultBean; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.ZoneId; |
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
@ -56,10 +62,31 @@ public class LoanSecondarySalesCustomerService extends MybatisBaseService<LoanSe |
|
|
|
private LoanOutboundApplyService loanOutboundApplyService; |
|
|
|
@Autowired |
|
|
|
private LoanReturnVehLedgerService loanReturnVehLedgerService; |
|
|
|
@Autowired |
|
|
|
private SysNoticeFeign sysNoticeFeign; |
|
|
|
|
|
|
|
public ResultBean saveSalesCustomer(LoanSecondarySalesCustomerDto dto) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
LoanSecondarySalesCustomer loanSecondarySalesCustomer = baseMapper.selectByMainSid(dto.getMainSid()); |
|
|
|
//查询二次销售审批通过竞价未完成之前需要限制不能保存补充信息,
|
|
|
|
boolean isTrue = false; |
|
|
|
//查询竞价结果
|
|
|
|
SysNoticeDetailsVo sysNotice = sysNoticeFeign.getDetails(dto.getMainSid()).getData(); |
|
|
|
if(sysNotice != null){ |
|
|
|
//查询截止日期,是否小于或等于当前日期
|
|
|
|
String validityDate = sysNotice.getValidityDate(); |
|
|
|
// 解析截止日期(假设格式为 yyyy-MM-dd)
|
|
|
|
LocalDate noticeExpiryDate = LocalDate.parse(validityDate); |
|
|
|
LocalDate currentDate = LocalDate.now(); |
|
|
|
|
|
|
|
// 判断是否已过期(截止日期 <= 当前日期)
|
|
|
|
if (noticeExpiryDate.isBefore(currentDate) || noticeExpiryDate.isEqual(currentDate)) { |
|
|
|
isTrue = true; |
|
|
|
} |
|
|
|
} |
|
|
|
if(!isTrue){ |
|
|
|
return rb.setMsg("二次销售竞价未完成之前不能保存补充信息"); |
|
|
|
} |
|
|
|
String customerSid = dto.getCustomerSid(); |
|
|
|
LoanSecondarySalesApply loanSecondarySalesApply = loanSecondarySalesApplyService.fetchBySid(dto.getMainSid()); |
|
|
|
String userSid = loanSecondarySalesApply.getCreateBySid(); |
|
|
|