44 changed files with 2089 additions and 4 deletions
@ -0,0 +1,131 @@ |
|||
/** |
|||
* 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.extract; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 项目明细_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-16 |
|||
*/ |
|||
@Data |
|||
public class FactOriginProjectLogDailyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格grid,部门department |
|||
*/ |
|||
private String orgType; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 日期ID |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 操作用户ID |
|||
*/ |
|||
private String operationUserId; |
|||
|
|||
/** |
|||
* 动作CODE |
|||
*/ |
|||
private String actionCode; |
|||
|
|||
/** |
|||
* 是否主动发起人 1 是, 0 否 |
|||
*/ |
|||
private Integer isActive; |
|||
|
|||
/** |
|||
* 删除状态,0:正常,1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,156 @@ |
|||
/** |
|||
* 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.extract; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 项目主表_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-16 |
|||
*/ |
|||
@Data |
|||
public class FactOriginProjectMainDailyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 项目ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 项目的发布日期yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 转议题用户ID |
|||
*/ |
|||
private String issueCreatorId; |
|||
|
|||
/** |
|||
* 转为项目的议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 转为议题的话题ID |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 上级ID |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 组织ID(网格所属组织ID) |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 状态 |
|||
*/ |
|||
private String projectStatus; |
|||
|
|||
/** |
|||
* 创建话题用户的ID |
|||
*/ |
|||
private String topicCreatorId; |
|||
|
|||
/** |
|||
* 是否是党员 1:是 |
|||
*/ |
|||
private String isParty; |
|||
|
|||
/** |
|||
* 是否超期 1:是 |
|||
*/ |
|||
private String isOverdue; |
|||
|
|||
/** |
|||
* 办结组织Ids(:隔开,有可能是社区id可能是网格id,无需区分级别,在统计时模糊查询) |
|||
*/ |
|||
private String finishOrgIds; |
|||
|
|||
/** |
|||
* 删除状态,0:正常,1:删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.epmet.dto.extract.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/9/17 16:24 |
|||
*/ |
|||
@Data |
|||
public class ProjectFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 5875702013226180335L; |
|||
private String customerId; |
|||
private Date date; |
|||
} |
@ -0,0 +1,147 @@ |
|||
/** |
|||
* 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.issue; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 议题详情表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-05-12 |
|||
*/ |
|||
@Data |
|||
public class IssueDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 议题状态 表决中:voting 已转项目:shift_project 已关闭:closed |
|||
*/ |
|||
private String issueStatus; |
|||
|
|||
/** |
|||
* 来源类型 eg:resi_topic |
|||
*/ |
|||
private String sourceType; |
|||
|
|||
/** |
|||
* 来源ID eg:2223232(当SOURCE_TYPE为"resi_topic"时,这里指话题的ID) |
|||
*/ |
|||
private String sourceId; |
|||
|
|||
/** |
|||
* 关闭理由 【未关闭时可以为空】关闭议题时必填的理由,转项目后而且已经结案,这个字段不回写 |
|||
*/ |
|||
private String closeReason; |
|||
|
|||
/** |
|||
* 解决类型 【未关闭时可以为空】已解决resolved、未解决unresolved,对应在关闭议题时所选的checkbox,转项目后而且已经结案,这个字段不回写 |
|||
*/ |
|||
private String resolveType; |
|||
|
|||
/** |
|||
* 议题名称 最多20字 |
|||
*/ |
|||
private String issueTitle; |
|||
|
|||
/** |
|||
* 建议 最多1000字 |
|||
*/ |
|||
private String suggestion; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格ID 居民端议题对应一个网格Id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 所属机关 【数据权限-非必填】11:22:33(agencyId)数据权限控制 |
|||
*/ |
|||
private String orgIdPath; |
|||
|
|||
/** |
|||
* 组织ID 【数据权限-非必填】agencyId |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 表决截止日期 |
|||
*/ |
|||
private Date votingDeadline; |
|||
|
|||
/** |
|||
* 表决发起日期(转议题日期) |
|||
*/ |
|||
private Date decidedTime; |
|||
|
|||
/** |
|||
* 转项目日期 (服务间调用日期一致性) |
|||
*/ |
|||
private Date shiftedTime; |
|||
|
|||
/** |
|||
* 关闭日期 |
|||
*/ |
|||
private Date closedTime; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.epmet.dto.party; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/9/16 10:50 |
|||
*/ |
|||
@Data |
|||
public class PartyMemberDTO implements Serializable { |
|||
private static final long serialVersionUID = 7326830619481816838L; |
|||
private String gridId; |
|||
private String userId; |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.epmet.dto.project; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/9/16 17:00 |
|||
*/ |
|||
@Data |
|||
public class ProcessInfoDTO implements Serializable { |
|||
private static final long serialVersionUID = 4586424046147127143L; |
|||
private String agencyId; |
|||
private String projectId; |
|||
/** |
|||
* 处理:结案close,退回return,部门流转transfer,创建项目created |
|||
*/ |
|||
private String operation; |
|||
/** |
|||
* 负负责人ID |
|||
*/ |
|||
private String staffId; |
|||
private Date createdTime; |
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.epmet.dto.project; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/9/15 15:51 |
|||
*/ |
|||
@Data |
|||
public class ProjectInfoDTO implements Serializable { |
|||
private static final long serialVersionUID = -143765862167548221L; |
|||
/** |
|||
* 项目ID |
|||
*/ |
|||
private String id; |
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String issueId; |
|||
/** |
|||
* 状态 |
|||
*/ |
|||
private String status; |
|||
/** |
|||
* 结案状态 |
|||
*/ |
|||
private String closedStatus; |
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private String createdDate; |
|||
} |
@ -0,0 +1,126 @@ |
|||
/** |
|||
* 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.topic; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 话题信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-31 |
|||
*/ |
|||
@Data |
|||
public class ResiTopicDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 小组Id,关联resi_group的ID |
|||
*/ |
|||
private String groupId; |
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 话题内容 |
|||
*/ |
|||
private String topicContent; |
|||
|
|||
/** |
|||
* 话题状态(讨论中 - discussing、 已屏蔽 - hidden、 已关闭 - closed) |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 是否解决(已解决 resolved,未解决 unresolved) |
|||
*/ |
|||
private String closedStatus; |
|||
|
|||
/** |
|||
* 省 |
|||
*/ |
|||
private String province; |
|||
|
|||
/** |
|||
* 市 |
|||
*/ |
|||
private String city; |
|||
|
|||
/** |
|||
* 区 |
|||
*/ |
|||
private String area; |
|||
|
|||
/** |
|||
* 地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 经度 |
|||
*/ |
|||
private String longitude; |
|||
|
|||
/** |
|||
* 维度 |
|||
*/ |
|||
private String dimension; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人,发布人Id来源于user |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -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.FactOriginProjectLogDailyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 项目明细_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-16 |
|||
*/ |
|||
@Mapper |
|||
public interface FactOriginProjectLogDailyDao extends BaseDao<FactOriginProjectLogDailyEntity> { |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
/** |
|||
* 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.dto.extract.FactOriginProjectMainDailyDTO; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; |
|||
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 2020-09-16 |
|||
*/ |
|||
@Mapper |
|||
public interface FactOriginProjectMainDailyDao extends BaseDao<FactOriginProjectMainDailyEntity> { |
|||
|
|||
/** |
|||
* 获取客户下项目 |
|||
* @author zhaoqifeng |
|||
* @date 2020/9/17 14:32 |
|||
* @param customerId |
|||
* @return java.util.List<com.epmet.dto.extract.FactOriginProjectMainDailyDTO> |
|||
*/ |
|||
List<FactOriginProjectMainDailyDTO> getProjectByCustomer(@Param("customerId") String customerId); |
|||
|
|||
/** |
|||
* 获取未结案的项目 |
|||
* @author zhaoqifeng |
|||
* @date 2020/9/17 14:32 |
|||
* @param customerId |
|||
* @return java.util.List<com.epmet.dto.extract.FactOriginProjectMainDailyDTO> |
|||
*/ |
|||
List<FactOriginProjectMainDailyDTO> getPendingList(@Param("customerId") String customerId); |
|||
} |
@ -0,0 +1,99 @@ |
|||
/** |
|||
* 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 2020-09-16 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_origin_project_log_daily") |
|||
public class FactOriginProjectLogDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 网格grid,部门department |
|||
*/ |
|||
private String orgType; |
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 日期ID |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 议题ID |
|||
*/ |
|||
private String projectId; |
|||
|
|||
/** |
|||
* 操作用户ID |
|||
*/ |
|||
private String operationUserId; |
|||
|
|||
/** |
|||
* 动作CODE |
|||
*/ |
|||
private String actionCode; |
|||
|
|||
/** |
|||
* 是否主动发起人 1 是, 0 否 |
|||
*/ |
|||
private Integer isActive; |
|||
|
|||
} |
@ -0,0 +1,126 @@ |
|||
/** |
|||
* 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 2020-09-16 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_origin_project_main_daily") |
|||
public class FactOriginProjectMainDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 项目的发布日期yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 周ID |
|||
*/ |
|||
private String weekId; |
|||
|
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
private String monthId; |
|||
|
|||
/** |
|||
* 季度ID |
|||
*/ |
|||
private String quarterId; |
|||
|
|||
/** |
|||
* 年度ID |
|||
*/ |
|||
private String yearId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 转议题用户ID |
|||
*/ |
|||
private String issueCreatorId; |
|||
|
|||
/** |
|||
* 转为项目的议题ID |
|||
*/ |
|||
private String issueId; |
|||
|
|||
/** |
|||
* 转为议题的话题ID |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 上级ID |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 组织ID(网格所属组织ID) |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 状态 |
|||
*/ |
|||
private String projectStatus; |
|||
|
|||
/** |
|||
* 创建话题用户的ID |
|||
*/ |
|||
private String topicCreatorId; |
|||
|
|||
/** |
|||
* 是否是党员 1:是 |
|||
*/ |
|||
private String isParty; |
|||
|
|||
/** |
|||
* 是否超期 1:是 |
|||
*/ |
|||
private String isOverdue; |
|||
|
|||
/** |
|||
* 办结组织Ids(:隔开,有可能是社区id可能是网格id,无需区分级别,在统计时模糊查询) |
|||
*/ |
|||
private String finishOrgIds; |
|||
|
|||
} |
@ -0,0 +1,95 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.extract.FactOriginProjectLogDailyDTO; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 项目明细_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-16 |
|||
*/ |
|||
public interface FactOriginProjectLogDailyService extends BaseService<FactOriginProjectLogDailyEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<FactOriginProjectLogDailyDTO> |
|||
* @author generator |
|||
* @date 2020-09-16 |
|||
*/ |
|||
PageData<FactOriginProjectLogDailyDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<FactOriginProjectLogDailyDTO> |
|||
* @author generator |
|||
* @date 2020-09-16 |
|||
*/ |
|||
List<FactOriginProjectLogDailyDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return FactOriginProjectLogDailyDTO |
|||
* @author generator |
|||
* @date 2020-09-16 |
|||
*/ |
|||
FactOriginProjectLogDailyDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-09-16 |
|||
*/ |
|||
void save(FactOriginProjectLogDailyDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-09-16 |
|||
*/ |
|||
void update(FactOriginProjectLogDailyDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-09-16 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,113 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 项目主表_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-16 |
|||
*/ |
|||
public interface FactOriginProjectMainDailyService extends BaseService<FactOriginProjectMainDailyEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<FactOriginProjectMainDailyDTO> |
|||
* @author generator |
|||
* @date 2020-09-16 |
|||
*/ |
|||
PageData<FactOriginProjectMainDailyDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<FactOriginProjectMainDailyDTO> |
|||
* @author generator |
|||
* @date 2020-09-16 |
|||
*/ |
|||
List<FactOriginProjectMainDailyDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return FactOriginProjectMainDailyDTO |
|||
* @author generator |
|||
* @date 2020-09-16 |
|||
*/ |
|||
FactOriginProjectMainDailyDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-09-16 |
|||
*/ |
|||
void save(FactOriginProjectMainDailyDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-09-16 |
|||
*/ |
|||
void update(FactOriginProjectMainDailyDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-09-16 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* 获取客户下项目 |
|||
* @author zhaoqifeng |
|||
* @date 2020/9/17 14:29 |
|||
* @param customerId |
|||
* @return java.util.List<com.epmet.dto.extract.FactOriginProjectMainDailyDTO> |
|||
*/ |
|||
List<FactOriginProjectMainDailyDTO> getProjectByCustomer(String customerId); |
|||
|
|||
/** |
|||
* 获取未结案的项目 |
|||
* @author zhaoqifeng |
|||
* @date 2020/9/17 14:30 |
|||
* @param customerId |
|||
* @return java.util.List<com.epmet.dto.extract.FactOriginProjectMainDailyDTO> |
|||
*/ |
|||
List<FactOriginProjectMainDailyDTO> getPendingList(String customerId); |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.service.evaluationindex.extract; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/9/15 14:00 |
|||
*/ |
|||
public interface ProjectExtractService { |
|||
|
|||
|
|||
/** |
|||
* 项目主表、明细日统计 |
|||
* @author zhaoqifeng |
|||
* @date 2020/9/15 14:38 |
|||
* @param customerId |
|||
* @param date |
|||
* @return |
|||
*/ |
|||
void saveOriginProjectDaily(String customerId, Date date); |
|||
} |
@ -0,0 +1,100 @@ |
|||
/** |
|||
* 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.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.evaluationindex.extract.FactOriginProjectLogDailyDao; |
|||
import com.epmet.dto.extract.FactOriginProjectLogDailyDTO; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; |
|||
import com.epmet.service.evaluationindex.extract.FactOriginProjectLogDailyService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 项目明细_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-16 |
|||
*/ |
|||
@Service |
|||
public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl<FactOriginProjectLogDailyDao, FactOriginProjectLogDailyEntity> implements FactOriginProjectLogDailyService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<FactOriginProjectLogDailyDTO> page(Map<String, Object> params) { |
|||
IPage<FactOriginProjectLogDailyEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, FactOriginProjectLogDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<FactOriginProjectLogDailyDTO> list(Map<String, Object> params) { |
|||
List<FactOriginProjectLogDailyEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, FactOriginProjectLogDailyDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<FactOriginProjectLogDailyEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<FactOriginProjectLogDailyEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public FactOriginProjectLogDailyDTO get(String id) { |
|||
FactOriginProjectLogDailyEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, FactOriginProjectLogDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(FactOriginProjectLogDailyDTO dto) { |
|||
FactOriginProjectLogDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactOriginProjectLogDailyEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(FactOriginProjectLogDailyDTO dto) { |
|||
FactOriginProjectLogDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactOriginProjectLogDailyEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,109 @@ |
|||
/** |
|||
* 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.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.evaluationindex.extract.FactOriginProjectMainDailyDao; |
|||
import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; |
|||
import com.epmet.service.evaluationindex.extract.FactOriginProjectMainDailyService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 项目主表_日统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-16 |
|||
*/ |
|||
@Service |
|||
public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl<FactOriginProjectMainDailyDao, FactOriginProjectMainDailyEntity> implements FactOriginProjectMainDailyService { |
|||
|
|||
@Override |
|||
public PageData<FactOriginProjectMainDailyDTO> page(Map<String, Object> params) { |
|||
IPage<FactOriginProjectMainDailyEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, FactOriginProjectMainDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<FactOriginProjectMainDailyDTO> list(Map<String, Object> params) { |
|||
List<FactOriginProjectMainDailyEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, FactOriginProjectMainDailyDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<FactOriginProjectMainDailyEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<FactOriginProjectMainDailyEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public FactOriginProjectMainDailyDTO get(String id) { |
|||
FactOriginProjectMainDailyEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, FactOriginProjectMainDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(FactOriginProjectMainDailyDTO dto) { |
|||
FactOriginProjectMainDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactOriginProjectMainDailyEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(FactOriginProjectMainDailyDTO dto) { |
|||
FactOriginProjectMainDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactOriginProjectMainDailyEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public List<FactOriginProjectMainDailyDTO> getProjectByCustomer(String customerId) { |
|||
return baseDao.getProjectByCustomer(customerId); |
|||
} |
|||
|
|||
@Override |
|||
public List<FactOriginProjectMainDailyDTO> getPendingList(String customerId) { |
|||
return baseDao.getPendingList(customerId); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,238 @@ |
|||
package com.epmet.service.evaluationindex.extract.impl; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.utils.DateUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.ProjectDTO; |
|||
import com.epmet.dto.extract.FactOriginProjectMainDailyDTO; |
|||
import com.epmet.dto.form.WorkDayFormDTO; |
|||
import com.epmet.dto.issue.IssueDTO; |
|||
import com.epmet.dto.party.PartyMemberDTO; |
|||
import com.epmet.dto.project.ProcessInfoDTO; |
|||
import com.epmet.dto.result.WorkDayResultDTO; |
|||
import com.epmet.dto.topic.ResiTopicDTO; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity; |
|||
import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity; |
|||
import com.epmet.entity.project.ProjectProcessEntity; |
|||
import com.epmet.feign.EpmetCommonServiceOpenFeignClient; |
|||
import com.epmet.service.Issue.IssueService; |
|||
import com.epmet.service.evaluationindex.extract.FactOriginProjectLogDailyService; |
|||
import com.epmet.service.evaluationindex.extract.FactOriginProjectMainDailyService; |
|||
import com.epmet.service.evaluationindex.extract.ProjectExtractService; |
|||
import com.epmet.service.partymember.PartyMemberService; |
|||
import com.epmet.service.project.ProjectProcessService; |
|||
import com.epmet.service.project.ProjectService; |
|||
import com.epmet.service.topic.TopicService; |
|||
import com.epmet.util.DimIdGenerator; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/9/15 14:00 |
|||
*/ |
|||
@Service |
|||
public class ProjectExtractServiceImpl implements ProjectExtractService { |
|||
|
|||
@Autowired |
|||
private ProjectService projectService; |
|||
@Autowired |
|||
private IssueService issueService; |
|||
@Autowired |
|||
private TopicService topicService; |
|||
@Autowired |
|||
private PartyMemberService partyMemberService; |
|||
@Autowired |
|||
private FactOriginProjectLogDailyService factOriginProjectLogDailyService; |
|||
@Autowired |
|||
private FactOriginProjectMainDailyService factOriginProjectMainDailyService; |
|||
@Autowired |
|||
private ProjectProcessService projectProcessService; |
|||
@Autowired |
|||
private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; |
|||
|
|||
|
|||
@Override |
|||
public void saveOriginProjectDaily(String customerId, Date date) { |
|||
String dateString = null; |
|||
if (null != date) { |
|||
dateString = DateUtils.format(date); |
|||
} |
|||
//获取已关闭项目列表
|
|||
List<ProjectProcessEntity> closedList = projectProcessService.getClosedProjectList(customerId, dateString); |
|||
List<FactOriginProjectMainDailyDTO> pendingList = factOriginProjectMainDailyService.getPendingList(customerId); |
|||
List<FactOriginProjectMainDailyEntity> closeProjects = |
|||
pendingList.stream().flatMap(pending -> closedList.stream().filter(closed -> pending.getId().equals(closed.getProjectId())).map(process -> { |
|||
FactOriginProjectMainDailyEntity entity = new FactOriginProjectMainDailyEntity(); |
|||
entity.setId(process.getId()); |
|||
entity.setProjectStatus("close"); |
|||
entity.setCreatedTime(DateUtils.stringToDate(pending.getDateId(), DateUtils.DATE_PATTERN_YYYYMMDD)); |
|||
entity.setUpdatedTime(process.getUpdatedTime()); |
|||
return entity; |
|||
})).collect(Collectors.toList()); |
|||
//更新状态
|
|||
if (null != closeProjects && !closeProjects.isEmpty()) { |
|||
factOriginProjectMainDailyService.updateBatchById(closeProjects); |
|||
} |
|||
//获取项目信息
|
|||
List<ProjectDTO> projectList = projectService.getProjectInfo(customerId, dateString); |
|||
if (null != projectList && !projectList.isEmpty()) { |
|||
//提取议题ID
|
|||
List<String> issueIds = projectList.stream().map(ProjectDTO::getOriginId).collect(Collectors.toList()); |
|||
//获取议题信息
|
|||
List<IssueDTO> issueList = issueService.getIssueInfoByIds(issueIds); |
|||
//提取话题ID
|
|||
List<String> topicIds = issueList.stream().map(IssueDTO::getSourceId).collect(Collectors.toList()); |
|||
//获取话题信息
|
|||
List<ResiTopicDTO> topicList = topicService.getTopicByIds(topicIds); |
|||
//获取网格认证党员
|
|||
List<PartyMemberDTO> partyMemberList = partyMemberService.getPartyMemberByCustomer(customerId); |
|||
//生成DTO
|
|||
List<FactOriginProjectMainDailyEntity> list = projectList.stream().map(project -> { |
|||
//获取日期相关维度
|
|||
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(project.getCreatedTime()); |
|||
FactOriginProjectMainDailyEntity entity = new FactOriginProjectMainDailyEntity(); |
|||
entity.setId(project.getId()); |
|||
entity.setAgencyId(project.getAgencyId()); |
|||
entity.setCustomerId(customerId); |
|||
entity.setYearId(dimId.getYearId()); |
|||
entity.setQuarterId(dimId.getQuarterId()); |
|||
entity.setMonthId(dimId.getMonthId()); |
|||
entity.setWeekId(dimId.getWeekId()); |
|||
entity.setDateId(dimId.getDateId()); |
|||
entity.setIssueId(project.getOriginId()); |
|||
entity.setProjectStatus(project.getStatus()); |
|||
entity.setCreatedTime(project.getCreatedTime()); |
|||
entity.setUpdatedTime(project.getUpdatedTime()); |
|||
String[] pIds = project.getOrgIdPath().split(":"); |
|||
if (pIds.length > 1) { |
|||
entity.setPid(pIds[pIds.length - 2]); |
|||
} else { |
|||
entity.setPid(pIds[0]); |
|||
} |
|||
entity.setIsParty(NumConstant.ZERO_STR); |
|||
entity.setIsOverdue(NumConstant.ZERO_STR); |
|||
return entity; |
|||
}).collect(Collectors.toList()); |
|||
list.forEach(entity -> issueList.stream().filter(issueDTO -> issueDTO.getId().equals(entity.getIssueId())).forEach(issue -> { |
|||
entity.setIssueCreatorId(issue.getCreatedBy()); |
|||
entity.setTopicId(issue.getSourceId()); |
|||
})); |
|||
list.forEach(entity -> topicList.stream().filter(topicDTO -> topicDTO.getId().equals(entity.getTopicId())).forEach(topic -> { |
|||
entity.setTopicCreatorId(topic.getCreatedBy()); |
|||
entity.setGridId(topic.getGridId()); |
|||
})); |
|||
list.forEach(entity -> partyMemberList.stream().filter(partyMemberDTO -> partyMemberDTO.getGridId().equals(entity.getGridId()) && partyMemberDTO.getUserId().equals(entity.getTopicCreatorId())).forEach(partyMember -> { |
|||
entity.setIsParty(NumConstant.ONE_STR); |
|||
})); |
|||
//插入数据
|
|||
factOriginProjectMainDailyService.insertBatch(list); |
|||
} |
|||
|
|||
//节点发起人
|
|||
List<ProcessInfoDTO> processList = projectProcessService.getProcessListByCustomer(customerId, dateString); |
|||
if (null != processList && !processList.isEmpty()) { |
|||
List<FactOriginProjectLogDailyEntity> logList = processList.stream().map(process -> { |
|||
//获取日期相关维度
|
|||
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); |
|||
FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); |
|||
entity.setCustomerId(customerId); |
|||
entity.setAgencyId(process.getAgencyId()); |
|||
entity.setYearId(dimId.getYearId()); |
|||
entity.setQuarterId(dimId.getQuarterId()); |
|||
entity.setMonthId(dimId.getMonthId()); |
|||
entity.setDateId(dimId.getDateId()); |
|||
entity.setProjectId(process.getProjectId()); |
|||
entity.setOperationUserId(process.getStaffId()); |
|||
entity.setActionCode(process.getOperation()); |
|||
entity.setIsActive(NumConstant.ONE); |
|||
entity.setOrgType("grid"); |
|||
return entity; |
|||
}).collect(Collectors.toList()); |
|||
|
|||
//节点接收人
|
|||
List<ProcessInfoDTO> processStaffList = projectProcessService.getProcessStaffByCustomer(customerId, dateString); |
|||
logList.addAll(processStaffList.stream().map(process -> { |
|||
//获取日期相关维度
|
|||
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); |
|||
FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); |
|||
entity.setCustomerId(customerId); |
|||
entity.setAgencyId(process.getAgencyId()); |
|||
entity.setYearId(dimId.getYearId()); |
|||
entity.setQuarterId(dimId.getQuarterId()); |
|||
entity.setMonthId(dimId.getMonthId()); |
|||
entity.setDateId(dimId.getDateId()); |
|||
entity.setProjectId(process.getProjectId()); |
|||
entity.setOperationUserId(process.getStaffId()); |
|||
entity.setActionCode(process.getOperation()); |
|||
entity.setIsActive(NumConstant.ZERO); |
|||
entity.setOrgType("grid"); |
|||
return entity; |
|||
}).collect(Collectors.toList())); |
|||
|
|||
//项目评论人
|
|||
List<ProcessInfoDTO> satisfactionRecordList = projectProcessService.getSatisfactionRecord(customerId, dateString); |
|||
logList.addAll(satisfactionRecordList.stream().map(process -> { |
|||
//获取日期相关维度
|
|||
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); |
|||
FactOriginProjectLogDailyEntity entity = new FactOriginProjectLogDailyEntity(); |
|||
entity.setCustomerId(customerId); |
|||
entity.setAgencyId(process.getAgencyId()); |
|||
entity.setYearId(dimId.getYearId()); |
|||
entity.setQuarterId(dimId.getQuarterId()); |
|||
entity.setMonthId(dimId.getMonthId()); |
|||
entity.setDateId(dimId.getDateId()); |
|||
entity.setProjectId(process.getProjectId()); |
|||
entity.setOperationUserId(process.getStaffId()); |
|||
entity.setActionCode(process.getOperation()); |
|||
entity.setIsActive(NumConstant.ONE); |
|||
entity.setOrgType("grid"); |
|||
return entity; |
|||
}).collect(Collectors.toList())); |
|||
|
|||
List<FactOriginProjectMainDailyDTO> projectMainList = factOriginProjectMainDailyService.getProjectByCustomer(customerId); |
|||
logList.forEach(log -> projectMainList.stream().filter(project -> log.getProjectId().equals(project.getId())).forEach(main -> { |
|||
log.setOrgId(main.getGridId()); |
|||
})); |
|||
|
|||
factOriginProjectLogDailyService.insertBatch(logList); |
|||
} |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 工作日计算 |
|||
* @author zhaoqifeng |
|||
* @date 2020/9/17 17:02 |
|||
* @param id |
|||
* @param startDate |
|||
* @param endDate |
|||
* @return java.lang.Integer |
|||
*/ |
|||
private Integer getDetentionDays(String id, Date startDate, Date endDate) { |
|||
int result; |
|||
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); |
|||
|
|||
List<WorkDayFormDTO> list = new ArrayList<>(); |
|||
WorkDayFormDTO workDayFormDTO = new WorkDayFormDTO(); |
|||
workDayFormDTO.setId(id); |
|||
workDayFormDTO.setStartDate(format.format(startDate)); |
|||
workDayFormDTO.setEndDate(format.format(endDate)); |
|||
list.add(workDayFormDTO); |
|||
Result<List<WorkDayResultDTO>> detentionDays = epmetCommonServiceOpenFeignClient.detentionDays(list); |
|||
String days = detentionDays.getData().get(NumConstant.ZERO).getDetentionDays(); |
|||
if (("<1").equals(days)) { |
|||
result = 1; |
|||
} else { |
|||
result = Integer.parseInt(days); |
|||
} |
|||
return result; |
|||
} |
|||
} |
@ -0,0 +1,28 @@ |
|||
<?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.FactOriginProjectLogDailyDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.evaluationindex.extract.FactOriginProjectLogDailyEntity" id="factOriginProjectLogDailyMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="dateId" column="DATE_ID"/> |
|||
<result property="monthId" column="MONTH_ID"/> |
|||
<result property="quarterId" column="QUARTER_ID"/> |
|||
<result property="yearId" column="YEAR_ID"/> |
|||
<result property="issueId" column="ISSUE_ID"/> |
|||
<result property="operationUserId" column="OPERATION_USER_ID"/> |
|||
<result property="actionCode" column="ACTION_CODE"/> |
|||
<result property="isParty" column="IS_PARTY"/> |
|||
<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,49 @@ |
|||
<?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.FactOriginProjectMainDailyDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity" id="factOriginProjectMainDailyMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="dateId" column="DATE_ID"/> |
|||
<result property="weekId" column="WEEK_ID"/> |
|||
<result property="monthId" column="MONTH_ID"/> |
|||
<result property="quarterId" column="QUARTER_ID"/> |
|||
<result property="yearId" column="YEAR_ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="issueCreatorId" column="ISSUE_CREATOR_ID"/> |
|||
<result property="issueId" column="ISSUE_ID"/> |
|||
<result property="topicId" column="TOPIC_ID"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="pid" column="PID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="projectStatus" column="PROJECT_STATUS"/> |
|||
<result property="topicCreatorId" column="TOPIC_CREATOR_ID"/> |
|||
<result property="isParty" column="IS_PARTY"/> |
|||
<result property="isOverdue" column="IS_OVERDUE"/> |
|||
<result property="finishOrgIds" column="FINISH_ORG_IDS"/> |
|||
<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> |
|||
<select id="getProjectByCustomer" resultType="com.epmet.dto.extract.FactOriginProjectMainDailyDTO"> |
|||
SELECT |
|||
ID, |
|||
GRID_ID |
|||
FROM fact_origin_project_main_daily |
|||
WHERE CUSTOMER_ID = #{customerId} |
|||
</select> |
|||
<select id="getPendingList" resultType="com.epmet.dto.extract.FactOriginProjectMainDailyDTO"> |
|||
SELECT |
|||
ID, |
|||
DATE_ID |
|||
FROM fact_origin_project_main_daily |
|||
WHERE CUSTOMER_ID = #{customerId} |
|||
AND PROJECT_STATUS = 'pending' |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue