| | |
| | | List<CoalCategory> coalCategories = coalCategoryMapper.selectByCoalPayId(pay.getId()); |
| | | pay.setCoalCategoryList(coalCategories); |
| | | //学员数据 |
| | | List<CoalPayStudent> coalPayStudents = coalPayStudentService.selectByCoalPayId(pay.getId()); |
| | | List<CoalPayStudent> havePay = coalPayStudents.stream() |
| | | .filter(stu -> stu.getPayStatus() != null && stu.getPayStatus() == 1) |
| | | .collect(Collectors.toList()); |
| | | pay.setTotalNum(coalPayStudents.size()); |
| | | pay.setHavePayNum(havePay.size()); |
| | | // List<CoalPayStudent> coalPayStudents = coalPayStudentService.selectByCoalPayId(pay.getId()); |
| | | // List<CoalPayStudent> havePay = coalPayStudents.stream() |
| | | // .filter(stu -> stu.getPayStatus() != null && stu.getPayStatus() == 1) |
| | | // .collect(Collectors.toList()); |
| | | // pay.setTotalNum(coalPayStudents.size()); |
| | | // pay.setHavePayNum(havePay.size()); |
| | | // coalPayRepDtos.add(coalPayRepDto); |
| | | } |
| | | return coalPays; |
| | |
| | | where id = #{id} |
| | | </update> |
| | | <select id="selectCoalPayList" resultType="com.gkhy.exam.pay.dto.rep.CoalPayRepDto"> |
| | | <include refid="selectCoalPayVo"/> |
| | | select id, |
| | | batch_name, |
| | | dept_id, |
| | | pay_type, |
| | | amount, |
| | | year, |
| | | quarter, |
| | | pay_person_type, pay_company_name, pay_company_card, update_by, update_time, create_by, create_time, del_flag , |
| | | ( SELECT COUNT(cps.id) FROM coal_pay_student cps WHERE cps.del_flag = 0 AND cps.coal_pay_id = coal_pay.id ) AS total_num, |
| | | ( SELECT COUNT(cps.id) FROM coal_pay_student cps WHERE cps.del_flag = 0 AND cps.coal_pay_id = coal_pay.id AND cps.pay_status = 1 ) AS have_pay_num |
| | | from coal_pay |
| | | <where> |
| | | <if test="deptId != null "> |
| | | and dept_id = #{deptId} |