工作组复制功能变更
This commit is contained in:
-4
@@ -98,10 +98,6 @@ public class PaySpendingContractController extends JeroController<PaySpendingCon
|
||||
if(!StringUtils.isBlank(paySpendingContract.getContractNum())){
|
||||
paySpendingContract.setContractNum(oConvertUtils.replaceAllPercent(paySpendingContract.getContractNum()));
|
||||
}
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if(!sysUser.getRoleCode().contains(RoleCommon.CWRY)){
|
||||
paySpendingContract.setPrincipalId(sysUser.getId());
|
||||
}
|
||||
Page<PaySpendingContract> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PaySpendingContract> pageList = paySpendingContractService.queryPageList(page, paySpendingContract,startTime,endTime);
|
||||
return Result.OK(pageList);
|
||||
|
||||
-18
@@ -159,12 +159,6 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
|
||||
if(Objects.isNull(paySpendingContractStatus)){
|
||||
throw new JeroBootException("支出合同不存在!");
|
||||
}
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if(!sysUser.getRoleCode().contains(RoleCommon.CWRY)){
|
||||
if(!Objects.equals(sysUser.getId(),paySpendingContractStatus.getPrincipalId())){
|
||||
throw new JeroBootException("支出合同不可操作!");
|
||||
}
|
||||
}
|
||||
List<PaySpendingContractInstallment> listPaySpendingContractInstallment = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(input.getInstallment())){
|
||||
listPaySpendingContractInstallment = input.getInstallment();
|
||||
@@ -244,21 +238,9 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
|
||||
LambdaQueryWrapper<PaySpendingContract> query = new LambdaQueryWrapper<>();
|
||||
query.in(PaySpendingContract::getId,ids);
|
||||
List<PaySpendingContract> listPaySpendingContractStatus = paySpendingContractService.list(query);
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if(CollectionUtils.isEmpty(listPaySpendingContractStatus)){
|
||||
throw new JeroBootException("收入合同不存在!");
|
||||
}
|
||||
StringBuilder msg = new StringBuilder();
|
||||
listPaySpendingContractStatus.forEach(p->{
|
||||
if(!sysUser.getRoleCode().contains(RoleCommon.CWRY)){
|
||||
if(!Objects.equals(sysUser.getId(),p.getPrincipalId())){
|
||||
msg.append(p.getContractName() + "支出合同不可操作!<br/>");
|
||||
}
|
||||
}
|
||||
});
|
||||
if(!StringUtils.isEmpty(msg)){
|
||||
throw new JeroBootException(msg.toString());
|
||||
}
|
||||
paySpendingContractService.removeByIds(ids);
|
||||
LambdaUpdateWrapper<PaySpendingContractInstallment> updatePaySpendingContractInstallment = new LambdaUpdateWrapper<>();
|
||||
updatePaySpendingContractInstallment.in(PaySpendingContractInstallment::getContractId,ids);
|
||||
|
||||
+13
@@ -11,6 +11,7 @@ import com.jero.contract.entity.PayIncomeContractAssociated;
|
||||
import com.jero.contract.service.IPayIncomeContractAssociatedService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.project.common.PayProjectCommon;
|
||||
import com.jero.project.entity.*;
|
||||
import com.jero.project.service.IPayWorkingGroupSubItemService;
|
||||
import com.jero.project.vo.PayWorkingGroupVO;
|
||||
@@ -184,6 +185,18 @@ public class PayWorkingGroupServiceImpl extends ServiceImpl<PayWorkingGroupMappe
|
||||
List<PayWorkingGroupSubItem> listPayWorkingGroupSubItem = payWorkingGroupSubItemService.list(query);
|
||||
if(!CollectionUtils.isEmpty(listPayWorkingGroupSubItem)){
|
||||
listPayWorkingGroupSubItem.forEach(p->{
|
||||
// 来款为合同,不复制合同编号
|
||||
if(Objects.equals(p.getChargeWay(), PayProjectCommon.CHARGE_WAY2)){
|
||||
p.setContractNum(null);
|
||||
}
|
||||
// 来款为收费通知,不复制收费通知文件
|
||||
if(Objects.equals(p.getChargeWay(), PayProjectCommon.CHARGE_WAY3)){
|
||||
p.setChargeNoticeId(null);
|
||||
}
|
||||
p.setPack(PayProjectCommon.PACKAGING0);
|
||||
p.setInAccount(PayProjectCommon.IN_ACCOUNT0);
|
||||
p.setMakeInvoice(PayProjectCommon.MAKE_INVOICE0);
|
||||
p.setMail(PayProjectCommon.MAIL0);
|
||||
p.setId(null);
|
||||
p.setCreateBy(null);
|
||||
p.setCreateTime(null);
|
||||
|
||||
Reference in New Issue
Block a user