Browse Source

二次销售审批通过竞价未完成之前需要限制不能保存补充信息

zhanglei
dimengzhe 3 days ago
parent
commit
36664df436
  1. 3
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/LoanSecondarySalesApplyVo.java
  2. 17
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java
  3. 27
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescustomer/LoanSecondarySalesCustomerService.java

3
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/LoanSecondarySalesApplyVo.java

@ -56,4 +56,7 @@ public class LoanSecondarySalesApplyVo {
private String procDefId;
@ApiModelProperty("流程实例id")
private String procInstId;
@ApiModelProperty("是否允许补充客户信息,true允许,false不允许")
private boolean allowSave;
}

17
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java

@ -248,6 +248,23 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService<LoanSecon
} else {
record.setAllowModify(false);
}
//查询二次销售审批通过竞价未完成之前需要限制不能保存补充信息,
boolean isTrue = false;
//查询竞价结果
SysNoticeDetailsVo sysNotice = sysNoticeFeign.getDetails(record.getSid()).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;
}
}
record.setAllowSave(isTrue);
}
}
PagerVo<LoanSecondarySalesApplyVo> p = PagerUtil.pageToVo(pagging, null);

27
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescustomer/LoanSecondarySalesCustomerService.java

@ -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();

Loading…
Cancel
Save