Browse Source

Merge remote-tracking branch 'origin/master'

master
God 2 years ago
parent
commit
1f019d0540
  1. 26
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java
  2. 4
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerService.java
  3. 19
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanhomevisitprep/HomeVisitDto.java
  4. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanhomevisitprep/LoanHomevisitPrepFeign.java
  5. 5
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanhomevisitprep/LoanHomevisitPrepFeignFallback.java
  6. 1
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanpreloancreditapply/LoanPreloanVo.java
  7. 20
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinpolicy/LoanFinPolicyMapper.xml
  8. 4
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinpolicy/LoanFinPolicyService.java
  9. 13
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanhomevisitprep/LoanHomevisitPrepRest.java
  10. 17
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanhomevisitprep/LoanHomevisitPrepService.java
  11. 7
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanpreloancreditapply/LoanPreloanCreditApplyMapper.xml

26
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java

@ -161,6 +161,9 @@ import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.portal.api.sysuser.app.AppUserOrgInfoVo; import com.yxt.anrui.portal.api.sysuser.app.AppUserOrgInfoVo;
import com.yxt.anrui.portal.config.DictCommonType; import com.yxt.anrui.portal.config.DictCommonType;
import com.yxt.anrui.riskcenter.api.loancreditappealapply.LoanCreditAppealApply; import com.yxt.anrui.riskcenter.api.loancreditappealapply.LoanCreditAppealApply;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.HomeVisitDto;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepDto;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepFeign;
import com.yxt.anrui.riskcenter.api.loanpreloancreditapply.LoanPreloanCreditApply; import com.yxt.anrui.riskcenter.api.loanpreloancreditapply.LoanPreloanCreditApply;
import com.yxt.anrui.riskcenter.api.loanpreloancreditapply.LoanPreloanCreditApplyVo; import com.yxt.anrui.riskcenter.api.loanpreloancreditapply.LoanPreloanCreditApplyVo;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions; import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions;
@ -338,6 +341,8 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
private BaseVehicleStateFeign baseVehicleStateFeign; private BaseVehicleStateFeign baseVehicleStateFeign;
@Autowired @Autowired
private BusSalesOrderBorrowerService busSalesOrderBorrowerService; private BusSalesOrderBorrowerService busSalesOrderBorrowerService;
@Autowired
private LoanHomevisitPrepFeign loanHomevisitPrepFeign;
/** /**
* 构造查询条件 * 构造查询条件
@ -7427,6 +7432,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
if (busSalesOrderBorrower == null) { if (busSalesOrderBorrower == null) {
return rb.setMsg("该贷款人不存在"); return rb.setMsg("该贷款人不存在");
} }
BusSalesOrder busSalesOrder = fetchBySid(busSalesOrderBorrower.getSalesOrderSid());
//查询该销售订单已确定的数量 //查询该销售订单已确定的数量
int count = busSalesOrderBorrowerService.selectByNum(busSalesOrderBorrower.getSalesOrderSid()); int count = busSalesOrderBorrowerService.selectByNum(busSalesOrderBorrower.getSalesOrderSid());
BusSalesOrderPrice busSalesOrderPrice = busSalesOrderPriceService.selectBySalesOrderSid(busSalesOrderBorrower.getSalesOrderSid()); BusSalesOrderPrice busSalesOrderPrice = busSalesOrderPriceService.selectBySalesOrderSid(busSalesOrderBorrower.getSalesOrderSid());
@ -7437,14 +7443,22 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
} }
} }
busSalesOrderBorrower.setVehCount(Integer.parseInt(num)); busSalesOrderBorrower.setVehCount(Integer.parseInt(num));
List<BusSalesOrderVehicle> list = busSalesOrderPriceService.selectByOrdersSid(sid); List<BusSalesOrderVehicle> list = busSalesOrderPriceService.selectByOrdersSid(busSalesOrderBorrower.getSalesOrderSid());
list.removeAll(Collections.singleton(null)); list.removeAll(Collections.singleton(null));
for (int i = 0; i < Integer.parseInt(num); i++) { if(list.size()>0){
BusSalesOrderVehicle busSalesOrderVehicle = list.get(i); for (int i = 0; i < Integer.parseInt(num); i++) {
busSalesOrderVehicle.setBorrowerSid(busSalesOrderBorrower.getSid()); BusSalesOrderVehicle busSalesOrderVehicle = list.get(i);
busSalesOrderVehicleService.updateById(busSalesOrderVehicle); busSalesOrderVehicle.setBorrowerSid(busSalesOrderBorrower.getSid());
busSalesOrderVehicleService.updateById(busSalesOrderVehicle);
}
busSalesOrderBorrowerService.updateById(busSalesOrderBorrower);
HomeVisitDto homeVisitDto = new HomeVisitDto();
homeVisitDto.setSaleOrderSid(busSalesOrderBorrower.getSalesOrderSid());
homeVisitDto.setSaleOrderBorrowerSid(sid);
loanHomevisitPrepFeign.saveHomeVisit(homeVisitDto);
}else{
return rb.setMsg("该销售订单的剩余台数已不足");
} }
busSalesOrderBorrowerService.updateById(busSalesOrderBorrower);
return rb.success(); return rb.success();
} }

4
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerService.java

@ -159,11 +159,11 @@ public class BusSalesOrderBorrowerService extends MybatisBaseService<BusSalesOrd
return rb.setMsg("该销售订单中已存在该贷款人"); return rb.setMsg("该销售订单中已存在该贷款人");
} }
busSalesOrderBorrower = new BusSalesOrderBorrower(); busSalesOrderBorrower = new BusSalesOrderBorrower();
busSalesOrderBorrower.setSalesOrderSid(sid); busSalesOrderBorrower.setSalesOrderSid(saleOrderSid);
busSalesOrderBorrower.setBorrowerName(loanPreloanCreditApply.getCustName()); busSalesOrderBorrower.setBorrowerName(loanPreloanCreditApply.getCustName());
busSalesOrderBorrower.setCustomSid(loanPreloanCreditApply.getCustSid()); busSalesOrderBorrower.setCustomSid(loanPreloanCreditApply.getCustSid());
busSalesOrderBorrower.setMobile(loanPreloanCreditApply.getPhone()); busSalesOrderBorrower.setMobile(loanPreloanCreditApply.getPhone());
LoanFinPolicy loanFinPolicy = baseMapper.selectBySid(sid); LoanFinPolicy loanFinPolicy = baseMapper.selectBySid(saleOrderSid);
if (loanFinPolicy != null) { if (loanFinPolicy != null) {
busSalesOrderBorrower.setBankSid(loanFinPolicy.getBankSid()); busSalesOrderBorrower.setBankSid(loanFinPolicy.getBankSid());
busSalesOrderBorrower.setBankName(loanFinPolicy.getBankShortName()); busSalesOrderBorrower.setBankName(loanFinPolicy.getBankShortName());

19
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanhomevisitprep/HomeVisitDto.java

@ -0,0 +1,19 @@
package com.yxt.anrui.riskcenter.api.loanhomevisitprep;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @description:
* @author: dimengzhe
* @date: 2023/9/13
**/
@Data
public class HomeVisitDto implements Dto {
private static final long serialVersionUID = -5874422243133205264L;
@ApiModelProperty("销售订单sid")
private String saleOrderSid;
@ApiModelProperty("销售订单贷款人表sid")
private String saleOrderBorrowerSid;
}

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanhomevisitprep/LoanHomevisitPrepFeign.java

@ -90,4 +90,9 @@ public interface LoanHomevisitPrepFeign {
@PostMapping("/saveLoanCon") @PostMapping("/saveLoanCon")
@ResponseBody @ResponseBody
public ResultBean saveLoanCon(@RequestParam("sid") String sid, @RequestParam("conSetUpKey") String conSetUpKey); public ResultBean saveLoanCon(@RequestParam("sid") String sid, @RequestParam("conSetUpKey") String conSetUpKey);
@ApiOperation("确定贷款人推送家纺准备")
@PostMapping("/saveHomeVisit")
@ResponseBody
ResultBean saveHomeVisit(@RequestBody HomeVisitDto dto);
} }

5
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanhomevisitprep/LoanHomevisitPrepFeignFallback.java

@ -84,4 +84,9 @@ public class LoanHomevisitPrepFeignFallback implements LoanHomevisitPrepFeign {
public ResultBean saveLoanCon(String sid, String conSetUpKey) { public ResultBean saveLoanCon(String sid, String conSetUpKey) {
return null; return null;
} }
@Override
public ResultBean saveHomeVisit(HomeVisitDto dto) {
return null;
}
} }

1
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanpreloancreditapply/LoanPreloanVo.java

@ -1,5 +1,6 @@
package com.yxt.anrui.riskcenter.api.loanpreloancreditapply; package com.yxt.anrui.riskcenter.api.loanpreloancreditapply;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.vo.Vo; import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;

20
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinpolicy/LoanFinPolicyMapper.xml

@ -55,7 +55,8 @@
, #{name} , #{name}
, '%') , '%')
</if> </if>
and lfp.validDateTo > now() and lfp.validDateTo
> now()
</where> </where>
order by lfp.id desc order by lfp.id desc
</select> </select>
@ -67,7 +68,10 @@
lfp.bankShortName, lfp.bankShortName,
lfp.busTypeValue, lfp.busTypeValue,
lfp.vehCategoryValue, lfp.vehCategoryValue,
lfp.isPack, case lfp.isPack
when 1 then '打包'
when 0 then '不打包'
end as isPack,
lfp.guaranteeTypeKey, lfp.guaranteeTypeKey,
lfp.remarks, lfp.remarks,
lfp.vehAccidentAmount, lfp.vehAccidentAmount,
@ -108,18 +112,22 @@
where lfp.filingState = 1 where lfp.filingState = 1
and isPack = #{isPack} and isPack = #{isPack}
<if test="deptSid != null and deptSid != ''"> <if test="deptSid != null and deptSid != ''">
and lfp.useDeptSids like concat('%',#{deptSid},'%') and lfp.useDeptSids like concat('%', #{deptSid}, '%')
</if> </if>
<if test="vehTypeKey != null and vehTypeKey != ''"> <if test="vehTypeKey != null and vehTypeKey != ''">
and lfp.vehTypeKey like concat('%',#{vehTypeKey},'%') and lfp.vehTypeKey like concat('%', #{vehTypeKey}, '%')
</if> </if>
and lfp.validDateTo > now() and lfp.useSate = 0 and lfp.riskState = 0 and lfp.validDateTo > now()
and lfp.useSate = 0
and lfp.riskState = 0
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and lfp.policyName like concat('%', #{name}, '%') and lfp.policyName like concat('%', #{name}, '%')
</if> </if>
</select> </select>
<select id="selectVehType" resultType="java.lang.String"> <select id="selectVehType" resultType="java.lang.String">
select vehicleType from anrui_base.base_vehicle_model where sid = #{modelSid} select vehicleType
from anrui_base.base_vehicle_model
where sid = #{modelSid}
</select> </select>
</mapper> </mapper>

4
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinpolicy/LoanFinPolicyService.java

@ -652,9 +652,9 @@ public class LoanFinPolicyService extends MybatisBaseService<LoanFinPolicyMapper
} }
if (StringUtils.isNotBlank(appPolicyDetailsVo.getGuaranteeTypeKey())) { if (StringUtils.isNotBlank(appPolicyDetailsVo.getGuaranteeTypeKey())) {
if ("01".equals(appPolicyDetailsVo.getGuaranteeTypeKey())) { if ("01".equals(appPolicyDetailsVo.getGuaranteeTypeKey())) {
appPolicyDetailsVo.setIsGuarantee("1"); appPolicyDetailsVo.setIsGuarantee("担保");
} else { } else {
appPolicyDetailsVo.setIsGuarantee("0"); appPolicyDetailsVo.setIsGuarantee("非担保");
} }
} }
if (appPolicyDetailsVo.getIsOtherProduct() == 1) {//有其他融 if (appPolicyDetailsVo.getIsOtherProduct() == 1) {//有其他融

13
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanhomevisitprep/LoanHomevisitPrepRest.java

@ -25,6 +25,7 @@
*********************************************************/ *********************************************************/
package com.yxt.anrui.riskcenter.biz.loanhomevisitprep; package com.yxt.anrui.riskcenter.biz.loanhomevisitprep;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.*;
import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo; import com.yxt.common.core.vo.PagerVo;
@ -35,13 +36,6 @@ import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrep;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepQuery;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepVo;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepDetailsVo;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepDto;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepFeign;
/** /**
* Project: anrui-riskcenter(家访准备) <br/> * Project: anrui-riskcenter(家访准备) <br/>
* File: LoanHomevisitPrepFeignFallback.java <br/> * File: LoanHomevisitPrepFeignFallback.java <br/>
@ -113,4 +107,9 @@ public class LoanHomevisitPrepRest implements LoanHomevisitPrepFeign {
public ResultBean saveLoanCon(String sid, String conSetUpKey) { public ResultBean saveLoanCon(String sid, String conSetUpKey) {
return loanHomevisitPrepService.saveLoanCon(sid, conSetUpKey); return loanHomevisitPrepService.saveLoanCon(sid, conSetUpKey);
} }
@Override
public ResultBean saveHomeVisit(HomeVisitDto dto) {
return loanHomevisitPrepService.saveHomeVisit(dto);
}
} }

17
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanhomevisitprep/LoanHomevisitPrepService.java

@ -42,6 +42,7 @@ import com.yxt.anrui.buscenter.api.bussalesvehicleorder.BusSalesVehicleOrderFeig
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigate.LoanHomevisitInvestigate; import com.yxt.anrui.riskcenter.api.loanhomevisitinvestigate.LoanHomevisitInvestigate;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.*;
import com.yxt.anrui.riskcenter.api.loanpreloancreditapply.LoanPreloanCreditApplyVo; import com.yxt.anrui.riskcenter.api.loanpreloancreditapply.LoanPreloanCreditApplyVo;
import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigate.LoanHomevisitInvestigateService; import com.yxt.anrui.riskcenter.biz.loanhomevisitinvestigate.LoanHomevisitInvestigateService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -50,12 +51,6 @@ import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo; import com.yxt.common.core.vo.PagerVo;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrep;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepQuery;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepVo;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepDetailsVo;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepDto;
import com.yxt.anrui.riskcenter.api.loanhomevisitprep.LoanHomevisitPrepFeign;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -214,7 +209,7 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr
loanHomevisitInvestigate.setSaleOrderBorrowerSid(loanHomevisitPrep.getSaleOrderBorrowerSid()); loanHomevisitInvestigate.setSaleOrderBorrowerSid(loanHomevisitPrep.getSaleOrderBorrowerSid());
loanHomevisitInvestigateService.save(loanHomevisitInvestigate); loanHomevisitInvestigateService.save(loanHomevisitInvestigate);
//修改销售订单贷款人家访状态 //修改销售订单贷款人家访状态
busSalesOrderBorrowerFeign.updateBusNo("302",loanHomevisitPrep.getSaleOrderBorrowerSid()); busSalesOrderBorrowerFeign.updateBusNo("302", loanHomevisitPrep.getSaleOrderBorrowerSid());
//修改车辆状态表家访状态 //修改车辆状态表家访状态
List<BusSalesOrderVehicle> busSalesOrderVehicles = busSalesOrderVehicleFeign.selectListByOrderSid(loanHomevisitPrep.getSaleOrderSid()).getData(); List<BusSalesOrderVehicle> busSalesOrderVehicles = busSalesOrderVehicleFeign.selectListByOrderSid(loanHomevisitPrep.getSaleOrderSid()).getData();
List<BaseVehicleStateDto> baseVehicleStateDtoArrayList = new ArrayList<>(); List<BaseVehicleStateDto> baseVehicleStateDtoArrayList = new ArrayList<>();
@ -276,4 +271,12 @@ public class LoanHomevisitPrepService extends MybatisBaseService<LoanHomevisitPr
} }
return rb.success(); return rb.success();
} }
public ResultBean saveHomeVisit(HomeVisitDto dto) {
ResultBean rb = ResultBean.fireFail();
LoanHomevisitPrep loanHomevisitPrep = new LoanHomevisitPrep();
BeanUtil.copyProperties(dto, loanHomevisitPrep, "sid");
baseMapper.insert(loanHomevisitPrep);
return rb.success();
}
} }

7
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanpreloancreditapply/LoanPreloanCreditApplyMapper.xml

@ -22,9 +22,10 @@
</select> </select>
<select id="getOrderLoanPagerList" resultType="com.yxt.anrui.riskcenter.api.loanpreloancreditapply.LoanPreloanVo"> <select id="getOrderLoanPagerList" resultType="com.yxt.anrui.riskcenter.api.loanpreloancreditapply.LoanPreloanVo">
select distinct(la.idCard),la.custSid,la.custName,DATE_FORMAT(la.createTime, '%Y-%m-%d') as createTime,la.phone,la.gsfkjg,la.capitalName, select distinct(la.idCard),la.custSid,
la.custName,DATE_FORMAT(la.createTime, '%Y-%m-%d') as createTime,
la.phone,la.gsfkjg,la.capitalName,
la.zffkjg, la.zffkjg,
la.capitalName,
lp.peoName, lp.peoName,
la.sid la.sid
from loan_preloan_credit_apply la from loan_preloan_credit_apply la
@ -42,7 +43,7 @@
, '%') , '%')
</if> </if>
</where> </where>
order by id desc order by la.id desc
</select> </select>
<select id="judgeIsLoan" resultType="com.yxt.anrui.riskcenter.api.loanpreloancreditapply.LoanPreloanCreditApply"> <select id="judgeIsLoan" resultType="com.yxt.anrui.riskcenter.api.loanpreloancreditapply.LoanPreloanCreditApply">

Loading…
Cancel
Save