add 合并开票
This commit is contained in:
+4
-8
@@ -96,10 +96,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
*/
|
||||
public Result<?> addPhase(PayPaymentRecord payPaymentRecord){
|
||||
//来款记录表新增
|
||||
String res = insertPayPaymentRecord(payPaymentRecord);
|
||||
if(!"success".equals(res)){
|
||||
return Result.error(res);
|
||||
}
|
||||
insertPayPaymentRecord(payPaymentRecord);
|
||||
|
||||
BigDecimal receivableAmount;
|
||||
Boolean isAdd;
|
||||
@@ -219,7 +216,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
}
|
||||
|
||||
//来款记录表新增
|
||||
private String insertPayPaymentRecord(PayPaymentRecord payPaymentRecord){
|
||||
private void insertPayPaymentRecord(PayPaymentRecord payPaymentRecord){
|
||||
//如果是标协会员类型,只能新增一次
|
||||
if(PayIncomeContractCommon.PROJECT_TYPE5.equals(String.valueOf(payPaymentRecord.getProjectType()))){
|
||||
|
||||
@@ -229,7 +226,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
List<PayPaymentRecord> type5List = payPaymentRecordMapper.selectList(wrapper);
|
||||
|
||||
if(type5List!=null && type5List.size()>0){
|
||||
return "标协会员项目,只能来款一次。";
|
||||
throw new JeroBootException("标协会员项目,只能来款一次。");
|
||||
}
|
||||
|
||||
TbMemberProjectSubitem tbMemberInsert = tbMemberProjectSubitemMapper.selectById(payPaymentRecord.getProjectId());
|
||||
@@ -240,11 +237,10 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
//欠款
|
||||
BigDecimal debtInsert = rAInsert.subtract(pAInsert);
|
||||
if(aRInsert.compareTo(debtInsert) != 0){
|
||||
return "标协会员项目,到账金额不等于欠款金额。";
|
||||
throw new JeroBootException("标协会员项目,到账金额不等于欠款金额。");
|
||||
}
|
||||
}
|
||||
payPaymentRecordMapper.insert(payPaymentRecord);
|
||||
return "success";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user