diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescustomer/LoanSecondarySalesCustomerService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescustomer/LoanSecondarySalesCustomerService.java index 3d5a4b9a3f..045654022b 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescustomer/LoanSecondarySalesCustomerService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalescustomer/LoanSecondarySalesCustomerService.java @@ -6,16 +6,24 @@ import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTemp; import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign; import com.yxt.anrui.crm.api.crmcustomertemp.CustomerSecondSalesDto; import com.yxt.anrui.riskcenter.api.loansecondarysalesapply.LoanSecondarySalesApply; +import com.yxt.anrui.riskcenter.api.loansecondarysalescost.LoanSecondarySalesCost; import com.yxt.anrui.riskcenter.api.loansecondarysalescustomer.LoanSecondarySalesCustomer; import com.yxt.anrui.riskcenter.api.loansecondarysalescustomer.LoanSecondarySalesCustomerDto; import com.yxt.anrui.riskcenter.api.loansecondarysalescustomer.SalesInitVo; +import com.yxt.anrui.riskcenter.api.loansecondarysalesveh.LoanSecondarySalesVehVo; import com.yxt.anrui.riskcenter.biz.loansecondarysalesapply.LoanSecondarySalesApplyService; +import com.yxt.anrui.riskcenter.biz.loansecondarysalescost.LoanSecondarySalesCostMapper; +import com.yxt.anrui.riskcenter.biz.loansecondarysalescost.LoanSecondarySalesCostService; +import com.yxt.anrui.riskcenter.biz.loansecondarysalesveh.LoanSecondarySalesVehService; import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.base.utils.StringUtils; import com.yxt.common.core.result.ResultBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.Collections; +import java.util.List; + /** * @description: * @author: dimengzhe @@ -28,6 +36,10 @@ public class LoanSecondarySalesCustomerService extends MybatisBaseService loanSecondarySalesVehVoList = loanSecondarySalesVehService.selectByMainSid(sid); + loanSecondarySalesVehVoList.removeAll(Collections.singleton(null)); + if (!loanSecondarySalesVehVoList.isEmpty()) { + salesInitVo.setLoanSecondarySalesVehVoList(loanSecondarySalesVehVoList); + } + LoanSecondarySalesApply loanSecondarySalesApply = loanSecondarySalesApplyService.fetchBySid(sid); + if (!"已办结".equals(loanSecondarySalesApply.getNodeState())) { + return rb.setMsg("该申请未办结"); + } + salesInitVo.setMainSid(sid); + salesInitVo.setCreateDept(loanSecondarySalesApply.getCreateDept()); + salesInitVo.setSaleDate(loanSecondarySalesApply.getCloseDate()); + LoanSecondarySalesCost loanSecondarySalesCost = loanSecondarySalesCostMapper.selectMainSid(sid); + salesInitVo.setSalePrice(loanSecondarySalesCost.getVehPrice().toString()); return rb.success().setData(salesInitVo); } }