Browse Source
# Conflicts: # epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/EpmetUserController.java # epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.javadev_shibei_match
43 changed files with 1917 additions and 4 deletions
@ -0,0 +1,21 @@ |
|||
package com.epmet.dataaggre.dto.epmetuser.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
|
|||
/** |
|||
* @Description 网格员相关统计formdto |
|||
* @author wxz |
|||
* @date 2021.07.05 15:46:23 |
|||
*/ |
|||
@Data |
|||
public class GridMemberStatsFormDTO { |
|||
|
|||
public interface IssueProjectStats {} |
|||
|
|||
@NotBlank(message = "网格ID不能为空", groups = {IssueProjectStats.class}) |
|||
private String gridId; |
|||
|
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.epmet.dataaggre.dto.govorg.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class GridMemberDataAnalysisFromDTO { |
|||
|
|||
public interface listGridMemberDatas {} |
|||
|
|||
private List<String> gridIds; |
|||
|
|||
// 搜索的人员姓名
|
|||
private String searchedStaffName; |
|||
@NotBlank(message = "月份不能为空", groups = { listGridMemberDatas.class }) |
|||
private String month; |
|||
@NotBlank(message = "排序规则不能为空", groups = { listGridMemberDatas.class }) |
|||
private String sort; |
|||
private Integer pageNo = 1; |
|||
private Integer pageSize = 10; |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.epmet.dataaggre.dto.govorg.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class GridMemberDataAnalysisResultDTO { |
|||
|
|||
private String gridId; |
|||
private String staffId; |
|||
private String staffName; |
|||
private String orgName; |
|||
|
|||
private Integer projectCount; |
|||
private Integer issueToProjectCount; |
|||
private Integer closedIssueCount; |
|||
private Integer projectResponseCount; |
|||
private Integer projectTransferCount; |
|||
private Integer projectClosedCount; |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.epmet.dataaggre.enums; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
public enum GridMemberDataAnalysisEnums { |
|||
|
|||
SORT_SORT_PROJECT_COUNT("projectCount", "project_count"), |
|||
SORT_ISSUE_TO_PROJECT_COUNT("issueToProjectCount", "issue_to_project_count"), |
|||
SORT_CLOSED_ISSUE_COUNT("closedIssueCount", "closed_issue_count"), |
|||
SORT_PROJECT_RESPONSE_COUNT("projectResponseCount", "project_response_count"), |
|||
SORT_PROJECT_TRANSFER_COUNT("projectTransferCount", "project_transfer_count"), |
|||
SORT_PROJECT_CLOSED_COUNT("projectClosedCount", "project_closed_count"); |
|||
|
|||
private String key; |
|||
private String value; |
|||
|
|||
GridMemberDataAnalysisEnums(String key, String value) { |
|||
this.key = key; |
|||
this.value = value; |
|||
} |
|||
|
|||
public static GridMemberDataAnalysisEnums get(String key) { |
|||
for (GridMemberDataAnalysisEnums gm : GridMemberDataAnalysisEnums.values()) { |
|||
if (gm.key.equals(key)) { |
|||
return gm; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public String getKey() { |
|||
return key; |
|||
} |
|||
|
|||
public String getValue() { |
|||
return value; |
|||
} |
|||
} |
@ -0,0 +1,55 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dataaggre.dao.datastats; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO; |
|||
import com.epmet.dataaggre.entity.datastats.FactGridMemberStatisticsDailyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 网格员数据统计_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-05 |
|||
*/ |
|||
@Mapper |
|||
public interface FactGridMemberStatisticsDailyDao extends BaseDao<FactGridMemberStatisticsDailyEntity> { |
|||
|
|||
/** |
|||
* @Description 查询网格员统计数据 |
|||
* @return |
|||
* @author wxz |
|||
* @date 2021.07.05 13:19 |
|||
*/ |
|||
List<GridMemberDataAnalysisResultDTO > listGridMemberDataStats(@Param("gridIds") List<String> gridIds, |
|||
@Param("searchedStaffName") String searchedStaffName, |
|||
@Param("month") String month, |
|||
@Param("sort") String sort); |
|||
|
|||
/** |
|||
* @Description 查询网格员议题项目统计数据 |
|||
* @return |
|||
* @author wxz |
|||
* @date 2021.07.05 16:17 |
|||
*/ |
|||
GridMemberDataAnalysisResultDTO getGridMemberIssueProjectStats(@Param("gridId") String gridId, @Param("userId") String userId); |
|||
} |
@ -0,0 +1,121 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dataaggre.entity.datastats; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 网格员数据统计_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-05 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_grid_member_statistics_daily") |
|||
public class FactGridMemberStatisticsDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 网格I |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 上级ID(项目来源Agency的上级组织Id) |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 所有agencyId的上级组织ID(包含agencyId) |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 工作人员ID |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 工作人员姓名 |
|||
*/ |
|||
private String staffName; |
|||
|
|||
/** |
|||
* 项目立项数 |
|||
*/ |
|||
private Integer projectCount; |
|||
|
|||
/** |
|||
* 议题转项目数 |
|||
*/ |
|||
private Integer issueToProjectCount; |
|||
|
|||
/** |
|||
* 议题关闭数 |
|||
*/ |
|||
private Integer closedIssueCount; |
|||
|
|||
/** |
|||
* 项目响应数 |
|||
*/ |
|||
private Integer projectResponseCount; |
|||
|
|||
/** |
|||
* 项目吹哨数 |
|||
*/ |
|||
private Integer projectTransferCount; |
|||
|
|||
/** |
|||
* 项目结案数 |
|||
*/ |
|||
private Integer projectClosedCount; |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.epmet.dataaggre.service; |
|||
|
|||
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 聚合的网格相关service,不指定具体的数据源,它调用其他子service,子service中指定具体数据源 |
|||
* @author wxz |
|||
* @date 2021.07.05 13:06:35 |
|||
*/ |
|||
public interface AggreGridService { |
|||
/** |
|||
* @Description 网格员数据统计列表查询 |
|||
* @return |
|||
* @author wxz |
|||
* @date 2021.07.05 11:17 |
|||
*/ |
|||
List<GridMemberDataAnalysisResultDTO> getGridMemberDataAnalysis(List<String> gridIds, String searchedStaffName, String currStaffId, String month, String sort, Integer pageNo, Integer pageSize); |
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.epmet.dataaggre.service.impl; |
|||
|
|||
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO; |
|||
import com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO; |
|||
import com.epmet.dataaggre.service.AggreGridService; |
|||
import com.epmet.dataaggre.service.datastats.DataStatsService; |
|||
import com.epmet.dataaggre.service.govorg.GovOrgService; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.stream.Collectors; |
|||
|
|||
@Service |
|||
public class AggreGridServiceImpl implements AggreGridService { |
|||
|
|||
@Autowired |
|||
private GovOrgService govOrgService; |
|||
|
|||
@Autowired |
|||
private DataStatsService dataStatsService; |
|||
|
|||
@Override |
|||
public List<GridMemberDataAnalysisResultDTO> getGridMemberDataAnalysis( |
|||
List<String> gridIds, |
|||
String searchedStaffName, |
|||
String currStaffId, |
|||
String month, |
|||
String sort, |
|||
Integer pageNo, |
|||
Integer pageSize) { |
|||
|
|||
//1.得到网格id列表
|
|||
Map<String, String> gridIdAndName = new HashMap<>(); |
|||
List<CustomerGridDTO> grids = govOrgService.getGridInfoList(gridIds, currStaffId); |
|||
grids.forEach(g -> { |
|||
gridIds.add(g.getId()); |
|||
gridIdAndName.put(g.getId(), g.getGridName()); |
|||
}); |
|||
|
|||
//2.查询列表,并且填充内容
|
|||
List<GridMemberDataAnalysisResultDTO> records = dataStatsService.listGridMemberDataStats(gridIds, searchedStaffName, month, sort, pageNo, pageSize); |
|||
records.forEach(r -> r.setOrgName(gridIdAndName.get(r.getGridId()))); |
|||
return records; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,114 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dataaggre.dao.datastats.FactGridMemberStatisticsDailyDao"> |
|||
|
|||
<resultMap type="com.epmet.dataaggre.entity.datastats.FactGridMemberStatisticsDailyEntity" id="factGridMemberStatisticsDailyMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="dateId" column="DATE_ID"/> |
|||
<result property="monthId" column="MONTH_ID"/> |
|||
<result property="yearId" column="YEAR_ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="pid" column="PID"/> |
|||
<result property="pids" column="PIDS"/> |
|||
<result property="staffId" column="STAFF_ID"/> |
|||
<result property="staffName" column="STAFF_NAME"/> |
|||
<result property="projectCount" column="PROJECT_COUNT"/> |
|||
<result property="issueToProjectCount" column="ISSUE_TO_PROJECT_COUNT"/> |
|||
<result property="closedIssueCount" column="CLOSED_ISSUE_COUNT"/> |
|||
<result property="projectResponseCount" column="PROJECT_RESPONSE_COUNT"/> |
|||
<result property="projectTransferCount" column="PROJECT_TRANSFER_COUNT"/> |
|||
<result property="projectClosedCount" column="PROJECT_CLOSED_COUNT"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
<sql id="allColumns"> |
|||
member.id, |
|||
member.date_id, |
|||
member.month_id, |
|||
member.year_id, |
|||
member.customer_id, |
|||
member.agency_id, |
|||
member.grid_id, |
|||
member.pid, |
|||
member.pids, |
|||
member.staff_id, |
|||
member.staff_name, |
|||
member.project_count, |
|||
member.issue_to_project_count, |
|||
member.closed_issue_count, |
|||
member.project_response_count, |
|||
member.project_transfer_count, |
|||
member.project_closed_count, |
|||
member.project_incr, |
|||
member.issue_to_project_incr, |
|||
member.closed_issue_incr, |
|||
member.project_response_incr, |
|||
member.project_transfer_incr, |
|||
member.project_closed_incr, |
|||
member.del_flag, |
|||
member.revision, |
|||
member.created_by, |
|||
member.created_time, |
|||
member.updated_by, |
|||
member.updated_time |
|||
</sql> |
|||
|
|||
<!--查询网格员统计数据--> |
|||
<select id="listGridMemberDataStats" |
|||
resultType="com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO"> |
|||
select member.id, |
|||
member.date_id, |
|||
member.month_id, |
|||
member.year_id, |
|||
member.customer_id, |
|||
member.agency_id, |
|||
member.grid_id, |
|||
member.pid, |
|||
member.pids, |
|||
member.staff_id, |
|||
member.staff_name, |
|||
member.project_count, |
|||
member.issue_to_project_count, |
|||
member.closed_issue_count, |
|||
member.project_response_count, |
|||
member.project_transfer_count, |
|||
member.project_closed_count |
|||
from fact_grid_member_statistics_daily member |
|||
<where> |
|||
<if test="gridIds != null and gridIds.size() > 0"> |
|||
<foreach collection="gridIds" item="gridId" separator="OR" open="(" close=")"> |
|||
member.GRID_ID = #{gridId} |
|||
</foreach> |
|||
</if> |
|||
<if test="searchedStaffName != null and searchedStaffName != ''"> |
|||
and member.STAFF_NAME like CONCAT('%',#{searchedStaffName},'%') |
|||
</if> |
|||
<if test="month != null and month != ''"> |
|||
and member.MONTH_ID = #{month} |
|||
</if> |
|||
and del_flag = 0 |
|||
</where> |
|||
order by ${sort} desc |
|||
</select> |
|||
|
|||
<select id="getGridMemberIssueProjectStats" |
|||
resultType="com.epmet.dataaggre.dto.govorg.result.GridMemberDataAnalysisResultDTO"> |
|||
SELECT |
|||
<include refid="allColumns"/> |
|||
FROM fact_grid_member_statistics_daily member |
|||
WHERE member.GRID_ID = #{gridId} |
|||
and member.STAFF_ID = #{userId} |
|||
and member.DEL_FLAG = 0 |
|||
ORDER BY member.CREATED_TIME DESC |
|||
LIMIT 1 |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,62 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto.org; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 网格人员关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-04-20 |
|||
*/ |
|||
@Data |
|||
public class CustomerStaffGridDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
/** |
|||
* 上级组织ID |
|||
*/ |
|||
private String pid; |
|||
/** |
|||
* 所有上级组织ID |
|||
*/ |
|||
private String pids; |
|||
/** |
|||
* 用户id, user.id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
} |
@ -0,0 +1,181 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto.stats; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 网格员数据统计_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-02 |
|||
*/ |
|||
@Data |
|||
public class FactGridMemberStatisticsDailyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 网格I |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 上级ID(项目来源Agency的上级组织Id) |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 所有agencyId的上级组织ID(包含agencyId) |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 工作人员ID |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 工作人员姓名 |
|||
*/ |
|||
private String staffName; |
|||
|
|||
/** |
|||
* 项目立项数 |
|||
*/ |
|||
private Integer projectCount; |
|||
|
|||
/** |
|||
* 议题转项目数 |
|||
*/ |
|||
private Integer issueToProjectCount; |
|||
|
|||
/** |
|||
* 议题关闭数 |
|||
*/ |
|||
private Integer closedIssueCount; |
|||
|
|||
/** |
|||
* 项目响应数 |
|||
*/ |
|||
private Integer projectResponseCount; |
|||
|
|||
/** |
|||
* 项目吹哨数 |
|||
*/ |
|||
private Integer projectTransferCount; |
|||
|
|||
/** |
|||
* 项目结案数 |
|||
*/ |
|||
private Integer projectClosedCount; |
|||
|
|||
/** |
|||
* 项目立项数日增量 |
|||
*/ |
|||
private Integer projectCountIncr; |
|||
|
|||
/** |
|||
* 议题转项目数日增量 |
|||
*/ |
|||
private Integer issueToProjectIncr; |
|||
|
|||
/** |
|||
* 议题关闭数日增量 |
|||
*/ |
|||
private Integer closedIssueIncr; |
|||
|
|||
/** |
|||
* 项目响应数日增量 |
|||
*/ |
|||
private Integer projectResponseIncr; |
|||
|
|||
/** |
|||
* 项目吹哨数日增量 |
|||
*/ |
|||
private Integer projectTransferIncr; |
|||
|
|||
/** |
|||
* 项目结案数日增量 |
|||
*/ |
|||
private Integer projectClosedIncr; |
|||
|
|||
/** |
|||
* 删除状态,0:正常,1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,146 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto.stats; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 网格员数据统计_月统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-02 |
|||
*/ |
|||
@Data |
|||
public class FactGridMemberStatisticsMonthlyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 上级ID(项目来源Agency的上级组织Id) |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 所有agencyId的上级组织ID(包含agencyId) |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 工作人员ID |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 工作人员姓名 |
|||
*/ |
|||
private String staffName; |
|||
|
|||
/** |
|||
* 项目立项数 |
|||
*/ |
|||
private Integer projectCount; |
|||
|
|||
/** |
|||
* 议题转项目数 |
|||
*/ |
|||
private Integer issueToProjectCount; |
|||
|
|||
/** |
|||
* 议题关闭数 |
|||
*/ |
|||
private Integer closedIssueCount; |
|||
|
|||
/** |
|||
* 项目响应数 |
|||
*/ |
|||
private Integer projectResponseCount; |
|||
|
|||
/** |
|||
* 项目吹哨数 |
|||
*/ |
|||
private Integer projectTransferCount; |
|||
|
|||
/** |
|||
* 项目结案数 |
|||
*/ |
|||
private Integer projectClosedCount; |
|||
|
|||
/** |
|||
* 删除状态,0:正常,1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.epmet.dto.user.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/7/5 9:49 |
|||
*/ |
|||
@Data |
|||
public class StaffRoleInfoDTO implements Serializable { |
|||
private static final long serialVersionUID = 5005209786187370928L; |
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 用户名 |
|||
*/ |
|||
private String staffName; |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao.evaluationindex.extract; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.evaluationindex.extract.FactGridMemberStatisticsDailyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 网格员数据统计_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-02 |
|||
*/ |
|||
@Mapper |
|||
public interface FactGridMemberStatisticsDailyDao extends BaseDao<FactGridMemberStatisticsDailyEntity> { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao.evaluationindex.extract; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.evaluationindex.extract.FactGridMemberStatisticsMonthlyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 网格员数据统计_月统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-02 |
|||
*/ |
|||
@Mapper |
|||
public interface FactGridMemberStatisticsMonthlyDao extends BaseDao<FactGridMemberStatisticsMonthlyEntity> { |
|||
|
|||
} |
@ -0,0 +1,151 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity.evaluationindex.extract; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 网格员数据统计_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-02 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_grid_member_statistics_daily") |
|||
public class FactGridMemberStatisticsDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 网格I |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 上级ID(项目来源Agency的上级组织Id) |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 所有agencyId的上级组织ID(包含agencyId) |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 工作人员ID |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 工作人员姓名 |
|||
*/ |
|||
private String staffName; |
|||
|
|||
/** |
|||
* 项目立项数 |
|||
*/ |
|||
private Integer projectCount; |
|||
|
|||
/** |
|||
* 议题转项目数 |
|||
*/ |
|||
private Integer issueToProjectCount; |
|||
|
|||
/** |
|||
* 议题关闭数 |
|||
*/ |
|||
private Integer closedIssueCount; |
|||
|
|||
/** |
|||
* 项目响应数 |
|||
*/ |
|||
private Integer projectResponseCount; |
|||
|
|||
/** |
|||
* 项目吹哨数 |
|||
*/ |
|||
private Integer projectTransferCount; |
|||
|
|||
/** |
|||
* 项目结案数 |
|||
*/ |
|||
private Integer projectClosedCount; |
|||
|
|||
/** |
|||
* 项目立项数日增量 |
|||
*/ |
|||
private Integer projectIncr; |
|||
|
|||
/** |
|||
* 议题转项目数日增量 |
|||
*/ |
|||
private Integer issueToProjectIncr; |
|||
|
|||
/** |
|||
* 议题关闭数日增量 |
|||
*/ |
|||
private Integer closedIssueIncr; |
|||
|
|||
/** |
|||
* 项目响应数日增量 |
|||
*/ |
|||
private Integer projectResponseIncr; |
|||
|
|||
/** |
|||
* 项目吹哨数日增量 |
|||
*/ |
|||
private Integer projectTransferIncr; |
|||
|
|||
/** |
|||
* 项目结案数日增量 |
|||
*/ |
|||
private Integer projectClosedIncr; |
|||
|
|||
} |
@ -0,0 +1,116 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity.evaluationindex.extract; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 网格员数据统计_月统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-02 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_grid_member_statistics_monthly") |
|||
public class FactGridMemberStatisticsMonthlyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 上级ID(项目来源Agency的上级组织Id) |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 所有agencyId的上级组织ID(包含agencyId) |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 工作人员ID |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 工作人员姓名 |
|||
*/ |
|||
private String staffName; |
|||
|
|||
/** |
|||
* 项目立项数 |
|||
*/ |
|||
private Integer projectCount; |
|||
|
|||
/** |
|||
* 议题转项目数 |
|||
*/ |
|||
private Integer issueToProjectCount; |
|||
|
|||
/** |
|||
* 议题关闭数 |
|||
*/ |
|||
private Integer closedIssueCount; |
|||
|
|||
/** |
|||
* 项目响应数 |
|||
*/ |
|||
private Integer projectResponseCount; |
|||
|
|||
/** |
|||
* 项目吹哨数 |
|||
*/ |
|||
private Integer projectTransferCount; |
|||
|
|||
/** |
|||
* 项目结案数 |
|||
*/ |
|||
private Integer projectClosedCount; |
|||
|
|||
} |
@ -0,0 +1,41 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.evaluationindex.extract.todata; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.evaluationindex.extract.FactGridMemberStatisticsDailyEntity; |
|||
|
|||
/** |
|||
* 网格员数据统计_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-02 |
|||
*/ |
|||
public interface FactGridMemberStatisticsDailyService extends BaseService<FactGridMemberStatisticsDailyEntity> { |
|||
/** |
|||
* 网格员数据统计 |
|||
* |
|||
* @param customerId |
|||
* @param dateId |
|||
* @return void |
|||
* @author zhaoqifeng |
|||
* @date 2021/7/5 9:29 |
|||
*/ |
|||
void extractFactAgencyGovernDaily(String customerId, String dateId); |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.evaluationindex.extract.todata; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.evaluationindex.extract.FactGridMemberStatisticsMonthlyEntity; |
|||
|
|||
/** |
|||
* 网格员数据统计_月统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-02 |
|||
*/ |
|||
public interface FactGridMemberStatisticsMonthlyService extends BaseService<FactGridMemberStatisticsMonthlyEntity> { |
|||
|
|||
} |
@ -0,0 +1,134 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.evaluationindex.extract.todata.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.constant.RoleKeyConstants; |
|||
import com.epmet.dao.evaluationindex.extract.FactGridMemberStatisticsDailyDao; |
|||
import com.epmet.dto.extract.result.OrgStatisticsResultDTO; |
|||
import com.epmet.dto.org.CustomerStaffGridDTO; |
|||
import com.epmet.dto.user.result.StaffRoleInfoDTO; |
|||
import com.epmet.entity.evaluationindex.extract.FactGridMemberStatisticsDailyEntity; |
|||
import com.epmet.service.evaluationindex.extract.todata.FactGridMemberStatisticsDailyService; |
|||
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectMainDailyService; |
|||
import com.epmet.service.org.CustomerGridService; |
|||
import com.epmet.service.user.UserService; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.function.Function; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* 网格员数据统计_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-02 |
|||
*/ |
|||
@Service |
|||
public class FactGridMemberStatisticsDailyServiceImpl extends BaseServiceImpl<FactGridMemberStatisticsDailyDao, FactGridMemberStatisticsDailyEntity> implements FactGridMemberStatisticsDailyService { |
|||
|
|||
@Resource |
|||
private UserService userService; |
|||
@Resource |
|||
private CustomerGridService customerGridService; |
|||
@Resource |
|||
private FactOriginProjectMainDailyService factOriginProjectMainDailyService; |
|||
|
|||
|
|||
/** |
|||
* 网格员数据统计 |
|||
* |
|||
* @param customerId |
|||
* @param dateId |
|||
* @return void |
|||
* @author zhaoqifeng |
|||
* @date 2021/7/5 9:29 |
|||
*/ |
|||
@Override |
|||
public void extractFactAgencyGovernDaily(String customerId, String dateId) { |
|||
List<CustomerStaffGridDTO> staffGridList = customerGridService.getCustomerStaffGridList(customerId); |
|||
List<StaffRoleInfoDTO> staffInfoList = userService.getStaffByRoleKey(customerId, RoleKeyConstants.ROLE_KEY_GRID_MEMBER); |
|||
Map<String, StaffRoleInfoDTO> staffMap = staffInfoList.stream().collect(Collectors.toMap(StaffRoleInfoDTO :: getStaffId, |
|||
Function.identity())); |
|||
List<FactGridMemberStatisticsDailyEntity> list = staffGridList.stream().filter(p -> null != staffMap.get(p.getStaffId())).map(item -> { |
|||
StaffRoleInfoDTO staffInfo = staffMap.get(item.getStaffId()); |
|||
FactGridMemberStatisticsDailyEntity entity = new FactGridMemberStatisticsDailyEntity(); |
|||
entity.setCustomerId(customerId); |
|||
entity.setAgencyId(item.getAgencyId()); |
|||
entity.setGridId(item.getGridId()); |
|||
entity.setPid(item.getPid()); |
|||
entity.setGridId(item.getGridId()); |
|||
entity.setYearId(dateId.substring(NumConstant.ZERO, NumConstant.FOUR)); |
|||
entity.setMonthId(dateId.substring(NumConstant.ZERO, NumConstant.SIX)); |
|||
entity.setDateId(dateId); |
|||
entity.setStaffId(item.getStaffId()); |
|||
entity.setStaffName(staffInfo.getStaffName()); |
|||
entity.setProjectCount(NumConstant.ZERO); |
|||
entity.setProjectIncr(NumConstant.ZERO); |
|||
entity.setIssueToProjectCount(NumConstant.ZERO); |
|||
entity.setIssueToProjectIncr(NumConstant.ZERO); |
|||
entity.setClosedIssueCount(NumConstant.ZERO); |
|||
entity.setClosedIssueIncr(NumConstant.ZERO); |
|||
entity.setProjectClosedCount(NumConstant.ZERO); |
|||
entity.setProjectClosedIncr(NumConstant.ZERO); |
|||
entity.setProjectResponseCount(NumConstant.ZERO); |
|||
entity.setProjectResponseIncr(NumConstant.ZERO); |
|||
entity.setProjectTransferCount(NumConstant.ZERO); |
|||
entity.setProjectTransferIncr(NumConstant.ZERO); |
|||
return entity; |
|||
}).collect(Collectors.toList()); |
|||
|
|||
//项目立项数
|
|||
Map<String, List<OrgStatisticsResultDTO>> projectCountMap = factOriginProjectMainDailyService.getMemberProjectCount(customerId, dateId, |
|||
NumConstant.ZERO); |
|||
Map<String, List<OrgStatisticsResultDTO>> projectIncrMap = factOriginProjectMainDailyService.getMemberProjectCount(customerId, dateId, |
|||
NumConstant.ONE); |
|||
//议题转项目数
|
|||
//议题关闭数
|
|||
//项目响应数
|
|||
//项目吹哨数
|
|||
//项目结案数
|
|||
list.forEach(item -> { |
|||
List<OrgStatisticsResultDTO> projectCount = projectCountMap.get(item.getStaffId()); |
|||
if (CollectionUtils.isNotEmpty(projectCount)) { |
|||
projectCount.forEach(dto -> { |
|||
if (item.getAgencyId().equals(dto.getAgencyId())) { |
|||
item.setProjectCount(dto.getCount()); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
List<OrgStatisticsResultDTO> projectIncr = projectIncrMap.get(item.getStaffId()); |
|||
if (CollectionUtils.isNotEmpty(projectIncr)) { |
|||
projectIncr.forEach(dto -> { |
|||
if (item.getAgencyId().equals(dto.getAgencyId())) { |
|||
item.setProjectIncr(dto.getCount()); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
}); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,36 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.evaluationindex.extract.todata.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.dao.evaluationindex.extract.FactGridMemberStatisticsMonthlyDao; |
|||
import com.epmet.entity.evaluationindex.extract.FactGridMemberStatisticsMonthlyEntity; |
|||
import com.epmet.service.evaluationindex.extract.todata.FactGridMemberStatisticsMonthlyService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 网格员数据统计_月统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-02 |
|||
*/ |
|||
@Service |
|||
public class FactGridMemberStatisticsMonthlyServiceImpl extends BaseServiceImpl<FactGridMemberStatisticsMonthlyDao, FactGridMemberStatisticsMonthlyEntity> implements FactGridMemberStatisticsMonthlyService { |
|||
|
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.evaluationindex.extract.FactGridMemberStatisticsDailyDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.evaluationindex.extract.FactGridMemberStatisticsDailyEntity" id="factGridMemberStatisticsDailyMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="dateId" column="DATE_ID"/> |
|||
<result property="monthId" column="MONTH_ID"/> |
|||
<result property="yearId" column="YEAR_ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="pid" column="PID"/> |
|||
<result property="pids" column="PIDS"/> |
|||
<result property="staffId" column="STAFF_ID"/> |
|||
<result property="staffName" column="STAFF_NAME"/> |
|||
<result property="projectCount" column="PROJECT_COUNT"/> |
|||
<result property="issueToProjectCount" column="ISSUE_TO_PROJECT_COUNT"/> |
|||
<result property="closedIssueCount" column="CLOSED_ISSUE_COUNT"/> |
|||
<result property="projectResponseCount" column="PROJECT_RESPONSE_COUNT"/> |
|||
<result property="projectTransferCount" column="PROJECT_TRANSFER_COUNT"/> |
|||
<result property="projectClosedCount" column="PROJECT_CLOSED_COUNT"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,32 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.evaluationindex.extract.FactGridMemberStatisticsMonthlyDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.evaluationindex.extract.FactGridMemberStatisticsMonthlyEntity" id="factGridMemberStatisticsMonthlyMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="monthId" column="MONTH_ID"/> |
|||
<result property="yearId" column="YEAR_ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="pid" column="PID"/> |
|||
<result property="pids" column="PIDS"/> |
|||
<result property="staffId" column="STAFF_ID"/> |
|||
<result property="staffName" column="STAFF_NAME"/> |
|||
<result property="projectCount" column="PROJECT_COUNT"/> |
|||
<result property="issueToProjectCount" column="ISSUE_TO_PROJECT_COUNT"/> |
|||
<result property="closedIssueCount" column="CLOSED_ISSUE_COUNT"/> |
|||
<result property="projectResponseCount" column="PROJECT_RESPONSE_COUNT"/> |
|||
<result property="projectTransferCount" column="PROJECT_TRANSFER_COUNT"/> |
|||
<result property="projectClosedCount" column="PROJECT_CLOSED_COUNT"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue