Browse Source

Merge remote-tracking branch 'remotes/origin/dev_pyscreen' into dev_temp

master
jianjun 5 years ago
parent
commit
dc031bbaa0
  1. 3
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java
  2. 2
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/constants/PyldConstants.java
  3. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
  4. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java
  5. 21
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java
  6. 16
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml
  7. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java

3
epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java

@ -113,8 +113,7 @@ public class PyldApiService extends AbstractApiService {
}
PyldUserInfoResultDTO userInfo = data.getObject("userInfo", PyldUserInfoResultDTO.class);
if (userInfo == null || StringUtils.isBlank(userInfo.getMobile()) || StringUtils.isBlank(userInfo.getReserved())) {
throw new RenException(EpmetErrorCode.THIRD_PLAT_REQUEST_ERROR.getCode(),
EpmetErrorCode.THIRD_PLAT_REQUEST_ERROR.getMsg().concat(":").concat(PyldConstants.REPONSE_USER_NOT_LOGIN));
throw new RenException(EpmetErrorCode.THIRD_PLAT_REQUEST_ERROR.getCode(), PyldConstants.REPONSE_USER_NOT_LOGIN);
}
return userInfo;
}

2
epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/constants/PyldConstants.java

@ -14,5 +14,5 @@ public interface PyldConstants {
String PLAT_PARAM_MANAGEMENTKEY = "managementKey";
String PLAT_PARAM_MANAGEMENTKEY_VALUE = "epmet_work";
String REPONSE_USER_NOT_LOGIN = "用户未登陆";
String REPONSE_USER_NOT_LOGIN = "token失效,请重新登陆";
}

3
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java

@ -14,6 +14,7 @@ import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO;
import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO;
import com.epmet.evaluationindex.screen.dto.result.*;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@ -89,7 +90,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
List<DifficultProjectResultDTO> result = screenDifficultyDataDao.selectDifficulty(param.getAgencyId(),param.getType());
for(DifficultProjectResultDTO resultDTO:result){
if(!resultDTO.getImgUrl().contains("http")){
if (StringUtils.isNotBlank(resultDTO.getImgUrl()) && !resultDTO.getImgUrl().contains("http")) {
resultDTO.setImgUrl(StrConstant.EPMETY_STR);
}
}

6
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/crm/CustomerRelationDao.java

@ -23,8 +23,6 @@ import com.epmet.entity.crm.CustomerRelationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 客户关系表(01.14 add)
*
@ -35,10 +33,10 @@ import java.util.List;
public interface CustomerRelationDao extends BaseDao<CustomerRelationEntity> {
/**
* @param customerIds
* @param customerId
* @author yinzuomei
* @description 查询当前客户的area_code信息以及下一级客户列表
* @Date 2021/1/21 11:27
**/
List<CustomerSubInfoDTO> selectCustomerSubInfo(@Param("list") List<String> customerIds);
CustomerSubInfoDTO selectCustomerSubInfo(@Param("customerId")String customerId);
}

21
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/crm/impl/CustomerRelationServiceImpl.java

@ -22,11 +22,15 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.crm.CustomerRelationDao;
import com.epmet.dto.indexcal.CustomerSubInfoDTO;
import com.epmet.dto.stats.DimCustomerDTO;
import com.epmet.entity.crm.CustomerRelationEntity;
import com.epmet.service.crm.CustomerRelationService;
import com.epmet.service.stats.DimCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -38,11 +42,12 @@ import java.util.stream.Collectors;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-01-14
*/
@DataSource(DataSourceConstant.STATS)
@DataSource(DataSourceConstant.OPER_CRM)
@Service
public class CustomerRelationServiceImpl extends BaseServiceImpl<CustomerRelationDao, CustomerRelationEntity> implements CustomerRelationService {
@Autowired
private DimCustomerService dimCustomerService;
/**
* @param customerIds
* @return java.util.Map<java.lang.String, com.epmet.dto.indexcal.CustomerSubInfoDTO>
@ -52,7 +57,17 @@ public class CustomerRelationServiceImpl extends BaseServiceImpl<CustomerRelatio
**/
@Override
public Map<String, CustomerSubInfoDTO> getCustomerInfoMap(List<String> customerIds) {
List<CustomerSubInfoDTO> list = baseDao.selectCustomerSubInfo(customerIds);
List<CustomerSubInfoDTO> list=new ArrayList<>();
for(String customerId:customerIds){
CustomerSubInfoDTO customerSubInfoDTO = baseDao.selectCustomerSubInfo(customerId);
if(null!=customerSubInfoDTO){
DimCustomerDTO dimCustomerDTO=dimCustomerService.get(customerId);
if(null!=dimCustomerDTO){
customerSubInfoDTO.setCustomerName(dimCustomerDTO.getCustomerName());
}
list.add(customerSubInfoDTO);
}
}
if(CollectionUtils.isEmpty(list)){
return new HashMap<>();
}

16
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/crm/CustomerRelationDao.xml

@ -4,7 +4,6 @@
<mapper namespace="com.epmet.dao.crm.CustomerRelationDao">
<resultMap id="CustomerSubInfoDTOResMap" type="com.epmet.dto.indexcal.CustomerSubInfoDTO">
<result property="customerId" column="customerId"></result>
<result property="customerName" column="customerName"></result>
<result property="customerAreaCode" column="customerAreaCode"></result>
<collection property="subCustomerIds" ofType="java.lang.String">
<result column="subCustomerId"/>
@ -14,22 +13,13 @@
<select id="selectCustomerSubInfo" parameterType="map" resultMap="CustomerSubInfoDTOResMap">
SELECT
CR.PARENT_CUSTOMER_ID AS customerId,
dc.CUSTOMER_NAME AS customerName,
dc.AREA_CODE AS customerAreaCode,
CR.CUSTOMER_ID AS subCustomerId
CR.CUSTOMER_ID AS subCustomerId,
(select c.AREA_CODE from customer_relation c where c.del_flag='0' and c.CUSTOMER_ID=#{customerId}) as customerAreaCode
FROM
customer_relation cr
LEFT JOIN dim_customer dc ON ( cr.PARENT_CUSTOMER_ID = DC.ID and dc.del_flag='0')
WHERE
cr.DEL_FLAG = '0'
AND cr.`STATUS` = 'open'
AND cr.PARENT_CUSTOMER_ID != '0'
<if test="null !=list and list.size()>0">
AND cr.PARENT_CUSTOMER_ID IN
<foreach collection="list" item="customerId" index="index" open="(" close=")" separator=",">
#{customerId}
</foreach>
</if>
AND cr.PARENT_CUSTOMER_ID =#{customerId}
</select>
</mapper>

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

@ -175,6 +175,7 @@ public class UserBadgeServiceImpl implements UserBadgeService {
return;
}
List<UserBaseInfoResultDTO> userBaseInfoResultDTOS = userBaseInfoService.queryUserBaseInfo(reUserIds);
log.info("user基本信息:"+userBaseInfoResultDTOS.toString());
if (CollectionUtils.isEmpty(userBaseInfoResultDTOS)) {
log.error("未查询到党员基本信息......");
throw new RenException("未查询到党员基本信息......");

Loading…
Cancel
Save