|
@@ -154,12 +154,6 @@ public class PersonService {
|
|
|
resVO.setTypeName(PersonTypeEnum.getValueToName(resVO.getType()));
|
|
|
resVO.setGenderName(GenderEnum.getValueToName(resVO.getGender()));
|
|
|
resVO.setCredentialsTypeName(CredentialsTypeEnum.getValueToName(resVO.getCredentialsType()));
|
|
|
-
|
|
|
- try {
|
|
|
- resVO.setImageUrl(new URL(resVO.getImage()));
|
|
|
- } catch (Exception e){
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
Long communityId1 = resVO.getCommunityId();
|
|
|
if(communityId1 != null){
|
|
|
IdenCommunity idenCommunity = this.idenCommunityService.getById(communityId1);
|
|
@@ -210,22 +204,22 @@ public class PersonService {
|
|
|
}
|
|
|
|
|
|
List<IdenPerson> list = this.idenPersonService.list(queryWrapper);
|
|
|
- List<PersonVO> records = new ArrayList<>();
|
|
|
+ List<PersonExcelVO> records = new ArrayList<>();
|
|
|
if (CollUtil.isNotEmpty(list)) {
|
|
|
list.forEach(item->{
|
|
|
- PersonVO resVO = new PersonVO();
|
|
|
+ PersonExcelVO resVO = new PersonExcelVO();
|
|
|
BeanUtils.copyProperties(item,resVO);
|
|
|
- resVO.setPopulationTypeName(PopulationTypeEnum.getValueToName(resVO.getPopulationType()));
|
|
|
- resVO.setTypeName(PersonTypeEnum.getValueToName(resVO.getType()));
|
|
|
- resVO.setGenderName(GenderEnum.getValueToName(resVO.getGender()));
|
|
|
- resVO.setCredentialsTypeName(CredentialsTypeEnum.getValueToName(resVO.getCredentialsType()));
|
|
|
+ resVO.setPopulationTypeName(PopulationTypeEnum.getValueToName(item.getPopulationType()));
|
|
|
+ resVO.setTypeName(PersonTypeEnum.getValueToName(item.getType()));
|
|
|
+ resVO.setGenderName(GenderEnum.getValueToName(item.getGender()));
|
|
|
+ resVO.setCredentialsTypeName(CredentialsTypeEnum.getValueToName(item.getCredentialsType()));
|
|
|
|
|
|
try {
|
|
|
- resVO.setImageUrl(new URL(resVO.getImage()));
|
|
|
+ resVO.setImageUrl(new URL(item.getImage()));
|
|
|
} catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- Long communityId1 = resVO.getCommunityId();
|
|
|
+ Long communityId1 = item.getCommunityId();
|
|
|
if(communityId1 != null){
|
|
|
IdenCommunity idenCommunity = this.idenCommunityService.getById(communityId1);
|
|
|
if(idenCommunity != null) {
|
|
@@ -233,7 +227,7 @@ public class PersonService {
|
|
|
}
|
|
|
}
|
|
|
QueryWrapper<IdenPersonCrowdRef> queryWrapper1 = new QueryWrapper<>();
|
|
|
- queryWrapper1.lambda().eq(IdenPersonCrowdRef::getPersonId,resVO.getId());
|
|
|
+ queryWrapper1.lambda().eq(IdenPersonCrowdRef::getPersonId,item.getId());
|
|
|
List<IdenPersonCrowdRef> listIdenPersonCrowdRef = idenPersonCrowdRefService.list(queryWrapper1);
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
if (CollUtil.isNotEmpty(listIdenPersonCrowdRef)) {
|
|
@@ -260,7 +254,7 @@ public class PersonService {
|
|
|
final String fileName = URLEncoder.encode("人员表", "UTF-8");
|
|
|
response.setHeader("Content-disposition", "attachment;filename=" + fileName + System.currentTimeMillis() + ".xlsx");
|
|
|
|
|
|
- EasyExcel.write(response.getOutputStream(), PersonVO.class).sheet("人员表").doWrite(records);
|
|
|
+ EasyExcel.write(response.getOutputStream(), PersonExcelVO.class).sheet("人员表").doWrite(records);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|