|
@@ -797,18 +797,22 @@ public class SysAgencyLeaderServiceImpl extends ServiceImpl<SysAgencyLeaderMappe
|
|
|
|
|
|
|
|
if (insOrderList.size() > 0) {
|
|
if (insOrderList.size() > 0) {
|
|
|
List<String> collect = insOrderList.stream().map(InsOrders::getOrderno).collect(Collectors.toList());
|
|
List<String> collect = insOrderList.stream().map(InsOrders::getOrderno).collect(Collectors.toList());
|
|
|
- //查询订单下的所有子订单
|
|
|
|
|
- List<InsAreaCompany> insAreaCompanies = insAreaCompanyMapper.selectList(new LambdaQueryWrapper<InsAreaCompany>()
|
|
|
|
|
- .in(InsAreaCompany::getOrderno, collect)
|
|
|
|
|
- .eq(InsAreaCompany::getOrderstatus, 3));
|
|
|
|
|
- if (insAreaCompanies.size() > 0) {
|
|
|
|
|
- //累加每一个子订单的交强险费用+商业险费用+驾意险费用
|
|
|
|
|
- BigDecimal jqpremium = insAreaCompanies.stream().map(InsAreaCompany::getJqpremium).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
- BigDecimal sypremium = insAreaCompanies.stream().map(InsAreaCompany::getSypremium).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
- BigDecimal jypremium = insAreaCompanies.stream().map(InsAreaCompany::getJypremium).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
-
|
|
|
|
|
- bigDecimal = jqpremium.add(sypremium).add(jypremium);
|
|
|
|
|
|
|
+ //查询订单下的所有子订单 保费和
|
|
|
|
|
+ HashMap<String, Object> map = sysAgencyLeaderMapper.getAreaCompanyByUserId(collect);
|
|
|
|
|
+ if (CollectionUtil.isNotEmpty(map)) {
|
|
|
|
|
+ bigDecimal = bigDecimal.add(map.get("bigDecimal") == null ? BigDecimal.ZERO : (BigDecimal)map.get("bigDecimal"));
|
|
|
}
|
|
}
|
|
|
|
|
+// List<InsAreaCompany> insAreaCompanies = insAreaCompanyMapper.selectList(new LambdaQueryWrapper<InsAreaCompany>()
|
|
|
|
|
+// .in(InsAreaCompany::getOrderno, collect)
|
|
|
|
|
+// .eq(InsAreaCompany::getOrderstatus, 3));
|
|
|
|
|
+// if (insAreaCompanies.size() > 0) {
|
|
|
|
|
+// //累加每一个子订单的交强险费用+商业险费用+驾意险费用
|
|
|
|
|
+// BigDecimal jqpremium = insAreaCompanies.stream().map(InsAreaCompany::getJqpremium).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
+// BigDecimal sypremium = insAreaCompanies.stream().map(InsAreaCompany::getSypremium).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
+// BigDecimal jypremium = insAreaCompanies.stream().map(InsAreaCompany::getJypremium).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
+//
|
|
|
|
|
+// bigDecimal = jqpremium.add(sypremium).add(jypremium);
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
teamInformation.setSumpremium(bigDecimal);
|
|
teamInformation.setSumpremium(bigDecimal);
|
|
@@ -1018,19 +1022,25 @@ public class SysAgencyLeaderServiceImpl extends ServiceImpl<SysAgencyLeaderMappe
|
|
|
if (insOrderList.size() > 0) {
|
|
if (insOrderList.size() > 0) {
|
|
|
List<String> orderNoList = insOrderList.stream().map(InsOrders::getOrderno).collect(Collectors.toList());
|
|
List<String> orderNoList = insOrderList.stream().map(InsOrders::getOrderno).collect(Collectors.toList());
|
|
|
//单个人员查询订单下的所有子订单总保费 '订单状态(0 报价 1 待核保 2 已核保待缴费 3 核保退回 4 核保不通过)',
|
|
//单个人员查询订单下的所有子订单总保费 '订单状态(0 报价 1 待核保 2 已核保待缴费 3 核保退回 4 核保不通过)',
|
|
|
- List<InsAreaCompany> insAreaCompanies = insAreaCompanyMapper.selectList(new LambdaQueryWrapper<InsAreaCompany>()
|
|
|
|
|
- .in(InsAreaCompany::getOrderno, orderNoList)
|
|
|
|
|
- .eq(InsAreaCompany::getOrderstatus, 3));
|
|
|
|
|
- if (insAreaCompanies.size() > 0) {
|
|
|
|
|
- //累加每一个子订单的交强险费用+商业险费用+驾意险费用
|
|
|
|
|
- BigDecimal jqpremium = insAreaCompanies.stream().map(InsAreaCompany::getJqpremium).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
- BigDecimal sypremium = insAreaCompanies.stream().map(InsAreaCompany::getSypremium).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
- BigDecimal jypremium = insAreaCompanies.stream().map(InsAreaCompany::getJypremium).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
-
|
|
|
|
|
- bigDecimal = jqpremium.add(sypremium).add(jypremium);
|
|
|
|
|
|
|
+ HashMap<String, Object> map = sysAgencyLeaderMapper.getAreaCompanyByUserId(orderNoList);
|
|
|
|
|
+ if (CollectionUtil.isNotEmpty(map)) {
|
|
|
|
|
+ bigDecimal = bigDecimal.add(map.get("bigDecimal") == null ? BigDecimal.ZERO : (BigDecimal)map.get("bigDecimal"));
|
|
|
|
|
+ Long issueNum = (Long)map.get("issueNum");
|
|
|
|
|
+ teamUserInfoVo.setIssueNum(issueNum.intValue());
|
|
|
}
|
|
}
|
|
|
- //出单笔数
|
|
|
|
|
- teamUserInfoVo.setIssueNum(insAreaCompanies.size());
|
|
|
|
|
|
|
+// List<InsAreaCompany> insAreaCompanies = insAreaCompanyMapper.selectList(new LambdaQueryWrapper<InsAreaCompany>()
|
|
|
|
|
+// .in(InsAreaCompany::getOrderno, orderNoList)
|
|
|
|
|
+// .eq(InsAreaCompany::getOrderstatus, 3));
|
|
|
|
|
+// if (insAreaCompanies.size() > 0) {
|
|
|
|
|
+// //累加每一个子订单的交强险费用+商业险费用+驾意险费用
|
|
|
|
|
+// BigDecimal jqpremium = insAreaCompanies.stream().map(InsAreaCompany::getJqpremium).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
+// BigDecimal sypremium = insAreaCompanies.stream().map(InsAreaCompany::getSypremium).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
+// BigDecimal jypremium = insAreaCompanies.stream().map(InsAreaCompany::getJypremium).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
+//
|
|
|
|
|
+// bigDecimal = jqpremium.add(sypremium).add(jypremium);
|
|
|
|
|
+// }
|
|
|
|
|
+// //出单笔数
|
|
|
|
|
+// teamUserInfoVo.setIssueNum(insAreaCompanies.size());
|
|
|
teamUserInfoVo.setSumpremium(bigDecimal);
|
|
teamUserInfoVo.setSumpremium(bigDecimal);
|
|
|
//报价笔数
|
|
//报价笔数
|
|
|
Long quoteNum = insAreaCompanyMapper.selectCount(new LambdaQueryWrapper<InsAreaCompany>()
|
|
Long quoteNum = insAreaCompanyMapper.selectCount(new LambdaQueryWrapper<InsAreaCompany>()
|
|
@@ -1041,6 +1051,7 @@ public class SysAgencyLeaderServiceImpl extends ServiceImpl<SysAgencyLeaderMappe
|
|
|
Long underwriteNum = insAreaCompanyMapper.selectCount(new LambdaQueryWrapper<InsAreaCompany>()
|
|
Long underwriteNum = insAreaCompanyMapper.selectCount(new LambdaQueryWrapper<InsAreaCompany>()
|
|
|
.in(InsAreaCompany::getOrderno, orderNoList)
|
|
.in(InsAreaCompany::getOrderno, orderNoList)
|
|
|
.in(InsAreaCompany::getOrderstatus, integers));
|
|
.in(InsAreaCompany::getOrderstatus, integers));
|
|
|
|
|
+
|
|
|
teamUserInfoVo.setUnderwriteNum(underwriteNum);
|
|
teamUserInfoVo.setUnderwriteNum(underwriteNum);
|
|
|
teamUserInfoVoList.add(teamUserInfoVo);
|
|
teamUserInfoVoList.add(teamUserInfoVo);
|
|
|
} else {
|
|
} else {
|