bug修改。

This commit is contained in:
Renpc-kilig 2022-02-09 17:28:49 +08:00
parent 1239347a90
commit 100df154b5
9 changed files with 63 additions and 10 deletions

View File

@ -314,4 +314,41 @@ public class PopulationDTO {
public void setNativePlaceAddr(String nativePlaceAddr) { public void setNativePlaceAddr(String nativePlaceAddr) {
this.nativePlaceAddr = nativePlaceAddr; this.nativePlaceAddr = nativePlaceAddr;
} }
@Override
public String toString() {
return "PopulationDTO{" +
"basePopulationInfoId='" + basePopulationInfoId + '\'' +
", idCardNumber='" + idCardNumber + '\'' +
", fullName='" + fullName + '\'' +
", nameUsedBefore='" + nameUsedBefore + '\'' +
", gender='" + gender + '\'' +
", genderDictionaryName='" + genderDictionaryName + '\'' +
", birthDate='" + birthDate + '\'' +
", nation='" + nation + '\'' +
", nationDictionaryName='" + nationDictionaryName + '\'' +
", nativePlace='" + nativePlace + '\'' +
", nativePlaceAddr='" + nativePlaceAddr + '\'' +
", nativePlaceDictionaryName='" + nativePlaceDictionaryName + '\'' +
", politicalStatus='" + politicalStatus + '\'' +
", politicalStatusDictionaryName='" + politicalStatusDictionaryName + '\'' +
", maritalStatus='" + maritalStatus + '\'' +
", maritalStatusDictionaryName='" + maritalStatusDictionaryName + '\'' +
", education='" + education + '\'' +
", educationDictionaryName='" + educationDictionaryName + '\'' +
", religion='" + religion + '\'' +
", religionDictionaryName='" + religionDictionaryName + '\'' +
", occupationCategory='" + occupationCategory + '\'' +
", occupationCategoryDictionaryName='" + occupationCategoryDictionaryName + '\'' +
", occupation='" + occupation + '\'' +
", serviceSpace='" + serviceSpace + '\'' +
", telephone='" + telephone + '\'' +
", registeredResidence='" + registeredResidence + '\'' +
", registeredResidenceDictionaryName='" + registeredResidenceDictionaryName + '\'' +
", registeredResidenceAddr='" + registeredResidenceAddr + '\'' +
", currentResidence='" + currentResidence + '\'' +
", currentResidenceDictionaryName='" + currentResidenceDictionaryName + '\'' +
", currentResidenceAddr='" + currentResidenceAddr + '\'' +
'}';
}
} }

View File

@ -4,8 +4,12 @@ import cn.com.tenlion.systembase.pojo.dtos.population.PopulationDTO;
import ink.wgink.annotation.rpc.rest.RemoteService; import ink.wgink.annotation.rpc.rest.RemoteService;
import ink.wgink.annotation.rpc.rest.method.RemoteGetMethod; import ink.wgink.annotation.rpc.rest.method.RemoteGetMethod;
import ink.wgink.annotation.rpc.rest.params.RemotePathParams; import ink.wgink.annotation.rpc.rest.params.RemotePathParams;
import ink.wgink.annotation.rpc.rest.params.RemoteQueryParams;
import ink.wgink.annotation.rpc.rest.params.RemoteQueryParamsMap;
import ink.wgink.annotation.rpc.rest.params.RemoteServerParams; import ink.wgink.annotation.rpc.rest.params.RemoteServerParams;
import java.util.Map;
/** /**
* @ClassName: IPopulationMsgService * @ClassName: IPopulationMsgService
* @Description: 通过身份证号码查询人口信息表中的数据 * @Description: 通过身份证号码查询人口信息表中的数据
@ -20,4 +24,7 @@ public interface IPopulationMsgService {
@RemoteGetMethod("/app/basepopulationinfo/release/getByIdCardNumber/{userId}") @RemoteGetMethod("/app/basepopulationinfo/release/getByIdCardNumber/{userId}")
PopulationDTO getByIdCardNumber(@RemoteServerParams String remotePath, @RemotePathParams("userId") String userId); PopulationDTO getByIdCardNumber(@RemoteServerParams String remotePath, @RemotePathParams("userId") String userId);
@RemoteGetMethod("resource/key-people-concerns/getbasepopulationinfo")
PopulationDTO getBaseInfo(@RemoteServerParams String remotePath, @RemoteQueryParamsMap Map<String, Object> params, @RemoteQueryParams("access_token") String access_token);
} }

View File

@ -262,6 +262,7 @@ public class KeyPlacePatrolServiceImpl extends DefaultBaseService implements IKe
if(null != userDTO) { if(null != userDTO) {
creator = userDTO.getUserName(); creator = userDTO.getUserName();
} }
System.out.println("keyPlaceId = " + keyPlacePatrolVO.getKeyPlaceId());
String keyPlaceId = keyPlacePatrolVO.getKeyPlaceId(); String keyPlaceId = keyPlacePatrolVO.getKeyPlaceId();
KeyPlaceDTO keyPlaceDTO = keyPlaceService.get(keyPlaceId); KeyPlaceDTO keyPlaceDTO = keyPlaceService.get(keyPlaceId);
if(null != keyPlaceDTO) { if(null != keyPlaceDTO) {

View File

@ -37,7 +37,7 @@ public class FullSyncC0011 implements ApplicationEventPublisherAware {
public FullSyncC0011() {} public FullSyncC0011() {}
@KafkaListener(topics = "C0032FullSync") @KafkaListener(topics = "C0011FullSync")
public void message(ConsumerRecord<?, ?> record) { public void message(ConsumerRecord<?, ?> record) {
System.out.println("收到全量同步命令"); System.out.println("收到全量同步命令");
JSONObject jsonObject = JSONObject.parseObject(record.value().toString()); JSONObject jsonObject = JSONObject.parseObject(record.value().toString());
@ -61,7 +61,7 @@ public class FullSyncC0011 implements ApplicationEventPublisherAware {
} }
} }
@KafkaListener(topics = "C0032") @KafkaListener(topics = "C0011")
public void messageMsg(ConsumerRecord<?, ?> record) { public void messageMsg(ConsumerRecord<?, ?> record) {
JSONObject jsonObject = JSONObject.parseObject(record.value().toString()); JSONObject jsonObject = JSONObject.parseObject(record.value().toString());
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();

View File

@ -9,6 +9,7 @@ import cn.com.tenlion.systembase.service.school.ISchoolService;
import cn.com.tenlion.systembase.service.schoolkey.ISchoolKeyService; import cn.com.tenlion.systembase.service.schoolkey.ISchoolKeyService;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import ink.wgink.exceptions.SearchException; import ink.wgink.exceptions.SearchException;
import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager;
import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisher;
@ -91,7 +92,7 @@ public class FullSyncC0016 implements ApplicationEventPublisherAware {
PopulationDTO populationDTO = getByIdCardNumber(schoolKeyDTO.getBaseId()); PopulationDTO populationDTO = getByIdCardNumber(schoolKeyDTO.getBaseId());
schoolKeyVO.setFullName(populationDTO.getFullName()); schoolKeyVO.setFullName(populationDTO.getFullName());
schoolKeyVO.setNameUsedBefore(populationDTO.getNameUsedBefore()); schoolKeyVO.setNameUsedBefore(populationDTO.getNameUsedBefore());
schoolKeyVO.setGender(populationDTO.getGender()); schoolKeyVO.setGender(populationDTO.getGenderDictionaryName());
schoolKeyVO.setDegreeOfHarmName(schoolKeyDTO.getDegreeOfHarmName()); schoolKeyVO.setDegreeOfHarmName(schoolKeyDTO.getDegreeOfHarmName());
schoolKeyVO.setIsFollow(schoolKeyDTO.getIsFollow()); schoolKeyVO.setIsFollow(schoolKeyDTO.getIsFollow());
schoolKeyVO.setLocationCode(schoolKeyDTO.getLocationCode()); schoolKeyVO.setLocationCode(schoolKeyDTO.getLocationCode());
@ -103,7 +104,12 @@ public class FullSyncC0016 implements ApplicationEventPublisherAware {
public PopulationDTO getByIdCardNumber(String cardNumber) { public PopulationDTO getByIdCardNumber(String cardNumber) {
String url = "http://10.25.242.190:37210/population"; String url = "http://10.25.242.190:37210/population";
PopulationDTO populationDTO = populationMsgService.getByIdCardNumber(url, cardNumber); Map<String, Object> params = new HashMap<>();
params.put("idCardNumber", cardNumber);
System.out.println("cardNumber = " + cardNumber);
String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken();
PopulationDTO populationDTO = populationMsgService.getBaseInfo(url, params, accessToken);
System.out.println("populationDTO = " + populationDTO.toString());
return populationDTO; return populationDTO;
} }

View File

@ -56,6 +56,7 @@ public class FullSyncC0020 implements ApplicationEventPublisherAware {
if(null != keyPlacePatrolDTOList && keyPlacePatrolDTOList.size() > 0) { if(null != keyPlacePatrolDTOList && keyPlacePatrolDTOList.size() > 0) {
for(KeyPlacePatrolDTO keyPlacePatrolDTO: keyPlacePatrolDTOList) { for(KeyPlacePatrolDTO keyPlacePatrolDTO: keyPlacePatrolDTOList) {
params = HashMapUtil.beanToMap(keyPlacePatrolDTO); params = HashMapUtil.beanToMap(keyPlacePatrolDTO);
System.out.println("keyPlacePatrolDTO.getKeyPlaceId() = " + keyPlacePatrolDTO.getKeyPlaceId());
KeyPlaceDTO keyPlaceDTO = keyPlaceService.get(keyPlacePatrolDTO.getKeyPlaceId()); KeyPlaceDTO keyPlaceDTO = keyPlaceService.get(keyPlacePatrolDTO.getKeyPlaceId());
KeyPlacePatrolVO keyPlacePatrolVO = setData(keyPlacePatrolDTO, keyPlaceDTO); KeyPlacePatrolVO keyPlacePatrolVO = setData(keyPlacePatrolDTO, keyPlaceDTO);
String creator = keyPlacePatrolService.getUserData(params, keyPlacePatrolVO); String creator = keyPlacePatrolService.getUserData(params, keyPlacePatrolVO);
@ -89,6 +90,7 @@ public class FullSyncC0020 implements ApplicationEventPublisherAware {
throw new SearchException("当前对象为空,请注意查看"); throw new SearchException("当前对象为空,请注意查看");
} }
KeyPlacePatrolVO keyPlacePatrolVO = new KeyPlacePatrolVO(); KeyPlacePatrolVO keyPlacePatrolVO = new KeyPlacePatrolVO();
keyPlacePatrolVO.setKeyPlaceId(keyPlaceDTO.getKeyPlaceId());
keyPlacePatrolVO.setKeyPlaceName(keyPlaceDTO.getPlaceName()); keyPlacePatrolVO.setKeyPlaceName(keyPlaceDTO.getPlaceName());
keyPlacePatrolVO.setPatrolTime(keyPlacePatrolDTO.getPatrolTime()); keyPlacePatrolVO.setPatrolTime(keyPlacePatrolDTO.getPatrolTime());
return keyPlacePatrolVO; return keyPlacePatrolVO;

View File

@ -68,8 +68,8 @@
#{location}, #{location},
#{locationCode}, #{locationCode},
#{grid}, #{grid},
#{longitude},
#{latitude}, #{latitude},
#{location},
#{creator}, #{creator},
#{gmtCreate}, #{gmtCreate},
#{modifier}, #{modifier},
@ -162,7 +162,7 @@
t1.location_code, t1.location_code,
t1.grid, t1.grid,
t1.latitude, t1.latitude,
t1.location, t1.longitude,
t1.school_key_id t1.school_key_id
FROM FROM
data_school_key t1 data_school_key t1
@ -227,8 +227,8 @@
t1.location, t1.location,
t1.location_code, t1.location_code,
t1.grid, t1.grid,
t1.longitude,
t1.latitude, t1.latitude,
t1.location,
1 1
FROM FROM
data_school_key t1 data_school_key t1

View File

@ -319,7 +319,7 @@
for(var i in data) { for(var i in data) {
dataFormData[i] = data[i] +''; dataFormData[i] = data[i] +'';
} }
dataFormData['baseId'] = dataFormData['basePopulationInfoId']; dataFormData['baseId'] = dataFormData['idCardNumber'];
dataFormData['fullName'] = dataFormData['fullName']; dataFormData['fullName'] = dataFormData['fullName'];
dataFormData['gender'] = dataFormData['genderDictionaryName']; dataFormData['gender'] = dataFormData['genderDictionaryName'];
dataFormData['cardNum'] = dataFormData['idCardNumber']; dataFormData['cardNum'] = dataFormData['idCardNumber'];

View File

@ -333,7 +333,7 @@
for(var i in data) { for(var i in data) {
dataFormData[i] = data[i] +''; dataFormData[i] = data[i] +'';
} }
dataFormData['baseId'] = dataFormData['basePopulationInfoId']; dataFormData['baseId'] = dataFormData['idCardNumber'];
dataFormData['fullName'] = dataFormData['fullName']; dataFormData['fullName'] = dataFormData['fullName'];
dataFormData['gender'] = dataFormData['genderDictionaryName']; dataFormData['gender'] = dataFormData['genderDictionaryName'];
dataFormData['cardNum'] = dataFormData['idCardNumber']; dataFormData['cardNum'] = dataFormData['idCardNumber'];
@ -398,7 +398,7 @@
form.val('dataForm', dataFormData); form.val('dataForm', dataFormData);
form.render(null, 'dataForm'); form.render(null, 'dataForm');
initDegreeOfHarmSelect(data['degreeOfHarm'] + ',' + data['degreeOfHarmCode']); initDegreeOfHarmSelect(data['degreeOfHarm'] + ',' + data['degreeOfHarmCode']);
queryBasePopulationInfo(data['cardNum']); queryBasePopulationInfo(data['baseId']);
initGridSelect(data['locationCode'], data['grid']); initGridSelect(data['locationCode'], data['grid']);
initSchoolSelect(data['schoolId']); initSchoolSelect(data['schoolId']);
if('view' == isView) { if('view' == isView) {