|
@ -32,6 +32,7 @@ import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity; |
|
|
import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService; |
|
|
import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService; |
|
|
import com.epmet.service.org.CustomerGridService; |
|
|
import com.epmet.service.org.CustomerGridService; |
|
|
import com.epmet.service.topic.TopicService; |
|
|
import com.epmet.service.topic.TopicService; |
|
|
|
|
|
import com.epmet.service.user.UserService; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.collections4.ListUtils; |
|
|
import org.apache.commons.collections4.ListUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
@ -60,7 +61,8 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl<FactOri |
|
|
private CustomerGridService customerGridService; |
|
|
private CustomerGridService customerGridService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private FactOriginTopicLogDailyDao factOriginTopicLogDailyDao; |
|
|
private FactOriginTopicLogDailyDao factOriginTopicLogDailyDao; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private UserService userService; |
|
|
/** |
|
|
/** |
|
|
* @param customerId 客户id |
|
|
* @param customerId 客户id |
|
|
* @param dateId yyyyMMdd |
|
|
* @param dateId yyyyMMdd |
|
@ -140,6 +142,8 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl<FactOri |
|
|
Map<String, Object> map=new HashMap<>(); |
|
|
Map<String, Object> map=new HashMap<>(); |
|
|
List<FactOriginTopicMainDailyEntity> mainDailyEntityList=new ArrayList<>(); |
|
|
List<FactOriginTopicMainDailyEntity> mainDailyEntityList=new ArrayList<>(); |
|
|
List<FactOriginTopicLogDailyEntity> logDailyEntityList=new ArrayList<>(); |
|
|
List<FactOriginTopicLogDailyEntity> logDailyEntityList=new ArrayList<>(); |
|
|
|
|
|
List<String> userIds = topicOriginInfoList.stream().map(topic -> topic.getOperateUserId()).distinct().collect(Collectors.toList()); |
|
|
|
|
|
Map<String,Integer> userIsPartyMap = userService.selectUserIsParty(userIds); |
|
|
for(TopicOriginInfoDTO topicOriginInfoDTO:topicOriginInfoList){ |
|
|
for(TopicOriginInfoDTO topicOriginInfoDTO:topicOriginInfoList){ |
|
|
GridInfoDTO gridInfoDTO=gridMap.get(topicOriginInfoDTO.getGridId()); |
|
|
GridInfoDTO gridInfoDTO=gridMap.get(topicOriginInfoDTO.getGridId()); |
|
|
if(null==gridInfoDTO){ |
|
|
if(null==gridInfoDTO){ |
|
@ -162,7 +166,11 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl<FactOri |
|
|
mainDailyEntity.setPid(gridInfoDTO.getPid()); |
|
|
mainDailyEntity.setPid(gridInfoDTO.getPid()); |
|
|
//TODO
|
|
|
//TODO
|
|
|
//话题发布人是否是党员:1是党员0不是。 默认0
|
|
|
//话题发布人是否是党员:1是党员0不是。 默认0
|
|
|
|
|
|
if (null != userIsPartyMap && null != userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId())) { |
|
|
|
|
|
mainDailyEntity.setCreateTopicUserIsParty(userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId()) == NumConstant.ONE ? true : false); |
|
|
|
|
|
} else { |
|
|
mainDailyEntity.setCreateTopicUserIsParty(false); |
|
|
mainDailyEntity.setCreateTopicUserIsParty(false); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
mainDailyEntityList.add(mainDailyEntity); |
|
|
mainDailyEntityList.add(mainDailyEntity); |
|
|
} |
|
|
} |
|
@ -174,7 +182,11 @@ public class FactOriginTopicMainDailyServiceImpl extends BaseServiceImpl<FactOri |
|
|
logDailyEntity.setAgencyId(gridInfoDTO.getAgencyId()); |
|
|
logDailyEntity.setAgencyId(gridInfoDTO.getAgencyId()); |
|
|
logDailyEntity.setPid(gridInfoDTO.getPid()); |
|
|
logDailyEntity.setPid(gridInfoDTO.getPid()); |
|
|
//TODO
|
|
|
//TODO
|
|
|
|
|
|
if (null != userIsPartyMap && null != userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId())) { |
|
|
|
|
|
logDailyEntity.setOperateUserIsParty(userIsPartyMap.get(topicOriginInfoDTO.getOperateUserId()) == NumConstant.ONE ? true : false); |
|
|
|
|
|
} else { |
|
|
logDailyEntity.setOperateUserIsParty(false); |
|
|
logDailyEntity.setOperateUserIsParty(false); |
|
|
|
|
|
} |
|
|
logDailyEntityList.add(logDailyEntity); |
|
|
logDailyEntityList.add(logDailyEntity); |
|
|
} |
|
|
} |
|
|
map.put("main",mainDailyEntityList); |
|
|
map.put("main",mainDailyEntityList); |
|
|