Commit 86051b9f authored by chenzhao's avatar chenzhao

勘察信息显示字段调整

parent 24bc64a9
package com.yeejoin.amos.boot.module.hygf.biz.service.impl; package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -37,6 +38,8 @@ import org.typroject.tyboot.core.rdbms.service.BaseService; ...@@ -37,6 +38,8 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* 勘察信息服务实现类 * 勘察信息服务实现类
...@@ -458,17 +461,20 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD ...@@ -458,17 +461,20 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
informationQueryWrapper.eq("survey_information_id", surveyInformationId); informationQueryWrapper.eq("survey_information_id", surveyInformationId);
Information information = informationService.getBaseMapper().selectOne(informationQueryWrapper); Information information = informationService.getBaseMapper().selectOne(informationQueryWrapper);
if(information == null){
surveyInfoAllDto.setInformation(new InformationDto());
}else {
surveyInfoAllDto.setInformation(BeanDtoUtils.convert(information, InformationDto.class));
}
QueryWrapper<Commercial> commercialQueryWrapper = new QueryWrapper<>(); QueryWrapper<Commercial> commercialQueryWrapper = new QueryWrapper<>();
commercialQueryWrapper.eq("survey_information_id", surveyInformationId); commercialQueryWrapper.eq("survey_information_id", surveyInformationId);
Commercial commercial = commercialService.getBaseMapper().selectOne(commercialQueryWrapper); Commercial commercial = commercialService.getBaseMapper().selectOne(commercialQueryWrapper);
if(commercial==null){ if(commercial==null){
commercial=new Commercial(); commercial=new Commercial();
} }
if(information == null){
surveyInfoAllDto.setInformation(new InformationDto());
}else {
information.setCardFile( null == commercial ?new ArrayList<>() :(CollectionUtil.isNotEmpty(commercial.getIdCardCredit())? commercial.getIdCardCredit():new ArrayList<>()));
surveyInfoAllDto.setInformation(BeanDtoUtils.convert(information, InformationDto.class));
}
commercial.setApplicant(peasantHousehold.getOwnersName()); commercial.setApplicant(peasantHousehold.getOwnersName());
commercial.setIdCard(peasantHousehold.getIdCard()); commercial.setIdCard(peasantHousehold.getIdCard());
commercial.setTelephone(peasantHousehold.getTelephone()); commercial.setTelephone(peasantHousehold.getTelephone());
...@@ -477,6 +483,25 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD ...@@ -477,6 +483,25 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
commercial.setProjectAddressDetail(peasantHousehold.getProjectAddressDetail()); commercial.setProjectAddressDetail(peasantHousehold.getProjectAddressDetail());
commercial.setLegalContactTelephone(peasantHousehold.getTelephone()); commercial.setLegalContactTelephone(peasantHousehold.getTelephone());
List<Object> list = new ArrayList<>();
if (null != surveyDetails){
if (CollectionUtil.isNotEmpty(surveyDetails.getSurroundingHouseSurvey())){
list.addAll(surveyDetails.getSurroundingHouseSurvey());
}
if (CollectionUtil.isNotEmpty(surveyDetails.getOverallHousingSurvey())){
list.addAll(surveyDetails.getOverallHousingSurvey());
}
if (CollectionUtil.isNotEmpty(surveyDetails.getPanoramaSurvey())){
list.addAll(surveyDetails.getPanoramaSurvey());
}
if (CollectionUtil.isNotEmpty(surveyDetails.getPlanSketchSurvey())){
list.addAll(surveyDetails.getPlanSketchSurvey());
}
if (CollectionUtil.isNotEmpty(surveyDetails.getAzimuthSurvey())){
list.addAll(surveyDetails.getAzimuthSurvey());
}
}
commercial.setSurveyPhotosWeb(list);
if(information == null){ if(information == null){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment