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;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 瓜子特殊字典
......@@ -50,4 +51,7 @@ public interface TGzAreaService extends IService<TGzArea> {
// 导出
void listExport(HttpServletResponse response, TGzAreaSearchVo searchVo);
// 获取瓜子特殊字典Map使用
Map<String, String> getGzAreaMap();
}
......@@ -43,7 +43,9 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 瓜子特殊字典
......@@ -75,6 +77,18 @@ public class TGzAreaServiceImpl extends ServiceImpl<TGzAreaMapper, TGzArea> impl
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
......
......@@ -116,6 +116,8 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
private final TGzPushEntryService tGzPushEntryService;
private final TGzAreaService tGzAreaService;
/**
* 瓜子档案表简单分页查询
......@@ -895,6 +897,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
@Override
public TGzEmpInfoPushGzVo getGzEmpInfoToPushGzById(String gzEmpId) {
TGzEmpInfoPushGzVo vo = baseMapper.getGzEmpInfoToPushGzById(gzEmpId);
if (vo != null) {
TGzEmpInfoPushGzVoAdress address = baseMapper.getGzEmpInfoToPushGzByIdAdress(gzEmpId);
TGzEmpInfoPushGzVoBank bank = baseMapper.getGzEmpInfoToPushGzByIdBank(gzEmpId);
List<TGzEmpInfoPushGzVoFamily> family = baseMapper.getGzEmpInfoToPushGzByIdFamily(gzEmpId);
......@@ -903,15 +906,57 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
List<TGzEmpInfoPushGzVoEducation> education = baseMapper.getGzEmpInfoToPushGzByIdEducation(gzEmpId);
List<TGzEmpInfoPushGzVoSkill> skill = baseMapper.getGzEmpInfoToPushGzByIdSkill(gzEmpId);
String[] directlyCityArr = {"110000", "120000", "310000", "500000"};
// 特殊处理: 是4个直辖市的,市编码和省编码一致——2026-02-03与倩倩讨论,去除此逻辑,改为从新字典中取值变更。
Map<String, String> gzMap = tGzAreaService.getGzAreaMap();
if (gzMap != null && !gzMap.isEmpty()) {
String values;
if (Common.isNotNull(vo.getHukouProvince())) {
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);
......@@ -920,6 +965,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
vo.setWorkExp(work);
vo.setEduExp(education);
vo.setSkill(skill);
}
//vo.setAttach(atta);
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