工作组收费通知变更,除了收费方式为合同的,不进行变更,其余状态都变更

This commit is contained in:
梁琦涛
2022-04-26 14:32:26 +08:00
parent 07c26d6021
commit 7bbac6ff2c
2 changed files with 14 additions and 10 deletions
@@ -48,7 +48,6 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils;
@@ -427,7 +426,7 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
}
/**
* 查询工作组成员是否收费通知
* 查询工作组成员是否收费通知(已弃用)
*
* @param ids 工作组成员ids 逗号分隔
* @param workingGroupId 工作组id
@@ -805,15 +805,19 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
if(CollectionUtils.isEmpty(listPayContactsManagementTemporary)){
throw new JeroBootException("联系人不存在!");
}
// 获取工作组信息
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(list.get(0).getWorkingGroupId());
if(Objects.isNull(payWorkingGroup)){
throw new JeroBootException("工作组不存在!");
}
SysUser sysUserInfo = sysUserService.getById(payWorkingGroup.getPrincipalIdA());
if(Objects.isNull(sysUserInfo)){
throw new JeroBootException("负责人不存在!");
}
list.forEach(p->{
// 获取工作组信息
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(list.get(0).getWorkingGroupId());
if(Objects.isNull(payWorkingGroup)){
throw new JeroBootException("工作组不存在!");
}
SysUser sysUserInfo = sysUserService.getById(payWorkingGroup.getPrincipalIdA());
if(Objects.isNull(sysUserInfo)){
throw new JeroBootException("负责人不存在!");
// 收费通知为合同的,不进行变更,其他方式直接变更
if(Objects.equals(p.getChargeWay(),PayProjectCommon.CHARGE_WAY2)){
return;
}
LambdaUpdateWrapper<PayWorkingGroupSubItem> updatePayWorkingGroupSubItem = new LambdaUpdateWrapper<>();
// 变更应收金额,重新校验状态
@@ -832,6 +836,7 @@ public class PayWorkingGroupSubItemServiceImpl extends ServiceImpl<PayWorkingGro
String paymentStatus = payPaymentCheckService.getPaymentStatus(input.getReceivableAmount(),p.getPaidAmount(),p.getPaymentStatus());
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getPaymentStatus,paymentStatus);
updatePayWorkingGroupSubItem.eq(PayWorkingGroupSubItem::getId,p.getId());
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getChargeWay,PayProjectCommon.CHARGE_WAY3);
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getCharge,input.getCharge());
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getReceivableAmount,input.getReceivableAmount());
updatePayWorkingGroupSubItem.set(PayWorkingGroupSubItem::getChargeNoticeNo,input.getChargeNoticeNo());