|
@ -69,7 +69,7 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo |
|
|
LoanFinOtherPolicyVos loanFinOtherPolicyVos = baseMapper.details(sid); |
|
|
LoanFinOtherPolicyVos loanFinOtherPolicyVos = baseMapper.details(sid); |
|
|
String vehTypeKey = loanFinOtherPolicyVos.getVehTypeKey(); |
|
|
String vehTypeKey = loanFinOtherPolicyVos.getVehTypeKey(); |
|
|
List<String> vehTypeKeyList = new ArrayList<>(); |
|
|
List<String> vehTypeKeyList = new ArrayList<>(); |
|
|
if (StringUtils.isNotBlank(vehTypeKey)){ |
|
|
if (StringUtils.isNotBlank(vehTypeKey)) { |
|
|
String[] s1s = vehTypeKey.split(","); |
|
|
String[] s1s = vehTypeKey.split(","); |
|
|
for (String s1 : s1s) { |
|
|
for (String s1 : s1s) { |
|
|
vehTypeKeyList.add(s1); |
|
|
vehTypeKeyList.add(s1); |
|
@ -78,7 +78,7 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo |
|
|
} |
|
|
} |
|
|
String vehTypeValue = loanFinOtherPolicyVos.getVehTypeValue(); |
|
|
String vehTypeValue = loanFinOtherPolicyVos.getVehTypeValue(); |
|
|
List<String> vehTypeValueList = new ArrayList<>(); |
|
|
List<String> vehTypeValueList = new ArrayList<>(); |
|
|
if (StringUtils.isNotBlank(vehTypeValue)){ |
|
|
if (StringUtils.isNotBlank(vehTypeValue)) { |
|
|
String[] s2s = vehTypeValue.split(","); |
|
|
String[] s2s = vehTypeValue.split(","); |
|
|
for (String s2 : s2s) { |
|
|
for (String s2 : s2s) { |
|
|
vehTypeValueList.add(s2); |
|
|
vehTypeValueList.add(s2); |
|
@ -92,15 +92,15 @@ 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) { |
|
|
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); |
|
|
String deptSid = Arrays.asList(orgPath.split("/")).get(Arrays.asList(orgPath.split("/")).size() - 1); |
|
|
String deptSid = Arrays.asList(orgPath.split("/")).get(Arrays.asList(orgPath.split("/")).size() - 1); |
|
|
List<OtherPolicyVo> list = baseMapper.selectListOne(sid,name); |
|
|
List<OtherPolicyVo> list = baseMapper.selectListOne(sid, name); |
|
|
list.removeAll(Collections.singleton(null)); |
|
|
list.removeAll(Collections.singleton(null)); |
|
|
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)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -131,7 +131,7 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo |
|
|
orgSidPath = orgSidPath.substring(0, i1); |
|
|
orgSidPath = orgSidPath.substring(0, i1); |
|
|
qw.like("orgSidPath", orgSidPath); |
|
|
qw.like("orgSidPath", orgSidPath); |
|
|
//集团权限 查看列表为已报备数据
|
|
|
//集团权限 查看列表为已报备数据
|
|
|
qw.eq("filingState",1); |
|
|
qw.eq("filingState", 1); |
|
|
} else if ("2".equals(orgLevelKey)) { |
|
|
} else if ("2".equals(orgLevelKey)) { |
|
|
orgSidPath = orgSidPath.substring(0, i2); |
|
|
orgSidPath = orgSidPath.substring(0, i2); |
|
|
qw.like("orgSidPath", orgSidPath); |
|
|
qw.like("orgSidPath", orgSidPath); |
|
@ -187,6 +187,8 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo |
|
|
qw.apply(StringUtils.isNotEmpty(validStartDateTo), "date_format (validDateTo,'%Y-%m-%d') >= date_format('" + validStartDateTo + "','%Y-%m-%d')"). |
|
|
qw.apply(StringUtils.isNotEmpty(validStartDateTo), "date_format (validDateTo,'%Y-%m-%d') >= date_format('" + validStartDateTo + "','%Y-%m-%d')"). |
|
|
apply(StringUtils.isNotEmpty(validEndDateTo), "date_format (validDateTo,'%Y-%m-%d') <= date_format('" + validEndDateTo + "','%Y-%m-%d')" |
|
|
apply(StringUtils.isNotEmpty(validEndDateTo), "date_format (validDateTo,'%Y-%m-%d') <= date_format('" + validEndDateTo + "','%Y-%m-%d')" |
|
|
); |
|
|
); |
|
|
|
|
|
qw.eq("isDelete", 0); |
|
|
|
|
|
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); |
|
|
PagerVo<LoanFinOtherPolicyPageVo> p = PagerUtil.pageToVo(pagging, null); |
|
|
PagerVo<LoanFinOtherPolicyPageVo> p = PagerUtil.pageToVo(pagging, null); |
|
@ -215,22 +217,22 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo |
|
|
useDeptName = useDeptName + useDept.getDeptName() + ","; |
|
|
useDeptName = useDeptName + useDept.getDeptName() + ","; |
|
|
} |
|
|
} |
|
|
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)) { |
|
|
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(); |
|
@ -238,15 +240,15 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo |
|
|
for (String s1 : vehTypeKeyList) { |
|
|
for (String s1 : vehTypeKeyList) { |
|
|
vehTypeKey = vehTypeKey + s1 + ","; |
|
|
vehTypeKey = vehTypeKey + s1 + ","; |
|
|
} |
|
|
} |
|
|
if (StringUtils.isNotBlank(vehTypeKey)){ |
|
|
if (StringUtils.isNotBlank(vehTypeKey)) { |
|
|
entity.setVehTypeKey(vehTypeKey.substring(0,vehTypeKey.lastIndexOf(","))); |
|
|
entity.setVehTypeKey(vehTypeKey.substring(0, vehTypeKey.lastIndexOf(","))); |
|
|
} |
|
|
} |
|
|
String vehTypeValue = ""; |
|
|
String vehTypeValue = ""; |
|
|
for (String s2 : vehTypeValueList) { |
|
|
for (String s2 : vehTypeValueList) { |
|
|
vehTypeValue = vehTypeValue + s2 + ","; |
|
|
vehTypeValue = vehTypeValue + s2 + ","; |
|
|
} |
|
|
} |
|
|
if (StringUtils.isNotBlank(vehTypeValue)){ |
|
|
if (StringUtils.isNotBlank(vehTypeValue)) { |
|
|
entity.setVehTypeValue(vehTypeValue.substring(0,vehTypeValue.lastIndexOf(","))); |
|
|
entity.setVehTypeValue(vehTypeValue.substring(0, vehTypeValue.lastIndexOf(","))); |
|
|
} |
|
|
} |
|
|
baseMapper.insert(entity); |
|
|
baseMapper.insert(entity); |
|
|
} |
|
|
} |
|
@ -266,36 +268,36 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo |
|
|
useDeptName = useDeptName + useDept.getDeptName() + ","; |
|
|
useDeptName = useDeptName + useDept.getDeptName() + ","; |
|
|
} |
|
|
} |
|
|
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); |
|
|
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 = ""; |
|
|
for (String s1 : vehTypeKeyList) { |
|
|
for (String s1 : vehTypeKeyList) { |
|
|
vehTypeKey = vehTypeKey + s1 + ","; |
|
|
vehTypeKey = vehTypeKey + s1 + ","; |
|
|
} |
|
|
} |
|
|
if (StringUtils.isNotBlank(vehTypeKey)){ |
|
|
if (StringUtils.isNotBlank(vehTypeKey)) { |
|
|
entity.setVehTypeKey(vehTypeKey.substring(0,vehTypeKey.lastIndexOf(","))); |
|
|
entity.setVehTypeKey(vehTypeKey.substring(0, vehTypeKey.lastIndexOf(","))); |
|
|
} |
|
|
} |
|
|
String vehTypeValue = ""; |
|
|
String vehTypeValue = ""; |
|
|
for (String s2 : vehTypeValueList) { |
|
|
for (String s2 : vehTypeValueList) { |
|
|
vehTypeValue = vehTypeValue + s2 + ","; |
|
|
vehTypeValue = vehTypeValue + s2 + ","; |
|
|
} |
|
|
} |
|
|
if (StringUtils.isNotBlank(vehTypeValue)){ |
|
|
if (StringUtils.isNotBlank(vehTypeValue)) { |
|
|
entity.setVehTypeValue(vehTypeValue.substring(0,vehTypeValue.lastIndexOf(","))); |
|
|
entity.setVehTypeValue(vehTypeValue.substring(0, vehTypeValue.lastIndexOf(","))); |
|
|
} |
|
|
} |
|
|
baseMapper.updateById(entity); |
|
|
baseMapper.updateById(entity); |
|
|
} |
|
|
} |
|
@ -345,4 +347,14 @@ public class LoanFinOtherPolicyService extends MybatisBaseService<LoanFinOtherPo |
|
|
public List<LoanFinOtherPolicy> fetchByMainSid(String mainSid) { |
|
|
public List<LoanFinOtherPolicy> fetchByMainSid(String mainSid) { |
|
|
return baseMapper.fetchByMainSid(mainSid); |
|
|
return baseMapper.fetchByMainSid(mainSid); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public ResultBean deleteOtherPolicy(String[] sids) { |
|
|
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
|
|
//符合条件直接删除
|
|
|
|
|
|
List<String> sidList = Arrays.asList(sids); |
|
|
|
|
|
for (String sid : sidList) { |
|
|
|
|
|
int i = baseMapper.deleteOne(sid); |
|
|
|
|
|
} |
|
|
|
|
|
return rb.success(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|