Commit 655bc7d2 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP-1.7.3-shuiyou' into MVP-1.7.3-shuiyou

parents 1e7edc13 9d58b762
...@@ -120,52 +120,4 @@ public class IdCardUtil { ...@@ -120,52 +120,4 @@ public class IdCardUtil {
} }
return sex; return sex;
} }
/**
* @param idNum 身份证
* @Description: 获取身份证的性别-汉字(已知身份证正确)
* @Author: hgw
* @Date: 2024/12/11 17:00
* @return: java.lang.String
**/
public static String getSexName(String idNum){
String sex = "男";
if(idNum != null) {
String sexString = "";
if (idNum.length() == 18) {
sexString = idNum.substring(16, 17);
} else if (idNum.length() == 15) {
sexString = idNum.substring(14, 15);
}
try {
// 判断性别
if (Integer.parseInt(sexString) % 2 == 0) {
sex = "女";
}
} catch (Exception e) {
sex = "男";
}
}
return sex;
}
/**
* @param idNum 身份证
* @Description: 获取身份证的年月日(已知身份证正确)
* @Author: hgw
* @Date: 2024/12/11 17:07
* @return: java.lang.String
**/
public static String getBirthStr(String idNum) {
String birthStr = "1990-01-01";
if (idNum != null) {
if (idNum.length() == 18) {
birthStr = idNum.substring(6,10) + "-" + idNum.substring(10,12) + "-" + idNum.substring(12,14);
} else if(idNum.length()==15){
birthStr = "19" +idNum.substring(6,8) + "-" + idNum.substring(8,10) + "-" + idNum.substring(10,12);
}
}
return birthStr;
}
} }
...@@ -72,6 +72,7 @@ public class SociaFriendYgsAddVo implements Serializable { ...@@ -72,6 +72,7 @@ public class SociaFriendYgsAddVo implements Serializable {
//其他20 法律、行政法规规定的其他情形 //其他20 法律、行政法规规定的其他情形
//合同期满12 劳动合同期满 //合同期满12 劳动合同期满
//单位辞退2 劳动者严重违反用人单位的规章制度 //单位辞退2 劳动者严重违反用人单位的规章制度
// 其他的默认 个人辞职1 劳动者提前30天书面通知解除或试用期提前3天通知解除合同 2024-12-12 09:19:59 昨晚盛宇沟通的结果
@ExcelProperty("减少原因") @ExcelProperty("减少原因")
private String reduceReason; private String reduceReason;
......
...@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.social.config; ...@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.social.config;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yifu.cloud.plus.v1.yifu.archives.util.IdCardUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException; import com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
...@@ -177,9 +176,9 @@ public class SocialFriendConfig { ...@@ -177,9 +176,9 @@ public class SocialFriendConfig {
cbrymdOne.put("gj", "中国"); cbrymdOne.put("gj", "中国");
// 性别 // 性别
//cbrymdOne.put("xb", "男") //cbrymdOne.put("xb", "男")
cbrymdOne.put("xb", IdCardUtil.getSexName(vo.getEmpIdcard())); cbrymdOne.put("xb", getSexName(vo.getEmpIdcard()));
// 出生日期 // 出生日期
cbrymdOne.put("csrq", IdCardUtil.getBirthStr(vo.getEmpIdcard())); cbrymdOne.put("csrq", getBirthStr(vo.getEmpIdcard()));
// 民族 空的默认汉族 // 民族 空的默认汉族
cbrymdOne.put("mz", vo.getEmpNational()); cbrymdOne.put("mz", vo.getEmpNational());
// 手机号码 // 手机号码
...@@ -345,7 +344,7 @@ public class SocialFriendConfig { ...@@ -345,7 +344,7 @@ public class SocialFriendConfig {
* @Date: 2024-12-9 16:54:22 * @Date: 2024-12-9 16:54:22
* @return: java.lang.String * @return: java.lang.String
**/ **/
public R<FriendResult> getFriendByRequestId(RestTemplate restTemplate, String requestId) { public FriendResult getFriendByRequestId(RestTemplate restTemplate, String requestId) {
if (Common.isEmpty(requestId)) { if (Common.isEmpty(requestId)) {
return null; return null;
} }
...@@ -379,10 +378,7 @@ public class SocialFriendConfig { ...@@ -379,10 +378,7 @@ public class SocialFriendConfig {
FriendResult result = new FriendResult(); FriendResult result = new FriendResult();
// 组装返回结果 // 组装返回结果
getResultToVo(dataResultList, result); getResultToVo(dataResultList, result);
if (Common.isNotNull(result.getIdCard())) { return result;
return R.ok(result);
}
return R.failed(result);
} }
// 组装返回结果 // 组装返回结果
...@@ -451,4 +447,51 @@ public class SocialFriendConfig { ...@@ -451,4 +447,51 @@ public class SocialFriendConfig {
return treeMap; return treeMap;
} }
/**
* @param idNum 身份证
* @Description: 获取身份证的性别-汉字(已知身份证正确)
* @Author: hgw
* @Date: 2024/12/11 17:00
* @return: java.lang.String
**/
public static String getSexName(String idNum) {
String sex = "男";
if (idNum != null) {
String sexString = "";
if (idNum.length() == 18) {
sexString = idNum.substring(16, 17);
} else if (idNum.length() == 15) {
sexString = idNum.substring(14, 15);
}
try {
// 判断性别
if (Integer.parseInt(sexString) % 2 == 0) {
sex = "女";
}
} catch (Exception e) {
sex = "男";
}
}
return sex;
}
/**
* @param idNum 身份证
* @Description: 获取身份证的年月日(已知身份证正确)
* @Author: hgw
* @Date: 2024/12/11 17:07
* @return: java.lang.String
**/
public static String getBirthStr(String idNum) {
String birthStr = "1990-01-01";
if (idNum != null) {
if (idNum.length() == 18) {
birthStr = idNum.substring(6, 10) + "-" + idNum.substring(10, 12) + "-" + idNum.substring(12, 14);
} else if (idNum.length() == 15) {
birthStr = "19" + idNum.substring(6, 8) + "-" + idNum.substring(8, 10) + "-" + idNum.substring(10, 12);
}
}
return birthStr;
}
} }
...@@ -28,9 +28,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; ...@@ -28,9 +28,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.check.entity.TCheckMobile; import com.yifu.cloud.plus.v1.check.entity.TCheckMobile;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo; import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaMap; import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
...@@ -129,6 +130,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -129,6 +130,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if (Common.isEmpty(sysHouseHoldInfo.getAuditUser()) || Common.isEmpty(sysHouseHoldInfo.getHandleUser())) { if (Common.isEmpty(sysHouseHoldInfo.getAuditUser()) || Common.isEmpty(sysHouseHoldInfo.getHandleUser())) {
return R.failed("审核人或办理人必填!"); return R.failed("审核人或办理人必填!");
} }
//获取行政区化代码
if (CommonConstants.ZERO_STRING.equals(sysHouseHoldInfo.getType())) {
HashMap<String, SysArea> map = initAreaMap();
if (Common.isNotNull(map) && map.size() > 0) {
SysArea area = map.get(sysHouseHoldInfo.getCity());
if (Common.isNotNull(area)) {
sysHouseHoldInfo.setAreaCode(area.getAreaCode());
}
}
}
baseMapper.insert(sysHouseHoldInfo); baseMapper.insert(sysHouseHoldInfo);
//维护附件信息 //维护附件信息
if (Common.isNotNull(sysHouseHoldInfo.getAttaId())) { if (Common.isNotNull(sysHouseHoldInfo.getAttaId())) {
...@@ -225,6 +236,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -225,6 +236,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
.ge(SysBaseSetInfo::getApplyEndDate,DateUtil.getCurrentDateTime()))) > CommonConstants.ZERO_INT){ .ge(SysBaseSetInfo::getApplyEndDate,DateUtil.getCurrentDateTime()))) > CommonConstants.ZERO_INT){
return R.failed("户下存在可用基数配置,请禁用可用基数配置后禁用户配置!"); return R.failed("户下存在可用基数配置,请禁用可用基数配置后禁用户配置!");
} }
//更新行政区划代码
if (CommonConstants.ZERO_STRING.equals(hold.getType()) && Common.isNotNull(hold.getCity())) {
HashMap<String, SysArea> map = initAreaMap();
if (Common.isNotNull(map) && map.size() > 0) {
SysArea area = map.get(hold.getCity());
if (Common.isNotNull(area)) {
hold.setAreaCode(area.getAreaCode());
}
}
}
int res = baseMapper.updateById(hold); int res = baseMapper.updateById(hold);
if (res >= 0){ if (res >= 0){
if (isEdit) { if (isEdit) {
...@@ -401,11 +422,8 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -401,11 +422,8 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
return; return;
} }
//获取所有区域数据 //获取所有区域数据
Map<String,String> areaMap = new HashMap<>(); HashMap<String, SysArea> areaMap = initAreaMap();
R<AreaMap> areaListR = upmsDaprUtils.getAreaMapR(); if (Common.isEmpty(areaMap)) {
if (null != areaListR && !Common.isEmpty(areaListR.getData())) {
areaMap = areaListR.getData().getIdLabelMap();
} else {
errorMessageList.add(new ErrorMessage(1, "获取区域数据失败")); errorMessageList.add(new ErrorMessage(1, "获取区域数据失败"));
} }
//获取所有的人员信息 //获取所有的人员信息
...@@ -433,10 +451,10 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -433,10 +451,10 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
excel.setOrganName(excel.getOrganName().trim()); excel.setOrganName(excel.getOrganName().trim());
SysHouseHoldInfo household = new SysHouseHoldInfo(); SysHouseHoldInfo household = new SysHouseHoldInfo();
BeanCopyUtils.copyProperties(excel,household); BeanCopyUtils.copyProperties(excel,household);
excel.setProvince(areaMap.get(excel.getProvince())); excel.setProvince(areaMap.get(excel.getProvince()).getAreaName());
excel.setCity(areaMap.get(excel.getCity())); excel.setCity(areaMap.get(excel.getCity()).getAreaName());
if (Common.isNotNull(excel.getTown())) { if (Common.isNotNull(excel.getTown())) {
excel.setTown(areaMap.get(excel.getTown())); excel.setTown(areaMap.get(excel.getTown()).getAreaName());
} }
//判断模板中是否有户重复的数据 //判断模板中是否有户重复的数据
if (null == exitNameMap.get(excel.getName())) { if (null == exitNameMap.get(excel.getName())) {
...@@ -490,6 +508,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -490,6 +508,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
continue; continue;
} }
//封装和插入数据 //封装和插入数据
household.setAreaCode(areaMap.get(household.getCity()).getAreaCode());
household.setAutoStatus(excel.getAutoStatus().equals(CommonConstants.IS_TRUE) ? "0" : "1"); household.setAutoStatus(excel.getAutoStatus().equals(CommonConstants.IS_TRUE) ? "0" : "1");
household.setType("0"); household.setType("0");
household.setHouseType(excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_ONE) ? "0" : "1"); household.setHouseType(excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_ONE) ? "0" : "1");
...@@ -511,11 +530,8 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -511,11 +530,8 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
return; return;
} }
//获取所有区域数据 //获取所有区域数据
Map<String,String> areaMap = new HashMap<>(); HashMap<String, SysArea> areaMap = initAreaMap();
R<AreaMap> areaListR = upmsDaprUtils.getAreaMapR(); if (Common.isEmpty(areaMap)) {
if (null != areaListR && !Common.isEmpty(areaListR.getData())) {
areaMap = areaListR.getData().getIdLabelMap();
} else {
errorMessageList.add(new ErrorMessage(1, "获取区域数据失败")); errorMessageList.add(new ErrorMessage(1, "获取区域数据失败"));
} }
//获取所有的人员信息 //获取所有的人员信息
...@@ -548,6 +564,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -548,6 +564,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if (Common.isNotNull(excel.getProvince()) && Common.isNotNull(excel.getCity())) { if (Common.isNotNull(excel.getProvince()) && Common.isNotNull(excel.getCity())) {
info.setProvince(excel.getProvince()); info.setProvince(excel.getProvince());
info.setCity(excel.getCity()); info.setCity(excel.getCity());
info.setAreaCode(areaMap.get(excel.getCity()).getAreaCode());
if (Common.isNotNull(excel.getTown())) { if (Common.isNotNull(excel.getTown())) {
info.setTown(excel.getTown()); info.setTown(excel.getTown());
} else { } else {
...@@ -555,13 +572,13 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -555,13 +572,13 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
} }
} }
if (Common.isNotNull(excel.getProvince())) { if (Common.isNotNull(excel.getProvince())) {
excel.setProvince(areaMap.get(excel.getProvince())); excel.setProvince(areaMap.get(excel.getProvince()).getAreaName());
} }
if (Common.isNotNull(excel.getCity())) { if (Common.isNotNull(excel.getCity())) {
excel.setCity(areaMap.get(excel.getCity())); excel.setCity(areaMap.get(excel.getCity()).getAreaName());
} }
if (Common.isNotNull(excel.getTown())) { if (Common.isNotNull(excel.getTown())) {
excel.setTown(areaMap.get(excel.getTown())); excel.setTown(areaMap.get(excel.getTown()).getAreaName());
} }
if (Common.isEmpty(info)){ if (Common.isEmpty(info)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_NOT_EXIT,excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_NOT_EXIT,excel));
...@@ -696,4 +713,22 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -696,4 +713,22 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
} }
baseMapper.updateById(info); baseMapper.updateById(info);
} }
//获取所有区域数据
private HashMap<String,SysArea> initAreaMap() {
HashMap<String,SysArea> areaMap = new HashMap<>();
R<AreaVo> areaListR = upmsDaprUtils.getAreaListR();
if (null == areaListR || areaListR.getCode() != CommonConstants.SUCCESS) {
return new HashMap<>();
}
AreaVo areaList = areaListR.getData();
if (null != areaList && !areaList.getSysAreaList().isEmpty()) {
for (SysArea area : areaList.getSysAreaList()) {
areaMap.put(Integer.toString(area.getId()), area);
}
} else {
return new HashMap<>();
}
return areaMap;
}
} }
...@@ -69,6 +69,44 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -69,6 +69,44 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
private final TSocialDeadlineInfoService tSocialDeadlineInfoService; private final TSocialDeadlineInfoService tSocialDeadlineInfoService;
private final TSocialSoldierLogService tSocialSoldierLogService; private final TSocialSoldierLogService tSocialSoldierLogService;
/**
* @Description: 推送到税友
* @Author: hgw
* @Date: 2024/5/10 17:53
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public R<String> pushFriendTest(List<String> dispatchIdList) {
String thisTime = DateUtil.getThisTime();
// type 1社保增 2社保减 3医保增 4医保减
int type = 1;
SociaFriendYgsAddVo vo = new SociaFriendYgsAddVo();
String id = socialFriendConfig.pushFriendByInfo(restTemplate, vo, type, thisTime);
return R.ok(id);
}
/**
* @Description: 获取结果税友
* @Author: hgw
* @Date: 2024/5/10 17:53
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public R<FriendResult> getFriendByRequestIdTest(List<String> dispatchIdList) {
FriendResult info = socialFriendConfig.getFriendByRequestId(restTemplate, "15074c814b4240a19cdb4425a7ae502c");
return R.ok(info);
}
/** /**
* @param socialList * @param socialList
* @param file * @param file
...@@ -161,33 +199,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -161,33 +199,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
return new CommonsMultipartFile(item); return new CommonsMultipartFile(item);
} }
/**
* @Description: 推送到社保士兵
* @Author: hgw
* @Date: 2024/5/10 17:53
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public R<String> pushFriendTest(List<String> dispatchIdList) {
String thisTime = DateUtil.getThisTime();
// type 1社保增 2社保减 3医保增 4医保减
int type = 1;
SociaFriendYgsAddVo vo = new SociaFriendYgsAddVo();
String id = socialFriendConfig.pushFriendByInfo(restTemplate, vo, type, thisTime);
return R.ok(id);
}
/**
* @Description: 推送到社保士兵
* @Author: hgw
* @Date: 2024/5/10 17:53
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public R<FriendResult> getFriendByRequestIdTest(List<String> dispatchIdList) {
R<FriendResult> info = socialFriendConfig.getFriendByRequestId(restTemplate, "15074c814b4240a19cdb4425a7ae502c");
return info;
}
/** /**
* @Description: 推送到社保士兵 * @Description: 推送到社保士兵
......
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