|
|
@ -581,11 +581,23 @@ public class PortalOfCostApplication { |
|
|
|
payLqw.eq(PayPayment::getBillNumber,billNumber); |
|
|
|
long countPay = paymentService.count(payLqw); |
|
|
|
if(countPay>0){Assert.throwEx("发票号已存在,请勿重复提交");} |
|
|
|
|
|
|
|
LambdaQueryWrapper<TbsCostApply> lqw = new LambdaQueryWrapper<>(); |
|
|
|
lqw.eq(TbsCostApply::getBillNumber,billNumber); |
|
|
|
long countPay2 = costApplyService.count(lqw); |
|
|
|
if(countPay2>0){Assert.throwEx("发票号已存在,请勿重复提交");} |
|
|
|
|
|
|
|
}else if (StringUtils.hasText(disNumber)){ |
|
|
|
LambdaQueryWrapper<PayPayment> payLqw = new LambdaQueryWrapper<>(); |
|
|
|
payLqw.eq(PayPayment::getErpCode,disNumber); |
|
|
|
long countPay = paymentService.count(payLqw); |
|
|
|
if(countPay>0){Assert.throwEx("发货单已存在,请勿重复提交");} |
|
|
|
|
|
|
|
LambdaQueryWrapper<TbsCostApply> lqw = new LambdaQueryWrapper<>(); |
|
|
|
lqw.eq(TbsCostApply::getDisCode,disNumber); |
|
|
|
long countPay2 = costApplyService.count(lqw); |
|
|
|
if(countPay2>0){Assert.throwEx("发货单已存在,请勿重复提交");} |
|
|
|
|
|
|
|
}else { |
|
|
|
Assert.throwEx("发票号或发货单号不能为空"); |
|
|
|
} |
|
|
|