|
|
@ -1,14 +1,19 @@ |
|
|
|
package com.epmet.datareport.service.screen.impl; |
|
|
|
|
|
|
|
import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; |
|
|
|
import com.epmet.datareport.dao.screen.ScreenCustomerGridDao; |
|
|
|
import com.epmet.screen.dto.form.BranchFormDTO; |
|
|
|
import com.epmet.screen.dto.form.ParymemberFormDTO; |
|
|
|
import com.epmet.screen.dto.form.UserFormDTO; |
|
|
|
import com.epmet.screen.dto.result.BranchResultDTO; |
|
|
|
import com.epmet.screen.dto.result.ParymemberResultDTO; |
|
|
|
import com.epmet.screen.dto.result.UserResultDTO; |
|
|
|
import com.epmet.screen.dto.result.*; |
|
|
|
import com.epmet.screen.constant.*; |
|
|
|
import com.epmet.datareport.service.screen.DistributionService; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
|
* 中央区相关各指标查询 |
|
|
|
* |
|
|
@ -18,6 +23,11 @@ import org.springframework.stereotype.Service; |
|
|
|
@Service |
|
|
|
public class DistributionServiceImpl implements DistributionService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ScreenCustomerGridDao screenCustomerGridDao; |
|
|
|
@Autowired |
|
|
|
private ScreenCustomerAgencyDao screenCustomerAgencyDao; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 1、党支部 |
|
|
|
* @param formDTO |
|
|
@ -25,8 +35,9 @@ public class DistributionServiceImpl implements DistributionService { |
|
|
|
* @date 2020/8/18 10:59 上午 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public BranchResultDTO branch(BranchFormDTO formDTO) { |
|
|
|
return null; |
|
|
|
public List<BranchResultDTO> branch(BranchFormDTO formDTO) { |
|
|
|
List<BranchResultDTO> branchResultDTOS = screenCustomerGridDao.selectBranch(formDTO.getAgencyId()); |
|
|
|
return branchResultDTOS; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -37,7 +48,20 @@ public class DistributionServiceImpl implements DistributionService { |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public UserResultDTO user(UserFormDTO userFormDTO) { |
|
|
|
return null; |
|
|
|
UserResultDTO userResult = new UserResultDTO(); |
|
|
|
CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(userFormDTO.getAgencyId()); |
|
|
|
if (null == agencyAreaInfo){ |
|
|
|
return userResult; |
|
|
|
} |
|
|
|
BeanUtils.copyProperties(agencyAreaInfo,userResult); |
|
|
|
if (userResult.getLevel().equals(ScreenConstant.COMMUNITY)){ |
|
|
|
List<UserDistributionResultDTO> userDistributionResultDTOS = screenCustomerGridDao.selectUserDistribution(userFormDTO.getAgencyId()); |
|
|
|
userResult.setUserDistribution(userDistributionResultDTOS); |
|
|
|
}else { |
|
|
|
List<UserDistributionResultDTO> userDistributionResultDTOS = screenCustomerAgencyDao.selectUserDistributionAgency(userFormDTO.getAgencyId()); |
|
|
|
userResult.setUserDistribution(userDistributionResultDTOS); |
|
|
|
} |
|
|
|
return userResult; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -48,6 +72,19 @@ public class DistributionServiceImpl implements DistributionService { |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public ParymemberResultDTO parymember(ParymemberFormDTO parymemberFormDTO) { |
|
|
|
return null; |
|
|
|
ParymemberResultDTO parymemberResult = new ParymemberResultDTO(); |
|
|
|
CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(parymemberFormDTO.getAgencyId()); |
|
|
|
if (null == agencyAreaInfo){ |
|
|
|
return parymemberResult; |
|
|
|
} |
|
|
|
BeanUtils.copyProperties(agencyAreaInfo,parymemberResult); |
|
|
|
if (parymemberResult.getLevel().equals(ScreenConstant.COMMUNITY)){ |
|
|
|
List<ParymemberDistributionResultDTO> parymemberDistributionResultDTOS = screenCustomerGridDao.selectParymemberDistribution(parymemberFormDTO.getAgencyId()); |
|
|
|
parymemberResult.setUserDistribution(parymemberDistributionResultDTOS); |
|
|
|
}else { |
|
|
|
List<ParymemberDistributionResultDTO> parymemberDistributionResultDTOS = screenCustomerAgencyDao.selectParymemberDistribution(parymemberFormDTO.getAgencyId()); |
|
|
|
parymemberResult.setUserDistribution(parymemberDistributionResultDTOS); |
|
|
|
} |
|
|
|
return parymemberResult; |
|
|
|
} |
|
|
|
} |
|
|
|