|
|
|
@@ -518,7 +518,7 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
InvestPageResult<InvestTaskVo> investPage = new InvestPageResult<>(); |
|
|
|
taskQueryWrapper.apply(StringUtils.isNotBlank(taskParams.getOwner()), "`owner` REGEXP {0}", taskParams.getOwner()); |
|
|
|
taskQueryWrapper.apply(Objects.nonNull(params.getBusinessId()), "`content` REGEXP {0}", |
|
|
|
String.format("\"businessId\": %d", params.getBusinessId())); |
|
|
|
buildBusinessQuery(params)); |
|
|
|
taskParams.setOwner(null); |
|
|
|
taskQueryWrapper.setEntity(taskParams); |
|
|
|
|
|
|
|
@@ -567,6 +567,13 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
return investPage; |
|
|
|
} |
|
|
|
|
|
|
|
private String buildBusinessQuery(InvestTaskQuery params) { |
|
|
|
if (params.getBusinessId() <= 10) { |
|
|
|
return String.format("\"businessId\": %d[^1%d]", params.getBusinessId(), params.getBusinessId()); |
|
|
|
} |
|
|
|
return String.format("\"businessId\": %d", params.getBusinessId()); |
|
|
|
} |
|
|
|
|
|
|
|
private Collection<Long> buildShopContractQuery(Collection<WxShop> shops, EnumRentShopType shopType) { |
|
|
|
Collection<Long> shopIds = new ArrayList<>(); |
|
|
|
if (CollectionUtils.isNotEmpty(shops)) { |
|
|
|
@@ -699,10 +706,10 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
} |
|
|
|
|
|
|
|
private String getDayEnd(Date date) { |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
calendar.setTime(date); |
|
|
|
calendar.add(Calendar.DAY_OF_YEAR, 1); |
|
|
|
return DateUtils.format(calendar.getTime()); |
|
|
|
//Calendar calendar = Calendar.getInstance(); |
|
|
|
//calendar.setTime(date); |
|
|
|
//calendar.add(Calendar.DAY_OF_YEAR, 1); |
|
|
|
return DateUtils.format(date); |
|
|
|
} |
|
|
|
|
|
|
|
private String getDayStart(Date date) { |
|
|
|
@@ -1041,11 +1048,11 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
.eq(InvestTaskEntity::getTenantId, InvestUserContext.getUser().getTenantId()))); |
|
|
|
result.put("customerTotal", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>() |
|
|
|
.eq(InvestCustomerEntity::getTenantId, InvestUserContext.getUser().getTenantId()))); |
|
|
|
result.put("taskToday", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>() |
|
|
|
result.put("customerToday", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>() |
|
|
|
.apply("date_format(create_date,'%Y-%m-%d') = {0}", DateUtils.format(new Date())) |
|
|
|
.eq(InvestCustomerEntity::getTenantId, InvestUserContext.getUser().getTenantId()))); |
|
|
|
result.put("customerImportant", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>() |
|
|
|
.eq(InvestCustomerEntity::getType, EnumCustomerType.INTENTIONAL) |
|
|
|
.in(InvestCustomerEntity::getType, EnumCustomerType.POTENTIAL,EnumCustomerType.INTENTIONAL) |
|
|
|
.eq(InvestCustomerEntity::getTenantId, InvestUserContext.getUser().getTenantId()))); |
|
|
|
result.put("remindTotal", remindService.count(new LambdaQueryWrapper<InvestRemindEntity>() |
|
|
|
.eq(InvestRemindEntity::getTenantId, InvestUserContext.getUser().getTenantId()))); |
|
|
|
@@ -1061,10 +1068,10 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
.apply("`owner` REGEXP {0}", InvestUserContext.getUserId()))); |
|
|
|
result.put("customerTotal", demandService.count(new LambdaQueryWrapper<InvestDemandEntity>() |
|
|
|
.eq(InvestDemandEntity::getOwner, InvestUserContext.getUser().getTenantId()))); |
|
|
|
result.put("taskToday", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>() |
|
|
|
result.put("taskToday", taskService.count(new LambdaQueryWrapper<InvestTaskEntity>() |
|
|
|
.apply("`owner` REGEXP {0}", InvestUserContext.getUserId()) |
|
|
|
.apply("date_format(create_date,'%Y-%m-%d') = {0}", DateUtils.format(new Date())) |
|
|
|
.eq(InvestCustomerEntity::getTenantId, InvestUserContext.getUser().getTenantId()))); |
|
|
|
.eq(InvestTaskEntity::getTenantId, InvestUserContext.getUser().getTenantId()))); |
|
|
|
result.put("customerToday", demandService.count(new LambdaQueryWrapper<InvestDemandEntity>() |
|
|
|
.eq(InvestDemandEntity::getOwner, InvestUserContext.getUser().getTenantId()) |
|
|
|
.apply("date_format(create_date,'%Y-%m-%d') = {0}", DateUtils.format(new Date())) |
|
|
|
|