Commit 5d995e2c authored by hongguangwu's avatar hongguangwu

1.7.20-瓜子新需求

parent 9025c56b
...@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzAreaSearchVo; ...@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzAreaSearchVo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 瓜子特殊字典 * 瓜子特殊字典
...@@ -50,4 +51,7 @@ public interface TGzAreaService extends IService<TGzArea> { ...@@ -50,4 +51,7 @@ public interface TGzAreaService extends IService<TGzArea> {
// 导出 // 导出
void listExport(HttpServletResponse response, TGzAreaSearchVo searchVo); void listExport(HttpServletResponse response, TGzAreaSearchVo searchVo);
// 获取瓜子特殊字典Map使用
Map<String, String> getGzAreaMap();
} }
...@@ -43,7 +43,9 @@ import javax.servlet.http.HttpServletResponse; ...@@ -43,7 +43,9 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 瓜子特殊字典 * 瓜子特殊字典
...@@ -75,6 +77,18 @@ public class TGzAreaServiceImpl extends ServiceImpl<TGzAreaMapper, TGzArea> impl ...@@ -75,6 +77,18 @@ public class TGzAreaServiceImpl extends ServiceImpl<TGzAreaMapper, TGzArea> impl
return baseMapper.getTGzAreaCountByCode(areaCode, id); return baseMapper.getTGzAreaCountByCode(areaCode, id);
} }
@Override
public Map<String, String> getGzAreaMap() {
List<TGzArea> list = baseMapper.getTGzAreaList(null);
Map<String, String> map = new HashMap<>();
if (list != null && !list.isEmpty()) {
for (TGzArea tGzArea : list) {
map.put(tGzArea.getAreaCode(), tGzArea.getGzCode());
}
}
return map;
}
/** /**
* 瓜子地址映射表批量导出 * 瓜子地址映射表批量导出
* @return * @return
......
...@@ -116,6 +116,8 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -116,6 +116,8 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
private final TGzPushEntryService tGzPushEntryService; private final TGzPushEntryService tGzPushEntryService;
private final TGzAreaService tGzAreaService;
/** /**
* 瓜子档案表简单分页查询 * 瓜子档案表简单分页查询
...@@ -895,31 +897,75 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -895,31 +897,75 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
@Override @Override
public TGzEmpInfoPushGzVo getGzEmpInfoToPushGzById(String gzEmpId) { public TGzEmpInfoPushGzVo getGzEmpInfoToPushGzById(String gzEmpId) {
TGzEmpInfoPushGzVo vo = baseMapper.getGzEmpInfoToPushGzById(gzEmpId); TGzEmpInfoPushGzVo vo = baseMapper.getGzEmpInfoToPushGzById(gzEmpId);
TGzEmpInfoPushGzVoAdress address = baseMapper.getGzEmpInfoToPushGzByIdAdress(gzEmpId); if (vo != null) {
TGzEmpInfoPushGzVoBank bank = baseMapper.getGzEmpInfoToPushGzByIdBank(gzEmpId); TGzEmpInfoPushGzVoAdress address = baseMapper.getGzEmpInfoToPushGzByIdAdress(gzEmpId);
List<TGzEmpInfoPushGzVoFamily> family = baseMapper.getGzEmpInfoToPushGzByIdFamily(gzEmpId); TGzEmpInfoPushGzVoBank bank = baseMapper.getGzEmpInfoToPushGzByIdBank(gzEmpId);
List<TGzEmpInfoPushGzVoContact> contact = baseMapper.getGzEmpInfoToPushGzByIdContact(gzEmpId); List<TGzEmpInfoPushGzVoFamily> family = baseMapper.getGzEmpInfoToPushGzByIdFamily(gzEmpId);
List<TGzEmpInfoPushGzVoWork> work = baseMapper.getGzEmpInfoToPushGzByIdWork(gzEmpId); List<TGzEmpInfoPushGzVoContact> contact = baseMapper.getGzEmpInfoToPushGzByIdContact(gzEmpId);
List<TGzEmpInfoPushGzVoEducation> education = baseMapper.getGzEmpInfoToPushGzByIdEducation(gzEmpId); List<TGzEmpInfoPushGzVoWork> work = baseMapper.getGzEmpInfoToPushGzByIdWork(gzEmpId);
List<TGzEmpInfoPushGzVoSkill> skill = baseMapper.getGzEmpInfoToPushGzByIdSkill(gzEmpId); List<TGzEmpInfoPushGzVoEducation> education = baseMapper.getGzEmpInfoToPushGzByIdEducation(gzEmpId);
List<TGzEmpInfoPushGzVoSkill> skill = baseMapper.getGzEmpInfoToPushGzByIdSkill(gzEmpId);
String[] directlyCityArr = {"110000", "120000", "310000", "500000"};
// 特殊处理: 是4个直辖市的,市编码和省编码一致 // 特殊处理: 是4个直辖市的,市编码和省编码一致——2026-02-03与倩倩讨论,去除此逻辑,改为从新字典中取值变更。
if (ArrayUtils.contains(directlyCityArr, vo.getHukouProvince())) { Map<String, String> gzMap = tGzAreaService.getGzAreaMap();
vo.setHukouCity(vo.getHukouProvince()); if (gzMap != null && !gzMap.isEmpty()) {
} String values;
if (ArrayUtils.contains(directlyCityArr, address.getStateId())) { if (Common.isNotNull(vo.getHukouProvince())) {
address.setCityId(address.getStateId()); values = gzMap.get(vo.getHukouProvince());
if (Common.isNotNull(values)) {
vo.setHukouProvince(values);
}
}
if (Common.isNotNull(vo.getHukouCity())) {
values = gzMap.get(vo.getHukouCity());
if (Common.isNotNull(values)) {
vo.setHukouCity(values);
}
}
if (Common.isNotNull(vo.getHukouCounty())) {
values = gzMap.get(vo.getHukouCounty());
if (Common.isNotNull(values)) {
vo.setHukouCounty(values);
}
}
if (address != null) {
if (Common.isNotNull(address.getStateId())) {
values = gzMap.get(address.getStateId());
if (Common.isNotNull(values)) {
address.setStateId(values);
}
}
if (Common.isNotNull(address.getCityId())) {
values = gzMap.get(address.getCityId());
if (Common.isNotNull(values)) {
address.setCityId(values);
}
}
if (Common.isNotNull(address.getCountyId())) {
values = gzMap.get(address.getCountyId());
if (Common.isNotNull(values)) {
address.setCountyId(values);
}
}
}
}
/*String[] directlyCityArr = {"110000", "120000", "310000", "500000"};
// 特殊处理: 是4个直辖市的,市编码和省编码一致
if (ArrayUtils.contains(directlyCityArr, vo.getHukouProvince())) {
vo.setHukouCity(vo.getHukouProvince());
}
if (ArrayUtils.contains(directlyCityArr, address.getStateId())) {
address.setCityId(address.getStateId());
}*/
//List<TGzEmpInfoPushGzVoAtta> atta = baseMapper.getGzEmpInfoToPushGzByIdAtta(gzEmpId);
vo.setAddress(address);
vo.setBankAccount(bank);
vo.setFamily(family);
vo.setEmergContact(contact);
vo.setWorkExp(work);
vo.setEduExp(education);
vo.setSkill(skill);
} }
//List<TGzEmpInfoPushGzVoAtta> atta = baseMapper.getGzEmpInfoToPushGzByIdAtta(gzEmpId);
vo.setAddress(address);
vo.setBankAccount(bank);
vo.setFamily(family);
vo.setEmergContact(contact);
vo.setWorkExp(work);
vo.setEduExp(education);
vo.setSkill(skill);
//vo.setAttach(atta); //vo.setAttach(atta);
return vo; return vo;
......
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