InsAreaCompanyMapper.java 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. package com.ydtech.modules.order.dao;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import com.baomidou.mybatisplus.core.metadata.IPage;
  4. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  5. import com.ydtech.modules.admin.model.SysUser;
  6. import com.ydtech.modules.admin.model.dto.*;
  7. import com.ydtech.modules.admin.model.report.company.*;
  8. import com.ydtech.modules.admin.model.report.opetationData.BusinessDataDto;
  9. import com.ydtech.modules.admin.model.report.opetationData.BusinessDataQueryDto;
  10. import com.ydtech.modules.admin.model.report.opetationData.QuotationCountDataDto;
  11. import com.ydtech.modules.admin.model.report.opetationData.QuotationCountQueryDto;
  12. import com.ydtech.modules.admin.model.vo.AgencyUserInsAreaVo;
  13. import com.ydtech.modules.admin.model.vo.OrdersDataVo;
  14. import com.ydtech.modules.admin.model.vo.SubOrder;
  15. import com.ydtech.modules.admin.model.vo.TaskStatisticsVo;
  16. import com.ydtech.modules.order.entity.InsAreaCompany;
  17. import com.ydtech.modules.order.entity.InsOrders;
  18. import com.ydtech.modules.order.entity.dto.InsAreaCompanyQueryDto;
  19. import com.ydtech.modules.order.entity.vo.OrderQueryVo;
  20. import com.ydtech.modules.order.entity.vo.RejectPageQueryVo;
  21. import org.apache.ibatis.annotations.Param;
  22. import java.math.BigDecimal;
  23. import java.util.HashMap;
  24. import java.util.List;
  25. /**
  26. * @author Administrator
  27. * @description 针对表【ins_area_company(报价渠道)】的数据库操作Mapper
  28. * @createDate 2023-01-31 15:51:19
  29. * @Entity generator.domain.InsAreaCompany
  30. */
  31. public interface InsAreaCompanyMapper extends BaseMapper<InsAreaCompany> {
  32. /**
  33. * 分组查询
  34. *
  35. * @param orderNo 订单号
  36. * @return
  37. */
  38. List<InsAreaCompanyQueryDto> selectByOrderNo(@Param("orderNo") String orderNo);
  39. /**
  40. * 查询承保的订单
  41. *
  42. * @param orderNo
  43. * @return
  44. */
  45. List<InsAreaCompanyQueryDto> selectAcceptInsurance(@Param("orderNo") String orderNo);
  46. /**
  47. * 查询最新订单的订单号
  48. *
  49. * @param orderNo 订单号
  50. * @return
  51. */
  52. String queryLatestStatus(@Param("orderNo") String orderNo);
  53. List<InsAreaCompany> getorDerIds();
  54. /**
  55. * 获取待审核的订单
  56. */
  57. Page<InsOrders> getAuditOrders(Page page, @Param("params") OrderQueryVo orderQueryVo);
  58. Page<InsOrders> getAlreadyAuditOrders(Page page, @Param("params") OrderQueryVo orderQueryVo);
  59. List<InsOrders> getByUserId(HashMap<String, Object> params);
  60. InsOrders selectFirstPromotionBy(HashMap<String, Object> params);
  61. InsOrders selectSecondPromotionBy(HashMap<String, Object> params);
  62. InsOrders selectThirdPromotionBy(HashMap<String, Object> params);
  63. /**
  64. * @version
  65. * @author: hxl
  66. * @Date: 2024/5/14 11:50
  67. * @Description: 更具日期查询数据
  68. */
  69. List<InsAreaCompany> selectListByDateStr(@Param("dateStr") String dateStr);
  70. /**
  71. * @version
  72. * @author: hxl
  73. * @Date: 2024/5/14 19:13
  74. * @Description: 通过子订单查询订单id
  75. */
  76. List<InsAreaCompany> selectListById(@Param("id") String id);
  77. /**
  78. * @version
  79. * @author: hxl
  80. * @Date: 2024/6/3 11:44
  81. * @Description: 通过状态查询预收和实收的金额
  82. */
  83. InsOrders selectSecondPromotionByNew(HashMap<String, Object> params);
  84. /**
  85. * @version
  86. * @author: hxl
  87. * @Date: 2024/6/3 15:25
  88. * @Description: 获取订单详情页面
  89. */
  90. SubOrder getSubOrderDetails(String subOrderId);
  91. /**
  92. * @version
  93. * @author: hxl
  94. * @Date: 2024/6/5 16:19
  95. * @Description: 保费报表统计
  96. */
  97. List<PremiumReportDto> premiumReportYear(HashMap<String,Object> map);
  98. /**
  99. * @version
  100. * @author: hxl
  101. * @Date: 2024/6/5 16:19
  102. * @Description: 保费报表统计
  103. */
  104. List<PremiumReportDto> premiumReportMonth(HashMap<String,Object> map);
  105. /**
  106. * @version
  107. * @author: hxl
  108. * @Date: 2024/6/5 16:19
  109. * @Description: 保费报表统计
  110. */
  111. List<PremiumReportDto> premiumReportDay(HashMap<String,Object> map);
  112. /**
  113. * @version
  114. * @author: hxl
  115. * @Date: 2024/6/7 15:21
  116. * @Description: 查询总的签单数
  117. */
  118. AllpremiumDto getAllpremium(@Param("year") String year,@Param("userId") String userId);
  119. /**
  120. * 获取审核驳回订单
  121. * @param page
  122. * @param userId
  123. * @return
  124. */
  125. Page<InsAreaCompany> getRejectOrder(Page page, @Param("userId") String userId, @Param("vo") RejectPageQueryVo rejectPageQueryVo);
  126. /**
  127. * @version
  128. * @author: hxl
  129. * @Date: 2024/7/3 10:44
  130. * @Description: 查询控制台页面业务数据
  131. */
  132. Page<BusinessDataDto> queryBusinessDataPage(@Param("vo") BusinessDataQueryDto businessDataQueryDto, @Param("page") Page<BusinessDataDto> page,@Param("userList") List<String> userList,@Param("flag") String flag);
  133. /**
  134. * @version
  135. * @author: hxl
  136. * @Date: 2024/7/3 11:29
  137. * @Description: 查询报价次数大订单的数据
  138. */
  139. Page<QuotationCountDataDto> queryQuotationOrderCountDataPage(@Param("vo") QuotationCountQueryDto quotationCountQueryDto, @Param("page") Page<QuotationCountDataDto> page, @Param("userList") List<String> userIds, @Param("flag") String flag);
  140. /**
  141. * @version
  142. * @author: hxl
  143. * @Date: 2024/7/3 11:34
  144. * @Description: 查询报价次数小订单的数据
  145. */
  146. Page<QuotationCountDataDto> queryQuotationSubOrderCountDataPage(@Param("vo") QuotationCountQueryDto quotationCountQueryDto, @Param("page") Page<QuotationCountDataDto> page, @Param("userList") List<String> userIds, @Param("flag") String flag);
  147. /**
  148. * @version
  149. * @author: hxl
  150. * @Date: 2024/7/3 15:42
  151. * @Description: 查询保险公司的签单保费
  152. */
  153. Page<CompanyPremiumDataDto> queryCompanyPremiumDataPage(@Param("vo") CompanyPremiumDataQueryDto companyPremiumDataQueryDto, @Param("page") Page<QuotationCountDataDto> page);
  154. /**
  155. * @version
  156. * @author: hxl
  157. * @Date: 2024/7/3 16:04
  158. * @Description: 查询保险公司的报价次数
  159. */
  160. Page<CompanyQutationCountDataDto> queryCompanyQutationCountDataPage(@Param("vo") CompanyQutationCountDataQueryDto companyQutationCountDataQueryDto, @Param("page") Page<QuotationCountDataDto> page);
  161. /**
  162. * @version
  163. * @author: hxl
  164. * @Date: 2024/7/10 17:42
  165. * @Description: 获取暂存订单的数据
  166. */
  167. Page<InsAreaCompany> getStageOrder(@Param("page") Page page, @Param("userId") String userId, @Param("vo") RejectPageQueryVo rejectPageQueryVo);
  168. IPage<TaskStatisticsDto> queryPageTaskStatistics(@Param("page") Page page, @Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  169. /**
  170. * @description: 保险公司统计查询
  171. * @author: whp
  172. * @date: 2024/7/25
  173. **/
  174. Page<TaskStatisticsDto> insuranceCompanyQueryPage(@Param("page") Page page,@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  175. /**
  176. * @description: 代理人统计查询
  177. * @author: whp
  178. * @date: 2024/7/26
  179. **/
  180. IPage<TaskStatisticsDto> agentStatisticsQueryPage(@Param("page") Page page, @Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  181. /**
  182. * @description: 财务中心-费用校验
  183. * @author: whp
  184. * @date: 2024/7/29
  185. **/
  186. IPage<TaskStatisticsDto> costCenter(@Param("page") Page page, @Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  187. /**
  188. * @version
  189. * @author: whp
  190. * @Date: 2024/8/08
  191. * @Description: 控制台出单人力
  192. */
  193. QxFrontlineAgentDto getOrderManpower(List<String> ids);
  194. QxFrontlineAgentDto getOrderManpowerByUserId(String id);
  195. /**
  196. *
  197. * @param userId
  198. * @return 查询用户报价次数
  199. */
  200. TaskStatisticsDto NumberQuotations(String userId);
  201. /**
  202. * @description: 保险公司统计总报价
  203. * @author: whp
  204. * @date: 2024/8/12
  205. **/
  206. IPage<TaskStatisticsDto> totalQuotation( @Param("page") Page page,@Param("vo") TaskStatisticsVo taskStatisticsVo);
  207. IPage<TaskStatisticsDto> getBusinessData( @Param("page") Page page,@Param("vo") TaskStatisticsVo taskStatisticsVo);
  208. TaskStatisticsDto getDistribution(@Param("vo") TaskStatisticsVo taskStatisticsVo);
  209. Long insuranceCompanyQueryTotal(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  210. Long queryPageTaskStatisticsTotal(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  211. QxFrontlineAgentDto getOrderManpowerNew( @Param("vo") QxFrontlineAgentDto qxFrontlineAgentDto);
  212. QxFrontlineAgentDto getChannelOrderManpowerNew(@Param("vo") QxFrontlineAgentDto qxFrontlineAgentDto);
  213. /**
  214. * @version
  215. * @author: hxl
  216. * @Date: 2024/8/30 10:22
  217. * @Description: 通过用户id查询金额数据
  218. */
  219. Double getOrderPremiumByUserIds(@Param("ids") List<String> ids);
  220. /**
  221. * @version
  222. * @author: whp
  223. * @Date: 2024/8/31 15:35
  224. * @Description: 查询控制台大订单
  225. */
  226. Page<OrdersDataDto> querOrdersDataPage(@Param("vo") OrdersDataVo ordersDataVo,@Param("page") Page<OrdersDataDto> page);
  227. /**
  228. * @version
  229. * @author: whp
  230. * @Date: 2024/8/31 15:35
  231. * @Description: 查询控制台大订合计
  232. */
  233. OrdersDataDto querOrdersamountTo( @Param("vo") OrdersDataVo ordersDataVo);
  234. /**
  235. * @version
  236. * @author: hxl
  237. * @Date: 2024/8/30 10:22
  238. * @Description: 通过用户id查询金额数据
  239. */
  240. TaskStatisticsDto numberQuotationsByUserIds(@Param("ids") List<String> ids,@Param("month") String month);
  241. OrdersDataDto querResultOrderNumber(@Param("vo") OrdersDataVo ordersDataVo);
  242. /**
  243. * 代理人统计查询
  244. * @param taskStatisticsVo
  245. * @return
  246. */
  247. Long agentStatisticsQueryPageTotal(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  248. Long queryCompanyQutationCountDataPageTotal(@Param("vo") CompanyQutationCountDataQueryDto companyQutationCountDataQueryDto);
  249. CompanyQutationCountDataDto getInsAreaCompanyError(@Param("vo") CompanyQutationCountDataQueryDto companyQutationCountDataQueryDto);
  250. List<OrdersDataDto> getOrdersGroupByLicenseno(@Param("vo") OrdersDataVo ordersDataVo);
  251. List<OrdersDataDto> selectByOrdersDataVo(@Param("vo") OrdersDataVo dtoParams);
  252. /**
  253. * @description: 任务统计-渠道导出
  254. * @author: whp
  255. * @date: 2024/09/09
  256. **/
  257. List<TaskStatisticsExcel> channelExcel(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  258. /**
  259. * @description: 任务统计-保险公司-导出
  260. * @author: whp
  261. * @date: 2024/9/9
  262. **/
  263. List<InsuranceCompanyExcel> insuranceCompanyExcel(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  264. IPage<AgencyUserInsAreaVo> queryAgencyUserInsAreaPage(Page page, @Param("dto")AgencyUserInsAreaDto agencyUserInsAreaDto);
  265. /** 通过 车牌号车架号获取小定单已承保数据
  266. *
  267. * @param ordersDataDto
  268. * @return
  269. */
  270. OrdersDataDto getSumBigOrderCount(@Param("vo") OrdersDataDto ordersDataDto);
  271. /**
  272. * 大订单导出查询
  273. * @param ordersDataDto
  274. * @return
  275. */
  276. List<OrdersDataExcel> querOrdersDataListExcel( @Param("vo") OrdersDataVo ordersDataVo);
  277. /***
  278. *
  279. * @param page
  280. * @param userId
  281. * @param rejectPageQueryVo
  282. * @return 查询已审核的外部订单
  283. */
  284. Page<InsAreaCompany> orderCheckPage(Page page, @Param("userId") String userId, @Param("vo") RejectPageQueryVo rejectPageQueryVo);
  285. }