修改数据大屏总人数统计

This commit is contained in:
yuyang 2022-07-13 10:08:14 +08:00
parent d59212d23b
commit c42cea4f1c
3 changed files with 16 additions and 2 deletions

View File

@ -33,6 +33,12 @@ public interface XhpcHistoryOrderMapper {
@Param("userType") Integer userType, @Param("userType") Integer userType,
@Param("currentTime") String currentTime); @Param("currentTime") String currentTime);
//社区用户统计
Long xhpcCommunityPersonnelSum();
//B端用户统计
Long xhpcCustomersPersonnelSum();
/** /**
* query total electric quantity by multiple tenant or multiple charging station * query total electric quantity by multiple tenant or multiple charging station
* *

View File

@ -123,8 +123,8 @@ public class XhpcDataBigScreenServiceImpl implements XhpcDataBigScreenService {
Long appUserCount = xhpcAppUserMapper.selectTotalCountByTenantIdAndCurrentTime(tenantIdsStr, null); Long appUserCount = xhpcAppUserMapper.selectTotalCountByTenantIdAndCurrentTime(tenantIdsStr, null);
List<Long> chargingStationIdList = xhpcChargingStationMapper.selectChargingStationIds(tenantIdsStr); List<Long> chargingStationIdList = xhpcChargingStationMapper.selectChargingStationIds(tenantIdsStr);
//0 C端用户 1 流量方用户 2社区用户 3B端用户 //0 C端用户 1 流量方用户 2社区用户 3B端用户
Long communityUserCount = xhpcHistoryOrderMapper.selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserTypeAndCurrentTime(tenantIdsStr, chargingStationIdList, UserTypeUtil.COMMUNIT_TYPE, null); Long communityUserCount = xhpcHistoryOrderMapper.xhpcCommunityPersonnelSum();
Long customerUserCount = xhpcHistoryOrderMapper.selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserTypeAndCurrentTime(tenantIdsStr, chargingStationIdList, UserTypeUtil.CUSTOMERS_TYPE, null); Long customerUserCount = xhpcHistoryOrderMapper.xhpcCustomersPersonnelSum();
return R.ok(appUserCount + communityUserCount + customerUserCount); return R.ok(appUserCount + communityUserCount + customerUserCount);
//judge care param function //judge care param function

View File

@ -163,6 +163,14 @@
</foreach> </foreach>
</if> </if>
</select> </select>
<select id="xhpcCommunityPersonnelSum" resultType="long">
select count(community_personnel_id) from xhpc_community_personnel where del_flag =0
</select>
<select id="xhpcCustomersPersonnelSum" resultType="long">
select count(customers_personnel_id) from xhpc_customers_personnel where del_flag =0
</select>
<select id="selectOrderTrendByTenantIdsAndChargingStationIds" resultType="java.util.Map"> <select id="selectOrderTrendByTenantIdsAndChargingStationIds" resultType="java.util.Map">
SELECT SELECT
`current_time`, `current_time`,