首页客户日历
This commit is contained in:
parent
c782367e28
commit
1e5ea1976e
|
@ -11,5 +11,14 @@ public class CustomerVO extends Customer{
|
||||||
|
|
||||||
@ApiModelProperty("创建人名称")
|
@ApiModelProperty("创建人名称")
|
||||||
private String createName;
|
private String createName;
|
||||||
|
|
||||||
|
@ApiModelProperty("日历,日期")
|
||||||
|
private String date;
|
||||||
|
|
||||||
|
@ApiModelProperty("已跟进客户数量")
|
||||||
|
private String followedCount;
|
||||||
|
|
||||||
|
@ApiModelProperty("待跟进客户数量")
|
||||||
|
private String pendingCount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,4 +85,8 @@ public interface CustomerMapper
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<LocalDateIntegerVO> selectDailyCreateCount(@Param("query") CustomerQuery query);
|
List<LocalDateIntegerVO> selectDailyCreateCount(@Param("query") CustomerQuery query);
|
||||||
|
|
||||||
|
|
||||||
|
List<CustomerVO> selectCalendarCustomerNumber(@Param("query") CustomerQuery query);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -260,4 +260,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
group by `key`
|
group by `key`
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectCalendarCustomerNumber" parameterType="CustomerQuery">
|
||||||
|
SELECT
|
||||||
|
date,
|
||||||
|
SUM(is_followed) AS followed_count,
|
||||||
|
SUM(is_pending) AS pending_count
|
||||||
|
FROM (
|
||||||
|
-- 已跟进客户按跟进日期统计
|
||||||
|
SELECT
|
||||||
|
DATE(last_follow_time) AS date,
|
||||||
|
1 AS is_followed,
|
||||||
|
0 AS is_pending
|
||||||
|
FROM bst_customer
|
||||||
|
WHERE follow_id = #{query.followId}
|
||||||
|
AND last_follow_time IS NOT NULL
|
||||||
|
|
||||||
|
UNION ALL
|
||||||
|
|
||||||
|
-- 待跟进客户按计划跟进日期统计
|
||||||
|
SELECT
|
||||||
|
DATE(next_follow_time) AS date,
|
||||||
|
0 AS is_followed,
|
||||||
|
1 AS is_pending
|
||||||
|
FROM bst_customer
|
||||||
|
WHERE follow_id = #{query.followId}
|
||||||
|
AND next_follow_time IS NOT NULL
|
||||||
|
AND status < 3
|
||||||
|
) AS combined_data
|
||||||
|
GROUP BY date
|
||||||
|
ORDER BY date;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -95,4 +95,8 @@ public interface CustomerService
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<LocalDateIntegerVO> selectDailyCreateCount(CustomerQuery query);
|
List<LocalDateIntegerVO> selectDailyCreateCount(CustomerQuery query);
|
||||||
|
|
||||||
|
|
||||||
|
List<CustomerVO> selectCalendarCustomerNumber(CustomerQuery query);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,4 +165,9 @@ public class CustomerServiceImpl implements CustomerService
|
||||||
public List<LocalDateIntegerVO> selectDailyCreateCount(CustomerQuery query) {
|
public List<LocalDateIntegerVO> selectDailyCreateCount(CustomerQuery query) {
|
||||||
return customerMapper.selectDailyCreateCount(query);
|
return customerMapper.selectDailyCreateCount(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CustomerVO> selectCalendarCustomerNumber(CustomerQuery query) {
|
||||||
|
return customerMapper.selectCalendarCustomerNumber(query);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,6 +65,18 @@ public class CustomerController extends BaseController
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取日历数据
|
||||||
|
* 待跟进客户数量、已跟进客户数量
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('bst:customer:list')")
|
||||||
|
@GetMapping("/listNumber")
|
||||||
|
public AjaxResult getCustomerNumber(CustomerQuery query)
|
||||||
|
{
|
||||||
|
List<CustomerVO> customerVOS = customerService.selectCalendarCustomerNumber(query);
|
||||||
|
return success(customerVOS);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询客户列表ByIds
|
* 查询客户列表ByIds
|
||||||
*/
|
*/
|
||||||
|
@ -142,4 +154,8 @@ public class CustomerController extends BaseController
|
||||||
return toAjax(customerService.logicDel(ids));
|
return toAjax(customerService.logicDel(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user