缴费审核

This commit is contained in:
baozhipeng
2021-12-16 12:17:06 +08:00
parent 1292b68d5a
commit 4b5d9894fc
4 changed files with 61 additions and 14 deletions
@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@Api(tags="到账审核")
@@ -33,13 +34,10 @@ public class PayPaymentCheckController extends JeroController<PayPaymentRecordSu
*/
@ApiOperation(value="来款列表", notes="来款列表")
@GetMapping(value = "/amountReceivedList")
public Result<?> amountReceivedList(String id) {
LambdaQueryWrapper<PayPaymentRecord> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayPaymentRecord::getProjectId, id);
wrapper.orderByAsc(PayPaymentRecord::getPaymentDate);
List<PayPaymentRecord> list = payPaymentRecordService.list(wrapper);
public Result<?> amountReceivedList(String id,String projectType) {
Map<String, Object> map = payPaymentCheckService.amountReceivedList(id, projectType);
return Result.OK(list);
return Result.OK(map);
}
@ApiOperation(value="申请", notes="申请")
@@ -20,13 +20,18 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.util.AuthenticationUtils;
import com.jero.contract.common.PayIncomeContractCommon;
import com.jero.mail.PayMailBillVO;
import com.jero.mail.entity.PayMailBill;
import com.jero.mail.entity.PayMailBillProject;
import com.jero.mail.service.IPayMailBillService;
import com.jero.meeting.entity.PayMeetingSituation;
import com.jero.member.entity.PayMemberProjectSubitem;
import com.jero.member.entity.TbMemberProjectSubitem;
import com.jero.payment.entity.PayPaymentRecord;
import com.jero.payment.service.IPayPaymentRecordService;
import com.jero.project.entity.PayCommonProject;
import com.jero.project.entity.PayWorkingGroupSubItem;
import com.jero.project.vo.PayCommonProjectOutput;
import com.jero.standards.memberinfo.entity.MemberInfo;
import io.lettuce.core.dynamic.annotation.Param;
@@ -53,10 +58,6 @@ public class PayPaymentRecordController extends JeroController<PayPaymentRecord,
private IPayPaymentRecordService payPaymentRecordService;
@Autowired
private IPayMailBillService payMailBillService;
@Resource
private AuthenticationUtils authenticationUtils;
/**
* 到账开票主列表
@@ -6,11 +6,17 @@ import com.jero.payment.entity.PayPaymentRecord;
import org.springframework.web.bind.annotation.RequestBody;
import java.math.BigDecimal;
import java.util.Map;
/**
* 到账审核
*/
public interface IPayPaymentCheckService extends IService<PayPaymentRecordSub> {
/**
* 来款列表
*/
Map<String,Object> amountReceivedList(String id, String projectType);
/**
* 申请
* @param payPaymentRecord
@@ -42,10 +42,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.*;
/**
* 到账审核
@@ -76,6 +73,51 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
@Resource
private SendMessageService sendMessageService;
/**
* 来款列表
*/
@Override
public Map<String,Object> amountReceivedList(String id, String projectType){
//列表
LambdaQueryWrapper<PayPaymentRecord> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(PayPaymentRecord::getProjectId, id);
wrapper.orderByAsc(PayPaymentRecord::getPaymentDate);
List<PayPaymentRecord> list = payPaymentRecordService.list(wrapper);
//实收、应收
BigDecimal paidAmount=new BigDecimal("0");;
BigDecimal receivableAmount=new BigDecimal("0");;
switch (String.valueOf(projectType)){
// 普通项目
case PayIncomeContractCommon.PROJECT_TYPE1:
PayCommonProject payCommonProject = payCommonProjectMapper.selectById(id);
paidAmount = payCommonProject.getPaidAmount();
receivableAmount = payCommonProject.getReceivableAmount();
break;
// 工作组项目
case PayIncomeContractCommon.PROJECT_TYPE2:
PayWorkingGroupSubItem payWorking = payWorkingGroupSubItemMapper.selectById(id);
paidAmount = payWorking.getPaidAmount();
receivableAmount = payWorking.getReceivableAmount();
break;
//会员项目
case PayIncomeContractCommon.PROJECT_TYPE4:
PayMemberProjectSubitem member = payMemberProjectSubitemMapper.selectById(id);
paidAmount = member.getPaidAmount();
receivableAmount = member.getAmountReceivable();
break;
default:break;
}
Map<String,Object> map = new HashMap<>();
map.put("list",list);
map.put("paidAmount",paidAmount);
map.put("receivableAmount",receivableAmount);
return map;
}
/**
* 申请
* @param payPaymentRecord