Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 2 years ago
parent
commit
658ec41b03
  1. 2
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfinotherPolicy/LoanFinOtherPolicyFeign.java
  2. 4
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfinotherPolicy/LoanFinOtherPolicyPageVo.java
  3. 3
      anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfinpolicy/LoanFinPolicyVos.java
  4. 4
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinotherPolicy/LoanFinOtherPolicyMapper.xml
  5. 4
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinotherPolicy/LoanFinOtherPolicyRest.java
  6. 70
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinotherPolicy/LoanFinOtherPolicyService.java
  7. 29
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinpolicy/LoanFinPolicyService.java
  8. 2
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/solutions/SolutionsFeign.java
  9. 4
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/solutions/SolutionsRest.java
  10. 4
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/solutions/SolutionsService.java

2
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfinotherPolicy/LoanFinOtherPolicyFeign.java

@ -49,7 +49,7 @@ public interface LoanFinOtherPolicyFeign {
@GetMapping("selectList") @GetMapping("selectList")
@ApiOperation("获取产品政策下其他融,或分公司下其他融") @ApiOperation("获取产品政策下其他融,或分公司下其他融")
ResultBean<List<OtherPolicyVo>> selectList(@RequestParam("orgPath") String orgPath, @RequestParam("userSid") String userSid, @RequestParam(value = "sid", required = false) String sid, @RequestParam(value = "name", required = false) String name,@RequestParam(value = "modelSid", required = false) String modelSid); ResultBean<List<OtherPolicyVo>> selectList(@RequestParam("orgPath") String orgPath, @RequestParam("userSid") String userSid, @RequestParam(value = "sid", required = false) String sid, @RequestParam(value = "name", required = false) String name,@RequestParam(value = "modelSid", required = false) String modelSid ,@RequestParam(value = "period", required = false) String period);
@ApiOperation("使用状态停用、开启:useState为1时走停用,为0时走开启") @ApiOperation("使用状态停用、开启:useState为1时走停用,为0时走开启")
@PostMapping("setState") @PostMapping("setState")

4
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfinotherPolicy/LoanFinOtherPolicyPageVo.java

@ -1,6 +1,7 @@
package com.yxt.anrui.riskcenter.api.loanfinotherPolicy; package com.yxt.anrui.riskcenter.api.loanfinotherPolicy;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.domain.BaseEntity; import com.yxt.common.core.domain.BaseEntity;
import com.yxt.common.core.vo.Vo; import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -43,4 +44,7 @@ public class LoanFinOtherPolicyPageVo implements Vo {
private int period; private int period;
@ApiModelProperty("年利率(%)") @ApiModelProperty("年利率(%)")
private BigDecimal yearRatio; private BigDecimal yearRatio;
@ApiModelProperty("编辑按钮显示")
@JsonProperty("updateBtn")
private boolean updateBtn;
} }

3
anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanfinpolicy/LoanFinPolicyVos.java

@ -57,4 +57,7 @@ public class LoanFinPolicyVos implements Vo {
@ApiModelProperty("是否有其他融") @ApiModelProperty("是否有其他融")
@JsonProperty("isOtherProduct") @JsonProperty("isOtherProduct")
private boolean isOtherProduct; private boolean isOtherProduct;
@ApiModelProperty("编辑按钮显示")
@JsonProperty("updateBtn")
private boolean updateBtn;
} }

4
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinotherPolicy/LoanFinOtherPolicyMapper.xml

@ -57,7 +57,7 @@
name,lfo.id,lfo.period,lfo.yearRatio name,lfo.id,lfo.period,lfo.yearRatio
from loan_fin_otherpolicy lfo from loan_fin_otherpolicy lfo
where lfo.useOrgSid = #{useOrgSid} where lfo.useOrgSid = #{useOrgSid}
and lfo.filingState = 2 and lfo.filingState = 1
and lfo.validDateTo > now() and lfo.validDateTo > now()
and lfo.useSate = 0 and lfo.useSate = 0
and lfo.riskState = 0 and lfo.riskState = 0
@ -74,7 +74,7 @@
select lfo.sid, lfo.otherPolicyName as name,lfo.id,lfo.period,lfo.yearRatio select lfo.sid, lfo.otherPolicyName as name,lfo.id,lfo.period,lfo.yearRatio
from loan_fin_otherpolicy lfo from loan_fin_otherpolicy lfo
where lfo.useOrgSid = #{useOrgSid} where lfo.useOrgSid = #{useOrgSid}
and lfo.filingState = 2 and lfo.filingState = 1
and lfo.useSate = 0 and lfo.useSate = 0
and lfo.riskState = 0 and lfo.riskState = 0
and lfo.validDateTo > now() and lfo.validDateTo > now()

4
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinotherPolicy/LoanFinOtherPolicyRest.java

@ -50,8 +50,8 @@ public class LoanFinOtherPolicyRest implements LoanFinOtherPolicyFeign {
} }
@Override @Override
public ResultBean<List<OtherPolicyVo>> selectList(String orgPath, String userSid, String sid,String name,String modelSid) { public ResultBean<List<OtherPolicyVo>> selectList(String orgPath, String userSid, String sid,String name,String modelSid ,String period) {
return loanFinOtherPolicyService.selectList(orgPath,userSid,sid,name,modelSid); return loanFinOtherPolicyService.selectList(orgPath,userSid,sid,name,modelSid ,period);
} }
@Override @Override

70
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanfinotherPolicy/LoanFinOtherPolicyService.java

@ -8,10 +8,7 @@ import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
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.loanfinotherPolicy.*; import com.yxt.anrui.riskcenter.api.loanfinotherPolicy.*;
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicy; import com.yxt.anrui.riskcenter.api.loanfinpolicy.*;
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanFinPolicyStateQuery;
import com.yxt.anrui.riskcenter.api.loanfinpolicy.LoanRiskStateQuery;
import com.yxt.anrui.riskcenter.api.loanfinpolicy.UseDept;
import com.yxt.anrui.riskcenter.api.loanpreloancreditapply.*; import com.yxt.anrui.riskcenter.api.loanpreloancreditapply.*;
import com.yxt.anrui.riskcenter.api.loanpreloancreditpeo.LoanPreloanCreditPeoDto; import com.yxt.anrui.riskcenter.api.loanpreloancreditpeo.LoanPreloanCreditPeoDto;
import com.yxt.anrui.riskcenter.biz.loanfinpolicy.LoanFinPolicyService; import com.yxt.anrui.riskcenter.biz.loanfinpolicy.LoanFinPolicyService;
@ -25,10 +22,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList; import java.text.ParseException;
import java.util.Arrays; import java.text.SimpleDateFormat;
import java.util.Collections; import java.util.*;
import java.util.List;
/** /**
* @description: * @description:
@ -92,7 +88,7 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo
return baseMapper.selectByMainSids(sid); return baseMapper.selectByMainSids(sid);
} }
public ResultBean<List<OtherPolicyVo>> selectList(String orgPath, String userSid, String sid, String name, String modelSid) { public ResultBean<List<OtherPolicyVo>> selectList(String orgPath, String userSid, String sid, String name, String modelSid, String period) {
ResultBean<List<OtherPolicyVo>> rb = ResultBean.fireFail(); ResultBean<List<OtherPolicyVo>> rb = ResultBean.fireFail();
String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData(); String useOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData();
String vehTypeKey = loanFinPolicyService.selectVehType(modelSid); String vehTypeKey = loanFinPolicyService.selectVehType(modelSid);
@ -102,8 +98,15 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo
if (list.isEmpty()) { if (list.isEmpty()) {
list = baseMapper.selectListTwo(useOrgSid, name, vehTypeKey, deptSid); list = baseMapper.selectListTwo(useOrgSid, name, vehTypeKey, deptSid);
list.removeAll(Collections.singleton(null)); list.removeAll(Collections.singleton(null));
//移除超过期数的对象
Iterator iterator = list.iterator();
while (iterator.hasNext()) {
OtherPolicyVo otherPolicyVo = (OtherPolicyVo) iterator.next();
if (Integer.parseInt(otherPolicyVo.getPeriod()) > Integer.parseInt(period)) {
iterator.remove();
}
}
} }
return rb.success().setData(list); return rb.success().setData(list);
} }
@ -191,6 +194,31 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo
qw.orderByDesc("createTime"); qw.orderByDesc("createTime");
IPage<LoanFinOtherPolicy> page = PagerUtil.queryToPage(pq); IPage<LoanFinOtherPolicy> page = PagerUtil.queryToPage(pq);
IPage<LoanFinOtherPolicyPageVo> pagging = baseMapper.selectPageVo(page, qw); IPage<LoanFinOtherPolicyPageVo> pagging = baseMapper.selectPageVo(page, qw);
List<LoanFinOtherPolicyPageVo> records = pagging.getRecords();
records.removeAll(Collections.singleton(null));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (!records.isEmpty()) {
for (LoanFinOtherPolicyPageVo record : records) {
record.setUpdateBtn(false);
if (record.getFilingState().equals("未报备")) {
record.setUpdateBtn(true);
}
if (record.getFilingState().equals("已报备")) {
String validDateTo = record.getValidDateTo();
try {
Date validDate = sdf.parse(validDateTo);
int i = validDate.compareTo(new Date());
if (i < 0) {
record.setUpdateBtn(true);
}
} catch (ParseException e) {
e.printStackTrace();
}
}
}
}
PagerVo<LoanFinOtherPolicyPageVo> p = PagerUtil.pageToVo(pagging, null); PagerVo<LoanFinOtherPolicyPageVo> p = PagerUtil.pageToVo(pagging, null);
return p; return p;
} }
@ -218,16 +246,16 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo
} }
String otherPolicyName = ""; String otherPolicyName = "";
if (StringUtils.isNotBlank(entity.getBankShortName())) { if (StringUtils.isNotBlank(entity.getBankShortName())) {
otherPolicyName = otherPolicyName + entity.getBankShortName(); otherPolicyName = otherPolicyName + entity.getBankShortName() + " ";
} }
if (StringUtils.isNotBlank(entity.getProductTypeValue())) { if (StringUtils.isNotBlank(entity.getProductTypeValue())) {
otherPolicyName = otherPolicyName + entity.getProductTypeValue(); otherPolicyName = otherPolicyName + entity.getProductTypeValue() + " ";
} }
if (StringUtils.isNotBlank(entity.getPeriodKey())) { if (StringUtils.isNotBlank(entity.getPeriodKey())) {
otherPolicyName = otherPolicyName + entity.getPeriod() + "期"; otherPolicyName = otherPolicyName + entity.getPeriod() + "期" + " ";
} }
if (entity.getMaxLoanRatio() != null) { if (entity.getMaxLoanRatio() != null) {
otherPolicyName = otherPolicyName + entity.getMaxLoanRatio(); otherPolicyName = otherPolicyName + entity.getMaxLoanRatio() + "%";
} }
entity.setOtherPolicyName(otherPolicyName); entity.setOtherPolicyName(otherPolicyName);
if (StringUtils.isNotBlank(useDeptSid)) { if (StringUtils.isNotBlank(useDeptSid)) {
@ -269,20 +297,22 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo
} }
String otherPolicyName = ""; String otherPolicyName = "";
if (StringUtils.isNotBlank(entity.getBankShortName())) { if (StringUtils.isNotBlank(entity.getBankShortName())) {
otherPolicyName = otherPolicyName + entity.getBankShortName(); otherPolicyName = otherPolicyName + entity.getBankShortName() + " ";
} }
if (StringUtils.isNotBlank(entity.getProductTypeValue())) { if (StringUtils.isNotBlank(entity.getProductTypeValue())) {
otherPolicyName = otherPolicyName + entity.getProductTypeValue(); otherPolicyName = otherPolicyName + entity.getProductTypeValue() + " ";
} }
if (StringUtils.isNotBlank(entity.getPeriodKey())) { if (StringUtils.isNotBlank(entity.getPeriodKey())) {
otherPolicyName = otherPolicyName + entity.getPeriod() + "期"; otherPolicyName = otherPolicyName + entity.getPeriod() + "期" + " ";
} }
if (entity.getMaxLoanRatio() != null) { if (entity.getMaxLoanRatio() != null) {
otherPolicyName = otherPolicyName + entity.getMaxLoanRatio(); otherPolicyName = otherPolicyName + entity.getMaxLoanRatio() + "%";
} }
entity.setOtherPolicyName(otherPolicyName); entity.setOtherPolicyName(otherPolicyName);
if (StringUtils.isNotBlank(useDeptSid)) {
entity.setUseDeptSids(useDeptSid.substring(0, useDeptSid.lastIndexOf(","))); entity.setUseDeptSids(useDeptSid.substring(0, useDeptSid.lastIndexOf(",")));
entity.setUseDeptNames(useDeptName.substring(0, useDeptName.lastIndexOf(","))); entity.setUseDeptNames(useDeptName.substring(0, useDeptName.lastIndexOf(",")));
}
List<String> vehTypeKeyList = dto.getVehTypeKeyList(); List<String> vehTypeKeyList = dto.getVehTypeKeyList();
List<String> vehTypeValueList = dto.getVehTypeValueList(); List<String> vehTypeValueList = dto.getVehTypeValueList();
String vehTypeKey = ""; String vehTypeKey = "";
@ -299,6 +329,10 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo
if (StringUtils.isNotBlank(vehTypeValue)) { if (StringUtils.isNotBlank(vehTypeValue)) {
entity.setVehTypeValue(vehTypeValue.substring(0, vehTypeValue.lastIndexOf(","))); entity.setVehTypeValue(vehTypeValue.substring(0, vehTypeValue.lastIndexOf(",")));
} }
//----------已备案且超过有效期再次编辑时,修改备案状态为未备案-------
if (entity.getFilingState() == 1) {
entity.setFilingState(0);
}
baseMapper.updateById(entity); baseMapper.updateById(entity);
} }

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

@ -25,6 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Date; import java.util.Date;
@ -351,6 +353,10 @@ public class LoanFinPolicyService extends MybatisBaseService<LoanFinPolicyMapper
} }
} }
loanFinPolicy.setPolicyName(policyName.toString()); loanFinPolicy.setPolicyName(policyName.toString());
//----------已备案且超过有效期再次编辑时,修改备案状态为未备案-------
if (loanFinPolicy.getFilingState() == 1) {
loanFinPolicy.setFilingState(0);
}
baseMapper.updateById(loanFinPolicy); baseMapper.updateById(loanFinPolicy);
} }
return rb.success(); return rb.success();
@ -542,6 +548,29 @@ public class LoanFinPolicyService extends MybatisBaseService<LoanFinPolicyMapper
qw.eq("lfp.isDelete", 0); qw.eq("lfp.isDelete", 0);
IPage<LoanFinPolicy> page = PagerUtil.queryToPage(pagerQuery); IPage<LoanFinPolicy> page = PagerUtil.queryToPage(pagerQuery);
IPage<LoanFinPolicyVos> pagging = baseMapper.pagerList(page, qw); IPage<LoanFinPolicyVos> pagging = baseMapper.pagerList(page, qw);
List<LoanFinPolicyVos> records = pagging.getRecords();
records.removeAll(Collections.singleton(null));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (!records.isEmpty()) {
for (LoanFinPolicyVos record : records) {
record.setUpdateBtn(false);
if (record.getFilingStateValue().equals("未报备")) {
record.setUpdateBtn(true);
}
if (record.getFilingStateValue().equals("已报备")) {
String validDateTo = record.getValidDateTo();
try {
Date validDate = sdf.parse(validDateTo);
int i = validDate.compareTo(new Date());
if (i < 0) {
record.setUpdateBtn(true);
}
} catch (ParseException e) {
e.printStackTrace();
}
}
}
}
PagerVo<LoanFinPolicyVos> p = PagerUtil.pageToVo(pagging, null); PagerVo<LoanFinPolicyVos> p = PagerUtil.pageToVo(pagging, null);
return p; return p;
} }

2
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/solutions/SolutionsFeign.java

@ -48,7 +48,7 @@ public interface SolutionsFeign {
@ApiOperation("获取产品政策下其他融,或分公司下其他融") @ApiOperation("获取产品政策下其他融,或分公司下其他融")
@GetMapping("/selectOtherList") @GetMapping("/selectOtherList")
@ResponseBody @ResponseBody
ResultBean<List<OtherPolicysVo>> selectOtherList(@RequestParam("orgPath") String orgPath, @RequestParam("userSid") String userSid, @RequestParam(value = "sid", required = false) String sid, @RequestParam(value = "name", required = false) String name,@RequestParam(value = "modelSid", required = false) String modelSid); ResultBean<List<OtherPolicysVo>> selectOtherList(@RequestParam("orgPath") String orgPath, @RequestParam("userSid") String userSid, @RequestParam(value = "sid", required = false) String sid, @RequestParam(value = "name", required = false) String name,@RequestParam(value = "modelSid", required = false) String modelSid,@RequestParam(value = "period", required = false) String period);
@ApiOperation("初始化金融方案2") @ApiOperation("初始化金融方案2")
@GetMapping("/selectDetailsVo2") @GetMapping("/selectDetailsVo2")

4
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/solutions/SolutionsRest.java

@ -44,8 +44,8 @@ public class SolutionsRest implements SolutionsFeign {
} }
@Override @Override
public ResultBean<List<OtherPolicysVo>> selectOtherList(String orgPath, String userSid, String sid, String name,String modelSid) { public ResultBean<List<OtherPolicysVo>> selectOtherList(String orgPath, String userSid, String sid, String name,String modelSid,String period) {
return solutionsService.selectOtherList(orgPath, userSid, sid, name,modelSid); return solutionsService.selectOtherList(orgPath, userSid, sid, name,modelSid,period);
} }
@Override @Override

4
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/solutions/SolutionsService.java

@ -75,10 +75,10 @@ public class SolutionsService {
return rb.success().setData(listNew); return rb.success().setData(listNew);
} }
public ResultBean<List<OtherPolicysVo>> selectOtherList(String orgPath, String userSid, String sid, String name,String modelSid) { public ResultBean<List<OtherPolicysVo>> selectOtherList(String orgPath, String userSid, String sid, String name, String modelSid, String period) {
ResultBean<List<OtherPolicysVo>> rb = ResultBean.fireFail(); ResultBean<List<OtherPolicysVo>> rb = ResultBean.fireFail();
List<OtherPolicysVo> listNew = new ArrayList<>(); List<OtherPolicysVo> listNew = new ArrayList<>();
ResultBean<List<OtherPolicyVo>> resultBean = loanFinOtherPolicyFeign.selectList(orgPath, userSid, sid, name,modelSid); ResultBean<List<OtherPolicyVo>> resultBean = loanFinOtherPolicyFeign.selectList(orgPath, userSid, sid, name, modelSid, period);
if (resultBean.getData() != null && !resultBean.getData().isEmpty()) { if (resultBean.getData() != null && !resultBean.getData().isEmpty()) {
List<OtherPolicyVo> list = resultBean.getData(); List<OtherPolicyVo> list = resultBean.getData();
list.removeAll(Collections.singleton(null)); list.removeAll(Collections.singleton(null));

Loading…
Cancel
Save