Browse Source

难点堵点、党建能力、党员相关代码提交

dev_shibei_match
yinzuomei 5 years ago
parent
commit
8269770456
  1. 96
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataDetailFormDTO.java
  2. 77
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java
  3. 105
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataDetailFormDTO.java
  4. 90
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java
  5. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java
  6. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java
  7. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java
  8. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java
  9. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexCollectService.java
  10. 19
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java
  11. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCollService.java
  12. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCollServiceImpl.java
  13. 7
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml
  14. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml

96
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataDetailFormDTO.java

@ -0,0 +1,96 @@
package com.epmet.dto.indexcollect.form;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 1党建能力-党员相关指标上报(按照月份) 入参
*
* @author yinzuomei@elink-cn.com
* @date 2020/9/4 16:04
*/
@Data
public class GridPartyMemberDataDetailFormDTO implements Serializable {
private static final long serialVersionUID = 2923515319015973995L;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 网格id
*/
private String gridId;
/**
* yyyyMM
*/
private String monthId;
/**
* yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4
*/
private String quarterId;
/**
* yyyy
*/
private String yearId;
/**
* 党员提出的话题数
*/
private Integer createTopicCount;
/**
* 党员参与话题数支持反对评论浏览
*/
private Integer joinTopicCount;
/**
* 话题转议题数
*/
private Integer shiftIssueCount;
/**
* 议题转项目数
*/
private Integer shiftProjectCount;
/**
* 参加三会一课次数
*/
private Integer joinThreeMeetsCount;
/**
* 自建群群众人数
*/
private Integer groupUserCount;
/**
* 自建群活跃度-话题数
*/
private Integer groupTopicCount;
/**
* 议题转项目率
*/
private BigDecimal topicToIssueRatio;
/**
* 上级组织Id
*/
private String parentId;
/**
* 党员自建群活跃群众人数(08-24)
*/
private Integer groupActiveUserCount;
/**
* 用户id
*/
private String userId;
}

77
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java

@ -3,8 +3,11 @@ package com.epmet.dto.indexcollect.form;
import lombok.Data;
import org.apache.poi.hpsf.Decimal;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 1党建能力-党员相关指标上报(按照月份) 入参
@ -17,82 +20,14 @@ public class GridPartyMemberDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 机关id:网格所属的组织id
* 当为true时后台将删除本月数据
*/
private String agencyId;
/**
* 网格id
*/
private String gridId;
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
/**
* yyyyQ1, yyyyQ2, yyyyQ3, yyyyQ4
*/
private String quarterId;
/**
* yyyy
*/
private String yearId;
/**
* 党员提出的话题数
*/
private Integer createTopicCount;
/**
* 党员参与话题数支持反对评论浏览
*/
private Integer joinTopicCount;
/**
* 话题转议题数
*/
private Integer shiftIssueCount;
/**
* 议题转项目数
*/
private Integer shiftProjectCount;
/**
* 参加三会一课次数
*/
private Integer joinThreeMeetsCount;
/**
* 自建群群众人数
*/
private Integer groupUserCount;
/**
* 自建群活跃度-话题数
*/
private Integer groupTopicCount;
/**
* 议题转项目率
*/
private BigDecimal topicToIssueRatio;
/**
* 上级组织Id
*/
private String parentId;
/**
* 党员自建群活跃群众人数(08-24)
*/
private Integer groupActiveUserCount;
/**
* 用户id
*/
private String userId;
private List<GridPartyMemberDataDetailFormDTO> partyMemberDataList;
}

105
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataDetailFormDTO.java

@ -0,0 +1,105 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2020/9/4 15:43
*/
@Data
public class DifficultyDataDetailFormDTO implements Serializable {
private static final long serialVersionUID = 4893795146396420078L;
/**
* 组织类别 agency组织部门department网格grid
*/
private String orgType;
/**
* 组织Id 可以为网格机关id
*/
private String orgId;
/**
* 上级组织Id
*/
private String parentId;
/**
* 组织名称
*/
private String orgName;
/**
* 事件原Id
*/
private String eventId;
/**
* 事件图片 URL
*/
private String eventImgUrl;
/**
* 事件来源 eg: XXX街道-xx社区-网格
*/
private String eventSource;
/**
* 事件内容
*/
private String eventContent;
/**
* 事件耗时单位分钟
*/
private Integer eventCostTime;
/**
* 事件设计部门数
*/
private Integer eventReOrg;
/**
* 事件类别编码
*/
private String eventCategoryCode;
/**
* 事件状态编码
*/
private String eventStatusCode;
/**
* 事件类别名称
*/
private String eventCategoryName;
/**
* 事件状态描述
*/
private String eventStatusDesc;
/**
* 最近一次操作说明 eg: 转项目结案流转
*/
private String latestOperateDesc;
/**
* 事件被处理次数08-21新增
*/
private Integer eventHandledCount;
/**
* 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
}

90
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java

@ -3,6 +3,7 @@ package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 3难点赌点 入参
@ -11,96 +12,15 @@ import java.io.Serializable;
*/
@Data
public class DifficultyDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 组织类别 agency组织部门department网格grid
* 当为true时后台将删除本月数据
*/
private String orgType;
private Boolean isFirst;
/**
* 组织Id 可以为网格机关id
* 难点堵点数据
*/
private String orgId;
private List<DifficultyDataDetailFormDTO> diffcultyDataList;
/**
* 上级组织Id
*/
private String parentId;
/**
* 组织名称
*/
private String orgName;
/**
* 事件原Id
*/
private String eventId;
/**
* 事件图片 URL
*/
private String eventImgUrl;
/**
* 事件来源 eg: XXX街道-xx社区-网格
*/
private String eventSource;
/**
* 事件内容
*/
private String eventContent;
/**
* 事件耗时单位分钟
*/
private Integer eventCostTime;
/**
* 事件设计部门数
*/
private Integer eventReOrg;
/**
* 事件类别编码
*/
private String eventCategoryCode;
/**
* 事件状态编码
*/
private String eventStatusCode;
/**
* 事件类别名称
*/
private String eventCategoryName;
/**
* 事件状态描述
*/
private String eventStatusDesc;
/**
* 最近一次操作说明 eg: 转项目结案流转
*/
private String latestOperateDesc;
/**
* 事件被处理次数08-21新增
*/
private Integer eventHandledCount;
/**
* 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开(8.26新增)
*/
private String allParentIds;
}

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java

@ -33,10 +33,11 @@ public class FactIndexCollectController {
* @Author zhangyong
* @Date 10:52 2020-08-20
**/
@ExternalAppRequestAuth
// @ExternalAppRequestAuth
@PostMapping("gridpartymemberdata")
public Result gridPartyMemberData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<GridPartyMemberDataFormDTO> formDTO) {
factIndexCollectService.insertGridPartyMemberData(formDTO, externalAppRequestParam.getCustomerId());
public Result gridPartyMemberData(ExternalAppRequestParam externalAppRequestParam, @RequestBody GridPartyMemberDataFormDTO formDTO) {
factIndexCollectService.insertGridPartyMemberData(formDTO,"b09527201c4409e19d1dbc5e3c3429a1" );//externalAppRequestParam.getCustomerId()
return new Result();
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java

@ -133,8 +133,8 @@ public class ScreenCollController {
**/
@ExternalAppRequestAuth
@PostMapping("difficultydata")
public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<DifficultyDataFormDTO> formDTO) {
screenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId());
public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody DifficultyDataFormDTO formDTO) {
screenCollService.insertDifficultyData(formDTO, "b09527201c4409e19d1dbc5e3c3429a1");//externalAppRequestParam.getCustomerId()
return new Result();
}

17
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java

@ -18,6 +18,7 @@
package com.epmet.dao.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcollect.form.GridPartyMemberDataDetailFormDTO;
import com.epmet.dto.indexcollect.form.GridPartyMemberDataFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity;
import org.apache.ibatis.annotations.Mapper;
@ -40,22 +41,12 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao<FactIndexPart
* 1) 根据CUSTOMER_IDAGENCY_IDGRID_IDUSER_IDYEAR_IDMONTH_IDQUARTER_ID进行查询如果有数据则先进行物理删除
*
* @param customerId
* @param agencyId
* @param gridId
* @param userId
* @param yearId
* @param monthId
* @param quarterId
* @Author zhangyong
* @Date 10:52 2020-08-20
**/
void deleteFactIndexPartyAblityCpcMonthly(@Param("customerId") String customerId,
@Param("agencyId") String agencyId,
@Param("gridId") String gridId,
@Param("userId") String userId,
@Param("yearId") String yearId,
@Param("monthId") String monthId,
@Param("quarterId") String quarterId);
int deleteFactIndexPartyAblityCpcMonthly(@Param("customerId") String customerId,
@Param("monthId") String monthId);
/**
* 1党建能力-党员相关指标上报(按照月份)
@ -66,7 +57,7 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao<FactIndexPart
* @Author zhangyong
* @Date 10:52 2020-08-20
**/
void batchInsertFactIndexPartyAblityCpcMonthly(@Param("list") List<GridPartyMemberDataFormDTO> list,
int batchInsertFactIndexPartyAblityCpcMonthly(@Param("list") List<GridPartyMemberDataDetailFormDTO> list,
@Param("customerId") String customerId);
List<Map<String, Object>> getCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize);

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java

@ -18,6 +18,7 @@
package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.screencoll.form.DifficultyDataDetailFormDTO;
import com.epmet.dto.screencoll.form.DifficultyDataFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity;
import org.apache.ibatis.annotations.Mapper;
@ -38,14 +39,10 @@ public interface ScreenDifficultyDataDao extends BaseDao<ScreenDifficultyDataEnt
* 1) 根据CUSTOMER_IDEVENT_IDORG_ID进行查询如果有数据则先进行物理删除
* @param customerId
* @param eventId
* @param orgId
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void deleteDifficultyData(@Param("customerId")String customerId,
@Param("eventId")String eventId,
@Param("orgId")String orgId);
void deleteDifficultyData(@Param("customerId")String customerId);
/**
* 3难点赌点
@ -56,5 +53,5 @@ public interface ScreenDifficultyDataDao extends BaseDao<ScreenDifficultyDataEnt
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void batchInsertDifficultyData(@Param("list") List<DifficultyDataFormDTO> list, @Param("customerId")String customerId);
void batchInsertDifficultyData(@Param("list") List<DifficultyDataDetailFormDTO> list, @Param("customerId")String customerId);
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/FactIndexCollectService.java

@ -22,7 +22,7 @@ public interface FactIndexCollectService {
* @Author zhangyong
* @Date 10:52 2020-08-20
**/
void insertGridPartyMemberData(List<GridPartyMemberDataFormDTO> formDTO, String customerId);
void insertGridPartyMemberData(GridPartyMemberDataFormDTO formDTO, String customerId);
/**
* 2党建能力-网格相关指标上报(按照月份)

19
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java

@ -22,6 +22,7 @@ import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
@ -75,14 +76,16 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
@Override
@Transactional(rollbackFor = Exception.class)
public void insertGridPartyMemberData(List<GridPartyMemberDataFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
factIndexPartyAblityCpcMonthlyDao.deleteFactIndexPartyAblityCpcMonthly(customerId,
formDTO.get(i).getAgencyId(), formDTO.get(i).getGridId(), formDTO.get(i).getUserId(),
formDTO.get(i).getYearId(), formDTO.get(i).getMonthId(), formDTO.get(i).getQuarterId());
}
factIndexPartyAblityCpcMonthlyDao.batchInsertFactIndexPartyAblityCpcMonthly(formDTO, customerId);
public void insertGridPartyMemberData(GridPartyMemberDataFormDTO formDTO, String customerId) {
if (formDTO.getIsFirst()) {
//删除这个客户这个月的数据
int deleteNum;
do {
deleteNum = factIndexPartyAblityCpcMonthlyDao.deleteFactIndexPartyAblityCpcMonthly(customerId, formDTO.getMonthId());
} while (deleteNum != NumConstant.ZERO);
}
if (null != formDTO && !CollectionUtils.isEmpty(formDTO.getPartyMemberDataList())) {
factIndexPartyAblityCpcMonthlyDao.batchInsertFactIndexPartyAblityCpcMonthly(formDTO.getPartyMemberDataList(), customerId);
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCollService.java

@ -100,7 +100,7 @@ public interface ScreenCollService {
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
void insertDifficultyData(List<DifficultyDataFormDTO> formDTO, String customerId);
void insertDifficultyData(DifficultyDataFormDTO formDTO, String customerId);
/**
* 2党员基本情况

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCollServiceImpl.java

@ -30,6 +30,7 @@ import com.epmet.service.evaluationindex.screen.ScreenCollService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
@ -198,13 +199,13 @@ public class ScreenCollServiceImpl implements ScreenCollService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true)
@Override
@Transactional(rollbackFor = Exception.class)
public void insertDifficultyData(List<DifficultyDataFormDTO> formDTO, String customerId) {
if (null != formDTO && formDTO.size() > NumConstant.ZERO){
for (int i = NumConstant.ZERO; i < formDTO.size(); i++){
screenDifficultyDataDao.deleteDifficultyData(customerId, formDTO.get(i).getEventId(), formDTO.get(i).getOrgId());
}
screenDifficultyDataDao.batchInsertDifficultyData(formDTO, customerId);
public void insertDifficultyData(DifficultyDataFormDTO formDTO, String customerId) {
if(formDTO.getIsFirst()){
//直接删除当前客户下所有的数据
screenDifficultyDataDao.deleteDifficultyData(customerId);
}
if (null != formDTO && !CollectionUtils.isEmpty(formDTO.getDiffcultyDataList())){
screenDifficultyDataDao.batchInsertDifficultyData(formDTO.getDiffcultyDataList(), customerId);
}
}

7
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml

@ -3,10 +3,11 @@
<mapper namespace="com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao">
<delete id="deleteFactIndexPartyAblityCpcMonthly">
<delete id="deleteFactIndexPartyAblityCpcMonthly" parameterType="map">
delete from fact_index_party_ablity_cpc_monthly
where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId} AND USER_ID = #{userId}
AND YEAR_ID = #{yearId} AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId}
where CUSTOMER_ID = #{customerId}
AND MONTH_ID = #{monthId}
limit 1000
</delete>
<insert id="batchInsertFactIndexPartyAblityCpcMonthly" parameterType="map">

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenDifficultyDataDao.xml

@ -5,7 +5,7 @@
<delete id="deleteDifficultyData">
delete from screen_difficulty_data
where CUSTOMER_ID = #{customerId} AND EVENT_ID = #{eventId} AND ORG_ID = #{orgId}
where CUSTOMER_ID = #{customerId}
</delete>
<insert id="batchInsertDifficultyData" parameterType="map">

Loading…
Cancel
Save