Browse Source

Merge remote-tracking branch 'origin/master'

master
wangxianzhang 3 years ago
parent
commit
6d97f24724
  1. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java
  2. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java
  3. 25
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java
  4. 6
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java
  5. 7
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java
  6. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java

@ -244,7 +244,7 @@ public class DataReportingServiceImpl implements DataReportingService {
if (CollectionUtils.isNotEmpty(formDTO.getProjectId())) {
list = projectList.stream().map(project -> {
EventInfoResultDTO dto = getEventInfoResultDTO(project, finalEpmetCodeMap, codeMap);
ScreenCustomerGridDTO grid = screenCustomerGridService.getGridById(project.getOrgId());
CustomerGridDTO grid = customerGridService.getGridById(project.getOrgId());
dto.setOrgId(project.getOrgId());
if (null != grid) {
dto.setOrgCode(grid.getCode());
@ -255,10 +255,10 @@ public class DataReportingServiceImpl implements DataReportingService {
} else {
//项目ID不为空时,提前取出客户下的组织和网格
Map<String, ScreenCustomerAgencyEntity> agencyMap = screenCustomerAgencyService.getAgencyList(formDTO.getCustomerId());
Map<String, ScreenCustomerGridDTO> gridMap = screenCustomerGridService.getGridList(formDTO.getCustomerId());
Map<String, CustomerGridDTO> gridMap = customerGridService.getGridMap(PingYinConstant.PROD_PING_YIN_CUSTOMER_ID);
list = projectList.stream().map(project -> {
EventInfoResultDTO dto = getEventInfoResultDTO(project, finalEpmetCodeMap, codeMap);
ScreenCustomerGridDTO grid = gridMap.get(project.getOrgId());
CustomerGridDTO grid = gridMap.get(project.getOrgId());
dto.setOrgId(project.getOrgId());
if (null != grid) {
dto.setOrgCode(grid.getCode());

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java

@ -15,6 +15,7 @@ import com.epmet.entity.org.CustomerGridEntity;
import java.util.Date;
import java.util.List;
import java.util.Map;
public interface CustomerGridService extends BaseService<CustomerGridEntity> {
/**
@ -106,4 +107,9 @@ public interface CustomerGridService extends BaseService<CustomerGridEntity> {
* @Description 查询客户下有效网格列表
**/
List<DimGridDTO> gridListByCustomerId(String customerId);
CustomerGridDTO getGridById(String gridId);
Map<String, CustomerGridDTO> getGridMap(String customerId);
}

25
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java

@ -1,8 +1,10 @@
package com.epmet.service.org.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.org.CustomerGridDao;
import com.epmet.dto.group.AgencyDTO;
@ -18,12 +20,13 @@ import com.epmet.dto.user.result.GridUserInfoDTO;
import com.epmet.entity.org.CustomerGridEntity;
import com.epmet.service.Issue.IssueService;
import com.epmet.service.org.CustomerGridService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@Service
@DataSource(DataSourceConstant.GOV_ORG)
@ -157,4 +160,20 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
return customerGridDao.gridListByCustomerId(customerId);
}
@Override
public CustomerGridDTO getGridById(String gridId) {
return ConvertUtils.sourceToTarget(baseDao.selectById(gridId), CustomerGridDTO.class);
}
@Override
public Map<String, CustomerGridDTO> getGridMap(String customerId) {
LambdaQueryWrapper<CustomerGridEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CustomerGridEntity::getCustomerId, customerId);
List<CustomerGridEntity> list = baseDao.selectList(wrapper);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyMap();
}
return ConvertUtils.sourceToTarget(list, CustomerGridDTO.class).stream().collect(Collectors.toMap(CustomerGridDTO::getId, Function.identity()));
}
}

6
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java

@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.CustomerGridStaffListFormDTO;
import com.epmet.dto.form.GridStaffUploadtFormDTO;
@ -21,6 +20,7 @@ import com.epmet.opendata.entity.GridstaffInfoPingyinEntity;
import com.epmet.opendata.service.GridstaffInfoPingyinService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -130,6 +130,10 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl<GridstaffIn
entity.setLeaveDate(r.getLeaveDate());
entity.setGridUserId(r.getStaffId());
entity.setCardNum(r.getIdCard());
if (StringUtils.isBlank(r.getIdCard())){
log.warn("getStaffBaseInfo 身份证号是空的,{}", JSON.toJSONString(entity));
return;
}
//按网格查询人员是否存在,存在更新否则新增
GridstaffInfoPingyinEntity gs = baseDao.selectByCodeAndStaffId(r.getCode(), r.getStaffId());
log.info(String.format("网格工作人员信息同步,当前操作人员信息,姓名:%s staffId:%s", entity.getNickName(), entity.getGridUserId()));

7
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/IcPartymemberStyleServiceImpl.java

@ -158,6 +158,12 @@ public class IcPartymemberStyleServiceImpl extends BaseServiceImpl<IcPartymember
IcPartymemberStyleEntity entity = baseDao.selectById(id);
IcPartymemberStyleDTO dto = ConvertUtils.sourceToTarget(entity, IcPartymemberStyleDTO.class);
dto.setImageList(icPartymemberStyleImageService.getByStyleId(id));
GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(dto.getGridId());
if (null != gridInfoCache) {
dto.setGridName(gridInfoCache.getGridName());
}
IcPartymemberStyleCategoryDictEntity dict = icPartymemberStyleCategoryDictService.get(dto.getCategoryId());
dto.setCategoryName(null == dict ? StrConstant.EPMETY_STR : dict.getCategoryName());
return dto;
}
@ -240,6 +246,7 @@ public class IcPartymemberStyleServiceImpl extends BaseServiceImpl<IcPartymember
item.setGridName(gridInfo.getGridName());
IcPartymemberStyleCategoryDictEntity dict = icPartymemberStyleCategoryDictService.get(item.getCategoryId());
item.setCategoryName(null == dict ? StrConstant.EPMETY_STR : dict.getCategoryName());
item.setImageList(icPartymemberStyleImageService.getByStyleId(item.getId()));
}
});
return new PageData<>(dtoList, pageInfo.getTotal());

1
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

@ -794,6 +794,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
resultDTO.setCustomerName(customerResult.getData().getCustomerName());
}
}
redisUtils.delete(userBaseInfoKey);
redisUtils.set(userBaseInfoKey,resultDTO);
return resultDTO;
}

Loading…
Cancel
Save