| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- package com.ydtech.modules.fnc.dao;
- import com.baomidou.mybatisplus.core.mapper.BaseMapper;
- import com.ydtech.modules.admin.model.report.financialReceivables.*;
- import com.ydtech.modules.admin.model.report.profitAnalysis.ProfitAnalysisDto;
- import com.ydtech.modules.admin.model.report.profitAnalysis.ProfitAnalysisQueryDto;
- import com.ydtech.modules.fnc.dto.InsPlyIncomePTCompanyDto;
- import com.ydtech.modules.fnc.dto.InsPlyIncomePTDto;
- import com.ydtech.modules.fnc.dto.InsuranceHandlingSettlementMonthDto;
- import com.ydtech.modules.fnc.dto.PlatformSettlementRecordDto;
- import com.ydtech.modules.fnc.entity.InsPlyIncome;
- import com.ydtech.modules.fnc.vo.*;
- import com.ydtech.modules.order.entity.vo.AuditExportQueryVo;
- import com.ydtech.modules.order.entity.vo.ReceivableExportVo;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import org.apache.ibatis.annotations.Select;
- import java.math.BigDecimal;
- import java.util.Collection;
- import java.util.HashMap;
- 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 1=1 " +
- "<if test='startDate!=null and endDate!=null'>" +
- "and DATE_FORMAT(pay_date, '%Y-%m-%d') " +
- "between DATE_FORMAT(#{startDate}, '%Y-%m-%d') and DATE_FORMAT(#{endDate}, '%Y-%m-%d')" +
- "</if> "+
- "<if test='companyId!=\"\" and companyId!=null '>" +
- " and a.company_id=#{companyId} " +
- "</if> "+
- "<if test='deptId!=\"\" and deptId!=null '>" +
- " and a.dept_id like CONCAT(#{deptId}, '%') " +
- "</if> "+
- "<if test='agreementId!=\"\" and agreementId!=null '>" +
- " 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 licenseno!=null '>" +
- " and a.licenseno=#{licenseno} " +
- "</if> "
- ,"</script>"}
- )
- List<InsPlyIncome> selectByCondition(InsPlyIncomeVo insPlyIncomeVo);
- @Select({
- "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 a.policyno= #{policyno}"
- }
- )
- InsPlyIncome selectByPlyno(String policyno);
- @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);
- List<InsPlyIncome> queryNew(HashMap<String, Object> params);
- List<InsPlyIncome> totalQuery(HashMap<String, Object> params);
- void uopdateByOrderno(InsPlyIncome insPlyIncome);
- List<InsPlyIncome> NonSettlementQuery(HashMap<String, Object> params);
- HashMap<String,Object> totalAmount(HashMap<String,Object> params);
- List<InsPlyIncome> totalPinAmount(HashMap<String, Object> params);
- List<InsPlyIncome> totalBxAmount(HashMap<String, Object> params);
- InsPlyIncome queryInvoicing(HashMap<String, Object> params);
- List<InsPlyIncome> allOtherAmount(HashMap<String, Object> params);
- InsPlyIncome findByLicenseno(HashMap<String, Object> params);
- InsPlyIncome bxTotalAmount(HashMap<String, Object> params);
- InsPlyIncome findByBxLicenseno(HashMap<String, Object> params);
- InsPlyIncome getById (@Param("id") String id);
- /**
- *
- * @param idArr 开票的id
- * @return
- */
- List<HashMap<String,Object>> groupByInvoic(HashMap<String,Object> params);
- List<InsPlyIncome> getIncomeIdList(HashMap<String, Object> params);
- List<HashMap<String,Object>> getOtherIds(HashMap<String, Object> params);
- InsPlyIncome getEntityById(@Param("id") String id);
- void updateByIds(String[] split);
- List<HashMap<String,Object>> otherTimeDetail(HashMap<String, Object> params);
- InsPlyIncome ptTotalAmount(HashMap<String, Object> params);
- /**
- * @version
- * @author: hxl
- * @Date: 2024/6/18 10:15
- * @Description: 根据合作公司id和结算状态查询数据
- */
- List<PlatformSettlementRecordDto> platformSettlementRecord(@Param("partnerCompaniesId") String partnerCompaniesId, @Param("handlingFeesStatus") String handlingFeesStatus,@Param("dockingPerson") String dockingPerson);
- /***
- *
- * @param insPlyIncomeVo
- * @return 返回私有 平台 应收 已收 未收
- */
- InsPlyIncome getTotalPtReceivables(InsPlyIncomeVo insPlyIncomeVo);
- /**
- * 根据签单日期月份分组
- * @param insPlyIncomeVo
- * @return 平台 私有 应收 已收
- */
- List<HashMap<String, Object>> ptSumGroupByMonth(HashMap<String, Object> params);
- /**
- * @version
- * @author: hxl
- * @Date: 2024/7/31 18:04
- * @Description: 查询数据
- */
- List<ProfitAnalysisDto> queryPage( @Param("vo") ProfitAnalysisQueryDto profitAnalysisQueryDto);
- /**
- * @version
- * @author: hxl
- * @Date: 2024/8/1 12:09
- * @Description: 查询应收总数据
- */
- BigDecimal queryDateByTypeSumAmount(@Param("vo") FinancialReceivablesQueryVo financialReceivablesQueryVo);
- /**
- * @version
- * @author: hxl
- * @Date: 2024/8/1 12:16
- * @Description: 查询应收列表数据 1-12月
- */
- List<FinancialReceivablesVo> queryDateByType(@Param("vo") FinancialReceivablesQueryVo financialReceivablesQueryVo);
- /**
- * @version
- * @author: hxl
- * @Date: 2024/8/5 10:06
- * @Description: 查询月份的统计数据
- */
- FinancialReceivablesAllMonthVo queryDateByTypeByMonth(@Param("vo") FinancialReceivablesQueryMonthVo financialReceivablesQueryVo);
- /**
- * @version
- * @author: hxl
- * @Date: 2024/8/5 10:32
- * @Description: 查询月份统计集合数据
- */
- List<FinancialReceivablesMonthVo> queryDateByTypeByMonthList(@Param("vo") FinancialReceivablesQueryMonthVo financialReceivablesQueryVo);
- List<FinancialReceivablesMonthVo> queryDateByTypeByMonthOtherList(@Param("vo") FinancialReceivablesQueryMonthVo financialReceivablesQueryVo);
- List<FinancialReceivablesMonthVo> queryPlatHanding(@Param("vo") FinancialReceivablesQueryMonthVo financialReceivablesQueryVo);
- List<FinancialReceivablesVo> queryPrivateCar(@Param("vo") FinancialReceivablesQueryVo financialReceivablesQueryVo);
- List<ProfitAnalysisDto> getProfitAnalysisQueryList(@Param("vo") ProfitAnalysisQueryDto profitAnalysisQueryDto);
- List<InsuranceHandlingSettlementMonthDto> getInvociAmount(@Param("vo") InsuranceHandlingSettlementMonthVo insuranceHandlingSettlementMonthVo);
- Collection<? extends FinancialReceivablesVo> queryDateByTypePt( @Param("vo") FinancialReceivablesQueryVo financialReceivablesQueryVo);
- List<FinancialReceivablesMonthVo> getPatherId( @Param("vo") FinancialReceivablesQueryMonthVo financialReceivablesQueryVo);
- /**
- * @version
- * @author: hxl
- * @Date: 2024/9/20 9:59
- * @Description: 平台结算情况
- */
- List<InsPlyIncomePTDto> totalPTAmount(@Param("vo") InsPlyIncomePTVo insPlyIncomeVo);
- /**
- * @version
- * @author: hxl
- * @Date: 2024/9/20 11:04
- * @Description: 通过对接人查询数据
- */
- List<InsPlyIncomePTCompanyDto> findListByDockingPerson(@Param("vo") InsPlyIncomeQueryPTVo insPlyIncomeVo);
- /**
- *
- * @param params
- * @return 合计金额
- */
- List<InsPlyIncome> totalBxAmountNew(HashMap<String, Object> params);
- List<ProfitAnalysisDto> changeAmount(@Param("vo") ProfitAnalysisQueryDto profitAnalysisQueryDto);
- BigDecimal queryDateByNotTypeSumAmount(@Param("vo") FinancialReceivablesQueryVo financialReceivablesQueryVo);
- BigDecimal queryDateByTypeNotSumAmount(@Param("vo") FinancialReceivablesQueryVo financialReceivablesQueryVo);
- /**
- * @version
- * @author: hxl
- * @Date: 2024/12/30 10:08
- * @Description: 查询签单日期为空的结算日期
- */
- List<InsPlyIncome> findListByDate(@Param("benginDate") String benginDate, @Param("endDate") String endDate);
- List<ReceivableExportVo> getReceivableExportList(@Param("params")AuditExportQueryVo auditExportQueryVo);
- }
|