Browse Source

Merge remote-tracking branch 'origin/dev_screen_data_2.0' into dev_temp

dev_shibei_match
zxc 5 years ago
parent
commit
0dd1bd429b
  1. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java
  2. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java
  3. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenPartyUserRankDataServiceImpl.java
  4. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenUserTotalDataServiceImpl.java
  5. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserGridDailyService.java
  6. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserGridDailyServiceImpl.java
  7. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactParticipationUserGridDailyDao.xml

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java

@ -46,5 +46,5 @@ public interface FactParticipationUserGridDailyDao extends BaseDao<FactParticipa
* @author zxc
* @date 2020/9/23 9:57 上午
*/
List<UserCountResultDTO> selectUserCount(String customerId);
List<UserCountResultDTO> selectUserCount(@Param("customerId")String customerId,@Param("dateId")String dateId);
}

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

@ -138,7 +138,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
}else {
// 级别为 street,district,city,province
List<GridInfoResultDTO> directGridIds = gridService.selectDirectGrid(orgIds);
List<UserCountResultDTO> userCountList = userGridDailyService.selectUserCount(customerId);
List<UserCountResultDTO> userCountList = userGridDailyService.selectUserCount(customerId,dateId);
agencyIdList.forEach(agency -> {
String agencyId = agency.getAgencyId();
List<String> dGridId = new ArrayList<>();
@ -330,7 +330,7 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService {
public GridPartyDTO gridParty(String customerId,String dateId,CustomerAgencyInfoResultDTO agency){
List<PartyBaseInfoFormDTO> result = new ArrayList<>();
List<String> orgIds = new ArrayList<>();
List<UserCountResultDTO> userCountList = userGridDailyService.selectUserCount(customerId);
List<UserCountResultDTO> userCountList = userGridDailyService.selectUserCount(customerId,dateId);
// 1. 处理社区下的所有网格中的党员信息
String agencyId = agency.getAgencyId();
// 获取下级所有agencyId【根据agencyMap中的level判断下级orgId是否是gridId】(此处直接作为gridId)

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

@ -28,6 +28,7 @@ import com.epmet.service.evaluationindex.screen.ScreenPartyUserRankDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.List;
@ -55,10 +56,12 @@ public class ScreenPartyUserRankDataServiceImpl extends BaseServiceImpl<ScreenPa
@Override
@Transactional(rollbackFor = Exception.class)
public void dataClean(List<ScreenPartyUserRankDataEntity> dataList, String customerId, String dateId) {
int affectedRows;
do{
affectedRows = baseDao.deleteBatchByCustomerIdAndDateId(customerId,dateId);
}while (affectedRows > NumConstant.ZERO);
baseDao.insertBatch(dataList);
if(!CollectionUtils.isEmpty(dataList)) {
int affectedRows;
do {
affectedRows = baseDao.deleteBatchByCustomerIdAndDateId(customerId, dateId);
} while (affectedRows > NumConstant.ZERO);
baseDao.insertBatch(dataList);
}
}
}

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

@ -51,12 +51,11 @@ public class ScreenUserTotalDataServiceImpl extends BaseServiceImpl<ScreenUserTo
@Override
@Transactional(rollbackFor = Exception.class)
public void dataClean(List<ScreenUserTotalDataEntity> list,String customerId) {
if(!CollectionUtils.isEmpty(list)){
int deleteNum;
do {
deleteNum = baseDao.deleteUserTotalData(customerId);
} while (deleteNum > NumConstant.ZERO);
if(!CollectionUtils.isEmpty(list)){
baseDao.insertBatch(list);
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/FactParticipationUserGridDailyService.java

@ -101,5 +101,5 @@ public interface FactParticipationUserGridDailyService extends BaseService<FactP
* @author zxc
* @date 2020/9/23 9:57 上午
*/
List<UserCountResultDTO> selectUserCount(String customerId);
List<UserCountResultDTO> selectUserCount(String customerId,String dateId);
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/user/impl/FactParticipationUserGridDailyServiceImpl.java

@ -107,8 +107,8 @@ public class FactParticipationUserGridDailyServiceImpl extends BaseServiceImpl<F
* @date 2020/9/23 9:57 上午
*/
@Override
public List<UserCountResultDTO> selectUserCount(String customerId) {
return baseDao.selectUserCount(customerId);
public List<UserCountResultDTO> selectUserCount(String customerId,String dateId) {
return baseDao.selectUserCount(customerId,dateId);
}
}

1
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/user/FactParticipationUserGridDailyDao.xml

@ -118,6 +118,7 @@
fact_participation_user_grid_daily
WHERE DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
AND DATE_ID <![CDATA[ <= ]]> #{dateId}
</select>

Loading…
Cancel
Save