|
|
@ -1,23 +1,20 @@ |
|
|
|
package com.epmet.service.evaluationindex.extract.impl; |
|
|
|
|
|
|
|
import com.epmet.dao.evaluationindex.extract.FactOriginGroupMainDailyDao; |
|
|
|
import com.epmet.dto.extract.result.PartyCreateGroupCountResultDTO; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
import com.epmet.dao.evaluationindex.extract.FactOriginGroupMainDailyDao; |
|
|
|
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO; |
|
|
|
import com.epmet.dto.extract.form.ExtractFormDTO; |
|
|
|
import com.epmet.dto.extract.form.GridHeartedFormDTO; |
|
|
|
import com.epmet.dto.extract.result.PartyCreateGroupCountResultDTO; |
|
|
|
import com.epmet.dto.group.result.ExtractGroupMemberActionRecordResultDTO; |
|
|
|
import com.epmet.dto.stats.result.GridAttributesResultDTO; |
|
|
|
import com.epmet.service.evaluationindex.extract.GroupExtractService; |
|
|
|
import com.epmet.service.group.GroupDataService; |
|
|
|
import com.epmet.service.stats.DimAgencyService; |
|
|
|
import com.epmet.service.stats.DimGridService; |
|
|
|
import com.epmet.service.user.UserService; |
|
|
|
import com.epmet.util.DimIdGenerator; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -31,8 +28,6 @@ import java.util.Map; |
|
|
|
import java.util.function.Function; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 业务数据抽取 - 组相关 |
|
|
|
* @ClassName GroupExtractServiceImpl |
|
|
@ -78,14 +73,14 @@ public class GroupExtractServiceImpl implements GroupExtractService { |
|
|
|
int count = factOriginGroupMainDailyDao.selectIfExist(param.getCustomerId()); |
|
|
|
|
|
|
|
if(StringUtils.isBlank(param.getDateId())){ |
|
|
|
Date yesterday = new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24); |
|
|
|
Date yesterday = DateUtils.addDateDays(new Date(), -1); |
|
|
|
SimpleDateFormat format = new SimpleDateFormat(DateUtils.DATE_PATTERN_YYYYMMDD); |
|
|
|
param.setDateId(format.format(yesterday)); |
|
|
|
} |
|
|
|
//原生数据,如果是首次,则为全部组,如果非首次,则只有新创建以及新进人的组
|
|
|
|
//但是每个组每天都要更新一次组长的身份信息
|
|
|
|
List<FactOriginGroupMainDailyDTO> originGroupData = groupDataService.extractGroupData( |
|
|
|
count <= NumConstant.ZERO ? true : false, |
|
|
|
count <= NumConstant.ZERO, |
|
|
|
param.getCustomerId(), param.getDateId()); |
|
|
|
|
|
|
|
List<ExtractGroupMemberActionRecordResultDTO> memberList = new LinkedList<>(); |
|
|
@ -138,7 +133,6 @@ public class GroupExtractServiceImpl implements GroupExtractService { |
|
|
|
factOriginGroupMainDailyDao.deleteBatchByGroupId(originGroupData.stream().map(FactOriginGroupMainDailyDTO :: getId).distinct().collect(Collectors.toList())); |
|
|
|
factOriginGroupMainDailyDao.insertBatchMembers(memberList); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|