Browse Source

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

dev_shibei_match
yinzuomei 4 years ago
parent
commit
de69be0ede
  1. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java
  2. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java
  3. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenProjectDataService.java
  4. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectDataServiceImpl.java
  5. 5
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml
  6. 11
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/LatestCustomerResultDTO.java
  7. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java
  8. 13
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/CustomerDTO.java
  9. 11
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenProjectDataDao.java

@ -18,12 +18,12 @@
package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.project.result.ProjectExceedParamsResultDTO;
import com.epmet.dto.screen.ScreenProjectDataDTO;
import com.epmet.entity.evaluationindex.screen.ScreenProjectDataEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
/**
@ -46,4 +46,6 @@ public interface ScreenProjectDataDao extends BaseDao<ScreenProjectDataEntity> {
void insertBatch(@Param("list") List<ScreenProjectDataDTO> list);
void updateBatch(@Param("list") List<ScreenProjectDataDTO> list,@Param("dateId") String dateId);
int updateProjectSatisfactionScore(@Param("projectId")String projectId, @Param("score")BigDecimal score);
}

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

@ -200,7 +200,7 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic
}
}
projectIds.forEach(id->{
projectService.calProjectSatisfactionScore(customerId,id);
targetDbService.updateProjectSatisfactionScore(id,projectService.calProjectSatisfactionScore(customerId,id));
});
}

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

@ -24,6 +24,7 @@ import com.epmet.dto.screen.form.ScreenProjectDataInfoFormDTO;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenProjectDataEntity;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
@ -124,4 +125,6 @@ public interface ScreenProjectDataService extends BaseService<ScreenProjectDataE
* @date 2021.03.09 17:36
*/
void insertOrUpdateBatch(String customerId,String dateId,List<ScreenProjectDataDTO> meta,List<ScreenProjectDataDTO> orient);
int updateProjectSatisfactionScore(String projectId, BigDecimal calProjectSatisfactionScore);
}

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

@ -41,6 +41,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
@ -285,4 +286,9 @@ public class ScreenProjectDataServiceImpl extends BaseServiceImpl<ScreenProjectD
}
}
@Override
public int updateProjectSatisfactionScore(String projectId, BigDecimal score) {
return baseDao.updateProjectSatisfactionScore(projectId,score);
}
}

5
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenProjectDataDao.xml

@ -172,4 +172,9 @@
PROJECT_ID=#{i.projectId}
</foreach>
</update>
<update id="updateProjectSatisfactionScore">
update screen_project_data set SATISFACTION_SCORE=#{score}
where PROJECT_ID=#{projectId}
</update>
</mapper>

11
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/LatestCustomerResultDTO.java

@ -3,6 +3,7 @@ package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
@ -38,4 +39,14 @@ public class LatestCustomerResultDTO implements Serializable {
* 性别0未知1男2女
*/
private Integer gender;
/**
* 是否有字客户
*/
private Boolean haveSubCustomer;
/**
* 子客户列表
*/
private List<String> subCustomerIds;
}

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java

@ -129,6 +129,9 @@ public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl<CustomerStaf
@Override
public Result<LatestCustomerResultDTO> getLatestCustomer(String userId) {
LatestCustomerResultDTO resultDTO = new LatestCustomerResultDTO();
resultDTO.setHaveSubCustomer(false);
resultDTO.setSubCustomerIds(new ArrayList<>());
CustomerStaffAgencyDTO customerStaffAgencyDTO = baseDao.selectLatestCustomerByStaff(userId);
resultDTO.setAgencyId(customerStaffAgencyDTO.getAgencyId());
@ -150,6 +153,8 @@ public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl<CustomerStaf
Result<CustomerDTO> customerResult = operCrmFeignClient.getCustomerInfo(customerDTO);
if (customerResult.success() && null != customerResult.getData()) {
resultDTO.setCustomerName(customerResult.getData().getCustomerName());
resultDTO.setHaveSubCustomer(customerResult.getData().getHaveSubCustomer());
resultDTO.setSubCustomerIds(customerResult.getData().getSubCustomerIds());
}else{
log.warn(String.format("根据客户id:%s,查询客户信息失败",customerDTO.getId()));
}

13
epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/CustomerDTO.java

@ -17,9 +17,11 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import java.util.List;
/**
@ -123,4 +125,13 @@ public class CustomerDTO implements Serializable {
*/
private Date updatedTime;
/**
* 06.21:扩展属性是否有字客户
*/
private Boolean haveSubCustomer;
/**
* 06.21:扩展属性子客户列表
*/
private List<String> subCustomerIds;
}

11
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java

@ -215,7 +215,16 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
@Override
public Result<CustomerDTO> getCustomerInfo(CustomerDTO dto) {
CustomerEntity entity = baseDao.selectById(dto.getId());
return new Result<CustomerDTO>().ok(ConvertUtils.sourceToTarget(entity, CustomerDTO.class));
List<String> customerIds=customerRelationService.getAllSubCustomerIds(dto.getId());
CustomerDTO customerDTO=ConvertUtils.sourceToTarget(entity, CustomerDTO.class);
if(CollectionUtils.isEmpty(customerIds)){
customerDTO.setHaveSubCustomer(false);
customerDTO.setSubCustomerIds(new ArrayList<>());
}else{
customerDTO.setHaveSubCustomer(true);
customerDTO.setSubCustomerIds(customerIds);
}
return new Result<CustomerDTO>().ok(customerDTO);
}
@Override

Loading…
Cancel
Save