fix 修改企业联系人123没有处理干净,相关功能丢失的遗留bug

This commit is contained in:
lijiarao
2022-09-05 16:10:47 +08:00
parent 8938e0c083
commit ef6eabb5c7
7 changed files with 172 additions and 200 deletions
@@ -47,8 +47,10 @@ import com.jero.pack.service.IPayPackCompanyProjectService;
import com.jero.project.entity.PayCommonProject;
import com.jero.project.entity.PayWorkingGroup;
import com.jero.project.entity.PayWorkingGroupSubItem;
import com.jero.project.mapper.PayWorkingGroupSubItemContactsMapper;
import com.jero.project.service.IPayCommonProjectService;
import com.jero.project.service.IPayWorkingGroupService;
import com.jero.project.service.IPayWorkingGroupSubItemContactsService;
import com.jero.project.service.IPayWorkingGroupSubItemService;
import com.jero.temporary.entity.PayCompanyManagementTemporary;
import com.jero.temporary.entity.PayContactsManagementTemporary;
@@ -119,6 +121,8 @@ public class PayIncomeContractServiceImpl extends ServiceImpl<PayIncomeContractM
private IPayIncomeContractAssociatedCancellationService payIncomeContractAssociatedCancellationService;
@Resource
private IPayContactsManagementService payContactsManagementService;
@Resource
private PayWorkingGroupSubItemContactsMapper payWorkingGroupSubItemContactsMapper;
@Override
public IPage<PayIncomeContract> queryPageList(Page<PayIncomeContract> page, PayIncomeContract payIncomeContract, String chargeStatus,String projectName, String startTime, String endTime) {
@@ -403,6 +407,7 @@ public class PayIncomeContractServiceImpl extends ServiceImpl<PayIncomeContractM
queryPayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getWorkingGroupId,payWorkingGroup.getId());
queryPayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getChargeCompanyId,payIncomeContract.getSignedCompanyId());
List<PayWorkingGroupSubItem> listPayWorkingGroupSubItem = payWorkingGroupSubItemService.list(queryPayWorkingGroupSubItem);
String workingGroupSubItemId = listPayWorkingGroupSubItem.get(0).getId();
if(CollectionUtils.isEmpty(listPayWorkingGroupSubItem)){
throw new JeroBootException("工作组成员单位不存在!");
}
@@ -413,12 +418,12 @@ public class PayIncomeContractServiceImpl extends ServiceImpl<PayIncomeContractM
}
// 验证项目是否已被关联
getIncomeContractAssociated(p.getContractId(),listPayWorkingGroupSubItem.get(0).getId());
getIncomeContractAssociated(p.getContractId(), workingGroupSubItemId);
// 关联合同,项目选了合同,变更合同编号
LambdaUpdateWrapper<PayWorkingGroupSubItem> updatePayWorkingGroupSubItem = new LambdaUpdateWrapper<>();
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getUpdateBy,sysUser.getUsername());
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getUpdateTime,new Date());
updatePayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getId,listPayWorkingGroupSubItem.get(0).getId());
updatePayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getId, workingGroupSubItemId);
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getContractNum,payIncomeContract.getContractNum());
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getChargeWay,PayIncomeContractCommon.CHARGE_WAY2);
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getCharge,null);
@@ -427,13 +432,14 @@ public class PayIncomeContractServiceImpl extends ServiceImpl<PayIncomeContractM
// 合同选择了打包,查看打包年份&&打包企业是否存在
if(Objects.equals(payIncomeContract.getPack(),PayIncomeContractCommon.PACK1)){
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getPack,PayIncomeContractCommon.PACK1);
payPackCompanyProjectService.setPack(listPayWorkingGroupSubItem.get(0).getChargeCompanyId(),listPayWorkingGroupSubItem.get(0).getContactsIdOne(),payIncomeContract.getPackYear(),listPayWorkingGroupSubItem.get(0).getId(),PayIncomeContractCommon.PROJECT_TYPE2,payIncomeContract.getPack());
String masterContactsId = payWorkingGroupSubItemContactsMapper.getMasterContactsId(workingGroupSubItemId);
payPackCompanyProjectService.setPack(listPayWorkingGroupSubItem.get(0).getChargeCompanyId(),masterContactsId,payIncomeContract.getPackYear(), workingGroupSubItemId,PayIncomeContractCommon.PROJECT_TYPE2,payIncomeContract.getPack());
}
payWorkingGroupSubItemService.update(updatePayWorkingGroupSubItem);
principalId = payWorkingGroup.getPrincipalIdA();
projectName = payWorkingGroup.getWorkingGroupProject();
// 更新项目id
p.setProjectId(listPayWorkingGroupSubItem.get(0).getId());
p.setProjectId(workingGroupSubItemId);
break;
case PayIncomeContractCommon.PROJECT_TYPE3:
// 会议项目