add 更新所有确认收入状态 接口
This commit is contained in:
+10
@@ -124,6 +124,16 @@ public class PayConfirmPaymentRecordController extends JeroController<PayConfir
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新所有确认收入状态
|
||||
*/
|
||||
@ApiOperation(value="-更新所有确认收入状态")
|
||||
@GetMapping(value = "/updateAffirmIncome")
|
||||
public Result<?> updateAffirmIncome() {
|
||||
payConfirmPaymentRecordService.updateAffirmIncome();
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
|
||||
+58
@@ -3,6 +3,8 @@ package com.jero.payment.service.impl;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.jero.common.enums.PaymentStatusEnum;
|
||||
import com.jero.company.entity.PayContactsManagement;
|
||||
import com.jero.contract.common.PayIncomeContractCommon;
|
||||
@@ -204,6 +206,62 @@ public class PayConfirmPaymentRecordService extends ServiceImpl<PayConfirmPaymen
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
public void updateAffirmIncome() {
|
||||
payCommonProjectMapper.selectList(new QueryWrapper<>()).forEach(p->{
|
||||
BigDecimal confirmAmount = p.getConfirmAmount();
|
||||
Integer affirmIncome = payPaymentRecordService.getInAccount(p.getReceivableAmount(), confirmAmount);
|
||||
PayCommonProject project = new PayCommonProject();
|
||||
project.setId(p.getId());
|
||||
project.setAffirmIncome(affirmIncome);
|
||||
payCommonProjectMapper.updateById(project);
|
||||
});
|
||||
|
||||
payWorkingGroupSubItemMapper.selectList(new QueryWrapper<>()).forEach(p ->{
|
||||
BigDecimal confirmAmount = p.getConfirmAmount();
|
||||
Integer affirmIncome = payPaymentRecordService.getInAccount(p.getReceivableAmount(), confirmAmount);
|
||||
PayWorkingGroupSubItem project = new PayWorkingGroupSubItem();
|
||||
project.setId(p.getId());
|
||||
project.setAffirmIncome(affirmIncome);
|
||||
payWorkingGroupSubItemMapper.updateById(project);
|
||||
});
|
||||
|
||||
payMeetingSituationMapper.selectList(new QueryWrapper<>()).forEach(p ->{
|
||||
BigDecimal confirmAmount = p.getConfirmAmount();
|
||||
Integer affirmIncome = payPaymentRecordService.getInAccount(p.getAmountReceivable(), confirmAmount);
|
||||
PayMeetingSituation project = new PayMeetingSituation();
|
||||
project.setId(p.getId());
|
||||
project.setAffirmIncome(affirmIncome);
|
||||
payMeetingSituationMapper.updateById(project);
|
||||
});
|
||||
|
||||
payMemberProjectSubitemMapper.selectList(new QueryWrapper<>()).forEach(p ->{
|
||||
BigDecimal confirmAmount = p.getConfirmAmount();
|
||||
Integer affirmIncome = payPaymentRecordService.getInAccount(p.getAmountReceivable(), confirmAmount);
|
||||
PayMemberProjectSubitem project = new PayMemberProjectSubitem();
|
||||
project.setId(p.getId());
|
||||
project.setAffirmIncome(affirmIncome);
|
||||
payMemberProjectSubitemMapper.updateById(project);
|
||||
});
|
||||
|
||||
tbMemberProjectSubitemMapper.selectList(new QueryWrapper<>()).forEach(p ->{
|
||||
BigDecimal confirmAmount = p.getConfirmAmount();
|
||||
Integer affirmIncome = payPaymentRecordService.getInAccount(p.getAmountReceivable(), confirmAmount);
|
||||
TbMemberProjectSubitem project = new TbMemberProjectSubitem();
|
||||
project.setId(p.getId());
|
||||
project.setAffirmIncome(affirmIncome);
|
||||
tbMemberProjectSubitemMapper.updateById(project);
|
||||
});
|
||||
|
||||
certificatePaymentMapper.selectList(new QueryWrapper<>()).forEach(p ->{
|
||||
BigDecimal confirmAmount = p.getConfirmAmount();
|
||||
Integer affirmIncome = payPaymentRecordService.getInAccount(p.getAmountReceivable(), confirmAmount);
|
||||
TbCertificatePayment project = new TbCertificatePayment();
|
||||
project.setId(p.getId());
|
||||
project.setAffirmIncome(affirmIncome);
|
||||
certificatePaymentMapper.updateById(project);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user