diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/dtos/population/PopulationDTO.java b/src/main/java/cn/com/tenlion/systembase/pojo/dtos/population/PopulationDTO.java index e085c40..9a33876 100644 --- a/src/main/java/cn/com/tenlion/systembase/pojo/dtos/population/PopulationDTO.java +++ b/src/main/java/cn/com/tenlion/systembase/pojo/dtos/population/PopulationDTO.java @@ -314,4 +314,41 @@ public class PopulationDTO { public void setNativePlaceAddr(String 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 + '\'' + + '}'; + } } diff --git a/src/main/java/cn/com/tenlion/systembase/remote/populationmsg/IPopulationMsgService.java b/src/main/java/cn/com/tenlion/systembase/remote/populationmsg/IPopulationMsgService.java index 1be7632..c121567 100644 --- a/src/main/java/cn/com/tenlion/systembase/remote/populationmsg/IPopulationMsgService.java +++ b/src/main/java/cn/com/tenlion/systembase/remote/populationmsg/IPopulationMsgService.java @@ -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.method.RemoteGetMethod; 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 java.util.Map; + /** * @ClassName: IPopulationMsgService * @Description: 通过身份证号码,查询人口信息表中的数据 @@ -20,4 +24,7 @@ public interface IPopulationMsgService { @RemoteGetMethod("/app/basepopulationinfo/release/getByIdCardNumber/{userId}") PopulationDTO getByIdCardNumber(@RemoteServerParams String remotePath, @RemotePathParams("userId") String userId); + @RemoteGetMethod("resource/key-people-concerns/getbasepopulationinfo") + PopulationDTO getBaseInfo(@RemoteServerParams String remotePath, @RemoteQueryParamsMap Map params, @RemoteQueryParams("access_token") String access_token); + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systembase/service/keyplacepatrol/impl/KeyPlacePatrolServiceImpl.java b/src/main/java/cn/com/tenlion/systembase/service/keyplacepatrol/impl/KeyPlacePatrolServiceImpl.java index c29c298..44603dc 100644 --- a/src/main/java/cn/com/tenlion/systembase/service/keyplacepatrol/impl/KeyPlacePatrolServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systembase/service/keyplacepatrol/impl/KeyPlacePatrolServiceImpl.java @@ -262,6 +262,7 @@ public class KeyPlacePatrolServiceImpl extends DefaultBaseService implements IKe if(null != userDTO) { creator = userDTO.getUserName(); } + System.out.println("keyPlaceId = " + keyPlacePatrolVO.getKeyPlaceId()); String keyPlaceId = keyPlacePatrolVO.getKeyPlaceId(); KeyPlaceDTO keyPlaceDTO = keyPlaceService.get(keyPlaceId); if(null != keyPlaceDTO) { diff --git a/src/main/java/cn/com/tenlion/systembase/util/fullsync/FullSyncC0011.java b/src/main/java/cn/com/tenlion/systembase/util/fullsync/FullSyncC0011.java index fd433c2..9a21911 100644 --- a/src/main/java/cn/com/tenlion/systembase/util/fullsync/FullSyncC0011.java +++ b/src/main/java/cn/com/tenlion/systembase/util/fullsync/FullSyncC0011.java @@ -37,7 +37,7 @@ public class FullSyncC0011 implements ApplicationEventPublisherAware { public FullSyncC0011() {} - @KafkaListener(topics = "C0032FullSync") + @KafkaListener(topics = "C0011FullSync") public void message(ConsumerRecord record) { System.out.println("收到全量同步命令"); 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) { JSONObject jsonObject = JSONObject.parseObject(record.value().toString()); Map params = new HashMap<>(); diff --git a/src/main/java/cn/com/tenlion/systembase/util/fullsync/FullSyncC0016.java b/src/main/java/cn/com/tenlion/systembase/util/fullsync/FullSyncC0016.java index e3e0472..65265d6 100644 --- a/src/main/java/cn/com/tenlion/systembase/util/fullsync/FullSyncC0016.java +++ b/src/main/java/cn/com/tenlion/systembase/util/fullsync/FullSyncC0016.java @@ -9,6 +9,7 @@ import cn.com.tenlion.systembase.service.school.ISchoolService; import cn.com.tenlion.systembase.service.schoolkey.ISchoolKeyService; import com.alibaba.fastjson.JSONObject; import ink.wgink.exceptions.SearchException; +import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationEventPublisher; @@ -91,7 +92,7 @@ public class FullSyncC0016 implements ApplicationEventPublisherAware { PopulationDTO populationDTO = getByIdCardNumber(schoolKeyDTO.getBaseId()); schoolKeyVO.setFullName(populationDTO.getFullName()); schoolKeyVO.setNameUsedBefore(populationDTO.getNameUsedBefore()); - schoolKeyVO.setGender(populationDTO.getGender()); + schoolKeyVO.setGender(populationDTO.getGenderDictionaryName()); schoolKeyVO.setDegreeOfHarmName(schoolKeyDTO.getDegreeOfHarmName()); schoolKeyVO.setIsFollow(schoolKeyDTO.getIsFollow()); schoolKeyVO.setLocationCode(schoolKeyDTO.getLocationCode()); @@ -103,7 +104,12 @@ public class FullSyncC0016 implements ApplicationEventPublisherAware { public PopulationDTO getByIdCardNumber(String cardNumber) { String url = "http://10.25.242.190:37210/population"; - PopulationDTO populationDTO = populationMsgService.getByIdCardNumber(url, cardNumber); + Map 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; } diff --git a/src/main/java/cn/com/tenlion/systembase/util/fullsync/FullSyncC0020.java b/src/main/java/cn/com/tenlion/systembase/util/fullsync/FullSyncC0020.java index 796cc93..484471e 100644 --- a/src/main/java/cn/com/tenlion/systembase/util/fullsync/FullSyncC0020.java +++ b/src/main/java/cn/com/tenlion/systembase/util/fullsync/FullSyncC0020.java @@ -56,6 +56,7 @@ public class FullSyncC0020 implements ApplicationEventPublisherAware { if(null != keyPlacePatrolDTOList && keyPlacePatrolDTOList.size() > 0) { for(KeyPlacePatrolDTO keyPlacePatrolDTO: keyPlacePatrolDTOList) { params = HashMapUtil.beanToMap(keyPlacePatrolDTO); + System.out.println("keyPlacePatrolDTO.getKeyPlaceId() = " + keyPlacePatrolDTO.getKeyPlaceId()); KeyPlaceDTO keyPlaceDTO = keyPlaceService.get(keyPlacePatrolDTO.getKeyPlaceId()); KeyPlacePatrolVO keyPlacePatrolVO = setData(keyPlacePatrolDTO, keyPlaceDTO); String creator = keyPlacePatrolService.getUserData(params, keyPlacePatrolVO); @@ -89,6 +90,7 @@ public class FullSyncC0020 implements ApplicationEventPublisherAware { throw new SearchException("当前对象为空,请注意查看"); } KeyPlacePatrolVO keyPlacePatrolVO = new KeyPlacePatrolVO(); + keyPlacePatrolVO.setKeyPlaceId(keyPlaceDTO.getKeyPlaceId()); keyPlacePatrolVO.setKeyPlaceName(keyPlaceDTO.getPlaceName()); keyPlacePatrolVO.setPatrolTime(keyPlacePatrolDTO.getPatrolTime()); return keyPlacePatrolVO; diff --git a/src/main/resources/mybatis/mapper/schoolkey/school-key-mapper.xml b/src/main/resources/mybatis/mapper/schoolkey/school-key-mapper.xml index d4b7cd6..364c6a6 100644 --- a/src/main/resources/mybatis/mapper/schoolkey/school-key-mapper.xml +++ b/src/main/resources/mybatis/mapper/schoolkey/school-key-mapper.xml @@ -68,8 +68,8 @@ #{location}, #{locationCode}, #{grid}, + #{longitude}, #{latitude}, - #{location}, #{creator}, #{gmtCreate}, #{modifier}, @@ -162,7 +162,7 @@ t1.location_code, t1.grid, t1.latitude, - t1.location, + t1.longitude, t1.school_key_id FROM data_school_key t1 @@ -227,8 +227,8 @@ t1.location, t1.location_code, t1.grid, + t1.longitude, t1.latitude, - t1.location, 1 FROM data_school_key t1 diff --git a/src/main/resources/templates/schoolkey/save.html b/src/main/resources/templates/schoolkey/save.html index feb5881..6d92216 100644 --- a/src/main/resources/templates/schoolkey/save.html +++ b/src/main/resources/templates/schoolkey/save.html @@ -319,7 +319,7 @@ for(var i in data) { dataFormData[i] = data[i] +''; } - dataFormData['baseId'] = dataFormData['basePopulationInfoId']; + dataFormData['baseId'] = dataFormData['idCardNumber']; dataFormData['fullName'] = dataFormData['fullName']; dataFormData['gender'] = dataFormData['genderDictionaryName']; dataFormData['cardNum'] = dataFormData['idCardNumber']; diff --git a/src/main/resources/templates/schoolkey/update.html b/src/main/resources/templates/schoolkey/update.html index 3fcb837..7a25ff6 100644 --- a/src/main/resources/templates/schoolkey/update.html +++ b/src/main/resources/templates/schoolkey/update.html @@ -333,7 +333,7 @@ for(var i in data) { dataFormData[i] = data[i] +''; } - dataFormData['baseId'] = dataFormData['basePopulationInfoId']; + dataFormData['baseId'] = dataFormData['idCardNumber']; dataFormData['fullName'] = dataFormData['fullName']; dataFormData['gender'] = dataFormData['genderDictionaryName']; dataFormData['cardNum'] = dataFormData['idCardNumber']; @@ -398,7 +398,7 @@ form.val('dataForm', dataFormData); form.render(null, 'dataForm'); initDegreeOfHarmSelect(data['degreeOfHarm'] + ',' + data['degreeOfHarmCode']); - queryBasePopulationInfo(data['cardNum']); + queryBasePopulationInfo(data['baseId']); initGridSelect(data['locationCode'], data['grid']); initSchoolSelect(data['schoolId']); if('view' == isView) {