Commit 347f9ad1 authored by litengwei's avatar litengwei

代码提交

parent c15892cf
...@@ -59,7 +59,7 @@ public class PeasantHouseholdDto extends BaseDto { ...@@ -59,7 +59,7 @@ public class PeasantHouseholdDto extends BaseDto {
private String permanentAddress; private String permanentAddress;
@ApiModelProperty(value = "常住地址Arr") @ApiModelProperty(value = "常住地址Arr")
private String permanentAddressArr; private String[] permanentAddressArr;
@ApiModelProperty(value = "是否勘察 0,1") @ApiModelProperty(value = "是否勘察 0,1")
private Integer surveyOrNot; private Integer surveyOrNot;
......
...@@ -75,4 +75,10 @@ public class SurveyInformationDto extends BaseDto { ...@@ -75,4 +75,10 @@ public class SurveyInformationDto extends BaseDto {
@ApiModelProperty(value = "常住地址") @ApiModelProperty(value = "常住地址")
private String permanentAddress; private String permanentAddress;
@ApiModelProperty(value = "项目地址Arr")
private Integer[] projectAddressArr;
@ApiModelProperty(value = "常住地址Arr")
private Integer[] permanentAddressArr;
} }
...@@ -49,7 +49,7 @@ public class SurveyInformation extends BaseEntity { ...@@ -49,7 +49,7 @@ public class SurveyInformation extends BaseEntity {
/** /**
* 业务员id * 业务员id
*/ */
@TableField("salesman _id") @TableField("salesman_id")
private String salesmanId; private String salesmanId;
/** /**
......
package com.yeejoin.amos.boot.module.hygf.biz.service.impl; package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.dto.*; import com.yeejoin.amos.boot.module.hygf.api.dto.*;
...@@ -11,6 +12,8 @@ import com.yeejoin.amos.boot.module.hygf.api.util.BeanDtoUtils; ...@@ -11,6 +12,8 @@ import com.yeejoin.amos.boot.module.hygf.api.util.BeanDtoUtils;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.systemctl.Systemctl; import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.RegionModel; import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
...@@ -91,36 +94,50 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD ...@@ -91,36 +94,50 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
SurveyInfoAllDto surveyInfoAllDto = new SurveyInfoAllDto(); SurveyInfoAllDto surveyInfoAllDto = new SurveyInfoAllDto();
SurveyInformation surveyInformation = this.getById(surveyInformationId); LambdaQueryWrapper<SurveyInformation> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SurveyInformation::getSequenceNbr, surveyInformationId);
SurveyInformation surveyInformation = this.baseMapper.selectOne(queryWrapper);
surveyInfoAllDto.setSurveyInformation(BeanDtoUtils.convert(surveyInformation, SurveyInformationDto.class)); surveyInfoAllDto.setSurveyInformation(BeanDtoUtils.convert(surveyInformation, SurveyInformationDto.class));
QueryWrapper<PeasantHousehold> peasantHouseholdQueryWrapper = new QueryWrapper<>(); QueryWrapper<PeasantHousehold> peasantHouseholdQueryWrapper = new QueryWrapper<>();
peasantHouseholdQueryWrapper.eq("surveyInformationId", surveyInformationId); peasantHouseholdQueryWrapper.eq("survey_information_id", surveyInformationId);
PeasantHousehold peasantHousehold = peasantHouseholdServiceImpl.getBaseMapper().selectOne(peasantHouseholdQueryWrapper); PeasantHousehold peasantHousehold = peasantHouseholdServiceImpl.getBaseMapper().selectOne(peasantHouseholdQueryWrapper);
BeanUtils.copyProperties(peasantHousehold, surveyInfoAllDto.getSurveyInformation()); BeanUtils.copyProperties(peasantHousehold, surveyInfoAllDto.getSurveyInformation());
if(StringUtils.isNotEmpty(peasantHousehold.getProjectAddress())) {
String[] pArr = peasantHousehold.getProjectAddress().split(",");
Integer[] convert = (Integer[]) ConvertUtils.convert(pArr, Integer.class);
surveyInfoAllDto.getSurveyInformation().setProjectAddressArr(convert);
}
if(StringUtils.isNotEmpty(peasantHousehold.getPermanentAddress())) {
String[] eArr = peasantHousehold.getPermanentAddress().split(",");
Integer[] convert1 = (Integer[]) ConvertUtils.convert(eArr, Integer.class);
surveyInfoAllDto.getSurveyInformation().setPermanentAddressArr(convert1);
}
QueryWrapper<SurveyDetails> surveyDetailsQueryWrapper = new QueryWrapper<>(); QueryWrapper<SurveyDetails> surveyDetailsQueryWrapper = new QueryWrapper<>();
surveyDetailsQueryWrapper.eq("surveyInformationId", surveyInformationId); surveyDetailsQueryWrapper.eq("survey_information_id", surveyInformationId);
SurveyDetails surveyDetails = surveyDetailsService.getBaseMapper().selectOne(surveyDetailsQueryWrapper); SurveyDetails surveyDetails = surveyDetailsService.getBaseMapper().selectOne(surveyDetailsQueryWrapper);
surveyInfoAllDto.setSurveyDetails(BeanDtoUtils.convert(surveyDetails, SurveyDetailsDto.class)); surveyInfoAllDto.setSurveyDetails(BeanDtoUtils.convert(surveyDetails, SurveyDetailsDto.class));
QueryWrapper<Information> informationQueryWrapper = new QueryWrapper<>(); QueryWrapper<Information> informationQueryWrapper = new QueryWrapper<>();
surveyDetailsQueryWrapper.eq("surveyInformationId", surveyInformationId); surveyDetailsQueryWrapper.eq("survey_information_id", surveyInformationId);
Information information = informationService.getBaseMapper().selectOne(informationQueryWrapper); Information information = informationService.getBaseMapper().selectOne(informationQueryWrapper);
surveyInfoAllDto.setInformation(BeanDtoUtils.convert(information, InformationDto.class)); surveyInfoAllDto.setInformation(BeanDtoUtils.convert(information, InformationDto.class));
QueryWrapper<Commercial> commercialQueryWrapper = new QueryWrapper<>(); QueryWrapper<Commercial> commercialQueryWrapper = new QueryWrapper<>();
surveyDetailsQueryWrapper.eq("surveyInformationId", surveyInformationId); surveyDetailsQueryWrapper.eq("survey_information_id", surveyInformationId);
Commercial commercial = commercialService.getBaseMapper().selectOne(commercialQueryWrapper); Commercial commercial = commercialService.getBaseMapper().selectOne(commercialQueryWrapper);
surveyInfoAllDto.setCommercial(BeanDtoUtils.convert(commercial, CommercialDto.class)); surveyInfoAllDto.setCommercial(BeanDtoUtils.convert(commercial, CommercialDto.class));
QueryWrapper<ExtendedInformation> extendedInformationQueryWrapper = new QueryWrapper<>(); QueryWrapper<ExtendedInformation> extendedInformationQueryWrapper = new QueryWrapper<>();
surveyDetailsQueryWrapper.eq("surveyInformationId", surveyInformationId); surveyDetailsQueryWrapper.eq("survey_information_id", surveyInformationId);
ExtendedInformation extendedInformation = extendedInformationService.getBaseMapper().selectOne(extendedInformationQueryWrapper); ExtendedInformation extendedInformation = extendedInformationService.getBaseMapper().selectOne(extendedInformationQueryWrapper);
surveyInfoAllDto.setExtendedInformation(BeanDtoUtils.convert(extendedInformation, ExtendedInformationDto.class)); surveyInfoAllDto.setExtendedInformation(BeanDtoUtils.convert(extendedInformation, ExtendedInformationDto.class));
......
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