收入合同-取消关联修改
This commit is contained in:
+4
-11
@@ -406,25 +406,18 @@ public class PayIncomeContractServiceImpl extends ServiceImpl<PayIncomeContractM
|
|||||||
break;
|
break;
|
||||||
case PayIncomeContractCommon.PROJECT_TYPE2:
|
case PayIncomeContractCommon.PROJECT_TYPE2:
|
||||||
// 工作组项目
|
// 工作组项目
|
||||||
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(payIncomeContractAssociated.getProjectId());
|
PayWorkingGroupSubItem listPayWorkingGroupSubItem = payWorkingGroupSubItemService.getById(payIncomeContractAssociated.getProjectId());
|
||||||
if(Objects.isNull(payWorkingGroup)){
|
if(Objects.isNull(listPayWorkingGroupSubItem)){
|
||||||
throw new JeroBootException("工作组项目不存在!");
|
|
||||||
}
|
|
||||||
LambdaQueryWrapper<PayWorkingGroupSubItem> queryPayWorkingGroupSubItem = new LambdaQueryWrapper<>();
|
|
||||||
queryPayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getWorkingGroupId,payWorkingGroup.getId());
|
|
||||||
queryPayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getChargeCompanyId,payIncomeContract.getSignedCompanyId());
|
|
||||||
List<PayWorkingGroupSubItem> listPayWorkingGroupSubItem = payWorkingGroupSubItemService.list(queryPayWorkingGroupSubItem);
|
|
||||||
if(CollectionUtils.isEmpty(listPayWorkingGroupSubItem)){
|
|
||||||
throw new JeroBootException("工作组成员单位不存在!");
|
throw new JeroBootException("工作组成员单位不存在!");
|
||||||
}
|
}
|
||||||
// 更新项目id
|
// 更新项目id
|
||||||
payIncomeContractAssociated.setProjectId(listPayWorkingGroupSubItem.get(0).getId());
|
payIncomeContractAssociated.setProjectId(listPayWorkingGroupSubItem.getId());
|
||||||
// todo 不是打包企业 取消打包 将关联项目取消打包
|
// todo 不是打包企业 取消打包 将关联项目取消打包
|
||||||
LambdaUpdateWrapper<PayWorkingGroupSubItem> updatePayWorkingGroupSubItem = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<PayWorkingGroupSubItem> updatePayWorkingGroupSubItem = new LambdaUpdateWrapper<>();
|
||||||
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getUpdateBy,sysUser.getUsername());
|
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getUpdateBy,sysUser.getUsername());
|
||||||
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getUpdateTime,new Date());
|
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getUpdateTime,new Date());
|
||||||
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getPack,PayIncomeContractCommon.PACK0);
|
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getPack,PayIncomeContractCommon.PACK0);
|
||||||
updatePayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getId,listPayWorkingGroupSubItem.get(0).getId());
|
updatePayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getId,listPayWorkingGroupSubItem.getId());
|
||||||
payWorkingGroupSubItemService.update(updatePayWorkingGroupSubItem);
|
payWorkingGroupSubItemService.update(updatePayWorkingGroupSubItem);
|
||||||
break;
|
break;
|
||||||
case PayIncomeContractCommon.PROJECT_TYPE3:
|
case PayIncomeContractCommon.PROJECT_TYPE3:
|
||||||
|
|||||||
Reference in New Issue
Block a user