Browse Source

Merge remote-tracking branch 'remotes/origin/dev' into 市北生产

feature/teamB_zz_wgh
jianjun 4 years ago
parent
commit
b4254768c6
  1. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
  2. 6
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java
  3. 9
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  4. 6
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  5. 18
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
  6. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java

@ -366,4 +366,11 @@ public interface DataStatsDao {
* @author sun
*/
List<GridDateIdResultDTO> gridDateProjectIncrList(GridLivelyFormDTO formDTO);
/**
* @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录一个网格一天一条
* @author sun
*/
List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO);
}

6
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java

@ -292,4 +292,10 @@ public interface DataStatsService {
* @author sun
*/
List<GridDateIdResultDTO> getGridDateProjectIncrList(GridLivelyFormDTO formDTO);
/**
* @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录一个网格一天一条
* @author sun
*/
List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO);
}

9
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java

@ -2217,4 +2217,13 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
public List<GridDateIdResultDTO> getGridDateProjectIncrList(GridLivelyFormDTO formDTO) {
return dataStatsDao.gridDateProjectIncrList(formDTO);
}
/**
* @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录一个网格一天一条
* @author sun
*/
@Override
public List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO) {
return dataStatsDao.getGridProejctToProjectMain(formDTO);
}
}

6
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -692,8 +692,10 @@ public class GovOrgServiceImpl implements GovOrgService {
Map<String, GridInfoResultDTO> gridMap = gridList.stream().collect(Collectors.toMap(GridInfoResultDTO :: getGridId, v -> v, (v1, v2) -> v1));
//2.查询直属下级组织下网格在查询时间段内存在例行工作次数的网格,一天一条
List<GridDateIdResultDTO> workList = epmetUserService.getGridDateRoutineWorkList(formDTO);
//3.查询直属下级组织下网格在查询时间段内存在上报事件(直接立项)数的网格,一天一条
List<GridDateIdResultDTO> projectList = dataStatsService.getGridDateProjectIncrList(formDTO);
/*//3.查询直属下级组织下网格在查询时间段内存在上报事件(直接立项)数的网格,一天一条
List<GridDateIdResultDTO> projectList = dataStatsService.getGridDateProjectIncrList(formDTO);*/
//3.查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条
List<GridDateIdResultDTO> projectList = dataStatsService.getGridProejctToProjectMain(formDTO);
//4.汇总数据,一个网格一天只记录一条数据,这条数据可能是例行工作的也可能是上报事件的,也可能某一天两个数都有,但只记录一条
Set<String> map = workList.stream().map(o -> o.getGridId() + o.getDateId()).collect(Collectors.toSet());
projectList.stream().filter(pro -> !map.contains(pro.getGridId() + pro.getDateId())).forEach(p -> workList.add(p));

18
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml

@ -1180,4 +1180,22 @@
AND pids LIKE CONCAT('%', #{agencyId}, '%')
GROUP BY grid_id, date_id
</select>
<select id="getGridProejctToProjectMain" resultType="com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO">
SELECT
grid_id gridId,
date_id dateId,
pids pids
FROM
fact_origin_project_main_daily
WHERE
del_flag = '0'
AND grid_id IS NOT NULL
AND grid_id != ''
AND date_id <![CDATA[ >= ]]> #{startTime}
AND date_id <![CDATA[ <= ]]> #{endTime}
AND pids LIKE CONCAT('%', #{agencyId}, '%')
GROUP BY grid_id, date_id
</select>
</mapper>

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java

@ -1586,7 +1586,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
if ("1".equals(oldValue)) {
IcUserChangeDetailedEntity changeDetail = fillChangeDetail(loginUserCustomerId, resiId, transferChangeRecord.getId(), oldAgencyId,
oldGridId, oldvillageId, oldBuildId, oldUnitId,
oldHomeId, transferChangeRecord.getType(), transferChangeRecord.getTypeName(), key, -1, pids);
oldHomeId, "out", "迁出", key, -1, pids);
icUserChangeDetailedDao.insert(changeDetail);
}
}
@ -1600,7 +1600,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
if ("1".equals(newValue)) {
IcUserChangeDetailedEntity changeDetail = fillChangeDetail(loginUserCustomerId, resiId, transferChangeRecord.getId(), newAgencyId,
newGridId, newvillageId, newBuildId, newUnitId,
newHomeId, transferChangeRecord.getType(), transferChangeRecord.getTypeName(), key, 1, pids);
newHomeId, "in", "迁入", key, 1, pids);
icUserChangeDetailedDao.insert(changeDetail);
}
}

Loading…
Cancel
Save