InsPlyIncomeMapper.java 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. package com.ydtech.modules.fnc.dao;
  2. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  3. import com.ydtech.modules.fnc.entity.InsPlyIncome;
  4. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  5. import com.ydtech.modules.fnc.entity.InsPlySettleDetail;
  6. import com.ydtech.modules.fnc.vo.InsPlyIncomeVo;
  7. import com.ydtech.modules.fnc.vo.InsPlySettleVo;
  8. import org.apache.ibatis.annotations.Mapper;
  9. import org.apache.ibatis.annotations.Param;
  10. import org.apache.ibatis.annotations.Select;
  11. import java.util.HashMap;
  12. import java.util.List;
  13. /**
  14. * <p>
  15. * 保司结算手续费 Mapper 接口
  16. * </p>
  17. *
  18. * @author gws
  19. * @since 2024-01-05
  20. */
  21. @Mapper
  22. public interface InsPlyIncomeMapper extends BaseMapper<InsPlyIncome> {
  23. @Select({"<script>"," " +
  24. "select a.*,b.`name` dept_name ,c.`name` companyName " +
  25. "from ins_ply_income a " +
  26. "left join sys_dept b on a.dept_id=b.id " +
  27. "left join esm_ins_company c on a.company_id=c.id " +
  28. "where 1=1 " +
  29. "<if test='startDate!=null and endDate!=null'>" +
  30. "and DATE_FORMAT(pay_date, '%Y-%m-%d') " +
  31. "between DATE_FORMAT(#{startDate}, '%Y-%m-%d') and DATE_FORMAT(#{endDate}, '%Y-%m-%d')" +
  32. "</if> "+
  33. "<if test='companyId!=\"\" and companyId!=null '>" +
  34. " and a.company_id=#{companyId} " +
  35. "</if> "+
  36. "<if test='deptId!=\"\" and deptId!=null '>" +
  37. " and a.dept_id like CONCAT(#{deptId}, '%') " +
  38. "</if> "+
  39. "<if test='agreementId!=\"\" and agreementId!=null '>" +
  40. " and a.agreement_id=#{agreementId} " +
  41. "</if> "+
  42. //待结算清单
  43. "<if test='flag==\"0\" '>" +
  44. " and a.all_fee_value!=IFNULL(a.final_fee_value,0)+IFNULL(a.doing_fee_value,0)" +
  45. "</if> "+
  46. "<if test='licenseno!=\"\" and licenseno!=null '>" +
  47. " and a.licenseno=#{licenseno} " +
  48. "</if> "
  49. ,"</script>"}
  50. )
  51. List<InsPlyIncome> selectByCondition(InsPlyIncomeVo insPlyIncomeVo);
  52. @Select({
  53. "select a.*,b.`name` dept_name ,c.`name` companyName " +
  54. "from ins_ply_income a " +
  55. "left join sys_dept b on a.dept_id=b.id " +
  56. "left join esm_ins_company c on a.company_id=c.id " +
  57. "where a.policyno= #{policyno}"
  58. }
  59. )
  60. InsPlyIncome selectByPlyno(String policyno);
  61. @Select({"<script>"," " +
  62. "select a.settleno,i.*,b.`name` dept_name ,c.`name` companyName " +
  63. "from ins_ply_settle_detail a " +
  64. "inner join ins_ply_income i on a.policyno=i.policyno " +
  65. "left join sys_dept b on i.dept_id=b.id " +
  66. "left join esm_ins_company c on i.company_id=c.id " +
  67. "where a.settleno =#{settleno} "
  68. ,"</script>"}
  69. )
  70. List<InsPlyIncome> selectSettleByCondition(InsPlySettleVo insPlySettleVo);
  71. List<InsPlyIncome> queryNew(HashMap<String, Object> params);
  72. List<InsPlyIncome> totalQuery(HashMap<String, Object> params);
  73. void uopdateByOrderno(InsPlyIncome insPlyIncome);
  74. }