Browse Source

Merge remote-tracking branch 'origin/dev_ic_diaodong' into develop

master
yinzuomei 4 years ago
parent
commit
b51977d3c7
  1. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
  2. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java
  3. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  4. 29
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  5. 5
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
  6. 5
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

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

@ -355,6 +355,7 @@ public interface DataStatsDao {
@Param("configIds") List<String> configIds);
List<FactIcuserCategoryAnalysisDailyDTO> queryAgencyIcUserCategoryData(@Param("gridPids") String gridPids,
@Param("orgId")String orgId,
@Param("dateId") String dateId,
@Param("configIds") List<String> configIds);
}

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

@ -283,5 +283,5 @@ public interface DataStatsService {
List<FactIcuserCategoryAnalysisDailyDTO> queryGridIcUserCategoryData(String orgId, String dateId, List<String> configIds);
List<FactIcuserCategoryAnalysisDailyDTO> queryAgencyIcUserCategoryData(String gridPids, String dateId, List<String> configIds);
List<FactIcuserCategoryAnalysisDailyDTO> queryAgencyIcUserCategoryData(String gridPids, String orgId,String dateId, List<String> configIds);
}

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

@ -2181,10 +2181,10 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
}
@Override
public List<FactIcuserCategoryAnalysisDailyDTO> queryAgencyIcUserCategoryData(String gridPids, String dateId, List<String> configIds) {
public List<FactIcuserCategoryAnalysisDailyDTO> queryAgeb09527201c4409e19d1dbc5e3c3429a1ncyIcUserCategoryData(String gridPids, String orgId,String dateId, List<String> configIds) {
if(CollectionUtils.isEmpty(configIds)||StringUtils.isBlank(gridPids)){
return new ArrayList<>();
}
return dataStatsDao.queryAgencyIcUserCategoryData(gridPids,dateId,configIds);
return dataStatsDao.queryAgencyIcUserCategoryData(gridPids,orgId,dateId,configIds);
}
}

29
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -35,8 +35,6 @@ import com.epmet.dataaggre.entity.epmetuser.ResiUserBadgeEntity;
import com.epmet.dataaggre.entity.epmetuser.StaffRoleEntity;
import com.epmet.dataaggre.entity.govorg.CustomerAgencyEntity;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.entity.epmetuser.*;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
import com.epmet.dataaggre.service.epmetuser.StaffPatrolDetailService;
import com.epmet.dataaggre.service.epmetuser.StaffPatrolRecordService;
@ -789,19 +787,36 @@ public class EpmetUserServiceImpl implements EpmetUserService {
});
}
}else if(OrgInfoConstant.AGENCY.equals(formDTO.getOrgType())){
CustomerAgencyEntity agencyEntity=govOrgService.getAgencyInfo(formDTO.getOrgId());
/*CustomerAgencyEntity agencyEntity=govOrgService.getAgencyInfo(formDTO.getOrgId());
String gridPids="";
if(NumConstant.ZERO_STR.equals(agencyEntity.getPid())){
// 当前组织是根组织
gridPids=formDTO.getOrgId();
}else {
gridPids=agencyEntity.getPids().concat(StrConstant.COLON).concat(formDTO.getOrgId());
}
List<FactIcuserCategoryAnalysisDailyDTO> list = dataStatsService.queryAgencyIcUserCategoryData(gridPids, formDTO.getDateId(), configIds);
if("b09527201c4409e19d1dbc5e3c3429a1".equals(formDTO.getCustomerId())){
//市北的是英文冒号隔开的
gridPids=agencyEntity.getPids().concat(StrConstant.COMMA).concat(formDTO.getOrgId());
}else{
gridPids=agencyEntity.getPids().concat(StrConstant.COLON).concat(formDTO.getOrgId());
}
}*/
List<FactIcuserCategoryAnalysisDailyDTO> list = dataStatsService.queryAgencyIcUserCategoryData(null, formDTO.getOrgId(), formDTO.getDateId(), configIds);
if(CollectionUtils.isNotEmpty(list)){
Map<String, FactIcuserCategoryAnalysisDailyDTO> configMap = list.stream().collect(Collectors.toMap(FactIcuserCategoryAnalysisDailyDTO::getConfigId, m -> m, (k1, k2) -> k1));
resList.forEach(resDto->{
if(MapUtils.isNotEmpty(configMap)&&configMap.containsKey(resDto.getConfigId())){
if(MapUtils.isNotEmpty(configMap)&&configMap.containsKey(resDto.getConfigId())){/*CustomerAgencyEntity agencyEntity=govOrgService.getAgencyInfo(formDTO.getOrgId());
String gridPids="";
if(NumConstant.ZERO_STR.equals(agencyEntity.getPid())){
// 当前组织是根组织
gridPids=formDTO.getOrgId();
}else {
if("b09527201c4409e19d1dbc5e3c3429a1".equals(formDTO.getCustomerId())){
//市北的是英文冒号隔开的
gridPids=agencyEntity.getPids().concat(StrConstant.COMMA).concat(formDTO.getOrgId());
}else{
gridPids=agencyEntity.getPids().concat(StrConstant.COLON).concat(formDTO.getOrgId());
}
}*/
FactIcuserCategoryAnalysisDailyDTO dailyDTO=configMap.get(resDto.getConfigId());
resDto.setTotal(dailyDTO.getTotal());
resDto.setImmigration(dailyDTO.getQrIncr());

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

@ -1134,7 +1134,10 @@
WHERE
m.DATE_ID = #{dateId}
AND m.DEL_FLAG = '0'
AND m.PIDS LIKE concat(#{gridPids},'%')
<if test="gridPids != null and gridPids != '' ">
AND m.PIDS LIKE concat(#{gridPids},'%')
</if>
AND m.pids like concat('%',#{orgId},'%')
AND M.ORG_TYPE='grid'
<if test='null!=configIds and configIds.size()>0'>
<foreach collection="configIds" item="configId" open="AND (" close=")" separator=" OR ">

5
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -130,7 +130,10 @@
LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID and d.DEL_FLAG = '0'
<where>
<if test="pids != null and pids != ''">
AND CONCAT(c.AGENCY_PIDS,':',c.AGENCY_ID) like CONCAT(#{pids},'%')
case c.AGENCY_PIDS
when '' then CONCAT(c.AGENCY_ID) like CONCAT(#{pids}, '%')
else CONCAT(c.AGENCY_PIDS, ':', c.AGENCY_ID) like CONCAT(#{pids}, '%')
end
</if>
<if test="buildingId != null and buildingId.trim() != ''">
AND a.BUILDING_ID = #{buildingId}

Loading…
Cancel
Save