Browse Source

难点赌点抽取修改

dev_shibei_match
wangchao 5 years ago
parent
commit
47722c9008
  1. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml
  2. 27
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/DifficultyIfExistedResultDTO.java
  3. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java
  4. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  5. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenDifficultyDataService.java
  6. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenDifficultyDataServiceImpl.java
  7. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java
  8. 22
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java
  9. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
  10. 17
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml
  11. 3
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectOrgPeriodResultDTO.java
  12. 1
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectStaffDao.xml

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml

@ -10,7 +10,6 @@
diff.EVENT_CONTENT AS title, diff.EVENT_CONTENT AS title,
diff.EVENT_STATUS_CODE AS STATUS, diff.EVENT_STATUS_CODE AS STATUS,
ROUND(diff.EVENT_COST_TIME/60,0) AS totalHours, ROUND(diff.EVENT_COST_TIME/60,0) AS totalHours,
DATE_FORMAT( eve.EVENT_CREATE_TIME, '%Y-%m-%d %H:%i' ) AS createDateTime,
diff.EVENT_SOURCE AS gridName, diff.EVENT_SOURCE AS gridName,
diff.EVENT_IMG_URL AS imgUrl, diff.EVENT_IMG_URL AS imgUrl,
diff.EVENT_CATEGORY_NAME AS categoryName, diff.EVENT_CATEGORY_NAME AS categoryName,
@ -18,8 +17,6 @@
diff.EVENT_RE_ORG AS handleCount diff.EVENT_RE_ORG AS handleCount
FROM FROM
screen_difficulty_data diff screen_difficulty_data diff
LEFT JOIN screen_event_data eve ON diff.EVENT_ID = eve.EVENT_ID
AND eve.DEL_FLAG = '0'
WHERE WHERE
diff.DEL_FLAG = '0' diff.DEL_FLAG = '0'
AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%') AND diff.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%')

27
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/DifficultyIfExistedResultDTO.java

@ -1,27 +0,0 @@
package com.epmet.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Description 判断难点赌点是否有数据的返回DTO
* @ClassName DifficultyIfExistedResultDTO
* @Auth wangc
* @Date 2020-09-28 10:45
*/
@Data
public class DifficultyIfExistedResultDTO implements Serializable {
private static final long serialVersionUID = -2278401165059196896L;
/**
* 是否有数据 true false
*/
private boolean ifExisted = false;
/**
* 已经结案的项目Id集合
*/
private List<String> closedIds;
}

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java

@ -152,7 +152,16 @@ public interface ProjectProcessDao extends BaseDao<ProjectProcessEntity> {
* @author wangc * @author wangc
* @date 2020.09.28 14:45 * @date 2020.09.28 14:45
*/ */
List<ProjectLatestOperationResultDTO> selectLatestOperation(@Param("list") List<String> list); List<ProjectLatestOperationResultDTO> selectLatestOperation(@Param("list") List<String> list,@Param("customerId") String customerId);
/**
* @Description 查找项目标题
* @param list
* @return java.util.List<com.epmet.dto.project.result.ProjectLatestOperationResultDTO>
* @author wangc
* @date 2020.09.28 14:45
*/
List<ProjectLatestOperationResultDTO> selectProjectTitle(@Param("list") List<String> list,@Param("customerId") String customerId);
} }

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java

@ -6,7 +6,6 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dto.org.GridInfoDTO; import com.epmet.dto.org.GridInfoDTO;
import com.epmet.dto.screen.form.ProjectSourceMapFormDTO; import com.epmet.dto.screen.form.ProjectSourceMapFormDTO;
import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO; import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO;
import com.epmet.dto.screen.result.DifficultyIfExistedResultDTO;
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity;
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyImgDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyImgDataEntity;
import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity;
@ -135,15 +134,17 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
**/ **/
@Override @Override
public void difficultyDataHub(ScreenCentralZoneDataFormDTO param) { public void difficultyDataHub(ScreenCentralZoneDataFormDTO param) {
//验证是否存在
DifficultyIfExistedResultDTO existedMap = screenDifficultyDataService.selectExistedInfo(param.getCustomerId());
//查询数据 //查询数据
List<ScreenDifficultyDataEntity> difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),existedMap.getClosedIds()); List<ScreenDifficultyDataEntity> difficulties = factOriginProjectMainDailyService.getDifficultyBaseInfo(param.getCustomerId(),screenDifficultyDataService.selectExistedInfo(param.getCustomerId()));
if(CollectionUtils.isEmpty(difficulties)) return; if(CollectionUtils.isEmpty(difficulties)) return;
List<String> projectIds = difficulties.stream().map(ScreenDifficultyDataEntity :: getEventId).distinct().collect(Collectors.toList()); List<String> projectIds = difficulties.stream().map(ScreenDifficultyDataEntity :: getEventId).distinct().collect(Collectors.toList());
//最近一次操作 //最近一次操作
Map<String,String> latestOperationMap = projectProcessService.selectLatestOperation(projectIds,param.getCustomerId()); Map<String,String> latestOperationMap = projectProcessService.getLatestOperation(projectIds,param.getCustomerId());
//标题
Map<String,String> titleMap = projectProcessService.getProjectTitle(projectIds,param.getCustomerId());
boolean isOperationNull = CollectionUtils.isEmpty(latestOperationMap) ? true : false; boolean isOperationNull = CollectionUtils.isEmpty(latestOperationMap) ? true : false;
boolean isTitleNull = CollectionUtils.isEmpty(titleMap) ? true : false;
//图片 //图片
List<ProjectSourceMapFormDTO> projectSourceMap = factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds); List<ProjectSourceMapFormDTO> projectSourceMap = factOriginProjectMainDailyService.getNewProject(param.getCustomerId(),projectIds);
@ -163,6 +164,9 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
if(!isOperationNull){ if(!isOperationNull){
diff.setLatestOperateDesc(latestOperationMap.get(diff.getEventId())); diff.setLatestOperateDesc(latestOperationMap.get(diff.getEventId()));
} }
if(!isTitleNull){
diff.setEventTitle(titleMap.get(diff.getEventId()));
}
diff.setDataEndTime(DateUtils.getBeforeNDay(NumConstant.ONE)); diff.setDataEndTime(DateUtils.getBeforeNDay(NumConstant.ONE));
}); });
List<ScreenDifficultyImgDataEntity> imgList = new LinkedList<>(); List<ScreenDifficultyImgDataEntity> imgList = new LinkedList<>();

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenDifficultyDataService.java

@ -18,7 +18,6 @@
package com.epmet.service.evaluationindex.screen; package com.epmet.service.evaluationindex.screen;
import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.screen.result.DifficultyIfExistedResultDTO;
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity;
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyImgDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyImgDataEntity;
@ -39,7 +38,7 @@ public interface ScreenDifficultyDataService extends BaseService<ScreenDifficult
* @author wangc * @author wangc
* @date 2020.09.28 10:53 * @date 2020.09.28 10:53
*/ */
DifficultyIfExistedResultDTO selectExistedInfo(String customerId); List<String> selectExistedInfo(String customerId);
/** /**

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

@ -24,7 +24,6 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.screen.ScreenDifficultyDataDao; import com.epmet.dao.evaluationindex.screen.ScreenDifficultyDataDao;
import com.epmet.dto.screen.result.DifficultyIfExistedResultDTO;
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity;
import com.epmet.entity.evaluationindex.screen.ScreenDifficultyImgDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenDifficultyImgDataEntity;
import com.epmet.service.evaluationindex.screen.ScreenDifficultyDataService; import com.epmet.service.evaluationindex.screen.ScreenDifficultyDataService;
@ -47,16 +46,9 @@ public class ScreenDifficultyDataServiceImpl extends BaseServiceImpl<ScreenDiffi
@Override @Override
public DifficultyIfExistedResultDTO selectExistedInfo(String customerId) { public List<String> selectExistedInfo(String customerId) {
int count = baseDao.selectCountByCustomerId(customerId); if (baseDao.selectCountByCustomerId(customerId) > NumConstant.ZERO) return baseDao.selectClosedProjectId(customerId);
DifficultyIfExistedResultDTO existedMap = new DifficultyIfExistedResultDTO(); return null;
if (count <= NumConstant.ZERO) {
existedMap.setIfExisted(true);
} else {
existedMap.setClosedIds(baseDao.selectClosedProjectId(customerId));
}
return existedMap;
} }
@Override @Override

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java

@ -124,6 +124,16 @@ public interface ProjectProcessService extends BaseService<ProjectProcessEntity>
* @author wangc * @author wangc
* @date 2020.09.28 14:44 * @date 2020.09.28 14:44
*/ */
Map<String,String> selectLatestOperation(List<String> list, String customerId); Map<String,String> getLatestOperation(List<String> list, String customerId);
/**
* @Description 获取项目标题
* @param list
* @param customerId
* @return java.util.Map<java.lang.String,java.lang.String>
* @author wangc
* @date 2020.10.27 14:34
*/
Map<String,String> getProjectTitle(List<String>list ,String customerId);
} }

22
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java

@ -122,8 +122,8 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
* @date 2020.09.28 14:44 * @date 2020.09.28 14:44
*/ */
@Override @Override
public Map<String, String> selectLatestOperation(List<String> list, String customerId) { public Map<String, String> getLatestOperation(List<String> list, String customerId) {
List<ProjectLatestOperationResultDTO> operations = baseDao.selectLatestOperation(list); List<ProjectLatestOperationResultDTO> operations = baseDao.selectLatestOperation(list,customerId);
if(CollectionUtils.isEmpty(operations)){ if(CollectionUtils.isEmpty(operations)){
return Collections.EMPTY_MAP; return Collections.EMPTY_MAP;
}else{ }else{
@ -131,4 +131,22 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl<ProjectProcessDao
} }
} }
/**
* @Description 获取项目标题
* @param list
* @param customerId
* @return java.util.Map<java.lang.String,java.lang.String>
* @author wangc
* @date 2020.10.27 14:34
*/
@Override
public Map<String, String> getProjectTitle(List<String> list, String customerId) {
List<ProjectLatestOperationResultDTO> titles = baseDao.selectProjectTitle(list,customerId);
if(CollectionUtils.isEmpty(titles)){
return Collections.EMPTY_MAP;
}else{
return titles.stream().collect(Collectors.toMap(ProjectLatestOperationResultDTO :: getProjectId,ProjectLatestOperationResultDTO :: getOperationName));
}
}
} }

1
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

@ -324,7 +324,6 @@
project.GRID_ID AS orgId, project.GRID_ID AS orgId,
project.AGENCY_ID AS parentId, project.AGENCY_ID AS parentId,
project.TOPIC_ID AS eventImgUrl, project.TOPIC_ID AS eventImgUrl,
project.TITLE AS eventTitle,
gridInfo.allPathName AS eventSource, gridInfo.allPathName AS eventSource,
gridInfo.gridName AS orgName, gridInfo.gridName AS orgName,
project.PROJECT_STATUS AS eventStatusCode, project.PROJECT_STATUS AS eventStatusCode,

17
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectProcessDao.xml

@ -273,6 +273,7 @@
project_process process project_process process
WHERE WHERE
process.DEL_FLAG = '0' process.DEL_FLAG = '0'
AND process.CUSTOMER_ID = #{customerId}
<if test="null != list and list.size() > 0"> <if test="null != list and list.size() > 0">
<foreach collection="list" item="projectId" open="AND (" separator=" OR " close=" )"> <foreach collection="list" item="projectId" open="AND (" separator=" OR " close=" )">
process.PROJECT_ID = #{projectId} process.PROJECT_ID = #{projectId}
@ -306,4 +307,20 @@
</if> </if>
</select> </select>
<!-- 查找项目标题 -->
<select id="selectProjectTitle" resultType="com.epmet.dto.project.result.ProjectLatestOperationResultDTO">
SELECT
ID AS projectId,
TITLE AS operationName
FROM
project
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
<if test="null != list and list.size() > 0">
<foreach collection="list" item="projectId" open="AND (" separator=" OR " close=" )">
ID = #{projectId}
</foreach>
</if>
</select>
</mapper> </mapper>

3
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectOrgPeriodResultDTO.java

@ -33,7 +33,8 @@ public class ProjectOrgPeriodResultDTO implements Serializable {
private String operation; private String operation;
/** /**
* 是这个节点的操作相当于上一个人的操作而不是对于这个节点的处理 * source_operation
* 是生成这个节点的操作相当于上一个人的操作而不是对于这个节点的处理
* created transfer close return response * created transfer close return response
* */ * */
private String lastAction; private String lastAction;

1
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectStaffDao.xml

@ -166,6 +166,7 @@
LEFT JOIN PROJECT project ON staff.PROJECT_ID = project.ID AND project.DEL_FLAG = '0' LEFT JOIN PROJECT project ON staff.PROJECT_ID = project.ID AND project.DEL_FLAG = '0'
LEFT JOIN PROJECT_PROCESS process ON staff.PROCESS_ID = process.ID AND process.DEL_FLAG = '0' LEFT JOIN PROJECT_PROCESS process ON staff.PROCESS_ID = process.ID AND process.DEL_FLAG = '0'
LEFT JOIN PROJECT_PROCESS selfAction ON staff.PROJECT_ID = selfAction.PROJECT_ID AND selfAction.DEL_FLAG = '0' LEFT JOIN PROJECT_PROCESS selfAction ON staff.PROJECT_ID = selfAction.PROJECT_ID AND selfAction.DEL_FLAG = '0'
AND selfAction.OPERATION <![CDATA[ <> ]]> 'created'
AND ABS(TIMESTAMPDIFF(SECOND,staff.UPDATED_TIME,selfAction.CREATED_TIME)) <![CDATA[ <= ]]> 30 AND ABS(TIMESTAMPDIFF(SECOND,staff.UPDATED_TIME,selfAction.CREATED_TIME)) <![CDATA[ <= ]]> 30
AND staff.STAFF_ID = selfAction.STAFF_ID AND staff.STAFF_ID = selfAction.STAFF_ID
WHERE staff.DEL_FLAG = '0' WHERE staff.DEL_FLAG = '0'

Loading…
Cancel
Save