通用项目详情完善
This commit is contained in:
+1
-1
@@ -95,7 +95,7 @@ public class ProjectDetailServiceImpl implements ProjectDetailService {
|
|||||||
// 合同编号查找合同id
|
// 合同编号查找合同id
|
||||||
if(!StringUtils.isBlank(payCommonProject.getContractNum())){
|
if(!StringUtils.isBlank(payCommonProject.getContractNum())){
|
||||||
LambdaQueryWrapper<PayIncomeContract> query = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<PayIncomeContract> query = new LambdaQueryWrapper<>();
|
||||||
query.eq(PayIncomeContract::getContractName,payCommonProject.getContractNum());
|
query.eq(PayIncomeContract::getContractNum,payCommonProject.getContractNum());
|
||||||
List<PayIncomeContract> list = payIncomeContractService.list(query);
|
List<PayIncomeContract> list = payIncomeContractService.list(query);
|
||||||
if(!CollectionUtils.isEmpty(list)){
|
if(!CollectionUtils.isEmpty(list)){
|
||||||
// 查看是否有关联
|
// 查看是否有关联
|
||||||
|
|||||||
+2
-2
@@ -351,7 +351,7 @@ public class PayCompanyManagementController extends JeroController<PayCompanyMan
|
|||||||
int count = list.indexOf(p);
|
int count = list.indexOf(p);
|
||||||
// 校验excel表中是否存在重复企业名称
|
// 校验excel表中是否存在重复企业名称
|
||||||
if(listCompany.contains(p.getCompanyName())){
|
if(listCompany.contains(p.getCompanyName())){
|
||||||
msg.append("第 ").append(count + 3).append(" 行:企业名称在excel中重复,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:企业名称在excel中重复,请修改。<br/>");
|
||||||
}
|
}
|
||||||
listCompany.add(p.getCompanyName());
|
listCompany.add(p.getCompanyName());
|
||||||
p.setDataSource(PayCompanyManagementCommon.DATA_SOURCE1);
|
p.setDataSource(PayCompanyManagementCommon.DATA_SOURCE1);
|
||||||
@@ -375,7 +375,7 @@ public class PayCompanyManagementController extends JeroController<PayCompanyMan
|
|||||||
listRemove.add(p);
|
listRemove.add(p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
msg.append("第").append(count + 3).append("行:企业名称已经存在,请修改。</br>");
|
msg.append("第").append(count + 3).append("行:企业名称已经存在,请修改。<br/>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!StringUtils.isBlank(p.getCompanyPhone())){
|
if (!StringUtils.isBlank(p.getCompanyPhone())){
|
||||||
|
|||||||
+5
-5
@@ -465,13 +465,13 @@ public class PayContactsManagementController extends JeroController<PayContactsM
|
|||||||
// 校验excel表中是否存在重复手机号
|
// 校验excel表中是否存在重复手机号
|
||||||
List<PayContactsManagement> listContactsPhone = listContacts.stream().filter(p1->Objects.equals(p1.getPhone(),p.getPhone())).collect(Collectors.toList());
|
List<PayContactsManagement> listContactsPhone = listContacts.stream().filter(p1->Objects.equals(p1.getPhone(),p.getPhone())).collect(Collectors.toList());
|
||||||
if(!CollectionUtils.isEmpty(listContactsPhone)){
|
if(!CollectionUtils.isEmpty(listContactsPhone)){
|
||||||
msg.append("第 ").append(count + 3).append(" 行:手机号在excel中重复,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:手机号在excel中重复,请修改。<br/>");
|
||||||
}
|
}
|
||||||
// 校验excel表中是否存在重复联系人
|
// 校验excel表中是否存在重复联系人
|
||||||
List<PayContactsManagement> listContactsName = listContacts.stream().filter(p1->Objects.equals(p1.getName(),p.getName())
|
List<PayContactsManagement> listContactsName = listContacts.stream().filter(p1->Objects.equals(p1.getName(),p.getName())
|
||||||
&& Objects.equals(p1.getCompanyId(),p.getCompanyId())).collect(Collectors.toList());
|
&& Objects.equals(p1.getCompanyId(),p.getCompanyId())).collect(Collectors.toList());
|
||||||
if(CollectionUtils.isEmpty(listContactsName)){
|
if(CollectionUtils.isEmpty(listContactsName)){
|
||||||
msg.append("第 ").append(count + 3).append(" 行:联系人姓名在excel中重复,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:联系人姓名在excel中重复,请修改。<br/>");
|
||||||
}
|
}
|
||||||
listContacts.add(p);
|
listContacts.add(p);
|
||||||
p.setDataSource(PayContactsManagementCommon.DATA_SOURCE1);
|
p.setDataSource(PayContactsManagementCommon.DATA_SOURCE1);
|
||||||
@@ -487,7 +487,7 @@ public class PayContactsManagementController extends JeroController<PayContactsM
|
|||||||
if(!CollectionUtils.isEmpty(listCompany)){
|
if(!CollectionUtils.isEmpty(listCompany)){
|
||||||
p.setCompanyId(listCompany.get(0).getId());
|
p.setCompanyId(listCompany.get(0).getId());
|
||||||
}else{
|
}else{
|
||||||
msg.append("第 ").append(count + 3).append(" 行:企业名称不存在,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:企业名称不存在,请修改。<br/>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 校验 手机号,姓名
|
// 校验 手机号,姓名
|
||||||
@@ -505,12 +505,12 @@ public class PayContactsManagementController extends JeroController<PayContactsM
|
|||||||
listRemove.add(p);
|
listRemove.add(p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
msg.append("第").append(count + 3).append("行:手机号已经存在,请修改。</br>");
|
msg.append("第").append(count + 3).append("行:手机号已经存在,请修改。<br/>");
|
||||||
}
|
}
|
||||||
List<PayContactsManagement> listContactsEquals = listContactsAll.stream().filter(p1->Objects.equals(p1.getCompanyId(),p.getCompanyId())
|
List<PayContactsManagement> listContactsEquals = listContactsAll.stream().filter(p1->Objects.equals(p1.getCompanyId(),p.getCompanyId())
|
||||||
&& Objects.equals(p1.getName(),p.getName())).collect(Collectors.toList());
|
&& Objects.equals(p1.getName(),p.getName())).collect(Collectors.toList());
|
||||||
if(!CollectionUtils.isEmpty(listContactsEquals)){
|
if(!CollectionUtils.isEmpty(listContactsEquals)){
|
||||||
msg.append("第").append(count + 3).append("行:联系人姓名已经存在,请修改。</br>");
|
msg.append("第").append(count + 3).append("行:联系人姓名已经存在,请修改。<br/>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!StringUtils.isBlank(p.getPhone())){
|
if (!StringUtils.isBlank(p.getPhone())){
|
||||||
|
|||||||
+1
-1
@@ -206,7 +206,7 @@ public class PayMemberProjectSubitemController extends JeroController<PayMemberP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!errorMessage.isEmpty()) {
|
if (!errorMessage.isEmpty()) {
|
||||||
throw new JeroBootException("excel导入失败,错误信息为</br>"+errorMessage);
|
throw new JeroBootException("excel导入失败,错误信息为"+errorMessage);
|
||||||
}
|
}
|
||||||
return Result.OK("文件导入成功!");
|
return Result.OK("文件导入成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-15
@@ -324,20 +324,20 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
// 校验企业名称
|
// 校验企业名称
|
||||||
List<PayCompanyManagement> listCompany = new ArrayList<>();
|
List<PayCompanyManagement> listCompany = new ArrayList<>();
|
||||||
if (StringUtils.isBlank(p.getChargeCompanyTemporaryName())) {
|
if (StringUtils.isBlank(p.getChargeCompanyTemporaryName())) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:企业名称不能为空,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:企业名称不能为空,请修改。<br/>");
|
||||||
} else {
|
} else {
|
||||||
// 通过企业名称获取企业id
|
// 通过企业名称获取企业id
|
||||||
listCompany = listCompanyInfo.stream().filter(item ->
|
listCompany = listCompanyInfo.stream().filter(item ->
|
||||||
Objects.equals(item.getCompanyName(), p.getChargeCompanyTemporaryName())).collect(Collectors.toList());
|
Objects.equals(item.getCompanyName(), p.getChargeCompanyTemporaryName())).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isEmpty(listCompany)) {
|
if (CollectionUtils.isEmpty(listCompany)) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:企业名称不存在,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:企业名称不存在,请修改。<br/>");
|
||||||
} else {
|
} else {
|
||||||
p.setChargeCompanyId(listCompany.get(0).getId());
|
p.setChargeCompanyId(listCompany.get(0).getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 校验联系人一
|
// 校验联系人一
|
||||||
if (StringUtils.isBlank(p.getContactsTemporaryNameOne())) {
|
if (StringUtils.isBlank(p.getContactsTemporaryNameOne())) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:联系人不能为空,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:联系人不能为空,请修改。<br/>");
|
||||||
} else {
|
} else {
|
||||||
if (!CollectionUtils.isEmpty(listCompany)) {
|
if (!CollectionUtils.isEmpty(listCompany)) {
|
||||||
// 通过联系人获取联系人id
|
// 通过联系人获取联系人id
|
||||||
@@ -346,7 +346,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
Objects.equals(item.getName(), p.getContactsTemporaryNameOne())
|
Objects.equals(item.getName(), p.getContactsTemporaryNameOne())
|
||||||
&& Objects.equals(item.getCompanyId(), finalListCompany.get(0).getId())).collect(Collectors.toList());
|
&& Objects.equals(item.getCompanyId(), finalListCompany.get(0).getId())).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isEmpty(listContacts)) {
|
if (CollectionUtils.isEmpty(listContacts)) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:该企业下不存在该联系人一,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:该企业下不存在该联系人一,请修改。<br/>");
|
||||||
} else {
|
} else {
|
||||||
p.setContactsIdOne(listContacts.get(0).getId());
|
p.setContactsIdOne(listContacts.get(0).getId());
|
||||||
}
|
}
|
||||||
@@ -356,7 +356,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
if (!StringUtils.isBlank(p.getChargeCompanyId())) {
|
if (!StringUtils.isBlank(p.getChargeCompanyId())) {
|
||||||
List<PayWorkingGroupSubItem> listDateNew = listData.stream().filter(item -> Objects.equals(p.getChargeCompanyId(), item.getChargeCompanyId())).collect(Collectors.toList());
|
List<PayWorkingGroupSubItem> listDateNew = listData.stream().filter(item -> Objects.equals(p.getChargeCompanyId(), item.getChargeCompanyId())).collect(Collectors.toList());
|
||||||
if (!CollectionUtils.isEmpty(listDateNew)) {
|
if (!CollectionUtils.isEmpty(listDateNew)) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:工作组成员单位已存在,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:工作组成员单位已存在,请修改。<br/>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 校验联系人二
|
// 校验联系人二
|
||||||
@@ -368,7 +368,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
Objects.equals(item.getName(), p.getContactsTemporaryNameTwo())
|
Objects.equals(item.getName(), p.getContactsTemporaryNameTwo())
|
||||||
&& Objects.equals(item.getCompanyId(), finalListCompany.get(0).getId())).collect(Collectors.toList());
|
&& Objects.equals(item.getCompanyId(), finalListCompany.get(0).getId())).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isEmpty(listContacts)) {
|
if (CollectionUtils.isEmpty(listContacts)) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:该企业下不存在该联系人二,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:该企业下不存在该联系人二,请修改。<br/>");
|
||||||
} else {
|
} else {
|
||||||
p.setContactsIdTwo(listContacts.get(0).getId());
|
p.setContactsIdTwo(listContacts.get(0).getId());
|
||||||
}
|
}
|
||||||
@@ -383,7 +383,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
Objects.equals(item.getName(), p.getContactsTemporaryNameThree())
|
Objects.equals(item.getName(), p.getContactsTemporaryNameThree())
|
||||||
&& Objects.equals(item.getCompanyId(), finalListCompany.get(0).getId())).collect(Collectors.toList());
|
&& Objects.equals(item.getCompanyId(), finalListCompany.get(0).getId())).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isEmpty(listContacts)) {
|
if (CollectionUtils.isEmpty(listContacts)) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:该企业下不存在该联系人三,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:该企业下不存在该联系人三,请修改。<br/>");
|
||||||
} else {
|
} else {
|
||||||
p.setContactsIdThree(listContacts.get(0).getId());
|
p.setContactsIdThree(listContacts.get(0).getId());
|
||||||
}
|
}
|
||||||
@@ -391,7 +391,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
}
|
}
|
||||||
// 校验邮寄联系人
|
// 校验邮寄联系人
|
||||||
if (StringUtils.isBlank(p.getMailContactsTemporaryName())) {
|
if (StringUtils.isBlank(p.getMailContactsTemporaryName())) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:邮寄联系人不能为空,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:邮寄联系人不能为空,请修改。<br/>");
|
||||||
} else {
|
} else {
|
||||||
if (!CollectionUtils.isEmpty(listCompany)) {
|
if (!CollectionUtils.isEmpty(listCompany)) {
|
||||||
// 通过联系人获取联系人id
|
// 通过联系人获取联系人id
|
||||||
@@ -400,7 +400,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
Objects.equals(item.getName(), p.getMailContactsTemporaryName())
|
Objects.equals(item.getName(), p.getMailContactsTemporaryName())
|
||||||
&& Objects.equals(item.getCompanyId(), finalListCompany.get(0).getId())).collect(Collectors.toList());
|
&& Objects.equals(item.getCompanyId(), finalListCompany.get(0).getId())).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isEmpty(listContacts)) {
|
if (CollectionUtils.isEmpty(listContacts)) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:该企业下不存在该邮寄联系人,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:该企业下不存在该邮寄联系人,请修改。<br/>");
|
||||||
} else {
|
} else {
|
||||||
p.setMailContactsId(listContacts.get(0).getId());
|
p.setMailContactsId(listContacts.get(0).getId());
|
||||||
}
|
}
|
||||||
@@ -409,32 +409,32 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
|
|||||||
// 校验成员唯一性
|
// 校验成员唯一性
|
||||||
List<PayWorkingGroupSubItem> listCompanyAndContactsNew = listCompanyAndContacts.stream().filter(item -> Objects.equals(p.getChargeCompanyTemporaryName(), item.getChargeCompanyTemporaryName())).collect(Collectors.toList());
|
List<PayWorkingGroupSubItem> listCompanyAndContactsNew = listCompanyAndContacts.stream().filter(item -> Objects.equals(p.getChargeCompanyTemporaryName(), item.getChargeCompanyTemporaryName())).collect(Collectors.toList());
|
||||||
if (!CollectionUtils.isEmpty(listCompanyAndContactsNew)) {
|
if (!CollectionUtils.isEmpty(listCompanyAndContactsNew)) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:工作组成员单位重复出现,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:工作组成员单位重复出现,请修改。<br/>");
|
||||||
}
|
}
|
||||||
listCompanyAndContacts.add(p);
|
listCompanyAndContacts.add(p);
|
||||||
// 校验
|
// 校验
|
||||||
if (Objects.equals(p.getChargeWay(), PayProjectCommon.CHARGE_WAY2)) {
|
if (Objects.equals(p.getChargeWay(), PayProjectCommon.CHARGE_WAY2)) {
|
||||||
if (Objects.isNull(p.getReceivableAmount())) {
|
if (Objects.isNull(p.getReceivableAmount())) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:应收金额不能为空,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:应收金额不能为空,请修改。<br/>");
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(p.getContractNum())) {
|
if (StringUtils.isBlank(p.getContractNum())) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:合同号不能为空,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:合同号不能为空,请修改。<br/>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Objects.equals(p.getChargeWay(), PayProjectCommon.CHARGE_WAY3)) {
|
if (Objects.equals(p.getChargeWay(), PayProjectCommon.CHARGE_WAY3)) {
|
||||||
if (Objects.isNull(p.getChargeNoticeNo())) {
|
if (Objects.isNull(p.getChargeNoticeNo())) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:收费通知号不能为空,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:收费通知号不能为空,请修改。<br/>");
|
||||||
} else {
|
} else {
|
||||||
if (Objects.equals(payWorkingGroup.getChargeNoticeNoA(), p.getChargeNoticeNo())) {
|
if (Objects.equals(payWorkingGroup.getChargeNoticeNoA(), p.getChargeNoticeNo())) {
|
||||||
p.setChargeNoticeId(payWorkingGroup.getChargeNoticeAId());
|
p.setChargeNoticeId(payWorkingGroup.getChargeNoticeAId());
|
||||||
} else if (Objects.equals(payWorkingGroup.getChargeNoticeNoB(), p.getChargeNoticeNo())) {
|
} else if (Objects.equals(payWorkingGroup.getChargeNoticeNoB(), p.getChargeNoticeNo())) {
|
||||||
p.setChargeNoticeId(payWorkingGroup.getChargeNoticeBId());
|
p.setChargeNoticeId(payWorkingGroup.getChargeNoticeBId());
|
||||||
} else {
|
} else {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:收费通知号不存在,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:收费通知号不存在,请修改。<br/>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Objects.isNull(p.getReceivableAmount())) {
|
if (Objects.isNull(p.getReceivableAmount())) {
|
||||||
msg.append("第 ").append(count + 3).append(" 行:应收金额不能为空,请修改。</br>");
|
msg.append("第 ").append(count + 3).append(" 行:应收金额不能为空,请修改。<br/>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.setPack(PayProjectCommon.PACKAGING0);
|
p.setPack(PayProjectCommon.PACKAGING0);
|
||||||
|
|||||||
Reference in New Issue
Block a user