|
|
@@ -415,10 +415,12 @@ public class SysPartnerServiceImpl extends ServiceImpl<SysPartnerMapper, SysPart
|
|
|
String dateStr = "";
|
|
|
if (updateTime != null) {
|
|
|
dateStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(updateTime);
|
|
|
+ agencyExtractFee.setStartTime(updateTime);
|
|
|
} else {
|
|
|
dateStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTime);
|
|
|
+ agencyExtractFee.setStartTime(createTime);
|
|
|
}
|
|
|
- HashMap<String, BigDecimal> map = sysAgencyLeaderMapper.getBigDecimalNum(sysAgencyLeaders.getDeptId(), dateStr);
|
|
|
+ HashMap<String, BigDecimal> map = sysAgencyLeaderMapper.getBigDecimalNum(sysAgencyLeaders.getDeptId(), dateStr,null,null);
|
|
|
if (CollectionUtil.isNotEmpty(map)) {
|
|
|
bigDecimal = bigDecimal.add(map.get("bigDecimal") == null ? BigDecimal.ZERO : map.get("bigDecimal"));
|
|
|
}
|
|
|
@@ -536,38 +538,52 @@ public class SysPartnerServiceImpl extends ServiceImpl<SysPartnerMapper, SysPart
|
|
|
|
|
|
for (SysDept sysDept1 : sysDeptList) {
|
|
|
|
|
|
- List<InsOrders> insOrderList;
|
|
|
+// List<InsOrders> insOrderList;
|
|
|
+// //筛选订单,选择时间
|
|
|
+// Date updateTime = sysAgencyLeader.getUpdateTime();
|
|
|
+// if (updateTime == null) {
|
|
|
+// //机构下所有订单
|
|
|
+// insOrderList = insOrdersMapper.selectList(new LambdaQueryWrapper<InsOrders>()
|
|
|
+// .likeRight(InsOrders::getDeptid, sysDept1.getId())
|
|
|
+// .ge(InsOrders::getCreatetime, sysAgencyLeader.getCreateTime()));
|
|
|
+// sysPartnerAPPPageVo.setStartTime(sysAgencyLeader.getCreateTime());
|
|
|
+//
|
|
|
+// } else {
|
|
|
+// insOrderList = insOrdersMapper.selectList(new LambdaQueryWrapper<InsOrders>()
|
|
|
+// .likeRight(InsOrders::getDeptid, sysDept1.getId())
|
|
|
+// .ge(InsOrders::getCreatetime, updateTime));
|
|
|
+// sysPartnerAPPPageVo.setStartTime(updateTime);
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (insOrderList.size() > 0) {
|
|
|
+// 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);
|
|
|
+// }
|
|
|
+// }
|
|
|
//筛选订单,选择时间
|
|
|
Date updateTime = sysAgencyLeader.getUpdateTime();
|
|
|
- if (updateTime == null) {
|
|
|
- //机构下所有订单
|
|
|
- insOrderList = insOrdersMapper.selectList(new LambdaQueryWrapper<InsOrders>()
|
|
|
- .likeRight(InsOrders::getDeptid, sysDept1.getId())
|
|
|
- .ge(InsOrders::getCreatetime, sysAgencyLeader.getCreateTime()));
|
|
|
- sysPartnerAPPPageVo.setStartTime(sysAgencyLeader.getCreateTime());
|
|
|
-
|
|
|
- } else {
|
|
|
- insOrderList = insOrdersMapper.selectList(new LambdaQueryWrapper<InsOrders>()
|
|
|
- .likeRight(InsOrders::getDeptid, sysDept1.getId())
|
|
|
- .ge(InsOrders::getCreatetime, updateTime));
|
|
|
+ Date createTime = sysAgencyLeader.getCreateTime();
|
|
|
+ String dateStr = "";
|
|
|
+ if (updateTime != null) {
|
|
|
+ dateStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(updateTime);
|
|
|
sysPartnerAPPPageVo.setStartTime(updateTime);
|
|
|
+ } else {
|
|
|
+ dateStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTime);
|
|
|
+ sysPartnerAPPPageVo.setStartTime(createTime);
|
|
|
}
|
|
|
-
|
|
|
- if (insOrderList.size() > 0) {
|
|
|
- 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, BigDecimal> map = sysAgencyLeaderMapper.getBigDecimalNum(sysDept1.getId(), dateStr,null,null);
|
|
|
+ if (CollectionUtil.isNotEmpty(map)) {
|
|
|
+ bigDecimal = bigDecimal.add(map.get("bigDecimal") == null ? BigDecimal.ZERO : map.get("bigDecimal"));
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|