修改app显示问题
This commit is contained in:
parent
425fb04628
commit
683ddfa634
@ -78,7 +78,7 @@ public class BasePopulationInfoAppController extends AbstractController {
|
|||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@GetMapping("getbasepopulationinfobyid/{basePopulationInfoId}")
|
@GetMapping("getbasepopulationinfobyid/{basePopulationInfoId}")
|
||||||
public BasePopulationInfoDTO getBasePopulationInfoById(@RequestHeader("token") String token, @PathVariable("basePopulationInfoId") String basePopulationInfoId) throws SearchException {
|
public BasePopulationInfoDTO getBasePopulationInfoById(@RequestHeader("token") String token, @PathVariable("basePopulationInfoId") String basePopulationInfoId) throws SearchException {
|
||||||
return basePopulationInfoService.getBasePopulationInfoById(basePopulationInfoId);
|
return basePopulationInfoService.getBasePopulationInfoByIdForApp(basePopulationInfoId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "人员信息基础表列表", notes = "人员信息基础表列表接口")
|
@ApiOperation(value = "人员信息基础表列表", notes = "人员信息基础表列表接口")
|
||||||
|
@ -165,4 +165,6 @@ public interface IBasePopulationInfoService {
|
|||||||
* @param dataObj
|
* @param dataObj
|
||||||
*/
|
*/
|
||||||
void saveBasePopulationInfoImport(Map<String, Object> dataObj);
|
void saveBasePopulationInfoImport(Map<String, Object> dataObj);
|
||||||
|
|
||||||
|
BasePopulationInfoDTO getBasePopulationInfoByIdForApp(String basePopulationInfoId);
|
||||||
}
|
}
|
@ -192,12 +192,100 @@ public class BasePopulationInfoServiceImpl extends AbstractService implements IB
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BasePopulationInfoDTO getBasePopulationInfoById(String basePopulationInfoId) throws SearchException {
|
public BasePopulationInfoDTO getBasePopulationInfoById(String basePopulationInfoId) throws SearchException {
|
||||||
|
Map<String, Object> params = super.getHashMap(1);
|
||||||
|
params.put("basePopulationInfoId", basePopulationInfoId);
|
||||||
|
BasePopulationInfoDTO dto = basePopulationInfoDao.getBasePopulationInfo(params);
|
||||||
|
return dto;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BasePopulationInfoDTO getBasePopulationInfoByIdForApp(String basePopulationInfoId) {
|
||||||
Map<String, Object> params = super.getHashMap(1);
|
Map<String, Object> params = super.getHashMap(1);
|
||||||
params.put("basePopulationInfoId", basePopulationInfoId);
|
params.put("basePopulationInfoId", basePopulationInfoId);
|
||||||
BasePopulationInfoDTO dto = basePopulationInfoDao.getBasePopulationInfo(params);
|
BasePopulationInfoDTO dto = basePopulationInfoDao.getBasePopulationInfo(params);
|
||||||
if(dto != null){
|
if(dto != null){
|
||||||
DataDictionaryDTO dictDto = dataDictionaryService.getDictionaryById(dto.getGender());
|
//查询数据字典用于比对字典数据值
|
||||||
dto.setGender(dictDto.getDictionaryName());
|
List<Map<String, Object>> dicList = basePopulationInfoDao.listDictionaryAll();
|
||||||
|
for(Map<String, Object> dicItem :dicList){
|
||||||
|
String dicId = dicItem.get("dictionary_id").toString();
|
||||||
|
//性别
|
||||||
|
if(dicId.equals(dto.getGender())){
|
||||||
|
dto.setGender(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//民族
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(dto.getNation())){
|
||||||
|
dto.setNation(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//籍贯
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(dto.getNativePlace())){
|
||||||
|
dto.setNativePlace(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//政治面貌
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(dto.getPoliticalStatus())){
|
||||||
|
dto.setPoliticalStatus(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//婚姻状况
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(dto.getMaritalStatus())){
|
||||||
|
dto.setMaritalStatus(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//学历
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(dto.getEducation())){
|
||||||
|
dto.setEducation(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//宗教信仰
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(dto.getReligion())){
|
||||||
|
dto.setReligion(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//职业类别
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(dto.getOccupationCategory())){
|
||||||
|
dto.setOccupationCategory(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//处理籍贯
|
||||||
|
String[] nativePlaceStr = dto.getNativePlace().split("&");
|
||||||
|
if(nativePlaceStr.length > 0 && !"".equals(nativePlaceStr[0])){
|
||||||
|
String str = "";
|
||||||
|
for(int i = 0 ; i < nativePlaceStr.length; i++){
|
||||||
|
if(i + 1 == nativePlaceStr.length){
|
||||||
|
DataAreaDTO areaById = dataAreaService.getAreaById(nativePlaceStr[i]);
|
||||||
|
str += areaById.getAreaName();
|
||||||
|
} else {
|
||||||
|
DataAreaDTO areaById = dataAreaService.getAreaById(nativePlaceStr[i]);
|
||||||
|
str += areaById.getAreaName() + "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dto.setNativePlace(str);
|
||||||
|
}
|
||||||
|
//处理户籍地
|
||||||
|
String[] registeredResidenceStr = dto.getRegisteredResidence().split("&");
|
||||||
|
if(registeredResidenceStr.length > 0 && !"".equals(registeredResidenceStr[0])){
|
||||||
|
String str = "";
|
||||||
|
for(int i = 0 ; i < registeredResidenceStr.length; i++){
|
||||||
|
if(i + 1 == registeredResidenceStr.length){
|
||||||
|
DataAreaDTO areaById = dataAreaService.getAreaById(registeredResidenceStr[i]);
|
||||||
|
str += areaById.getAreaName();
|
||||||
|
} else {
|
||||||
|
DataAreaDTO areaById = dataAreaService.getAreaById(registeredResidenceStr[i]);
|
||||||
|
str += areaById.getAreaName() + "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dto.setRegisteredResidence(str);
|
||||||
|
}
|
||||||
|
//处理现住地
|
||||||
|
String[] currentResidenceStr = dto.getCurrentResidence().split("&");
|
||||||
|
if(currentResidenceStr.length > 0 && !"".equals(currentResidenceStr[0])){
|
||||||
|
String str = "";
|
||||||
|
for(int i = 0 ; i < currentResidenceStr.length; i++){
|
||||||
|
if(i + 1 == currentResidenceStr.length){
|
||||||
|
DataAreaDTO areaById = dataAreaService.getAreaById(currentResidenceStr[i]);
|
||||||
|
str += areaById.getAreaName();
|
||||||
|
} else {
|
||||||
|
DataAreaDTO areaById = dataAreaService.getAreaById(registeredResidenceStr[i]);
|
||||||
|
str += areaById.getAreaName() + "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dto.setCurrentResidence(str);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
@ -252,38 +340,47 @@ public class BasePopulationInfoServiceImpl extends AbstractService implements IB
|
|||||||
//处理籍贯
|
//处理籍贯
|
||||||
String[] nativePlaceStr = item.getNativePlace().split("&");
|
String[] nativePlaceStr = item.getNativePlace().split("&");
|
||||||
if(nativePlaceStr.length > 0 && !"".equals(nativePlaceStr[0])){
|
if(nativePlaceStr.length > 0 && !"".equals(nativePlaceStr[0])){
|
||||||
String nativePlace = "";
|
String str = "";
|
||||||
DataAreaDTO areaById = dataAreaService.getAreaById(nativePlaceStr[0]);
|
for(int i = 0 ; i < nativePlaceStr.length; i++){
|
||||||
nativePlace += areaById.getAreaName() + "-";
|
if(i + 1 == nativePlaceStr.length){
|
||||||
DataAreaDTO areaById1 = dataAreaService.getAreaById(nativePlaceStr[1]);
|
DataAreaDTO areaById = dataAreaService.getAreaById(nativePlaceStr[i]);
|
||||||
nativePlace += areaById1.getAreaName() + "-";
|
str += areaById.getAreaName();
|
||||||
DataAreaDTO areaById2 = dataAreaService.getAreaById(nativePlaceStr[2]);
|
} else {
|
||||||
nativePlace += areaById2.getAreaName();
|
DataAreaDTO areaById = dataAreaService.getAreaById(nativePlaceStr[i]);
|
||||||
item.setNativePlace(nativePlace);
|
str += areaById.getAreaName() + "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.setNativePlace(str);
|
||||||
}
|
}
|
||||||
//处理户籍地
|
//处理户籍地
|
||||||
String[] registeredResidenceStr = item.getRegisteredResidence().split("&");
|
String[] registeredResidenceStr = item.getRegisteredResidence().split("&");
|
||||||
if(registeredResidenceStr.length > 0 && !"".equals(registeredResidenceStr[0])){
|
if(registeredResidenceStr.length > 0 && !"".equals(registeredResidenceStr[0])){
|
||||||
String registeredResidence = "";
|
String str = "";
|
||||||
DataAreaDTO areaById = dataAreaService.getAreaById(registeredResidenceStr[0]);
|
for(int i = 0 ; i < registeredResidenceStr.length; i++){
|
||||||
registeredResidence += areaById.getAreaName() + "-";
|
if(i + 1 == registeredResidenceStr.length){
|
||||||
DataAreaDTO areaById1 = dataAreaService.getAreaById(registeredResidenceStr[1]);
|
DataAreaDTO areaById = dataAreaService.getAreaById(registeredResidenceStr[i]);
|
||||||
registeredResidence += areaById1.getAreaName() + "-";
|
str += areaById.getAreaName();
|
||||||
DataAreaDTO areaById2 = dataAreaService.getAreaById(registeredResidenceStr[2]);
|
} else {
|
||||||
registeredResidence += areaById2.getAreaName();
|
DataAreaDTO areaById = dataAreaService.getAreaById(registeredResidenceStr[i]);
|
||||||
item.setRegisteredResidence(registeredResidence);
|
str += areaById.getAreaName() + "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.setRegisteredResidence(str);
|
||||||
}
|
}
|
||||||
//处理现住地
|
//处理现住地
|
||||||
String[] currentResidenceStr = item.getCurrentResidence().split("&");
|
String[] currentResidenceStr = item.getCurrentResidence().split("&");
|
||||||
if(currentResidenceStr.length > 0 && !"".equals(currentResidenceStr[0])){
|
if(currentResidenceStr.length > 0 && !"".equals(currentResidenceStr[0])){
|
||||||
String currentResidence = "";
|
String str = "";
|
||||||
DataAreaDTO areaById = dataAreaService.getAreaById(currentResidenceStr[0]);
|
for(int i = 0 ; i < currentResidenceStr.length; i++){
|
||||||
currentResidence += areaById.getAreaName() + "-";
|
if(i + 1 == currentResidenceStr.length){
|
||||||
DataAreaDTO areaById1 = dataAreaService.getAreaById(currentResidenceStr[1]);
|
DataAreaDTO areaById = dataAreaService.getAreaById(currentResidenceStr[i]);
|
||||||
currentResidence += areaById1.getAreaName() + "-";
|
str += areaById.getAreaName();
|
||||||
DataAreaDTO areaById2 = dataAreaService.getAreaById(currentResidenceStr[2]);
|
} else {
|
||||||
currentResidence += areaById2.getAreaName();
|
DataAreaDTO areaById = dataAreaService.getAreaById(registeredResidenceStr[i]);
|
||||||
item.setCurrentResidence(currentResidence);
|
str += areaById.getAreaName() + "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.setCurrentResidence(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PageInfo<BasePopulationInfoDTO> pageInfo = new PageInfo<>(basePopulationInfoDTOs);
|
PageInfo<BasePopulationInfoDTO> pageInfo = new PageInfo<>(basePopulationInfoDTOs);
|
||||||
@ -307,9 +404,87 @@ public class BasePopulationInfoServiceImpl extends AbstractService implements IB
|
|||||||
if(populationInfoDTO == null){
|
if(populationInfoDTO == null){
|
||||||
return new BasePopulationInfoDTO();
|
return new BasePopulationInfoDTO();
|
||||||
}
|
}
|
||||||
if(!"".equals(populationInfoDTO.getGender())){
|
//查询数据字典用于比对字典数据值
|
||||||
DataDictionaryDTO dictDto = dataDictionaryService.getDictionaryById(populationInfoDTO.getGender());
|
List<Map<String, Object>> dicList = basePopulationInfoDao.listDictionaryAll();
|
||||||
populationInfoDTO.setGender(dictDto == null ? "" : dictDto.getDictionaryName());
|
for(Map<String, Object> dicItem :dicList){
|
||||||
|
String dicId = dicItem.get("dictionary_id").toString();
|
||||||
|
//性别
|
||||||
|
if(dicId.equals(populationInfoDTO.getGender())){
|
||||||
|
populationInfoDTO.setGender(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//民族
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(populationInfoDTO.getNation())){
|
||||||
|
populationInfoDTO.setNation(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//籍贯
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(populationInfoDTO.getNativePlace())){
|
||||||
|
populationInfoDTO.setNativePlace(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//政治面貌
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(populationInfoDTO.getPoliticalStatus())){
|
||||||
|
populationInfoDTO.setPoliticalStatus(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//婚姻状况
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(populationInfoDTO.getMaritalStatus())){
|
||||||
|
populationInfoDTO.setMaritalStatus(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//学历
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(populationInfoDTO.getEducation())){
|
||||||
|
populationInfoDTO.setEducation(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//宗教信仰
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(populationInfoDTO.getReligion())){
|
||||||
|
populationInfoDTO.setReligion(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
//职业类别
|
||||||
|
if(dicItem.get("dictionary_id").toString().equals(populationInfoDTO.getOccupationCategory())){
|
||||||
|
populationInfoDTO.setOccupationCategory(dicItem.get("dictionary_name").toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//处理籍贯
|
||||||
|
String[] nativePlaceStr = populationInfoDTO.getNativePlace().split("&");
|
||||||
|
if(nativePlaceStr.length > 0 && !"".equals(nativePlaceStr[0])){
|
||||||
|
String str = "";
|
||||||
|
for(int i = 0 ; i < nativePlaceStr.length; i++){
|
||||||
|
if(i + 1 == nativePlaceStr.length){
|
||||||
|
DataAreaDTO areaById = dataAreaService.getAreaById(nativePlaceStr[i]);
|
||||||
|
str += areaById.getAreaName();
|
||||||
|
} else {
|
||||||
|
DataAreaDTO areaById = dataAreaService.getAreaById(nativePlaceStr[i]);
|
||||||
|
str += areaById.getAreaName() + "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
populationInfoDTO.setNativePlace(str);
|
||||||
|
}
|
||||||
|
//处理户籍地
|
||||||
|
String[] registeredResidenceStr = populationInfoDTO.getRegisteredResidence().split("&");
|
||||||
|
if(registeredResidenceStr.length > 0 && !"".equals(registeredResidenceStr[0])){
|
||||||
|
String str = "";
|
||||||
|
for(int i = 0 ; i < registeredResidenceStr.length; i++){
|
||||||
|
if(i + 1 == registeredResidenceStr.length){
|
||||||
|
DataAreaDTO areaById = dataAreaService.getAreaById(registeredResidenceStr[i]);
|
||||||
|
str += areaById.getAreaName();
|
||||||
|
} else {
|
||||||
|
DataAreaDTO areaById = dataAreaService.getAreaById(registeredResidenceStr[i]);
|
||||||
|
str += areaById.getAreaName() + "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
populationInfoDTO.setRegisteredResidence(str);
|
||||||
|
}
|
||||||
|
//处理现住地
|
||||||
|
String[] currentResidenceStr = populationInfoDTO.getCurrentResidence().split("&");
|
||||||
|
if(currentResidenceStr.length > 0 && !"".equals(currentResidenceStr[0])){
|
||||||
|
String str = "";
|
||||||
|
for(int i = 0 ; i < currentResidenceStr.length; i++){
|
||||||
|
if(i + 1 == currentResidenceStr.length){
|
||||||
|
DataAreaDTO areaById = dataAreaService.getAreaById(currentResidenceStr[i]);
|
||||||
|
str += areaById.getAreaName();
|
||||||
|
} else {
|
||||||
|
DataAreaDTO areaById = dataAreaService.getAreaById(registeredResidenceStr[i]);
|
||||||
|
str += areaById.getAreaName() + "-";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
populationInfoDTO.setCurrentResidence(str);
|
||||||
}
|
}
|
||||||
return populationInfoDTO;
|
return populationInfoDTO;
|
||||||
}
|
}
|
||||||
|
@ -226,6 +226,7 @@
|
|||||||
<if test="idCardNumber != null and idCardNumber != ''">
|
<if test="idCardNumber != null and idCardNumber != ''">
|
||||||
AND t1.id_card_number = #{idCardNumber}
|
AND t1.id_card_number = #{idCardNumber}
|
||||||
</if>
|
</if>
|
||||||
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 人员信息基础表列表 -->
|
<!-- 人员信息基础表列表 -->
|
||||||
|
Loading…
Reference in New Issue
Block a user