修改bug#40674

This commit is contained in:
梁琦涛
2021-10-14 16:57:16 +08:00
parent 0eddd9727b
commit e5795a5a19
5 changed files with 57 additions and 36 deletions
@@ -260,11 +260,11 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
int count = map.size();
// 合同信息字段为20个,分期信息为5个
if(count < listSpendingContract.size()){
throw new JeroBootException("excel表头错误!");
throw new JeroBootException("文件格式有误,请下载模板后上传!");
}else {
listSpendingContract.forEach(p->{
if(!Objects.equals(map.get(listSpendingContract.indexOf(p)),p)){
throw new JeroBootException("excel表头错误!");
throw new JeroBootException("文件格式有误,请下载模板后上传!");
}
});
int count1 = count - listSpendingContract.size();
@@ -272,7 +272,7 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
Pattern p = Pattern.compile("[0-9]*");
Matcher m = p.matcher(String.valueOf(count1 / 5));
if (!m.matches()){
throw new JeroBootException("excel表头错误!");
throw new JeroBootException("文件格式有误,请下载模板后上传!");
}
int count2 = count1 / listSpendingContractInstallment.size();
for (int i = 1; i <= count2; i++) {