InsAreaCompanyMapper.java 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  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.*;
  13. import com.ydtech.modules.order.entity.InsAreaCompany;
  14. import com.ydtech.modules.order.entity.InsOrders;
  15. import com.ydtech.modules.order.entity.dto.InsAreaCompanyQueryDto;
  16. import com.ydtech.modules.order.entity.dto.SubOrderCountDTO;
  17. import com.ydtech.modules.order.entity.vo.OrderQueryVo;
  18. import com.ydtech.modules.order.entity.vo.RejectPageQueryVo;
  19. import org.apache.ibatis.annotations.Param;
  20. import java.math.BigDecimal;
  21. import java.util.HashMap;
  22. import java.util.List;
  23. /**
  24. * @author Administrator
  25. * @description 针对表【ins_area_company(报价渠道)】的数据库操作Mapper
  26. * @createDate 2023-01-31 15:51:19
  27. * @Entity generator.domain.InsAreaCompany
  28. */
  29. public interface InsAreaCompanyMapper extends BaseMapper<InsAreaCompany> {
  30. /**
  31. * 分组查询
  32. *
  33. * @param orderNo 订单号
  34. * @return
  35. */
  36. List<InsAreaCompanyQueryDto> selectByOrderNo(@Param("orderNo") String orderNo);
  37. /**
  38. * 查询承保的订单
  39. *
  40. * @param orderNo
  41. * @return
  42. */
  43. List<InsAreaCompanyQueryDto> selectAcceptInsurance(@Param("orderNo") String orderNo);
  44. /**
  45. * 查询最新订单的订单号
  46. *
  47. * @param orderNo 订单号
  48. * @return
  49. */
  50. String queryLatestStatus(@Param("orderNo") String orderNo);
  51. List<InsAreaCompany> getorDerIds();
  52. /**
  53. * 获取待审核的订单
  54. */
  55. Page<InsOrders> getAuditOrders(Page page, @Param("params") OrderQueryVo orderQueryVo);
  56. Page<InsOrders> getAlreadyAuditOrders(Page page, @Param("params") OrderQueryVo orderQueryVo);
  57. List<InsOrders> getByUserId(HashMap<String, Object> params);
  58. InsOrders selectFirstPromotionBy(HashMap<String, Object> params);
  59. InsOrders selectSecondPromotionBy(HashMap<String, Object> params);
  60. InsOrders selectThirdPromotionBy(HashMap<String, Object> params);
  61. /**
  62. * @version
  63. * @author: hxl
  64. * @Date: 2024/5/14 11:50
  65. * @Description: 更具日期查询数据
  66. */
  67. List<InsAreaCompany> selectListByDateStr(@Param("dateStr") String dateStr);
  68. /**
  69. * @version
  70. * @author: hxl
  71. * @Date: 2024/5/14 19:13
  72. * @Description: 通过子订单查询订单id
  73. */
  74. List<InsAreaCompany> selectListById(@Param("id") String id);
  75. /**
  76. * @version
  77. * @author: hxl
  78. * @Date: 2024/6/3 11:44
  79. * @Description: 通过状态查询预收和实收的金额
  80. */
  81. InsOrders selectSecondPromotionByNew(HashMap<String, Object> params);
  82. /**
  83. * @version
  84. * @author: hxl
  85. * @Date: 2024/6/3 15:25
  86. * @Description: 获取订单详情页面
  87. */
  88. SubOrder getSubOrderDetails(String subOrderId);
  89. /**
  90. * @version
  91. * @author: hxl
  92. * @Date: 2024/6/5 16:19
  93. * @Description: 保费报表统计
  94. */
  95. List<PremiumReportDto> premiumReportYear(HashMap<String,Object> map);
  96. /**
  97. * @version
  98. * @author: hxl
  99. * @Date: 2024/6/5 16:19
  100. * @Description: 保费报表统计
  101. */
  102. List<PremiumReportDto> premiumReportMonth(HashMap<String,Object> map);
  103. /**
  104. * @version
  105. * @author: hxl
  106. * @Date: 2024/6/5 16:19
  107. * @Description: 保费报表统计
  108. */
  109. List<PremiumReportDto> premiumReportDay(HashMap<String,Object> map);
  110. /**
  111. * @version
  112. * @author: hxl
  113. * @Date: 2024/6/7 15:21
  114. * @Description: 查询总的签单数
  115. */
  116. AllpremiumDto getAllpremium(@Param("year") String year,@Param("userId") String userId);
  117. /**
  118. * 获取审核驳回订单
  119. * @param page
  120. * @param userId
  121. * @return
  122. */
  123. Page<InsAreaCompany> getRejectOrder(Page page, @Param("userId") String userId, @Param("vo") RejectPageQueryVo rejectPageQueryVo);
  124. /**
  125. * @version
  126. * @author: hxl
  127. * @Date: 2024/7/3 10:44
  128. * @Description: 查询控制台页面业务数据
  129. */
  130. Page<BusinessDataDto> queryBusinessDataPage(@Param("vo") BusinessDataQueryDto businessDataQueryDto, @Param("page") Page<BusinessDataDto> page,@Param("userList") List<String> userList,@Param("flag") String flag);
  131. /**
  132. * @version
  133. * @author: hxl
  134. * @Date: 2024/7/3 11:29
  135. * @Description: 查询报价次数大订单的数据
  136. */
  137. Page<QuotationCountDataDto> queryQuotationOrderCountDataPage(@Param("vo") QuotationCountQueryDto quotationCountQueryDto, @Param("page") Page<QuotationCountDataDto> page, @Param("userList") List<String> userIds, @Param("flag") String flag);
  138. /**
  139. * @version
  140. * @author: hxl
  141. * @Date: 2024/7/3 11:34
  142. * @Description: 查询报价次数小订单的数据
  143. */
  144. Page<QuotationCountDataDto> queryQuotationSubOrderCountDataPage(@Param("vo") QuotationCountQueryDto quotationCountQueryDto, @Param("page") Page<QuotationCountDataDto> page, @Param("userList") List<String> userIds, @Param("flag") String flag);
  145. /**
  146. * @version
  147. * @author: hxl
  148. * @Date: 2024/7/3 15:42
  149. * @Description: 查询保险公司的签单保费
  150. */
  151. Page<CompanyPremiumDataDto> queryCompanyPremiumDataPage(@Param("vo") CompanyPremiumDataQueryDto companyPremiumDataQueryDto, @Param("page") Page<QuotationCountDataDto> page);
  152. /**
  153. * @version
  154. * @author: hxl
  155. * @Date: 2024/7/3 16:04
  156. * @Description: 查询保险公司的报价次数
  157. */
  158. Page<CompanyQutationCountDataDto> queryCompanyQutationCountDataPage(@Param("vo") CompanyQutationCountDataQueryDto companyQutationCountDataQueryDto, @Param("page") Page<QuotationCountDataDto> page);
  159. /**
  160. * @version
  161. * @author: hxl
  162. * @Date: 2024/7/10 17:42
  163. * @Description: 获取暂存订单的数据
  164. */
  165. Page<InsAreaCompany> getStageOrder(@Param("page") Page page, @Param("userId") String userId, @Param("vo") RejectPageQueryVo rejectPageQueryVo);
  166. IPage<TaskStatisticsDto> queryPageTaskStatistics(@Param("page") Page page, @Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  167. /**
  168. * @description: 保险公司统计查询
  169. * @author: whp
  170. * @date: 2024/7/25
  171. **/
  172. Page<TaskStatisticsDto> insuranceCompanyQueryPage(@Param("page") Page page,@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  173. /**
  174. * @description: 代理人统计查询
  175. * @author: whp
  176. * @date: 2024/7/26
  177. **/
  178. IPage<TaskStatisticsDto> agentStatisticsQueryPage(@Param("page") Page page, @Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  179. /**
  180. * @description: 财务中心-费用校验
  181. * @author: whp
  182. * @date: 2024/7/29
  183. **/
  184. IPage<TaskStatisticsDto> costCenter(@Param("page") Page page, @Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  185. /**
  186. * @version
  187. * @author: whp
  188. * @Date: 2024/8/08
  189. * @Description: 控制台出单人力
  190. */
  191. QxFrontlineAgentDto getOrderManpower(List<String> ids);
  192. QxFrontlineAgentDto getOrderManpowerByUserId(String id);
  193. /**
  194. *
  195. * @param userId
  196. * @return 查询用户报价次数
  197. */
  198. TaskStatisticsDto NumberQuotations(String userId);
  199. /**
  200. * @description: 保险公司统计总报价
  201. * @author: whp
  202. * @date: 2024/8/12
  203. **/
  204. IPage<TaskStatisticsDto> totalQuotation( @Param("page") Page page,@Param("vo") TaskStatisticsVo taskStatisticsVo);
  205. IPage<TaskStatisticsDto> getBusinessData( @Param("page") Page page,@Param("vo") TaskStatisticsVo taskStatisticsVo);
  206. TaskStatisticsDto getDistribution(@Param("vo") TaskStatisticsVo taskStatisticsVo);
  207. Long insuranceCompanyQueryTotal(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  208. Long queryPageTaskStatisticsTotal(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  209. QxFrontlineAgentDto getOrderManpowerNew( @Param("vo") QxFrontlineAgentDto qxFrontlineAgentDto);
  210. QxFrontlineAgentDto getChannelOrderManpowerNew(@Param("vo") QxFrontlineAgentDto qxFrontlineAgentDto);
  211. /**
  212. * @version
  213. * @author: hxl
  214. * @Date: 2024/8/30 10:22
  215. * @Description: 通过用户id查询金额数据
  216. */
  217. Double getOrderPremiumByUserIds(@Param("vo") QxFrontlineAgentVo qxFrontlineAgentVo);
  218. /**
  219. * @version
  220. * @author: whp
  221. * @Date: 2024/8/31 15:35
  222. * @Description: 查询控制台大订单
  223. */
  224. Page<OrdersDataDto> querOrdersDataPage(@Param("vo") OrdersDataVo ordersDataVo,@Param("page") Page<OrdersDataDto> page);
  225. /**
  226. * @version
  227. * @author: whp
  228. * @Date: 2024/8/31 15:35
  229. * @Description: 查询控制台大订合计
  230. */
  231. OrdersDataDto querOrdersamountTo( @Param("vo") OrdersDataVo ordersDataVo);
  232. /**
  233. * @version
  234. * @author: hxl
  235. * @Date: 2024/8/30 10:22
  236. * @Description: 通过用户id查询金额数据
  237. */
  238. TaskStatisticsDto numberQuotationsByUserIds(@Param("ids") List<String> ids,@Param("month") String month);
  239. OrdersDataDto querResultOrderNumber(@Param("vo") OrdersDataVo ordersDataVo);
  240. /**
  241. * 代理人统计查询
  242. * @param taskStatisticsVo
  243. * @return
  244. */
  245. Long agentStatisticsQueryPageTotal(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  246. Long queryCompanyQutationCountDataPageTotal(@Param("vo") CompanyQutationCountDataQueryDto companyQutationCountDataQueryDto);
  247. CompanyQutationCountDataDto getInsAreaCompanyError(@Param("vo") CompanyQutationCountDataQueryDto companyQutationCountDataQueryDto);
  248. List<OrdersDataDto> getOrdersGroupByLicenseno(@Param("vo") OrdersDataVo ordersDataVo);
  249. List<OrdersDataDto> selectByOrdersDataVo(@Param("vo") OrdersDataVo dtoParams);
  250. /**
  251. * @description: 任务统计-渠道导出
  252. * @author: whp
  253. * @date: 2024/09/09
  254. **/
  255. List<TaskStatisticsExcel> channelExcel(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  256. /**
  257. * @description: 任务统计-保险公司-导出
  258. * @author: whp
  259. * @date: 2024/9/9
  260. **/
  261. List<InsuranceCompanyExcel> insuranceCompanyExcel(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  262. IPage<AgencyUserInsAreaVo> queryAgencyUserInsAreaPage(Page page, @Param("dto")AgencyUserInsAreaDto agencyUserInsAreaDto);
  263. /** 通过 车牌号车架号获取小定单已承保数据
  264. *
  265. * @param ordersDataDto
  266. * @return
  267. */
  268. OrdersDataDto getSumBigOrderCount(@Param("vo") OrdersDataDto ordersDataDto);
  269. /**
  270. * 大订单导出查询
  271. * @param ordersDataDto
  272. * @return
  273. */
  274. List<OrdersDataExcel> querOrdersDataListExcel( @Param("vo") OrdersDataVo ordersDataVo);
  275. /***
  276. *
  277. * @param page
  278. * @param userId
  279. * @param rejectPageQueryVo
  280. * @return 查询已审核的外部订单
  281. */
  282. Page<InsAreaCompany> orderCheckPage(Page page, @Param("userId") String userId, @Param("vo") RejectPageQueryVo rejectPageQueryVo);
  283. /**
  284. * 获取子订单数量
  285. * @param orderNo 订单数量
  286. * @return 子订单数量
  287. */
  288. List<SubOrderCountDTO> getSubOrderCountDTO(List<String> orderNo);
  289. /**
  290. * @description: 财务中心-费用校验-合计
  291. * @author: whp
  292. * @date: 2024/9/28
  293. **/
  294. HashMap<String, Object> costCenterTotal(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  295. /**
  296. * @version
  297. * @author: hxl
  298. * @Date: 2024/9/30 8:55
  299. * @Description: 查询所有的驳回订单信息
  300. */
  301. Page<InsAreaCompany> getAllRejectOrders(@Param("page") Page page, @Param("vo") RejectPageQueryVo rejectPageQueryVo);
  302. /**
  303. * @description: 财务中心-费用校验-明细
  304. * @author: whp
  305. * @date: 2024/10/10
  306. **/
  307. IPage<TaskStatisticsDto> costCenterDetails(@Param("page") Page page,@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  308. /**
  309. * @description: 财务中心-费用校验-明细-查看
  310. * @author: whp
  311. * @date: 2024/10/10
  312. **/
  313. IPage<TaskStatisticsDto> costCenterDetailsLicense( @Param("page") Page page, @Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  314. TaskStatisticsDtoNew costCenterSecond(@Param("taskStatisticsVo")TaskStatisticsVo taskStatisticsVo);
  315. List<TaskStatisticsDtoExcel> costCenterDetailsExcel(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  316. /**
  317. * @description: 电销任务统计查询
  318. * @author: whp
  319. * @date: 2024/10/11
  320. **/
  321. IPage<TaskStatisticsDto> queryPageElectric( @Param("page") Page page, @Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  322. /**
  323. *
  324. * @param taskStatisticsVo
  325. * @return 电销合计
  326. */
  327. Long queryPageElectricTotal(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  328. /**
  329. * @description: 控制台-业务数据-统计
  330. * @author: whp
  331. * @date: 2024/10/12
  332. **/
  333. TaskStatisticsDto getCountBusinessData(@Param("vo") TaskStatisticsVo taskStatisticsVo);
  334. /**
  335. * @param userId
  336. * @return 入口金额 出口金额 分销金额
  337. */
  338. InsAreaCompany getExpectNetProfit(@Param("vo") QxFrontlineAgentVo qxFrontlineAgentVo);
  339. /**
  340. * @version
  341. * @author: hxl
  342. * @Date: 2024/10/17 10:57
  343. * @Description: 查询已承保的保单数据
  344. */
  345. Page<InsOrders> queryPageOrderCB(@Param("page") Page<InsAreaCompany> page, @Param("params") OrderQueryVo orderQueryVo);
  346. /**
  347. *
  348. *
  349. * @param userId
  350. * @return 通过 用户id 获取1-3 级分销金额
  351. */
  352. HashMap<String, BigDecimal> getDistributionAllAmount(@Param("vo") QxFrontlineAgentVo qxFrontlineAgentVo);
  353. /**
  354. * @version
  355. * @author: hxl
  356. * @Date: 2024/10/22 11:00
  357. * @Description: 获取时间范围内的已承保的订单数据
  358. */
  359. List<InsAreaCompany> findListByDate(@Param("benginDate") String benginDate, @Param("endDate") String endDate);
  360. /**
  361. *
  362. * @param taskStatisticsVo
  363. * @return 出单人数
  364. */
  365. TaskStatisticsDto getUserNumber(@Param("vo") TaskStatisticsVo taskStatisticsVo);
  366. /**
  367. *
  368. * @param userId
  369. * @return 代课录单数
  370. */
  371. HashMap<String,Object> getSumEntryStatus(@Param("taskStatisticsVo") TaskStatisticsVo taskStatisticsVo);
  372. /**
  373. *
  374. * @param taskStatisticsVo
  375. * @return 业务 数据保险公司
  376. */
  377. List<TaskStatisticsDto> getBusinessDataList(@Param("vo") TaskStatisticsVo taskStatisticsVo);
  378. /**
  379. * @description: 控制台-小定单报价明细
  380. * @author: whp
  381. **/
  382. List<QuotationDetailsExcel> quotationDetailsExcel(@Param("vo") CompanyQutationCountDataQueryDto companyQutationCountDataQueryDto);
  383. /**
  384. * @description: 财务中心 - 费用校验 - 人员查询
  385. * @author: whp
  386. **/
  387. IPage<TaskStatisticsDto> costReviewer(@Param("page") Page page,@Param("vo") TaskStatisticsVo taskStatisticsVo);
  388. }