| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- package com.ydtech.modules.fnc.dao;
- import com.ydtech.modules.fnc.entity.InsPlyIncome;
- import com.baomidou.mybatisplus.core.mapper.BaseMapper;
- import com.ydtech.modules.fnc.entity.InsPlySettleDetail;
- import com.ydtech.modules.fnc.vo.InsPlyIncomeVo;
- import com.ydtech.modules.fnc.vo.InsPlySettleVo;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Select;
- import java.util.List;
- /**
- * <p>
- * 保司结算手续费 Mapper 接口
- * </p>
- *
- * @author gws
- * @since 2024-01-05
- */
- @Mapper
- public interface InsPlyIncomeMapper extends BaseMapper<InsPlyIncome> {
- @Select({"<script>"," " +
- "select a.*,b.`name` dept_name ,c.`name` companyName " +
- "from ins_ply_income a " +
- "left join sys_dept b on a.dept_id=b.id " +
- "left join esm_ins_company c on a.company_id=c.id " +
- "where DATE_FORMAT(pay_date, '%Y-%m-%d') " +
- "between DATE_FORMAT(#{startDate}, '%Y-%m-%d') and DATE_FORMAT(#{endDate}, '%Y-%m-%d')" +
- "<if test='companyId!=\"\" '>" +
- " and a.company_id=#{companyId} " +
- "</if> "+
- "<if test='deptId!=\"\" '>" +
- " and a.dept_id like CONCAT(#{deptId}, '%') " +
- "</if> "+
- "<if test='agreementId!=\"\" '>" +
- " and a.agreement_id=#{agreementId} " +
- "</if> "+
- //待结算清单
- "<if test='flag==\"0\" '>" +
- " and a.all_fee_value!=IFNULL(a.final_fee_value,0)+IFNULL(a.doing_fee_value,0)" +
- "</if> "+
- "<if test='licenseno!=\"\" '>" +
- " and a.licenseno=#{licenseno} " +
- "</if> "
- ,"</script>"}
- )
- List<InsPlyIncome> selectByCondition(InsPlyIncomeVo insPlyIncomeVo);
- @Select({"<script>"," " +
- "select a.settleno,i.*,b.`name` dept_name ,c.`name` companyName " +
- "from ins_ply_settle_detail a " +
- "inner join ins_ply_income i on a.policyno=i.policyno " +
- "left join sys_dept b on i.dept_id=b.id " +
- "left join esm_ins_company c on i.company_id=c.id " +
- "where a.settleno =#{settleno} "
- ,"</script>"}
- )
- List<InsPlyIncome> selectSettleByCondition(InsPlySettleVo insPlySettleVo);
- }
|